From 46ea5754b9b318dacd9e3d4aeef97c2712cdbcca Mon Sep 17 00:00:00 2001 From: HbmMods Date: Sat, 14 Jul 2018 18:33:49 +0200 Subject: [PATCH] More work on better reactor, "fixed" potions crashing on SMP --- assets/hbm/textures/gui/gui_reactor_small.png | Bin 2808 -> 3589 bytes .../gui/gui_reactor_small_overlay.png | Bin 0 -> 5722 bytes com/hbm/blocks/bomb/BlockTaint.java | 4 +- com/hbm/blocks/generic/BlockOre.java | 8 +- com/hbm/blocks/test/TestEventTester.java | 5 +- com/hbm/entity/projectile/EntityModBeam.java | 4 +- .../inventory/gui/GUIMachineReactorSmall.java | 69 ++++++++--- com/hbm/items/ModItems.java | 24 ++-- com/hbm/items/special/ItemFuelRod.java | 12 -- com/hbm/items/special/ItemRadioactive.java | 28 ++--- com/hbm/main/MainRegistry.java | 17 ++- com/hbm/main/ModEventHandler.java | 4 +- com/hbm/packet/AuxGaugePacket.java | 4 +- com/hbm/potion/HbmPotion.java | 115 ++++++++++++++++++ com/hbm/potion/PotionEffectBang.java | 59 --------- com/hbm/potion/PotionEffectRadiation.java | 80 ------------ com/hbm/potion/PotionEffectTaint.java | 61 ---------- .../deco/TileEntityYellowBarrel.java | 18 +-- .../TileEntityMachineReactorSmall.java | 78 ++++++++---- .../machine/TileEntityReactorMultiblock.java | 4 +- 20 files changed, 283 insertions(+), 311 deletions(-) create mode 100644 assets/hbm/textures/gui/gui_reactor_small_overlay.png create mode 100644 com/hbm/potion/HbmPotion.java delete mode 100644 com/hbm/potion/PotionEffectBang.java delete mode 100644 com/hbm/potion/PotionEffectRadiation.java delete mode 100644 com/hbm/potion/PotionEffectTaint.java diff --git a/assets/hbm/textures/gui/gui_reactor_small.png b/assets/hbm/textures/gui/gui_reactor_small.png index 7dfce4066324c80e1e9031853a4f9fb86ffcc430..064445911bff73d69b031bf26799f3dea9cef56e 100644 GIT binary patch literal 3589 zcmd^Bi9gg^8-KrIg^ zDj^cGWQmffT#^=DWQlUcdB=VKiTCq)pXZ#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RuemwJP7; znUlvFBvCT5#>;z8dDM!Q6g@HrDVz434s|c;!s2F@O#4v*&_y;T(2Gwl*F}m};6TnV zKY@;lcbQ~zF5QU;emip<)^mXUQ^iuvI5kigO^zB}yq3+wh-*P&$*q^t2WCh+-~;|g zlUuua=Nyz_b_4rd=MJlC`wwHW^GhETvE3mL<`$$`vG)f}KxUhf=M~=;VqXly^7-=K z78J`M)u9w#`dx7D=Q;-&@Yzle{;Z(;tOHwlGkD(n!8a+qLdXea?MD#{d&%Xq<~XC~ zmeWRL#Ym@!l~!w@!$Qc9f(&7{KABVap*-d)K0{ID7N_J1YQncauehW4=^43GR!Hl0z zEq{*29S~NsEtl`2-AY?sbvD7I;0B}gHBryblnYw_JRRNE>TS+ldS!l-tGK)?+`2LI$H`V?S9V5F+w?wb+C* z{m;ijf-e@re9_=byfGYXHCMlEkCj8CotmLOA-|oifiiB>^}7}diN$?thBD*y)3FIpi84tE4ZaO{6U;bu=XXOWZ<=#r z!ZY6*iGcuycS0)uDN#>MHn#5Mrq=y^+FOHceQ9kts&xrB$wx_GMagKxL*xICsFpq^ z7&;*Y@sc6&H9=(+_{-hdIMt_ZVcX)+b?{yM_>!gd|Lw9h$t{K2YW@>rQtU$PVO+?z zzOP91LWTH^E}}fvU?+k%Kd*V+nV!u?VyN}?oKOs2RuY7IY(PY{5-@#fP8rE&;IhUD zH#p%E&W)L4%lXfG+uw4EukYu2{oejzJ!4|G-t~=~8Zue4Z}{Q66N>YZXQP{(-|4Gy zm-H{R_?HFmA>iqMSMF`R=KWdUq%&qm))#D9qYrMsh%A_>+WRp^ONNR1+n(e9q5kg$ a?O4(O5NYu-uuE@r)60xtX;f+GcH>_TU(&1q diff --git a/assets/hbm/textures/gui/gui_reactor_small_overlay.png b/assets/hbm/textures/gui/gui_reactor_small_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..4b3f80995683e9c0b9cf20d5adc92a32e5c200e5 GIT binary patch literal 5722 zcmcgwi9eKG`#<-Lu@l)IOJ*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jxv2t*MxC z1J^p5od3k?cvJORuY@YLTwvGD3*(c1nHL{M%;^TUHar{e#b$VAgm)~ASA-|(HE#U$ z3S93<)KVHS_Rd(QJsGFF%KKPdyFR>!S@kLv7Y;c@1c@8S6U!PlE-ggErhFlY&r;E)15^8H5s zfC7T>z7y)B-M8T@#0CnxepZZ~+Ix~7sm@X?!p4$anTGDN^jS&g-679=_35>$A-8(> z7wwKCpJE2Od)NDlvP*iE>Wwr*ihJ+6=hqiXRa-INyJNRM605dgsuum}J|`Ofyw{LE zq{{Lr(vPh<%Pe(Ixm{zy>~@#BU31zerniNDR<+E98Brt^pRO2E)|=}7{C2u(nJv@2 zXtX{m{_fjKWN1)au2DkyWe|`&U}0Au(sjyut{tC7WQ}K list = new ArrayList(); - PotionEffect effect = new PotionEffect(PotionEffectTaint.instance.id, 15 * 20, level); + PotionEffect effect = new PotionEffect(HbmPotion.taint.id, 15 * 20, level); effect.setCurativeItems(list); if(entity instanceof EntityLivingBase) if(world.rand.nextInt(50) == 0) diff --git a/com/hbm/blocks/generic/BlockOre.java b/com/hbm/blocks/generic/BlockOre.java index a2c2f93f0..e8e8ecc58 100644 --- a/com/hbm/blocks/generic/BlockOre.java +++ b/com/hbm/blocks/generic/BlockOre.java @@ -7,7 +7,7 @@ import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; -import com.hbm.potion.PotionEffectRadiation; +import com.hbm.potion.HbmPotion; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -192,21 +192,21 @@ public class BlockOre extends Block { { if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity)) { } else { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 45 * 20, 20)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 45 * 20, 20)); } } if (entity instanceof EntityLivingBase && this == ModBlocks.block_waste) { if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity)) { } else { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 60 * 20, 20)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 20)); } } if (entity instanceof EntityLivingBase && (this == ModBlocks.waste_trinitite || this == ModBlocks.waste_trinitite_red)) { if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity)) { } else { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 30 * 20, 10)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 10)); } } diff --git a/com/hbm/blocks/test/TestEventTester.java b/com/hbm/blocks/test/TestEventTester.java index 6d108f92b..49b53a1c3 100644 --- a/com/hbm/blocks/test/TestEventTester.java +++ b/com/hbm/blocks/test/TestEventTester.java @@ -16,8 +16,7 @@ import com.hbm.explosion.ExplosionNukeRay; import com.hbm.explosion.ExplosionNukeRay.FloatTriplet; import com.hbm.main.MainRegistry; import com.hbm.main.ModEventHandler; -import com.hbm.potion.PotionEffectBang; -import com.hbm.potion.PotionEffectTaint; +import com.hbm.potion.HbmPotion; import com.hbm.saveddata.SatelliteSaveStructure; import com.hbm.saveddata.SatelliteSavedData; import com.hbm.world.Meteorite; @@ -262,7 +261,7 @@ public class TestEventTester extends Block { /*if(!worldObj.isRemote) buildEvent(worldObj, par2, par3, par4, 30);*/ - ((EntityLivingBase)par5EntityPlayer).addPotionEffect(new PotionEffect(PotionEffectBang.instance.id, 100, 0)); + ((EntityLivingBase)par5EntityPlayer).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 100, 0)); return true; } diff --git a/com/hbm/entity/projectile/EntityModBeam.java b/com/hbm/entity/projectile/EntityModBeam.java index 0b0a7480d..8be5adf27 100644 --- a/com/hbm/entity/projectile/EntityModBeam.java +++ b/com/hbm/entity/projectile/EntityModBeam.java @@ -17,7 +17,7 @@ import com.hbm.explosion.ExplosionThermo; import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; import com.hbm.main.MainRegistry; -import com.hbm.potion.PotionEffectBang; +import com.hbm.potion.HbmPotion; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -336,7 +336,7 @@ public class EntityModBeam extends Entity implements IProjectile } if(movingobjectposition.entityHit instanceof EntityLivingBase) { - ((EntityLivingBase)movingobjectposition.entityHit).addPotionEffect(new PotionEffect(PotionEffectBang.instance.id, 60, 0)); + ((EntityLivingBase)movingobjectposition.entityHit).addPotionEffect(new PotionEffect(HbmPotion.bang.id, 60, 0)); } else { explode(); } diff --git a/com/hbm/inventory/gui/GUIMachineReactorSmall.java b/com/hbm/inventory/gui/GUIMachineReactorSmall.java index 83dfd1585..5a894f939 100644 --- a/com/hbm/inventory/gui/GUIMachineReactorSmall.java +++ b/com/hbm/inventory/gui/GUIMachineReactorSmall.java @@ -18,9 +18,11 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; public class GUIMachineReactorSmall extends GuiInfoContainer { - + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_small.png"); + private static ResourceLocation overlay = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_small_overlay.png"); private TileEntityMachineReactorSmall diFurnace; + private boolean toggleOverlay = false; public GUIMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall tedf) { super(new ContainerMachineReactorSmall(invPlayer, tedf)); @@ -36,7 +38,9 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 36, 16, 52); diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 36, 16, 52); - this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 108, 88, 7, diFurnace.power, diFurnace.powerMax); + this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 108, 88, 4, diFurnace.power, diFurnace.powerMax); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 114, 88, 4, new String[] { "Hull Temperature:", " " + Math.round((diFurnace.hullHeat) * 0.00001 * 2480 + 20) + "°C" }); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((diFurnace.coreHeat) * 0.00002 * 980 + 20) + "°C" }); } @Override @@ -60,7 +64,12 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + + if(toggleOverlay) + Minecraft.getMinecraft().getTextureManager().bindTexture(overlay); + else + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); if(diFurnace.power > 0) { @@ -68,31 +77,42 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { i = (int) Math.min(i, 88); - drawTexturedModalRect(guiLeft + 80, guiTop + 108, 0, 222, i, 7); + drawTexturedModalRect(guiLeft + 80, guiTop + 108, 0, 222, i, 4); } - if(diFurnace.heat > 0) { - int i = diFurnace.getHeatScaled(88); + + if(diFurnace.hasHullHeat()) { + int i = diFurnace.getHullHeatScaled(88); i = (int) Math.min(i, 160); - drawTexturedModalRect(guiLeft + 80, guiTop + 117, 0, 229, i, 7); + drawTexturedModalRect(guiLeft + 80, guiTop + 114, 0, 226, i, 4); + } + + if(diFurnace.hasCoreHeat()) { + int i = diFurnace.getCoreHeatScaled(88); + + i = (int) Math.min(i, 160); + + drawTexturedModalRect(guiLeft + 80, guiTop + 120, 0, 230, i, 4); } if(!diFurnace.retracting) drawTexturedModalRect(guiLeft + 52, guiTop + 53, 212, 0, 18, 18); - if(diFurnace.rods >= diFurnace.rodsMax) { - - for(int x = 0; x < 3; x++) - for(int y = 0; y < 3; y++) - drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 176, 0, 18, 18); - - } else if(diFurnace.rods > 0) { - - for(int x = 0; x < 3; x++) - for(int y = 0; y < 3; y++) - drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 194, 0, 18, 18); - + if(!toggleOverlay) { + if(diFurnace.rods >= diFurnace.rodsMax) { + + for(int x = 0; x < 3; x++) + for(int y = 0; y < 3; y++) + drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 176, 0, 18, 18); + + } else if(diFurnace.rods > 0) { + + for(int x = 0; x < 3; x++) + for(int y = 0; y < 3; y++) + drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 194, 0, 18, 18); + + } } Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[0].getSheet()); @@ -100,4 +120,15 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[1].getSheet()); diFurnace.tanks[1].renderTank(this, guiLeft + 26, guiTop + 88, diFurnace.tanks[1].getTankType().textureX() * FluidTank.x, diFurnace.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52); } + + protected void keyTyped(char p_73869_1_, int p_73869_2_) + { + super.keyTyped(p_73869_1_, p_73869_2_); + + if (p_73869_2_ == 56) + { + this.toggleOverlay = !this.toggleOverlay; + } + + } } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index addf23948..ebb3d59ab 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -1761,18 +1761,18 @@ public class ModItems { rod_quad_schrabidium = new ItemCustomLore().setUnlocalizedName("rod_quad_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium"); rod_quad_solinium = new ItemCustomLore().setUnlocalizedName("rod_quad_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_solinium"); - rod_uranium_fuel = new ItemFuelRod(10000, 100).setUnlocalizedName("rod_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel"); - rod_dual_uranium_fuel = new ItemFuelRod(20000, 100).setUnlocalizedName("rod_dual_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel"); - rod_quad_uranium_fuel = new ItemFuelRod(40000, 100).setUnlocalizedName("rod_quad_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel"); - rod_plutonium_fuel = new ItemFuelRod(25000, 250).setUnlocalizedName("rod_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel"); - rod_dual_plutonium_fuel = new ItemFuelRod(50000, 250).setUnlocalizedName("rod_dual_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel"); - rod_quad_plutonium_fuel = new ItemFuelRod(100000, 250).setUnlocalizedName("rod_quad_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel"); - rod_mox_fuel = new ItemFuelRod(100000, 75).setUnlocalizedName("rod_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel"); - rod_dual_mox_fuel = new ItemFuelRod(200000, 75).setUnlocalizedName("rod_dual_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel"); - rod_quad_mox_fuel = new ItemFuelRod(400000, 75).setUnlocalizedName("rod_quad_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel"); - rod_schrabidium_fuel = new ItemFuelRod(2500000, 1000).setUnlocalizedName("rod_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel"); - rod_dual_schrabidium_fuel = new ItemFuelRod(5000000, 1000).setUnlocalizedName("rod_dual_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel"); - rod_quad_schrabidium_fuel = new ItemFuelRod(10000000, 1000).setUnlocalizedName("rod_quad_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel"); + rod_uranium_fuel = new ItemFuelRod(100000, 15).setUnlocalizedName("rod_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel"); + rod_dual_uranium_fuel = new ItemFuelRod(100000, 30).setUnlocalizedName("rod_dual_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel"); + rod_quad_uranium_fuel = new ItemFuelRod(100000, 60).setUnlocalizedName("rod_quad_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel"); + rod_plutonium_fuel = new ItemFuelRod(75000, 25).setUnlocalizedName("rod_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel"); + rod_dual_plutonium_fuel = new ItemFuelRod(75000, 50).setUnlocalizedName("rod_dual_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel"); + rod_quad_plutonium_fuel = new ItemFuelRod(75000, 100).setUnlocalizedName("rod_quad_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel"); + rod_mox_fuel = new ItemFuelRod(150000, 10).setUnlocalizedName("rod_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel"); + rod_dual_mox_fuel = new ItemFuelRod(150000, 20).setUnlocalizedName("rod_dual_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel"); + rod_quad_mox_fuel = new ItemFuelRod(150000, 40).setUnlocalizedName("rod_quad_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel"); + rod_schrabidium_fuel = new ItemFuelRod(500000, 250).setUnlocalizedName("rod_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel"); + rod_dual_schrabidium_fuel = new ItemFuelRod(500000, 500).setUnlocalizedName("rod_dual_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel"); + rod_quad_schrabidium_fuel = new ItemFuelRod(500000, 1000).setUnlocalizedName("rod_quad_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel"); rod_water = new ItemCustomLore().setUnlocalizedName("rod_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_water"); rod_dual_water = new ItemCustomLore().setUnlocalizedName("rod_dual_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_water"); diff --git a/com/hbm/items/special/ItemFuelRod.java b/com/hbm/items/special/ItemFuelRod.java index 18adffe9d..7b120d746 100644 --- a/com/hbm/items/special/ItemFuelRod.java +++ b/com/hbm/items/special/ItemFuelRod.java @@ -26,84 +26,72 @@ public class ItemFuelRod extends ItemRadioactive { if(this == ModItems.rod_uranium_fuel) { - list.add("Generates 100 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_dual_uranium_fuel) { - list.add("Generates 100 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_quad_uranium_fuel) { - list.add("Generates 100 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_plutonium_fuel) { - list.add("Generates 150 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_dual_plutonium_fuel) { - list.add("Generates 150 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_quad_plutonium_fuel) { - list.add("Generates 150 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_mox_fuel) { - list.add("Generates 50 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_dual_mox_fuel) { - list.add("Generates 50 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_quad_mox_fuel) { - list.add("Generates 50 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_schrabidium_fuel) { - list.add("Generates 25000 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_dual_schrabidium_fuel) { - list.add("Generates 25000 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } if(this == ModItems.rod_quad_schrabidium_fuel) { - list.add("Generates 25000 power per tick"); list.add("Generates " + heat + " heat per tick"); list.add("Lasts " + lifeTime + " ticks"); } diff --git a/com/hbm/items/special/ItemRadioactive.java b/com/hbm/items/special/ItemRadioactive.java index b1d0f6c28..0cf2ad890 100644 --- a/com/hbm/items/special/ItemRadioactive.java +++ b/com/hbm/items/special/ItemRadioactive.java @@ -3,7 +3,7 @@ package com.hbm.items.special; import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; -import com.hbm.potion.PotionEffectRadiation; +import com.hbm.potion.HbmPotion; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -44,7 +44,7 @@ public class ItemRadioactive extends Item { this == ModItems.pellet_mes || this == ModItems.pellet_neptunium || this == ModItems.pellet_schrabidium) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 80 * 20, 25)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 25)); } //Strong @@ -78,7 +78,7 @@ public class ItemRadioactive extends Item { this == ModItems.gadget_core || this == ModItems.man_core || this == ModItems.nuclear_waste) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 60 * 20, 20)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 20)); } //Strong Nuggets @@ -98,7 +98,7 @@ public class ItemRadioactive extends Item { this == ModItems.rod_uranium_fuel_depleted || this == ModItems.rod_plutonium_fuel_depleted || this == ModItems.rod_mox_fuel_depleted) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 45 * 20, 20)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 45 * 20, 20)); } //Medium @@ -116,7 +116,7 @@ public class ItemRadioactive extends Item { this == ModItems.mike_core || this == ModItems.tsar_core || this == ModItems.trinitite) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 30 * 20, 15)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 15)); } //Medium Nuggets @@ -128,7 +128,7 @@ public class ItemRadioactive extends Item { this == ModItems.rod_pu238 || this == ModItems.rod_plutonium || this == ModItems.pellet_rtg_weak) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 20 * 20, 15)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 20 * 20, 15)); } //Weak @@ -141,7 +141,7 @@ public class ItemRadioactive extends Item { this == ModItems.rod_dual_u238 || this == ModItems.rod_quad_pu238 || this == ModItems.rod_dual_pu238) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 20 * 20, 5)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 20 * 20, 5)); } //Weak Nuggets @@ -155,19 +155,19 @@ public class ItemRadioactive extends Item { this == ModItems.rod_dual_tritium || this == ModItems.rod_quad_tritium || this == ModItems.powder_yellowcake) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 10 * 20, 5)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 10 * 20, 5)); } //Powder if (this == ModItems.powder_neptunium || this == ModItems.powder_plutonium) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 60 * 20, 20)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 20)); living.setFire(5); } if (this == ModItems.powder_uranium) { - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 20 * 20, 5)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 20 * 20, 5)); living.setFire(5); } @@ -191,7 +191,7 @@ public class ItemRadioactive extends Item { this == ModItems.rod_dual_schrabidium_fuel || this == ModItems.rod_quad_schrabidium_fuel) { living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0)); - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 100 * 20, 30)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 100 * 20, 30)); } if (this == ModItems.nugget_schrabidium || @@ -200,18 +200,18 @@ public class ItemRadioactive extends Item { this == ModItems.nugget_hes || this == ModItems.nugget_les) { living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0)); - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 75 * 20, 30)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 75 * 20, 30)); } if (this == ModItems.plate_schrabidium || this == ModItems.wire_schrabidium) { living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0)); - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 80 * 20, 30)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 30)); } if (this == ModItems.powder_schrabidium) { living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0)); - living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 100 * 20, 30)); + living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 100 * 20, 30)); living.setFire(5); } } diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 2895e9b7f..50aadcbdc 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -170,7 +170,7 @@ import com.hbm.lib.HbmWorld; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; import com.hbm.packet.PacketDispatcher; -import com.hbm.potion.PotionEffectTaint; +import com.hbm.potion.HbmPotion; import com.hbm.render.util.HmfModelLoader; import com.hbm.tileentity.bomb.TileEntityBombMulti; import com.hbm.tileentity.bomb.TileEntityCelPrime; @@ -482,6 +482,10 @@ public class MainRegistry public static int generalOverride = 0; public static int polaroidID = 1; + public static int taintID = 62; + public static int radiationID = 63; + public static int bangID = 64; + public static int x; public static int y; public static int z; @@ -509,6 +513,7 @@ public class MainRegistry proxy.registerRenderInfo(); HbmWorld.mainRegistry(); GameRegistry.registerFuelHandler(new FuelHandler()); + HbmPotion.init(); Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8"); Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e"); @@ -1449,6 +1454,16 @@ public class MainRegistry Property propCiwsHitrate = config.get(Configuration.CATEGORY_GENERAL, "7.03_ciwsAccuracy", 50); propCiwsHitrate.comment = "Additional modifier for CIWS accuracy"; ciwsHitrate = propRadarAltitude.getInt(); + + Property propTaintID = config.get(Configuration.CATEGORY_GENERAL, "8.00_taintPotionID", 62); + propTaintID.comment = "What potion ID the taint effect will have"; + taintID = propTaintID.getInt(); + Property propRadiationID = config.get(Configuration.CATEGORY_GENERAL, "8.01_radiationPotionID", 63); + propRadiationID.comment = "What potion ID the radiation effect will have"; + radiationID = propRadiationID.getInt(); + Property propBangID = config.get(Configuration.CATEGORY_GENERAL, "8.02_bangPotionID", 64); + propBangID.comment = "What potion ID the B93 timebomb effect will have"; + bangID = propBangID.getInt(); config.save(); } diff --git a/com/hbm/main/ModEventHandler.java b/com/hbm/main/ModEventHandler.java index 74502010d..b95bb2bf4 100644 --- a/com/hbm/main/ModEventHandler.java +++ b/com/hbm/main/ModEventHandler.java @@ -6,7 +6,7 @@ import com.hbm.entity.projectile.EntityMeteor; import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; import com.hbm.lib.RefStrings; -import com.hbm.potion.PotionEffectRadiation; +import com.hbm.potion.HbmPotion; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; @@ -80,7 +80,7 @@ public class ModEventHandler for(Object e : event.world.loadedEntityList) { if(e instanceof EntityLivingBase) { EntityLivingBase entity = (EntityLivingBase) e; - PotionEffect effect = entity.getActivePotionEffect(PotionEffectRadiation.instance); + PotionEffect effect = entity.getActivePotionEffect(HbmPotion.radiation); if(effect != null) { diff --git a/com/hbm/packet/AuxGaugePacket.java b/com/hbm/packet/AuxGaugePacket.java index 4c91a0143..873f7461d 100644 --- a/com/hbm/packet/AuxGaugePacket.java +++ b/com/hbm/packet/AuxGaugePacket.java @@ -125,7 +125,9 @@ public class AuxGaugePacket implements IMessage { if(m.id == 1) reactor.retracting = m.value == 1; if(m.id == 2) - reactor.heat = m.value; + reactor.coreHeat = m.value; + if(m.id == 3) + reactor.hullHeat = m.value; } } catch (Exception x) { } diff --git a/com/hbm/potion/HbmPotion.java b/com/hbm/potion/HbmPotion.java new file mode 100644 index 000000000..ce41e4433 --- /dev/null +++ b/com/hbm/potion/HbmPotion.java @@ -0,0 +1,115 @@ +package com.hbm.potion; + +import java.lang.reflect.Field; + +import com.hbm.explosion.ExplosionLarge; +import com.hbm.lib.ModDamageSource; +import com.hbm.main.MainRegistry; + +import cpw.mods.fml.relauncher.ReflectionHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; + +public class HbmPotion extends Potion { + + public static HbmPotion taint; + public static HbmPotion radiation; + public static HbmPotion bang; + + public HbmPotion(int id, boolean isBad, int color) { + super(id, isBad, color); + } + + public static void init() { + taint = registerPotion(MainRegistry.taintID, true, 8388736, "potion.hbm_taint", 0, 0); + radiation = registerPotion(MainRegistry.radiationID, true, 8700200, "potion.hbm_radiation", 1, 0); + bang = registerPotion(MainRegistry.bangID, true, 1118481, "potion.hbm_bang", 3, 0); + } + + public static HbmPotion registerPotion(int id, boolean isBad, int color, String name, int x, int y) { + + if (id >= Potion.potionTypes.length) { + + Potion[] newArray = new Potion[Math.max(256, id)]; + System.arraycopy(Potion.potionTypes, 0, newArray, 0, Potion.potionTypes.length); + + Field field = ReflectionHelper.findField(Potion.class, new String[] { "field_76425_a", "potionTypes" }); + field.setAccessible(true); + + try { + + Field modfield = Field.class.getDeclaredField("modifiers"); + modfield.setAccessible(true); + modfield.setInt(field, field.getModifiers() & 0xFFFFFFEF); + field.set(null, newArray); + + } catch (Exception e) { + + } + } + + HbmPotion effect = new HbmPotion(id, isBad, color); + effect.setPotionName(name); + effect.setIconIndex(x, y); + + return effect; + } + + @Override + @SideOnly(Side.CLIENT) + public int getStatusIconIndex() { + ResourceLocation loc = new ResourceLocation("hbm","textures/gui/potions.png"); + Minecraft.getMinecraft().renderEngine.bindTexture(loc); + return super.getStatusIconIndex(); + } + + public void performEffect(EntityLivingBase entity, int level) { + + if(this == taint) { + + entity.attackEntityFrom(ModDamageSource.taint, (level + 1)); + } + if(this == radiation) { + + if (entity.getHealth() > entity.getMaxHealth() - (level + 1)) { + entity.attackEntityFrom(ModDamageSource.radiation, 1); + } + } + if(this == bang) { + + entity.attackEntityFrom(ModDamageSource.bang, 1000); + entity.setHealth(0.0F); + + if (!(entity instanceof EntityPlayer)) + entity.setDead(); + + entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.laserBang", 100.0F, 1.0F); + ExplosionLarge.spawnParticles(entity.worldObj, entity.posX, entity.posY, entity.posZ, 10); + } + } + + public boolean isReady(int par1, int par2) { + + if(this == taint) { + + int k = 80 >> par2; + return k > 0 ? par1 % k == 0 : true; + } + if(this == radiation) { + int k = 40 >> par2; + return k > 0 ? par1 % k == 0 : true; + } + if(this == bang) { + + return par1 <= 10; + } + + return false; + } + +} diff --git a/com/hbm/potion/PotionEffectBang.java b/com/hbm/potion/PotionEffectBang.java deleted file mode 100644 index 349fe93d5..000000000 --- a/com/hbm/potion/PotionEffectBang.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.hbm.potion; - -import java.util.Random; - -import com.hbm.blocks.ModBlocks; -import com.hbm.blocks.bomb.BlockTaint; -import com.hbm.explosion.ExplosionLarge; -import com.hbm.lib.Library; -import com.hbm.lib.ModDamageSource; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.ResourceLocation; - -public class PotionEffectBang extends Potion { - - public static PotionEffectBang instance = new PotionEffectBang(Library.getFirstNullIndex(1, Potion.potionTypes), true, 1118481); - Random rand = new Random(); - - public PotionEffectBang(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_) { - super(p_i1573_1_, p_i1573_2_, p_i1573_3_); - this.setPotionName("potion.hbm_bang"); - this.setIconIndex(3, 0); - } - - @Override - @SideOnly(Side.CLIENT) - public int getStatusIconIndex() { - ResourceLocation loc = new ResourceLocation("hbm","textures/gui/potions.png"); - Minecraft.getMinecraft().renderEngine.bindTexture(loc); - return super.getStatusIconIndex(); - } - - - public void performEffect(EntityLivingBase entity, int level) - { - entity.attackEntityFrom(ModDamageSource.bang, 1000); - entity.setHealth(0.0F); - - if(!(entity instanceof EntityPlayer)) - entity.setDead(); - - entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.laserBang", 100.0F, 1.0F); - //entity.worldObj.spawnParticle("hugeexplosion", entity.posX, entity.posY, entity.posZ, 0, 0, 0); - ExplosionLarge.spawnParticles(entity.worldObj, entity.posX, entity.posY, entity.posZ, 10); - } - - public boolean isReady(int par1, int par2) - { - return par1 <= 10; - } - -} diff --git a/com/hbm/potion/PotionEffectRadiation.java b/com/hbm/potion/PotionEffectRadiation.java deleted file mode 100644 index de76fbd81..000000000 --- a/com/hbm/potion/PotionEffectRadiation.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.hbm.potion; - -import java.util.Random; - -import com.hbm.blocks.ModBlocks; -import com.hbm.blocks.bomb.BlockTaint; -import com.hbm.lib.Library; -import com.hbm.lib.ModDamageSource; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.ResourceLocation; - -public class PotionEffectRadiation extends Potion { - - public static PotionEffectRadiation instance = new PotionEffectRadiation(Library.getFirstNullIndex(1, Potion.potionTypes), true, 8700200); - Random rand = new Random(); - - public PotionEffectRadiation(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_) { - super(p_i1573_1_, p_i1573_2_, p_i1573_3_); - this.setPotionName("potion.hbm_radiation"); - this.setIconIndex(1, 0); - } - - @Override - @SideOnly(Side.CLIENT) - public int getStatusIconIndex() { - ResourceLocation loc = new ResourceLocation("hbm","textures/gui/potions.png"); - Minecraft.getMinecraft().renderEngine.bindTexture(loc); - return super.getStatusIconIndex(); - } - - - public void performEffect(EntityLivingBase entity, int level) - { - if(entity.getHealth() > entity.getMaxHealth() - (level + 1)) - entity.attackEntityFrom(ModDamageSource.radiation, 1); - - /*if(level > 15) { - if(rand.nextInt(10) == 0) - entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 5 * 20, 3)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 5 * 20, 3)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 5 * 20, 2)); - if(rand.nextInt(30) == 0) - entity.addPotionEffect(new PotionEffect(Potion.wither.id, 3 * 20, 4)); - } else if(level > 10) { - if(rand.nextInt(10) == 0) - entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 5 * 20, 3)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 5 * 20, 3)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 5 * 20, 2)); - } else if(level > 4) { - if(rand.nextInt(10) == 0) - entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 5 * 20, 1)); - if(rand.nextInt(20) == 0) - entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 5 * 20, 1)); - }*/ - } - - public boolean isReady(int par1, int par2) - { - int k = 40 >> par2; - return k > 0 ? par1 % k == 0 : true; - } - -} diff --git a/com/hbm/potion/PotionEffectTaint.java b/com/hbm/potion/PotionEffectTaint.java deleted file mode 100644 index a8eb4027b..000000000 --- a/com/hbm/potion/PotionEffectTaint.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.hbm.potion; - -import java.util.Random; - -import com.hbm.blocks.ModBlocks; -import com.hbm.blocks.bomb.BlockTaint; -import com.hbm.lib.Library; -import com.hbm.lib.ModDamageSource; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.ResourceLocation; - -public class PotionEffectTaint extends Potion { - - public static PotionEffectTaint instance = new PotionEffectTaint(Library.getFirstNullIndex(1, Potion.potionTypes), true, 8388736); - Random rand = new Random(); - - public PotionEffectTaint(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_) { - super(p_i1573_1_, p_i1573_2_, p_i1573_3_); - this.setPotionName("potion.hbm_taint"); - this.setIconIndex(0, 0); - } - - @Override - @SideOnly(Side.CLIENT) - public int getStatusIconIndex() { - ResourceLocation loc = new ResourceLocation("hbm","textures/gui/potions.png"); - Minecraft.getMinecraft().renderEngine.bindTexture(loc); - return super.getStatusIconIndex(); - } - - - public void performEffect(EntityLivingBase entity, int level) - { - entity.attackEntityFrom(ModDamageSource.taint, (level + 1)); - - /*if(!entity.worldObj.isRemote) { - - for(int i = 0; i < 15; i++) { - int a = rand.nextInt(5) + (int)entity.posX - 2; - int b = rand.nextInt(5) + (int)entity.posY - 2; - int c = rand.nextInt(5) + (int)entity.posZ - 2; - if(entity.worldObj.getBlock(a, b, c).isReplaceable(entity.worldObj, a, b, c) && BlockTaint.hasPosNeightbour(entity.worldObj, a, b, c)) - entity.worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3), 2); - } - }*/ - } - - public boolean isReady(int par1, int par2) - { - int k = 80 >> par2; - return k > 0 ? par1 % k == 0 : true; - } - -} diff --git a/com/hbm/tileentity/deco/TileEntityYellowBarrel.java b/com/hbm/tileentity/deco/TileEntityYellowBarrel.java index 0f8918ba2..6e1ada2ef 100644 --- a/com/hbm/tileentity/deco/TileEntityYellowBarrel.java +++ b/com/hbm/tileentity/deco/TileEntityYellowBarrel.java @@ -6,7 +6,7 @@ import java.util.List; import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; -import com.hbm.potion.PotionEffectRadiation; +import com.hbm.potion.HbmPotion; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -71,23 +71,9 @@ public class TileEntityYellowBarrel extends TileEntity { Library.damageSuit(((EntityPlayer)entity), 2); Library.damageSuit(((EntityPlayer)entity), 3);*/ - } else if(entity instanceof EntityCreeper) { - EntityNuclearCreeper creep = new EntityNuclearCreeper(this.worldObj); - creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch); - //creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead); - if(!entity.isDead) - if(!worldObj.isRemote) - worldObj.spawnEntityInWorld(creep); - entity.setDead(); - } else if(entity instanceof EntityVillager) { - EntityZombie creep = new EntityZombie(this.worldObj); - creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch); - entity.setDead(); - if(!this.worldObj.isRemote) - this.worldObj.spawnEntityInWorld(creep); } else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 30 * 20, 14)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 14)); } } } diff --git a/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java b/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java index 791bdc81a..9cbaba482 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ b/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java @@ -33,11 +33,13 @@ import net.minecraft.tileentity.TileEntity; public class TileEntityMachineReactorSmall extends TileEntity implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor { private ItemStack slots[]; - - public int heat; - public final int heatMax = 10000; + + public int hullHeat; + public final int maxHullHeat = 100000; + public int coreHeat; + public final int maxCoreHeat = 50000; public long power; - public final long powerMax = 100000; + public final long powerMax = 250000; public int rods; public final int rodsMax = 100; public boolean retracting = true; @@ -177,7 +179,7 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI NBTTagList list = nbt.getTagList("items", 10); power = nbt.getLong("power"); - heat = nbt.getInteger("heat"); + coreHeat = nbt.getInteger("heat"); slots = new ItemStack[getSizeInventory()]; tanks[0].readFromNBT(nbt, "water"); tanks[1].readFromNBT(nbt, "coolant"); @@ -197,7 +199,7 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setLong("power", power); - nbt.setInteger("heat", heat); + nbt.setInteger("heat", coreHeat); NBTTagList list = new NBTTagList(); tanks[0].writeToNBT(nbt, "water"); tanks[1].writeToNBT(nbt, "coolant"); @@ -264,16 +266,24 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI return (power * i) / powerMax; } - public int getHeatScaled(int i) { - return (heat * i) / heatMax; + public int getCoreHeatScaled(int i) { + return (coreHeat * i) / maxCoreHeat; + } + + public int getHullHeatScaled(int i) { + return (hullHeat * i) / maxHullHeat; } public boolean hasPower() { return power > 0; } - public boolean hasHeat() { - return heat > 0; + public boolean hasCoreHeat() { + return coreHeat > 0; + } + + public boolean hasHullHeat() { + return hullHeat > 0; } private int[] getNeighbouringSlots(int id) { @@ -347,12 +357,37 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI decay(i); } + if(this.coreHeat > 0 && this.tanks[1].getFill() > 0 && this.hullHeat < this.maxHullHeat) { + this.hullHeat += this.coreHeat * 0.175; + this.coreHeat -= this.coreHeat * 0.1; + + this.tanks[1].setFill(this.tanks[1].getFill() - 10); + + if(this.tanks[1].getFill() < 0) + this.tanks[1].setFill(0); + } + + if(this.hullHeat > maxHullHeat) + { + this.hullHeat = maxHullHeat; + } + + if(this.hullHeat > 0 && this.tanks[0].getFill() > 0) { + this.power += this.hullHeat * 0.1; + this.hullHeat -= this.hullHeat * 0.085; + + this.tanks[0].setFill(this.tanks[0].getFill() - 100); + + if(this.tanks[0].getFill() < 0) + this.tanks[0].setFill(0); + } + if(this.power > powerMax) { this.power = powerMax; } - if(this.heat > heatMax) + if(this.coreHeat > maxCoreHeat) { this.explode(); } @@ -360,7 +395,8 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power)); PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0)); PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, retracting ? 1 : 0, 1)); - PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, heat, 2)); + PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 2)); + PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3)); } } @@ -400,7 +436,7 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI for(int i = 0; i < decay; i++) { ItemFuelRod rod = ((ItemFuelRod)slots[id].getItem()); - this.heat += rod.heat; + this.coreHeat += rod.heat; ItemFuelRod.setLifeTime(slots[id], ItemFuelRod.getLifeTime(slots[id]) + 1); ItemFuelRod.updateDamage(slots[id]); @@ -473,15 +509,15 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI @Override public void ffgeuaInit() { - ffgeua(this.xCoord - 1, this.yCoord + 1, this.zCoord, getTact()); - ffgeua(this.xCoord + 1, this.yCoord + 1, this.zCoord, getTact()); - ffgeua(this.xCoord, this.yCoord + 1, this.zCoord - 1, getTact()); - ffgeua(this.xCoord, this.yCoord + 1, this.zCoord + 1, getTact()); + ffgeua(this.xCoord - 1, this.yCoord, this.zCoord, getTact()); + ffgeua(this.xCoord + 1, this.yCoord, this.zCoord, getTact()); + ffgeua(this.xCoord, this.yCoord, this.zCoord - 1, getTact()); + ffgeua(this.xCoord, this.yCoord, this.zCoord + 1, getTact()); - ffgeua(this.xCoord - 1, this.yCoord - 1, this.zCoord, getTact()); - ffgeua(this.xCoord + 1, this.yCoord - 1, this.zCoord, getTact()); - ffgeua(this.xCoord, this.yCoord - 1, this.zCoord - 1, getTact()); - ffgeua(this.xCoord, this.yCoord - 1, this.zCoord + 1, getTact()); + ffgeua(this.xCoord - 1, this.yCoord + 2, this.zCoord, getTact()); + ffgeua(this.xCoord + 1, this.yCoord + 2, this.zCoord, getTact()); + ffgeua(this.xCoord, this.yCoord + 2, this.zCoord - 1, getTact()); + ffgeua(this.xCoord, this.yCoord + 2, this.zCoord + 1, getTact()); } @Override diff --git a/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java b/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java index d78e4c012..ee63393da 100644 --- a/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java +++ b/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java @@ -24,7 +24,7 @@ import com.hbm.lib.Library; import com.hbm.main.MainRegistry; import com.hbm.packet.AuxElectricityPacket; import com.hbm.packet.PacketDispatcher; -import com.hbm.potion.PotionEffectRadiation; +import com.hbm.potion.HbmPotion; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -513,7 +513,7 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv Library.damageSuit(((EntityPlayer)entity), 3);*/ } else { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 80 * 20, 25)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 25)); } } }