mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
makes use of the pistol bullet model, transparency for water in GUIs
This commit is contained in:
parent
a7921b73e0
commit
edb78440ca
@ -26,6 +26,7 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -54,6 +55,18 @@ public class BlockBobble extends BlockContainer {
|
||||
public Item getItemDropped(int i, Random rand, int j) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
|
||||
TileEntityBobble entity = (TileEntityBobble) world.getTileEntity(x, y, z);
|
||||
|
||||
if(entity != null) {
|
||||
return new ItemStack(this, 1, entity.type.ordinal());
|
||||
}
|
||||
|
||||
return super.getPickBlock(target, world, x, y, z, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
|
||||
@ -89,6 +89,12 @@ public class BulletConfigFactory {
|
||||
|
||||
return bullet;
|
||||
}
|
||||
public static BulletConfiguration standardPistolConfig() {
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
bullet.style = BulletConfiguration.STYLE_PISTOL;
|
||||
bullet.plink = BulletConfiguration.PLINK_BULLET;
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration standardBuckshotConfig() {
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ public class Gun22LRFactory {
|
||||
static float inaccuracy = 5;
|
||||
public static BulletConfiguration get22LRConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_22lr;
|
||||
bullet.spread *= inaccuracy;
|
||||
@ -73,7 +73,7 @@ public class Gun22LRFactory {
|
||||
|
||||
public static BulletConfiguration get22LRAPConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_22lr_ap;
|
||||
bullet.spread *= inaccuracy;
|
||||
|
||||
@ -193,7 +193,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevIronConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_iron_ammo;
|
||||
bullet.dmgMin = 8;
|
||||
@ -204,7 +204,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevSteelConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_ammo;
|
||||
bullet.dmgMin = 18;
|
||||
@ -215,7 +215,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevLeadConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_lead_ammo;
|
||||
bullet.dmgMin = 10;
|
||||
@ -229,7 +229,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevGoldConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_gold_ammo;
|
||||
bullet.dmgMin = 25;
|
||||
@ -240,7 +240,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevDeshConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_357_desh;
|
||||
bullet.dmgMin = 30;
|
||||
@ -251,7 +251,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevSchrabidiumConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_schrabidium_ammo;
|
||||
bullet.dmgMin = 10000;
|
||||
@ -263,7 +263,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevCursedConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_cursed_ammo;
|
||||
bullet.dmgMin = 18;
|
||||
@ -274,7 +274,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getRevNightmareConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_nightmare_ammo;
|
||||
bullet.dmgMin = 1;
|
||||
|
||||
@ -169,7 +169,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getNoPipConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44;
|
||||
bullet.dmgMin = 18;
|
||||
@ -180,7 +180,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getNoPipAPConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_ap;
|
||||
bullet.dmgMin = 25;
|
||||
@ -193,7 +193,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getNoPipDUConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_du;
|
||||
bullet.dmgMin = 28;
|
||||
@ -206,7 +206,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getPhosphorusConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_phosphorus;
|
||||
bullet.dmgMin = 18;
|
||||
@ -240,7 +240,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getNoPipStarConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_star;
|
||||
bullet.dmgMin = 42;
|
||||
@ -253,7 +253,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getPipConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_pip;
|
||||
bullet.dmgMin = 30;
|
||||
@ -290,7 +290,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getBJConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_bj;
|
||||
bullet.dmgMin = 30;
|
||||
@ -328,7 +328,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getSilverStormConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_silver;
|
||||
bullet.dmgMin = 30;
|
||||
|
||||
@ -54,7 +54,7 @@ public class Gun50AEFactory {
|
||||
static float inaccuracy = 0.0005F;
|
||||
public static BulletConfiguration get50AEConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50ae;
|
||||
bullet.spread *= inaccuracy;
|
||||
@ -66,7 +66,7 @@ public class Gun50AEFactory {
|
||||
|
||||
public static BulletConfiguration get50APConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50ae_ap;
|
||||
bullet.spread *= inaccuracy;
|
||||
@ -80,7 +80,7 @@ public class Gun50AEFactory {
|
||||
|
||||
public static BulletConfiguration get50DUConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50ae_du;
|
||||
bullet.spread *= inaccuracy;
|
||||
@ -94,7 +94,7 @@ public class Gun50AEFactory {
|
||||
|
||||
public static BulletConfiguration get50StarConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50ae_star;
|
||||
bullet.spread *= inaccuracy;
|
||||
|
||||
@ -77,7 +77,7 @@ public class Gun9mmFactory {
|
||||
static float inaccuracy = 5;
|
||||
public static BulletConfiguration get9mmConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_9mm;
|
||||
bullet.spread *= inaccuracy;
|
||||
@ -89,7 +89,7 @@ public class Gun9mmFactory {
|
||||
|
||||
public static BulletConfiguration get9mmAPConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_9mm_ap;
|
||||
bullet.spread *= inaccuracy;
|
||||
@ -103,7 +103,7 @@ public class Gun9mmFactory {
|
||||
|
||||
public static BulletConfiguration get9mmDUConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_9mm_du;
|
||||
bullet.spread *= inaccuracy;
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.inventory;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.interfaces.IPartiallyFillable;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -261,7 +263,9 @@ public class FluidTank {
|
||||
*/
|
||||
//TODO: add a directional parameter to allow tanks to grow horizontally
|
||||
public void renderTank(int x, int y, double z, int width, int height) {
|
||||
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
y -= height;
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(type.getTexture());
|
||||
@ -285,6 +289,8 @@ public class FluidTank {
|
||||
tessellator.addVertexWithUV(maxX, minY, z, maxU, minV);
|
||||
tessellator.addVertexWithUV(minX, minY, z, minU, minV);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
public void renderTankInfo(GuiInfoContainer gui, int mouseX, int mouseY, int x, int y, int width, int height) {
|
||||
@ -293,24 +299,8 @@ public class FluidTank {
|
||||
List<String> list = new ArrayList();
|
||||
list.add(I18n.format(this.type.getUnlocalizedName()));
|
||||
list.add(fluid + "/" + maxFluid + "mB");
|
||||
|
||||
/*if(type.temperature < 0)
|
||||
list.add(EnumChatFormatting.BLUE + "" + type.temperature + "°C");
|
||||
if(type.temperature > 0)
|
||||
list.add(EnumChatFormatting.RED + "" + type.temperature + "°C");
|
||||
if(type.isAntimatter())
|
||||
list.add(EnumChatFormatting.DARK_RED + "Antimatter");
|
||||
if(type.traits.contains(FluidTrait.CORROSIVE))
|
||||
list.add(EnumChatFormatting.YELLOW + "Corrosive");
|
||||
if(type.traits.contains(FluidTrait.CORROSIVE_2))
|
||||
list.add(EnumChatFormatting.GOLD + "Strongly Corrosive");
|
||||
if(type.traits.contains(FluidTrait.NO_CONTAINER))
|
||||
list.add(EnumChatFormatting.RED + "Cannot be stored in any universal tank");
|
||||
if(type.traits.contains(FluidTrait.LEAD_CONTAINER))
|
||||
list.add(EnumChatFormatting.YELLOW + "Requires hazardous material tank to hold");*/
|
||||
|
||||
type.addInfo(list);
|
||||
|
||||
gui.drawFluidInfo(list.toArray(new String[0]), mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
@ -329,7 +319,7 @@ public class FluidTank {
|
||||
if(max > 0)
|
||||
maxFluid = nbt.getInteger(s + "_max");
|
||||
|
||||
type = FluidType.getEnumFromName(nbt.getString(s + "_type")); //compat
|
||||
type = Fluids.fromName(nbt.getString(s + "_type")); //compat
|
||||
if(type == Fluids.NONE)
|
||||
type = Fluids.fromID(nbt.getInteger(s + "_type"));
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 2.0 KiB |
Loading…
x
Reference in New Issue
Block a user