From 6e32c9818d770b3d1d16d6ab0cef1dd90fe7f553 Mon Sep 17 00:00:00 2001 From: Vaern Date: Sat, 2 Oct 2021 13:37:44 -0700 Subject: [PATCH 1/5] added pulmonary fibrosis --- .../com/hbm/blocks/gas/BlockGasRadon.java | 2 ++ .../hbm/blocks/gas/BlockGasRadonDense.java | 2 ++ .../com/hbm/blocks/gas/BlockGasRadonTomb.java | 2 ++ .../java/com/hbm/extprop/HbmLivingProps.java | 24 ++++++++++++++++++- .../com/hbm/handler/EntityEffectHandler.java | 21 ++++++++++++++-- 5 files changed, 48 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java b/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java index fc584b29f..1be042541 100644 --- a/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java +++ b/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java @@ -2,6 +2,7 @@ package com.hbm.blocks.gas; import java.util.Random; +import com.hbm.extprop.HbmLivingProps; import com.hbm.util.ArmorUtil; import com.hbm.util.ContaminationUtil; import com.hbm.util.ContaminationUtil.ContaminationType; @@ -24,6 +25,7 @@ public class BlockGasRadon extends BlockGasBase { if(entity instanceof EntityLivingBase) { ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 0.05F); + HbmLivingProps.incrementFibrosis((EntityLivingBase)entity, 5); } } diff --git a/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java b/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java index 780672e67..7a6d94b5a 100644 --- a/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java +++ b/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java @@ -3,6 +3,7 @@ package com.hbm.blocks.gas; import java.util.Random; import com.hbm.blocks.ModBlocks; +import com.hbm.extprop.HbmLivingProps; import com.hbm.lib.ModDamageSource; import com.hbm.potion.HbmPotion; import com.hbm.util.ArmorRegistry; @@ -40,6 +41,7 @@ public class BlockGasRadonDense extends BlockGasBase { } else { ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.5F); entityLiving.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 0)); + HbmLivingProps.incrementFibrosis(entityLiving, 10); } } diff --git a/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java b/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java index 308c4ea23..d6ad3ef7d 100644 --- a/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java +++ b/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java @@ -3,6 +3,7 @@ package com.hbm.blocks.gas; import java.util.Random; import com.hbm.blocks.ModBlocks; +import com.hbm.extprop.HbmLivingProps; import com.hbm.util.ContaminationUtil; import com.hbm.util.ContaminationUtil.ContaminationType; import com.hbm.util.ContaminationUtil.HazardType; @@ -52,6 +53,7 @@ public class BlockGasRadonTomb extends BlockGasBase { if(entity instanceof EntityLivingBase) { ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 0.5F); + HbmLivingProps.incrementFibrosis((EntityLivingBase)entity, 20); } } diff --git a/src/main/java/com/hbm/extprop/HbmLivingProps.java b/src/main/java/com/hbm/extprop/HbmLivingProps.java index 8a65319ac..9e4c9b0d9 100644 --- a/src/main/java/com/hbm/extprop/HbmLivingProps.java +++ b/src/main/java/com/hbm/extprop/HbmLivingProps.java @@ -35,6 +35,8 @@ public class HbmLivingProps implements IExtendedEntityProperties { public static final int maxAsbestos = 60 * 60 * 20; private int blacklung; public static final int maxBlacklung = 60 * 60 * 20; + private int Fibrosis; + public static final int maxFibrosis = 60 * 60 * 30; private float radEnv; private float radBuf; private int bombTimer; @@ -185,6 +187,7 @@ public class HbmLivingProps implements IExtendedEntityProperties { public static void incrementAsbestos(EntityLivingBase entity, int asbestos) { setAsbestos(entity, getAsbestos(entity) + asbestos); + incrementFibrosis(entity, asbestos); } @@ -197,13 +200,32 @@ public class HbmLivingProps implements IExtendedEntityProperties { getData(entity).blacklung = blacklung; if(blacklung >= maxBlacklung) { - getData(entity).asbestos = 0; + getData(entity).blacklung = 0; entity.attackEntityFrom(ModDamageSource.asbestos, 1000); } } public static void incrementBlackLung(EntityLivingBase entity, int blacklung) { setBlackLung(entity, getBlackLung(entity) + blacklung); + incrementFibrosis(entity, blacklung); + } + + /// PULMONARY FIBROSIS /// + public static int getFibrosis(EntityLivingBase entity) { + return getData(entity).Fibrosis; + } + + public static void setFibrosis(EntityLivingBase entity, int fibrosis) { + getData(entity).Fibrosis = fibrosis; + + if (fibrosis >= maxFibrosis) { + getData(entity).Fibrosis = 0; + entity.attackEntityFrom(ModDamageSource.asbestos, 1000); + } + } + + public static void incrementFibrosis(EntityLivingBase entity, int fibrosis) { + setFibrosis(entity, getFibrosis(entity) + fibrosis); } /// TIME BOMB /// diff --git a/src/main/java/com/hbm/handler/EntityEffectHandler.java b/src/main/java/com/hbm/handler/EntityEffectHandler.java index ab1dc9504..fc55aa41d 100644 --- a/src/main/java/com/hbm/handler/EntityEffectHandler.java +++ b/src/main/java/com/hbm/handler/EntityEffectHandler.java @@ -328,6 +328,7 @@ public class EntityEffectHandler { if(entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode) { HbmLivingProps.setBlackLung(entity, 0); HbmLivingProps.setAsbestos(entity, 0); + HbmLivingProps.setFibrosis(entity, 0); return; } else { @@ -340,8 +341,9 @@ public class EntityEffectHandler { double blacklung = Math.min(HbmLivingProps.getBlackLung(entity), HbmLivingProps.maxBlacklung); double asbestos = Math.min(HbmLivingProps.getAsbestos(entity), HbmLivingProps.maxAsbestos); + double fibrosis = Math.min(HbmLivingProps.getFibrosis(entity), HbmLivingProps.maxFibrosis); - boolean coughs = blacklung / HbmLivingProps.maxBlacklung > 0.25D || asbestos / HbmLivingProps.maxAsbestos > 0.25D; + boolean coughs = blacklung / HbmLivingProps.maxBlacklung > 0.25D || asbestos / HbmLivingProps.maxAsbestos > 0.25D || fibrosis / HbmLivingProps.maxFibrosis > 0.25D; if(!coughs) return; @@ -349,11 +351,13 @@ public class EntityEffectHandler { boolean coughsCoal = blacklung / HbmLivingProps.maxBlacklung > 0.5D; boolean coughsALotOfCoal = blacklung / HbmLivingProps.maxBlacklung > 0.8D; boolean coughsBlood = asbestos / HbmLivingProps.maxAsbestos > 0.75D || blacklung / HbmLivingProps.maxBlacklung > 0.75D; + boolean asthmaAttack = fibrosis / HbmLivingProps.maxFibrosis > 0.30D; double blacklungDelta = 1D - (blacklung / (double)HbmLivingProps.maxBlacklung); double asbestosDelta = 1D - (asbestos / (double)HbmLivingProps.maxAsbestos); + double fibrosisDelta = 1D - (fibrosis / (double)HbmLivingProps.maxFibrosis); - double total = 1 - (blacklungDelta * asbestosDelta); + double total = 1 - (blacklungDelta * asbestosDelta * fibrosisDelta); int freq = Math.max((int) (1000 - 950 * total), 20); @@ -377,6 +381,10 @@ public class EntityEffectHandler { nbt.setInteger("count", 5); nbt.setInteger("entity", entity.getEntityId()); PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25)); + if(asthmaAttack) { + entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 40, 1)); + entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); + } } if(coughsCoal) { @@ -386,6 +394,15 @@ public class EntityEffectHandler { nbt.setInteger("count", coughsALotOfCoal ? 50 : 10); nbt.setInteger("entity", entity.getEntityId()); PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25)); + if(asthmaAttack) { + entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 40, 1)); + entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); + } + } + + if(asthmaAttack) { + entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 40, 1)); + entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); } } } From c2e002419fee6c44e48409e40b56f9a8baa48c35 Mon Sep 17 00:00:00 2001 From: Vaern Date: Sat, 2 Oct 2021 15:57:40 -0700 Subject: [PATCH 2/5] whoops --- .../com/hbm/handler/EntityEffectHandler.java | 51 ++++++++----------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/hbm/handler/EntityEffectHandler.java b/src/main/java/com/hbm/handler/EntityEffectHandler.java index fc55aa41d..0e6362ce2 100644 --- a/src/main/java/com/hbm/handler/EntityEffectHandler.java +++ b/src/main/java/com/hbm/handler/EntityEffectHandler.java @@ -343,7 +343,8 @@ public class EntityEffectHandler { double asbestos = Math.min(HbmLivingProps.getAsbestos(entity), HbmLivingProps.maxAsbestos); double fibrosis = Math.min(HbmLivingProps.getFibrosis(entity), HbmLivingProps.maxFibrosis); - boolean coughs = blacklung / HbmLivingProps.maxBlacklung > 0.25D || asbestos / HbmLivingProps.maxAsbestos > 0.25D || fibrosis / HbmLivingProps.maxFibrosis > 0.25D; + boolean coughs = blacklung / HbmLivingProps.maxBlacklung > 0.25D || asbestos / HbmLivingProps.maxAsbestos > 0.25D; + boolean bronchospasms = fibrosis / HbmLivingProps.maxFibrosis > 0.20D; if(!coughs) return; @@ -351,7 +352,6 @@ public class EntityEffectHandler { boolean coughsCoal = blacklung / HbmLivingProps.maxBlacklung > 0.5D; boolean coughsALotOfCoal = blacklung / HbmLivingProps.maxBlacklung > 0.8D; boolean coughsBlood = asbestos / HbmLivingProps.maxAsbestos > 0.75D || blacklung / HbmLivingProps.maxBlacklung > 0.75D; - boolean asthmaAttack = fibrosis / HbmLivingProps.maxFibrosis > 0.30D; double blacklungDelta = 1D - (blacklung / (double)HbmLivingProps.maxBlacklung); double asbestosDelta = 1D - (asbestos / (double)HbmLivingProps.maxAsbestos); @@ -373,36 +373,29 @@ public class EntityEffectHandler { if(world.getTotalWorldTime() % freq == entity.getEntityId() % freq) { world.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:player.cough", 1.0F, 1.0F); - - if(coughsBlood) { - NBTTagCompound nbt = new NBTTagCompound(); - nbt.setString("type", "vomit"); - nbt.setString("mode", "blood"); - nbt.setInteger("count", 5); - nbt.setInteger("entity", entity.getEntityId()); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25)); - if(asthmaAttack) { - entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 40, 1)); - entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); + if (new Random().nextInt(6) > 1) { + if(coughsBlood) { + NBTTagCompound nbt = new NBTTagCompound(); + nbt.setString("type", "vomit"); + nbt.setString("mode", "blood"); + nbt.setInteger("count", 5); + nbt.setInteger("entity", entity.getEntityId()); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25)); } - } - if(coughsCoal) { - NBTTagCompound nbt = new NBTTagCompound(); - nbt.setString("type", "vomit"); - nbt.setString("mode", "smoke"); - nbt.setInteger("count", coughsALotOfCoal ? 50 : 10); - nbt.setInteger("entity", entity.getEntityId()); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25)); - if(asthmaAttack) { - entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 40, 1)); - entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); + if(coughsCoal) { + NBTTagCompound nbt = new NBTTagCompound(); + nbt.setString("type", "vomit"); + nbt.setString("mode", "smoke"); + nbt.setInteger("count", coughsALotOfCoal ? 50 : 10); + nbt.setInteger("entity", entity.getEntityId()); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25)); + } + } else { + if(bronchospasms) { + entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2)); + entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 140, 2)); } - } - - if(asthmaAttack) { - entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 40, 1)); - entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); } } } From 78cef1a099976a34f6416cf5a3f4fb5affd4b4f0 Mon Sep 17 00:00:00 2001 From: Vaern Date: Sun, 3 Oct 2021 12:14:44 -0700 Subject: [PATCH 3/5] adjusted the fibrosis values --- src/main/java/com/hbm/blocks/gas/BlockGasRadon.java | 2 +- src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java | 2 +- src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java b/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java index 1be042541..df166aa03 100644 --- a/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java +++ b/src/main/java/com/hbm/blocks/gas/BlockGasRadon.java @@ -25,7 +25,7 @@ public class BlockGasRadon extends BlockGasBase { if(entity instanceof EntityLivingBase) { ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 0.05F); - HbmLivingProps.incrementFibrosis((EntityLivingBase)entity, 5); + HbmLivingProps.incrementFibrosis((EntityLivingBase)entity, 1); } } diff --git a/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java b/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java index 7a6d94b5a..21a24186f 100644 --- a/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java +++ b/src/main/java/com/hbm/blocks/gas/BlockGasRadonDense.java @@ -41,7 +41,7 @@ public class BlockGasRadonDense extends BlockGasBase { } else { ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.5F); entityLiving.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 0)); - HbmLivingProps.incrementFibrosis(entityLiving, 10); + HbmLivingProps.incrementFibrosis(entityLiving, 5); } } diff --git a/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java b/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java index d6ad3ef7d..8dcc6bdb6 100644 --- a/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java +++ b/src/main/java/com/hbm/blocks/gas/BlockGasRadonTomb.java @@ -53,7 +53,7 @@ public class BlockGasRadonTomb extends BlockGasBase { if(entity instanceof EntityLivingBase) { ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 0.5F); - HbmLivingProps.incrementFibrosis((EntityLivingBase)entity, 20); + HbmLivingProps.incrementFibrosis((EntityLivingBase)entity, 10); } } From 599e688598102c1de4e5befe7905c895ea60c19c Mon Sep 17 00:00:00 2001 From: Vaern Date: Mon, 4 Oct 2021 20:24:10 -0700 Subject: [PATCH 4/5] rebalanced pile, added fibrosis treatment --- .../java/com/hbm/crafting/ConsumableRecipes.java | 1 + .../hbm/inventory/recipes/anvil/AnvilRecipes.java | 14 ++++++++++---- src/main/java/com/hbm/items/ModItems.java | 3 +++ src/main/java/com/hbm/items/food/ItemPill.java | 8 ++++++++ .../machine/pile/TileEntityPileBase.java | 2 +- .../machine/pile/TileEntityPileFuel.java | 2 +- src/main/resources/assets/hbm/lang/en_NT.lang | 1 + src/main/resources/assets/hbm/lang/en_US.lang | 1 + .../assets/hbm/textures/items/pirfenidone.png | Bin 0 -> 747 bytes 9 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/items/pirfenidone.png diff --git a/src/main/java/com/hbm/crafting/ConsumableRecipes.java b/src/main/java/com/hbm/crafting/ConsumableRecipes.java index 27b698d2a..e0f013374 100644 --- a/src/main/java/com/hbm/crafting/ConsumableRecipes.java +++ b/src/main/java/com/hbm/crafting/ConsumableRecipes.java @@ -116,6 +116,7 @@ public class ConsumableRecipes { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.siox, 8), new Object[] { "dustCoal", "dustAsbestos", ModItems.nugget_bismuth })); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.xanax, 1), new Object[] { ModItems.powder_coal, ModItems.niter, ModItems.powder_bromine }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.fmn, 1), new Object[] { ModItems.powder_coal, ModItems.powder_polonium, ModItems.powder_strontium }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.pirfenidone, 1), new Object[] {ModItems.powder_coal, ModItems.niter, ModItems.nugget_bismuth }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.five_htp, 1), new Object[] { ModItems.powder_coal, ModItems.powder_euphemium, ModItems.canteen_fab }); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cigarette, 16), new Object[] { "ingotAsbestos", ModItems.oil_tar, "nuggetPolonium210" })); diff --git a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index f88da5e4d..76e82e252 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -460,16 +460,22 @@ public class AnvilRecipes { constructionRecipes.add(new AnvilConstructionRecipe( new ComparableStack(ModItems.pile_rod_uranium), - new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.billet_uranium, 3)), new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))}).setTier(3)); + new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.billet_uranium, 3)), new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))}).setTier(2)); + if (GeneralConfig.enable528) { constructionRecipes.add(new AnvilConstructionRecipe( new ComparableStack(ModItems.pile_rod_plutonium), - new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.billet_plutonium, 3)), new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))}).setTier(3)); + new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 2)),new AnvilOutput(new ItemStack(ModItems.nuclear_waste_tiny, 6)),new AnvilOutput(new ItemStack(ModItems.plate_iron, 1))}).setTier(2)); + } else { + constructionRecipes.add(new AnvilConstructionRecipe( + new ComparableStack(ModItems.pile_rod_plutonium), + new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 3)), new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))}).setTier(2)); + } constructionRecipes.add(new AnvilConstructionRecipe( new ComparableStack(ModItems.pile_rod_source), - new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.billet_ra226be, 3)), new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))}).setTier(3)); + new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.billet_ra226be, 3)), new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))}).setTier(2)); constructionRecipes.add(new AnvilConstructionRecipe( new ComparableStack(ModItems.pile_rod_boron), - new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)), new AnvilOutput(new ItemStack(Items.stick, 2))}).setTier(3)); + new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)), new AnvilOutput(new ItemStack(Items.stick, 2))}).setTier(2)); } public static void pullFromAssembler(ComparableStack result, int tier) { diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 8015ae73b..795ca4323 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -823,6 +823,7 @@ public class ModItems { public static Item siox; public static Item xanax; public static Item fmn; + public static Item pirfenidone; public static Item five_htp; public static Item med_bag; public static Item pill_iodine; @@ -3181,6 +3182,7 @@ public class ModItems { siox = new ItemPill(0).setUnlocalizedName("siox").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":siox"); xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2"); fmn = new ItemPill(0).setUnlocalizedName("fmn").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tablet"); + pirfenidone = new ItemPill(0).setUnlocalizedName("pirfenidone").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pirfenidone"); five_htp = new ItemPill(0).setUnlocalizedName("five_htp").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":5htp"); pill_iodine = new ItemPill(0).setUnlocalizedName("pill_iodine").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_iodine"); plan_c = new ItemPill(0).setUnlocalizedName("plan_c").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":plan_c"); @@ -7272,6 +7274,7 @@ public class ModItems { GameRegistry.registerItem(pill_iodine, pill_iodine.getUnlocalizedName()); GameRegistry.registerItem(xanax, xanax.getUnlocalizedName()); GameRegistry.registerItem(fmn, fmn.getUnlocalizedName()); + GameRegistry.registerItem(pirfenidone, pirfenidone.getUnlocalizedName()); GameRegistry.registerItem(five_htp, five_htp.getUnlocalizedName()); GameRegistry.registerItem(plan_c, plan_c.getUnlocalizedName()); GameRegistry.registerItem(stealth_boy, stealth_boy.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/food/ItemPill.java b/src/main/java/com/hbm/items/food/ItemPill.java index e0668ebdf..c6a9622fa 100644 --- a/src/main/java/com/hbm/items/food/ItemPill.java +++ b/src/main/java/com/hbm/items/food/ItemPill.java @@ -67,6 +67,11 @@ public class ItemPill extends ItemFood { HbmLivingProps.setDigamma(player, Math.min(digamma, 2F)); player.addPotionEffect(new PotionEffect(Potion.blindness.id, 60, 0)); } + + if(this == ModItems.pirfenidone) { + float fibrosis = HbmLivingProps.getFibrosis(player); + HbmLivingProps.setFibrosis(player, (int) Math.min(fibrosis, 37800)); + } if(this == ModItems.five_htp) { HbmLivingProps.setDigamma(player, 0); @@ -95,6 +100,9 @@ public class ItemPill extends ItemFood { if(this == ModItems.fmn) { list.add("Removes all DRX above 2,000mDRX"); } + if(this == ModItems.pirfenidone) { + list.add("Removes all Pulmonary Fibrosis over 35%"); + } if(this == ModItems.five_htp) { list.add("Removes all DRX, Stability for 10 minutes"); } diff --git a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileBase.java b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileBase.java index 938910d79..63d693b33 100644 --- a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileBase.java +++ b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileBase.java @@ -53,7 +53,7 @@ public abstract class TileEntityPileBase extends TileEntity { if(te instanceof IPileNeutronReceiver) { //this part throttles neutron efficiency for reactions that are way too close, efficiency reaches 100% after 2.5 meters - float mult = Math.min((float)range / 2.5F, 1F); + float mult = Math.min((float)range / 1.5F, 1F); int n = (int)(flux * mult); IPileNeutronReceiver rec = (IPileNeutronReceiver) te; diff --git a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java index b5b09a9e9..fb5e8e2aa 100644 --- a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java +++ b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java @@ -13,7 +13,7 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr public int neutrons; public int lastNeutrons; public int progress; - public static final int maxProgress = 100000; + public static final int maxProgress = 75000; @Override public void updateEntity() { diff --git a/src/main/resources/assets/hbm/lang/en_NT.lang b/src/main/resources/assets/hbm/lang/en_NT.lang index 16299e21a..2b775c582 100644 --- a/src/main/resources/assets/hbm/lang/en_NT.lang +++ b/src/main/resources/assets/hbm/lang/en_NT.lang @@ -1469,6 +1469,7 @@ item.radaway.name=RadAway item.radaway_strong.name=Strong RadAway item.radaway_flush.name=Elite RadAway item.radx.name=Rad-X +item.pirfenidone.name=Pirfenidone item.pill_iodine.name=Iodine Pill item.plan_c.name=Plan C item.med_ipecac.name=Ipecac Syrup diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 705fe6cd2..d69dce13f 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2025,6 +2025,7 @@ item.pill_iodine.name=Iodine Pill item.pin.name=Bobby Pin item.pipes_steel.name=Steel Pipes item.pipes_steel.desc=Uncrafting was omitted due to tax evasion. +item.pirfenidone.name=Pirfenidone item.piston_selenium.name=Radial Engine Piston item.plan_c.name=Plan C item.plate_advanced_alloy.name=Advanced Alloy Plate diff --git a/src/main/resources/assets/hbm/textures/items/pirfenidone.png b/src/main/resources/assets/hbm/textures/items/pirfenidone.png new file mode 100644 index 0000000000000000000000000000000000000000..90a7965beb33f9678ded33dc1e9dbc2202eb8857 GIT binary patch literal 747 zcmVEX>4Tx04R}tkv&MmP!xqvQ%j{(9PA+CkfC<6AS&W0RV;#q(pG5I!Q`cX(4-+r zad8w}3l9D)RvlcNb#-tR1i>E=H#a9m7b)?+q|hS93y=44-aUu+?gNBYjj3ke1fXh` zkx3@Rd|_1#z9NJG1o#k>n5n0-i#d4K*FE)7-Nkv9ci*2ipcG98_(bA4rW+RV2Jy_M zrE}gVjTk;}{zM~KC856eBwDuzltO&nEJjq-)O z%L?Z$&T6f}I``x+3>USPEZ1p`B8erWkcJ2u4OCHsg*fdRDJC*>p78LGIQ}%bWO7x( z$gzMrR7j2={11N5)+|j;x=G;#5O}fek1-&)3$&ZI{e5iP?GwQN3|whlf4v3Fev;no zYSANLa2vR|?rQQLaJd5vKk1SoIg+22P$~iMXY@@4VCWVIt+{jSoa6KX$kD8pZ-9eC zAXcXAb&q%V_s;F#p3eM!02qgIgK*%ip#T5?24YJ`L;(K){{a7>y{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jvO{0wW-Ca7)Di000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0002ONklS(|{F!ORd5hzQd3hCwH=HbE4vJA+}k zA|K>G85m>gCsRs&1QKt#p^Hiv!PFZ7a#h)(ftIN%s>>t1U;K7+|2PX0{IU1(lG dDHYJK^#&zeR!k)FbEW_Q002ovPDHLkV1h^}IUfK3 literal 0 HcmV?d00001 From a0037e88fa8590e206a34d9177c12f5f8e1010f5 Mon Sep 17 00:00:00 2001 From: Vaern Date: Tue, 5 Oct 2021 20:15:00 -0700 Subject: [PATCH 5/5] adjusted pile a little bit --- .../com/hbm/tileentity/machine/pile/TileEntityPileFuel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java index fb5e8e2aa..027ad9699 100644 --- a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java +++ b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java @@ -1,6 +1,7 @@ package com.hbm.tileentity.machine.pile; import com.hbm.blocks.ModBlocks; +import com.hbm.config.GeneralConfig; import api.hbm.block.IPileNeutronReceiver; import net.minecraft.init.Blocks; @@ -13,7 +14,7 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr public int neutrons; public int lastNeutrons; public int progress; - public static final int maxProgress = 75000; + public static final int maxProgress = GeneralConfig.enable528 ? 75000 : 50000; @Override public void updateEntity() {