diff --git a/src/main/java/api/hbm/energy/IEnergyConnector.java b/src/main/java/api/hbm/energy/IEnergyConnector.java index 6cb7214097..62c3d582bf 100644 --- a/src/main/java/api/hbm/energy/IEnergyConnector.java +++ b/src/main/java/api/hbm/energy/IEnergyConnector.java @@ -76,18 +76,18 @@ public default void trySubscribe(World world, BlockPos pos, ForgeDirection dir) red = true; } - if(particleDebug) {// - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "network"); - data.setString("mode", "power"); - double posX = pos.getX() + 0.5 + dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; - double posY = pos.getY() + 0.5 + dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; - double posZ = pos.getZ() + 0.5 + dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; - data.setDouble("mX", -dir.offsetX * (red ? 0.025 : 0.1)); - data.setDouble("mY", -dir.offsetY * (red ? 0.025 : 0.1)); - data.setDouble("mZ", -dir.offsetZ * (red ? 0.025 : 0.1)); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.getDimension(), posX, posY, posZ, 25)); - } + // if(particleDebug) {// + // NBTTagCompound data = new NBTTagCompound(); + // data.setString("type", "network"); + // data.setString("mode", "power"); + // double posX = pos.getX() + 0.5 + dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; + // double posY = pos.getY() + 0.5 + dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; + // double posZ = pos.getZ() + 0.5 + dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; + // data.setDouble("mX", -dir.offsetX * (red ? 0.025 : 0.1)); + // data.setDouble("mY", -dir.offsetY * (red ? 0.025 : 0.1)); + // data.setDouble("mZ", -dir.offsetZ * (red ? 0.025 : 0.1)); + // PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.getDimension(), posX, posY, posZ, 25)); + // } } public default void tryUnsubscribe(World world, BlockPos pos) { diff --git a/src/main/java/api/hbm/energy/IEnergyUser.java b/src/main/java/api/hbm/energy/IEnergyUser.java index ee88b4ab3a..7eace7f783 100644 --- a/src/main/java/api/hbm/energy/IEnergyUser.java +++ b/src/main/java/api/hbm/energy/IEnergyUser.java @@ -87,17 +87,17 @@ public default void sendPower(World world, BlockPos pos, ForgeDirection dir) { } } - if(particleDebug) { - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "network"); - data.setString("mode", "power"); - double posX = pos.getX() + 0.5 + dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; - double posY = pos.getY() + 0.5 + dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; - double posZ = pos.getZ() + 0.5 + dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; - data.setDouble("mX", dir.offsetX * (red ? 0.025 : 0.1)); - data.setDouble("mY", dir.offsetY * (red ? 0.025 : 0.1)); - data.setDouble("mZ", dir.offsetZ * (red ? 0.025 : 0.1)); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.getDimension(), posX, posY, posZ, 25)); - } + // if(particleDebug) { + // NBTTagCompound data = new NBTTagCompound(); + // data.setString("type", "network"); + // data.setString("mode", "power"); + // double posX = pos.getX() + 0.5 + dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; + // double posY = pos.getY() + 0.5 + dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; + // double posZ = pos.getZ() + 0.5 + dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25; + // data.setDouble("mX", dir.offsetX * (red ? 0.025 : 0.1)); + // data.setDouble("mY", dir.offsetY * (red ? 0.025 : 0.1)); + // data.setDouble("mZ", dir.offsetZ * (red ? 0.025 : 0.1)); + // PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.getDimension(), posX, posY, posZ, 25)); + // } } } diff --git a/src/main/java/com/hbm/blocks/machine/MachineBattery.java b/src/main/java/com/hbm/blocks/machine/MachineBattery.java index b27e38f812..ab33b3c934 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineBattery.java +++ b/src/main/java/com/hbm/blocks/machine/MachineBattery.java @@ -1,9 +1,12 @@ package com.hbm.blocks.machine; +import java.util.ArrayList; import java.util.List; import java.util.Random; +import com.hbm.util.I18nUtil; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.ILookOverlay; import com.hbm.lib.Library; import com.hbm.lib.InventoryHelper; import com.hbm.main.MainRegistry; @@ -30,8 +33,9 @@ import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; -public class MachineBattery extends BlockContainer { +public class MachineBattery extends BlockContainer implements ILookOverlay { public static final PropertyDirection FACING = BlockHorizontal.FACING; private long maxPower; @@ -247,4 +251,28 @@ public void addInformation(ItemStack stack, World worldIn, List list, IT list.add(color+Library.getShortNumber(charge)+color2+"/"+Library.getShortNumber(this.maxPower)+"HE "+color+"("+percent+"%)§r"); } } + + @Override + public void printHook(Pre event, World world, int x, int y, int z) { + + TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); + + if(!(te instanceof TileEntityMachineBattery)) + return; + + TileEntityMachineBattery battery = (TileEntityMachineBattery) te; + List text = new ArrayList(); + text.add("§6<> §rStored Energy: " + Library.getShortNumber(battery.power) + "/" + Library.getShortNumber(getMaxPower()) + "HE"); + if(battery.powerDelta == 0){ + text.add("§e-- §r0HE/s"); + } + else if(battery.powerDelta > 0){ + text.add("§a-> §r" + Library.getShortNumber(battery.powerDelta) + "HE/s"); + } + else{ + text.add("§c<- §r" + Library.getShortNumber(-battery.powerDelta) + "HE/s"); + } + text.add("&["+Library.getColorProgress((double)battery.power/(double)getMaxPower())+"&] "+Library.getPercentage((double)battery.power/(double)getMaxPower())+"%"); + ILookOverlay.printGeneric(event, getLocalizedName(), 0xffff00, 0x404000, text); + } } diff --git a/src/main/java/com/hbm/blocks/machine/MachineChungus.java b/src/main/java/com/hbm/blocks/machine/MachineChungus.java index cb551d9bc5..05a6d575d6 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineChungus.java +++ b/src/main/java/com/hbm/blocks/machine/MachineChungus.java @@ -3,7 +3,6 @@ import java.util.ArrayList; import java.util.List; -import com.hbm.util.I18nUtil; import com.hbm.lib.Library; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.BlockDummyable; @@ -158,8 +157,8 @@ public void printHook(Pre event, World world, int x, int y, int z) { text.add("§a-> §r" + chungus.types[0].getLocalizedName(new FluidStack(chungus.types[0], 1)) + ": " + chungus.tanks[0].getFluidAmount() + "/" + chungus.tanks[0].getCapacity() + "mB"); if(chungus.types[1] != null) text.add("§c<- §r" + chungus.types[1].getLocalizedName(new FluidStack(chungus.types[1], 1)) + ": " + chungus.tanks[1].getFluidAmount() + "/" + chungus.tanks[1].getCapacity() + "mB"); - text.add("§6<> §rStored Energy: " + Library.getShortNumber(chungus.power)+ "/" + Library.getShortNumber(chungus.maxPower) + "HE"); + text.add("§6<> §rStored Energy: " + Library.getShortNumber(chungus.power) + "/" + Library.getShortNumber(chungus.maxPower) + "HE"); - ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); + ILookOverlay.printGeneric(event, getLocalizedName(), 0xffff00, 0x404000, text); } } \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/machine/MachineFENSU.java b/src/main/java/com/hbm/blocks/machine/MachineFENSU.java index 4b49108bf0..c92cf6d12c 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineFENSU.java +++ b/src/main/java/com/hbm/blocks/machine/MachineFENSU.java @@ -1,10 +1,13 @@ package com.hbm.blocks.machine; +import java.util.ArrayList; import java.util.List; import java.util.Random; import com.hbm.lib.Library; import com.hbm.lib.InventoryHelper; +import com.hbm.blocks.ILookOverlay; +import com.hbm.lib.Library; import com.hbm.blocks.BlockDummyableMBB; import com.hbm.blocks.ModBlocks; import com.hbm.main.MainRegistry; @@ -25,9 +28,10 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; import net.minecraftforge.fml.common.network.internal.FMLNetworkHandler; -public class MachineFENSU extends BlockDummyableMBB { +public class MachineFENSU extends BlockDummyableMBB implements ILookOverlay { public MachineFENSU(Material materialIn, String s) { super(materialIn, s); @@ -213,4 +217,25 @@ public void addInformation(ItemStack stack, World worldIn, List list, IT list.add(color+Library.getShortNumber(charge)+color2+"/9.22EHE "+color+"("+percent+"%)§r"); } } + + @Override + public void printHook(Pre event, World world, int x, int y, int z) { + + TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); + + if(!(te instanceof TileEntityMachineFENSU)) + return; + + TileEntityMachineFENSU battery = (TileEntityMachineFENSU) te; + List text = new ArrayList(); + text.add("§6<> §rStored Energy: " + Library.getShortNumber(battery.power) + "/9.22EHE"); + if(battery.powerDelta == 0) + text.add("§e-- §r0HE/s"); + else if(battery.powerDelta > 0) + text.add("§a-> §r" + Library.getShortNumber(battery.powerDelta) + "HE/s"); + else + text.add("§c<- §r" + Library.getShortNumber(-battery.powerDelta) + "HE/s"); + text.add("&["+Library.getColorProgress((double)battery.power/(double)Long.MAX_VALUE)+"&] "+Library.getPercentage((double)battery.power/(double)Long.MAX_VALUE)+"%"); + ILookOverlay.printGeneric(event, getLocalizedName(), 0xffff00, 0x404000, text); + } } diff --git a/src/main/java/com/hbm/blocks/network/BlockFluidPipeMk2.java b/src/main/java/com/hbm/blocks/network/BlockFluidPipeMk2.java index 1d61f4acf1..abe23cd178 100644 --- a/src/main/java/com/hbm/blocks/network/BlockFluidPipeMk2.java +++ b/src/main/java/com/hbm/blocks/network/BlockFluidPipeMk2.java @@ -233,7 +233,7 @@ public void printHook(Pre event, World world, int x, int y, int z) { if(ductFluid == null){ text.add("§7None"); } else{ - int color = ModForgeFluids.fluidColors.get(ductFluid); + int color = ModForgeFluids.getFluidColor(ductFluid); text.add("&[" + color + "&]" +I18nUtil.resolveKey(ductFluid.getUnlocalizedName())); } diff --git a/src/main/java/com/hbm/config/BombConfig.java b/src/main/java/com/hbm/config/BombConfig.java index 5d636c28c6..a260a54956 100644 --- a/src/main/java/com/hbm/config/BombConfig.java +++ b/src/main/java/com/hbm/config/BombConfig.java @@ -23,7 +23,7 @@ public class BombConfig { public static int mk4 = 1024; public static int blastSpeed = 1024; public static int falloutRange = 100; - public static int fChunkSpeed = 20; + public static int fChunkSpeed = 10; public static boolean evaporateWater = true; public static boolean fillCraterWithWater = true; public static int oceanHeight = 0; @@ -92,7 +92,7 @@ public static void loadFromConfig(Configuration config) { falloutRangeProp.setComment("Radius of fallout area (base radius * value in percent)"); falloutRange = falloutRangeProp.getInt(); // new explosion speed - Property falloutChunkSpeed = config.get(CATEGORY_NUKE, "6.04_falloutChunkSpeed", 6); + Property falloutChunkSpeed = config.get(CATEGORY_NUKE, "6.04_falloutChunkSpeed", 10); falloutChunkSpeed.setComment("Process a Chunk every nth tick by the fallout rain"); fChunkSpeed = falloutChunkSpeed.getInt(); //Whether fallout and nuclear radiation is enabled at all diff --git a/src/main/java/com/hbm/config/CompatibilityConfig.java b/src/main/java/com/hbm/config/CompatibilityConfig.java index 71524c7c93..d73b5b5be9 100644 --- a/src/main/java/com/hbm/config/CompatibilityConfig.java +++ b/src/main/java/com/hbm/config/CompatibilityConfig.java @@ -198,11 +198,11 @@ public static void loadFromConfig(Configuration config) { meteorShowerDuration = CommonConfig.createConfigHashMap(config, CATEGORY_METEOR, "05.03_meteorShowerDuration", "Max duration of meteor shower in ticks - (Int:Int)", "Int", "Int", new String[]{ "0:"+20 * 60 * 30, "-28:"+20 * 60 * 60, "-27:"+20 * 60 * 3, "-26:"+20 * 60 * 3, "-29:"+20 * 60 * 60, "-30:"+20*10, "-31:"+20 * 60 }, ":"); - String mobModRadComment = "Amount of radiation resistance the all mobs of that mod get. Radresistance s is calculated as s=(1-0.2^r). So a resistance value of 3.0 means that 99.2%=(1-0.2^3.0) of the radiation gets blocked. - (String:Float)"; + String mobModRadComment = "Amount of radiation resistance the all mobs of that mod get. Radresistance s is calculated as s=(1-0.1^r). So a resistance value of 3.0 means that 99.9%=(1-0.1^3.0) of the radiation gets blocked. - (String:Float)"; mobModRadresistance = CommonConfig.createConfigHashMap(config, CATEGORY_MOB, "06.01_mobModRadresistance", mobModRadComment, "String", "Float", new String[]{ "biomesoplenty=0.5" }, "="); mobModRadimmune = CommonConfig.createConfigHashSet(config, CATEGORY_MOB, "06.02_mobModRadimmune", "List of mods whose entities should all be immune to radiation. - (String)", "String", new String[]{ "srparasites" }); - String mobRadComment = "Amount of radiation resistance the mob gets. Radresistance s is calculated as s=(1-0.2^r). So a resistance value of 3.0 means that 99.2%=(1-0.2^3.0) of the radiation gets blocked. - (String:Float)"; + String mobRadComment = "Amount of radiation resistance the mob gets. Radresistance s is calculated as s=(1-0.1^r). So a resistance value of 3.0 means that 99.9%=(1-0.1^3.0) of the radiation gets blocked. - (String:Float)"; mobRadresistance = CommonConfig.createConfigHashMap(config, CATEGORY_MOB, "06.03_mobRadresistance", mobRadComment, "String", "Float", new String[]{ "biomesoplenty:entity.wasp=2.0" }, "="); mobRadimmune = CommonConfig.createConfigHashSet(config, CATEGORY_MOB, "06.04_mobRadimmune", "List of mobs that are immune to radiation. - (String)", "String", new String[]{ "minecraft:entity.Slime", "minecraft:entity.Vex" }); diff --git a/src/main/java/com/hbm/config/VersatileConfig.java b/src/main/java/com/hbm/config/VersatileConfig.java index cdd87ba55f..a13fa564a6 100644 --- a/src/main/java/com/hbm/config/VersatileConfig.java +++ b/src/main/java/com/hbm/config/VersatileConfig.java @@ -9,14 +9,6 @@ public class VersatileConfig { - public static Item getTransmutatorItem() { - - if(GeneralConfig.enableBabyMode) - return ModItems.ingot_schrabidium; - - return ModItems.ingot_schraranium; - } - public static int getSchrabOreChance() { if(GeneralConfig.enableBabyMode) diff --git a/src/main/java/com/hbm/explosion/ExplosionChaos.java b/src/main/java/com/hbm/explosion/ExplosionChaos.java index 660c678ee9..0f57f3695f 100644 --- a/src/main/java/com/hbm/explosion/ExplosionChaos.java +++ b/src/main/java/com/hbm/explosion/ExplosionChaos.java @@ -199,17 +199,19 @@ public static void c(World world, int x, int y, int z, int bombStartStrength) { } } - if(entity instanceof EntityPlayer && ArmorUtil.checkForHazmat((EntityPlayer) entity)) { - } else { - - if(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isPotionActive(HbmPotion.taint)) { - ((EntityLivingBase) entity).removePotionEffect(HbmPotion.taint); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.mutation, 1 * 60 * 60 * 20, 0, false, true)); - } else { - if(ArmorRegistry.hasProtection((EntityLivingBase) entity, EntityEquipmentSlot.HEAD, HazardClass.BACTERIA)){ - ArmorUtil.damageGasMaskFilter((EntityLivingBase) entity, 1); - }else{ - entity.attackEntityFrom(ModDamageSource.cloud, 3); + if(!(entity instanceof EntityPlayer && ArmorUtil.checkForHazmat((EntityPlayer) entity))) { + + if(entity instanceof EntityLivingBase){ + EntityLivingBase livi = (EntityLivingBase)entity; + if(livi.isPotionActive(HbmPotion.taint)) { + livi.removePotionEffect(HbmPotion.taint); + livi.addPotionEffect(new PotionEffect(HbmPotion.mutation, 1 * 60 * 60 * 20, 0, false, true)); + } else { + if(ArmorRegistry.hasProtection(livi, EntityEquipmentSlot.HEAD, HazardClass.BACTERIA)){ + ArmorUtil.damageGasMaskFilter(livi, 1); + }else{ + entity.attackEntityFrom(ModDamageSource.cloud, 3); + } } } } diff --git a/src/main/java/com/hbm/handler/ArmorUtil.java b/src/main/java/com/hbm/handler/ArmorUtil.java index 203d187fc9..c0a0e038d0 100644 --- a/src/main/java/com/hbm/handler/ArmorUtil.java +++ b/src/main/java/com/hbm/handler/ArmorUtil.java @@ -407,6 +407,27 @@ public static boolean checkForGoggles(EntityPlayer player) { return false; } + /** + * Grabs the installed filter or the filter of the attachment, used for attachment rendering + * @param mask + * @param entity + * @return + */ + public static ItemStack getGasMaskFilterRecursively(ItemStack mask) { + + ItemStack filter = getGasMaskFilter(mask); + + if((filter == null || filter.isEmpty()) && ArmorModHandler.hasMods(mask)) { + + ItemStack mods[] = ArmorModHandler.pryMods(mask); + + if(mods[ArmorModHandler.helmet_only] != null && mods[ArmorModHandler.helmet_only].getItem() instanceof IGasMask) + filter = ((IGasMask)mods[ArmorModHandler.helmet_only].getItem()).getFilter(mods[ArmorModHandler.helmet_only]); + } + + return filter; + } + public static void addGasMaskTooltip(ItemStack mask, World world, List list, ITooltipFlag flagIn){ if(mask == null || !(mask.getItem() instanceof IGasMask)) diff --git a/src/main/java/com/hbm/handler/RadiationWorldHandler.java b/src/main/java/com/hbm/handler/RadiationWorldHandler.java index 0b11b6b1eb..3cb0659110 100644 --- a/src/main/java/com/hbm/handler/RadiationWorldHandler.java +++ b/src/main/java/com/hbm/handler/RadiationWorldHandler.java @@ -91,10 +91,14 @@ public static void handleWorldDestruction(World world) { } else if(bblock == ModBlocks.waste_leaves) { if(world.rand.nextInt(8) == 0) { world.setBlockState(pos, Blocks.AIR.getDefaultState(), 1); + IBlockState state = world.getBlockState(pos); + world.notifyBlockUpdate(pos, state, state, 1); } } else if(bblock instanceof BlockLeaves) { world.setBlockState(pos, ModBlocks.waste_leaves.getDefaultState(), 1); + IBlockState state = world.getBlockState(pos); + world.notifyBlockUpdate(pos, state, state, 1); } } } @@ -172,10 +176,14 @@ public static void handleWorldDestruction(World world) { } else if(bblock == ModBlocks.waste_leaves) { if(world.rand.nextInt(8) == 0) { world.setBlockState(pos, Blocks.AIR.getDefaultState(), 1); + IBlockState state = world.getBlockState(pos); + world.notifyBlockUpdate(pos, state, state, 1); } } else if(bblock instanceof BlockLeaves) { world.setBlockState(pos, ModBlocks.waste_leaves.getDefaultState(), 1); + IBlockState state = world.getBlockState(pos); + world.notifyBlockUpdate(pos, state, state, 1); } } } diff --git a/src/main/java/com/hbm/handler/jei/JEIConfig.java b/src/main/java/com/hbm/handler/jei/JEIConfig.java index 62c892f360..5b54a54504 100644 --- a/src/main/java/com/hbm/handler/jei/JEIConfig.java +++ b/src/main/java/com/hbm/handler/jei/JEIConfig.java @@ -30,6 +30,7 @@ import com.hbm.inventory.gui.GUITestDiFurnace; import com.hbm.inventory.gui.GUIRBMKOutgasser; import com.hbm.inventory.gui.GUIFWatzCore; +import com.hbm.inventory.gui.GUIMachineSchrabidiumTransmutator; import com.hbm.items.ModItems; import com.hbm.items.weapon.ItemCustomMissile; import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; @@ -79,11 +80,13 @@ public class JEIConfig implements IModPlugin { public static final String SILEX_GAMMA = "hbm.silexgamma"; public static final String SILEX_DIGAMMA = "hbm.silexdigamma"; public static final String WASTEDRUM = "hbm.waste_drum"; + public static final String STORAGEDRUM = "hbm.storage_drum"; public static final String SMITHING = "hbm.smithing"; public static final String ANVIL = "hbm.anvil"; public static final String RBMKOUTGASSER = "hbm.rbmk_outgasser"; public static final String SAFE_REACTOR = "hbm.safe_reactor"; public static final String DFC = "hbm.dfc"; + public static final String TRANSMUTATION = "hbm.transmutation"; @Override public void register(IModRegistry registry) { @@ -94,6 +97,7 @@ public void register(IModRegistry registry) { registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_assembler), ASSEMBLY); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_chemplant), CHEMPLANT); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_cyclotron), CYCLOTRON); + registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_schrabidium_transmutator), TRANSMUTATION); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_press), PRESS); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_difurnace_off), ALLOY); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_boiler_off), BOILER); @@ -102,6 +106,7 @@ public void register(IModRegistry registry) { registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_gascent), GAS_CENT); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_reactor), REACTOR); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_waste_drum), WASTEDRUM); + registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_storage_drum), STORAGEDRUM); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_refinery), REFINERY); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_catalytic_cracker), CRACKING); registry.addRecipeCatalyst(new ItemStack(ModBlocks.machine_fraction_tower), FRACTIONING); @@ -131,6 +136,7 @@ public void register(IModRegistry registry) { // registry.addRecipes(ItemAssemblyTemplate.recipes, ASSEMBLY); registry.addRecipes(JeiRecipes.getChemistryRecipes(), CHEMPLANT); registry.addRecipes(JeiRecipes.getCyclotronRecipes(), CYCLOTRON); + registry.addRecipes(JeiRecipes.getTransmutationRecipes(), TRANSMUTATION); registry.addRecipes(JeiRecipes.getPressRecipes(), PRESS); registry.addRecipes(JeiRecipes.getAlloyRecipes(), ALLOY); registry.addRecipes(JeiRecipes.getBoilerRecipes(), BOILER); @@ -139,6 +145,7 @@ public void register(IModRegistry registry) { registry.addRecipes(JeiRecipes.getGasCentrifugeRecipes(), GAS_CENT); registry.addRecipes(JeiRecipes.getReactorRecipes(), REACTOR); registry.addRecipes(JeiRecipes.getWasteDrumRecipes(), WASTEDRUM); + registry.addRecipes(JeiRecipes.getStorageDrumRecipes(), STORAGEDRUM); registry.addRecipes(JeiRecipes.getRefineryRecipe(), REFINERY); registry.addRecipes(JeiRecipes.getCrackingRecipe(), CRACKING); registry.addRecipes(JeiRecipes.getFractioningRecipe(), FRACTIONING); @@ -186,6 +193,7 @@ public void register(IModRegistry registry) { registry.addRecipeClickArea(GUIAnvil.class, 12, 50, 48-12, 66-50, ANVIL); registry.addRecipeClickArea(GUIFWatzCore.class, 52, 64, 72, 19, SAFE_REACTOR); registry.addRecipeClickArea(GUIRBMKOutgasser.class, 64, 53, 48, 16, RBMKOUTGASSER); + registry.addRecipeClickArea(GUIMachineSchrabidiumTransmutator.class, 64, 56, 66, 31, TRANSMUTATION); IIngredientBlacklist blacklist = registry.getJeiHelpers().getIngredientBlacklist(); @@ -274,9 +282,11 @@ public void registerCategories(IRecipeCategoryRegistration registry) { new CentrifugeRecipeHandler(help), new GasCentrifugeRecipeHandler(help), new CyclotronRecipeHandler(help), + new TransmutationRecipeHandler(help), new CMBFurnaceRecipeHandler(help), new ReactorRecipeHandler(help), new WasteDrumRecipeHandler(help), + new StorageDrumRecipeHandler(help), new FluidRecipeHandler(help), new SILEXRecipeHandler(help), new SILEXRadioRecipeHandler(help), diff --git a/src/main/java/com/hbm/handler/jei/JeiRecipes.java b/src/main/java/com/hbm/handler/jei/JeiRecipes.java index 06d3fd5092..850514ba08 100644 --- a/src/main/java/com/hbm/handler/jei/JeiRecipes.java +++ b/src/main/java/com/hbm/handler/jei/JeiRecipes.java @@ -23,6 +23,7 @@ import com.hbm.inventory.BreederRecipes; import com.hbm.inventory.BreederRecipes.BreederRecipe; import com.hbm.inventory.WasteDrumRecipes; +import com.hbm.inventory.StorageDrumRecipes; import com.hbm.inventory.CyclotronRecipes; import com.hbm.inventory.FusionRecipes; import com.hbm.inventory.DiFurnaceRecipes; @@ -31,6 +32,7 @@ import com.hbm.inventory.MagicRecipes; import com.hbm.inventory.RefineryRecipes; import com.hbm.inventory.CrackRecipes; +import com.hbm.inventory.NuclearTransmutationRecipes; import com.hbm.inventory.MagicRecipes.MagicRecipe; import com.hbm.inventory.RecipesCommon.AStack; import com.hbm.inventory.RecipesCommon.ComparableStack; @@ -79,6 +81,7 @@ public class JeiRecipes { private static List gasCentRecipes = null; private static List reactorRecipes = null; private static List wasteDrumRecipes = null; + private static List storageDrumRecipes = null; private static List refineryRecipes = null; private static List crackingRecipes = null; private static List fractioningRecipes = null; @@ -91,6 +94,7 @@ public class JeiRecipes { private static Map> waveSilexRecipes = new HashMap>(); private static List smithingRecipes = null; private static List anvilRecipes = null; + private static List transmutationRecipes = null; private static List batteries = null; private static Map> reactorFuelMap = new HashMap>(); @@ -280,7 +284,41 @@ public void getIngredients(IIngredients ingredients) { ingredients.setInput(VanillaTypes.ITEM, input); ingredients.setOutput(VanillaTypes.ITEM, output); } + } + + public static class StorageDrumRecipe implements IRecipeWrapper { + + private final ItemStack input; + private final ItemStack output; + + public StorageDrumRecipe(ItemStack input, ItemStack output) { + this.input = input; + this.output = output; + } + + @Override + public void getIngredients(IIngredients ingredients) { + ingredients.setInput(VanillaTypes.ITEM, input); + ingredients.setOutput(VanillaTypes.ITEM, output); + } + } + + public static class TransmutationRecipe implements IRecipeWrapper { + + private final List> inputs; + private final ItemStack output; + public TransmutationRecipe(List inputs, ItemStack output) { + this.inputs = new ArrayList(); + this.inputs.add(inputs); + this.output = output; + } + + @Override + public void getIngredients(IIngredients ingredients) { + ingredients.setInputLists(VanillaTypes.ITEM, inputs); + ingredients.setOutput(VanillaTypes.ITEM, output); + } } public static class RefineryRecipe implements IRecipeWrapper { @@ -903,6 +941,30 @@ public static List getWasteDrumRecipes(){ return wasteDrumRecipes; } + + public static List getStorageDrumRecipes(){ + if(storageDrumRecipes != null) + return storageDrumRecipes; + storageDrumRecipes = new ArrayList(); + + for(Map.Entry entry : StorageDrumRecipes.recipeOutputs.entrySet()){ + storageDrumRecipes.add(new StorageDrumRecipe(entry.getKey().getStack(), entry.getValue())); + } + + return storageDrumRecipes; + } + + public static List getTransmutationRecipes(){ + if(transmutationRecipes != null) + return transmutationRecipes; + transmutationRecipes = new ArrayList(); + + for(Map.Entry entry : NuclearTransmutationRecipes.recipesOutput.entrySet()){ + transmutationRecipes.add(new TransmutationRecipe(entry.getKey().getStackList(), entry.getValue())); + } + + return transmutationRecipes; + } public static List getReactorFuels(int heat){ if(reactorFuelMap.containsKey(heat)) diff --git a/src/main/java/com/hbm/handler/jei/StorageDrumRecipeHandler.java b/src/main/java/com/hbm/handler/jei/StorageDrumRecipeHandler.java new file mode 100644 index 0000000000..d133a520f1 --- /dev/null +++ b/src/main/java/com/hbm/handler/jei/StorageDrumRecipeHandler.java @@ -0,0 +1,54 @@ +package com.hbm.handler.jei; + +import com.hbm.handler.jei.JeiRecipes.StorageDrumRecipe; +import com.hbm.lib.RefStrings; + +import mezz.jei.api.IGuiHelper; +import mezz.jei.api.gui.IDrawable; +import mezz.jei.api.gui.IGuiItemStackGroup; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IRecipeCategory; +import net.minecraft.util.ResourceLocation; + +public class StorageDrumRecipeHandler implements IRecipeCategory { + + public static final ResourceLocation gui_rl = new ResourceLocation(RefStrings.MODID, "textures/gui/jei/gui_nei_wastedrum.png"); + + protected final IDrawable background; + + public StorageDrumRecipeHandler(IGuiHelper help) { + background = help.createDrawable(gui_rl, 38, 29, 99, 27); + } + + @Override + public String getUid() { + return JEIConfig.STORAGEDRUM; + } + + @Override + public String getTitle() { + return "Nuclear Waste Drum"; + } + + @Override + public String getModName() { + return RefStrings.MODID; + } + + @Override + public IDrawable getBackground() { + return background; + } + + @Override + public void setRecipe(IRecipeLayout recipeLayout, StorageDrumRecipe recipeWrapper, IIngredients ingredients) { + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + guiItemStacks.init(0, true, 5, 5); + guiItemStacks.init(1, false, 78, 6); + + guiItemStacks.set(ingredients); + } + +} diff --git a/src/main/java/com/hbm/handler/jei/TransmutationRecipeHandler.java b/src/main/java/com/hbm/handler/jei/TransmutationRecipeHandler.java new file mode 100644 index 0000000000..7c2fc5e157 --- /dev/null +++ b/src/main/java/com/hbm/handler/jei/TransmutationRecipeHandler.java @@ -0,0 +1,54 @@ +package com.hbm.handler.jei; + +import com.hbm.handler.jei.JeiRecipes.TransmutationRecipe; +import com.hbm.lib.RefStrings; + +import mezz.jei.api.IGuiHelper; +import mezz.jei.api.gui.IDrawable; +import mezz.jei.api.gui.IGuiItemStackGroup; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IRecipeCategory; +import net.minecraft.util.ResourceLocation; + +public class TransmutationRecipeHandler implements IRecipeCategory { + + public static final ResourceLocation gui_rl = new ResourceLocation(RefStrings.MODID, "textures/gui/jei/gui_nei_transmutation.png"); + + protected final IDrawable background; + + public TransmutationRecipeHandler(IGuiHelper help) { + background = help.createDrawable(gui_rl, 38, 29, 99, 27); + } + + @Override + public String getUid() { + return JEIConfig.TRANSMUTATION; + } + + @Override + public String getTitle() { + return "Nuclear Transmutation"; + } + + @Override + public String getModName() { + return RefStrings.MODID; + } + + @Override + public IDrawable getBackground() { + return background; + } + + @Override + public void setRecipe(IRecipeLayout recipeLayout, TransmutationRecipe recipeWrapper, IIngredients ingredients) { + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + guiItemStacks.init(0, true, 5, 5); + guiItemStacks.init(1, false, 78, 6); + + guiItemStacks.set(ingredients); + } + +} diff --git a/src/main/java/com/hbm/inventory/CyclotronRecipes.java b/src/main/java/com/hbm/inventory/CyclotronRecipes.java index 32d0ec21eb..2715d1974c 100644 --- a/src/main/java/com/hbm/inventory/CyclotronRecipes.java +++ b/src/main/java/com/hbm/inventory/CyclotronRecipes.java @@ -41,7 +41,7 @@ public static void register() { makeRecipe(lithium, liAmat, P_RED.dust(), new ItemStack(ModItems.sulfur), liA); makeRecipe(lithium, liAmat, IRON.dust(), new ItemStack(ModItems.powder_cobalt), liA); makeRecipe(lithium, liAmat, SR.dust(), new ItemStack(ModItems.powder_zirconium), liA); - makeRecipe(lithium, liAmat, GOLD.dust(), new ItemStack(ModItems.nugget_mercury), liA); + makeRecipe(lithium, liAmat, GOLD.dust(), new ItemStack(ModItems.bottle_mercury), liA); makeRecipe(lithium, liAmat, PO210.dust(), new ItemStack(ModItems.powder_astatine), liA); makeRecipe(lithium, liAmat, LA.dust(), new ItemStack(ModItems.powder_cerium), liA); makeRecipe(lithium, liAmat, AC.dust(), new ItemStack(ModItems.powder_thorium), liA); @@ -71,7 +71,7 @@ public static void register() { makeRecipe(carbon, caAmat, TI.dust(), new ItemStack(ModItems.powder_cobalt), caA); makeRecipe(carbon, caAmat, CS.dust(), new ItemStack(ModItems.powder_lanthanium), caA); makeRecipe(carbon, caAmat, ND.dust(), new ItemStack(ModItems.powder_gold), caA); - makeRecipe(carbon, caAmat, new ComparableStack(ModItems.nugget_mercury), new ItemStack(ModItems.powder_polonium), caA); + makeRecipe(carbon, caAmat, new ComparableStack(ModItems.bottle_mercury), new ItemStack(ModItems.powder_polonium), caA); makeRecipe(carbon, caAmat, PB.dust(), new ItemStack(ModItems.powder_ra226), caA); makeRecipe(carbon, caAmat, AT.dust(), new ItemStack(ModItems.powder_actinium), caA); /// CARBON END /// diff --git a/src/main/java/com/hbm/inventory/DiFurnaceRecipes.java b/src/main/java/com/hbm/inventory/DiFurnaceRecipes.java index 86454b4c42..8fd53a0855 100644 --- a/src/main/java/com/hbm/inventory/DiFurnaceRecipes.java +++ b/src/main/java/com/hbm/inventory/DiFurnaceRecipes.java @@ -179,6 +179,18 @@ public static ItemStack getFurnaceProcessingResult(ItemStack stack1, ItemStack s } haveTriedAllID2 = true; } + + for(int id2 = 0; id2 < ids2.length; id2++) { + OreDictStack oreStack2 = new OreDictStack(OreDictionary.getOreName(ids2[id2])); + if(!haveTriedAllID2){ + outputItem = diRecipes.get(new Pair(new ComparableStack(item1), oreStack2)); + if(outputItem != null) + return outputItem; + outputItem = diRecipes.get(new Pair(new NbtComparableStack(item1), oreStack2)); + if(outputItem != null) + return outputItem; + } + } return null; } diff --git a/src/main/java/com/hbm/inventory/NuclearTransmutationRecipes.java b/src/main/java/com/hbm/inventory/NuclearTransmutationRecipes.java new file mode 100644 index 0000000000..14ba16eb70 --- /dev/null +++ b/src/main/java/com/hbm/inventory/NuclearTransmutationRecipes.java @@ -0,0 +1,72 @@ +package com.hbm.inventory; + +import java.util.HashMap; + +import com.hbm.items.ModItems; +import com.hbm.blocks.ModBlocks; +import static com.hbm.inventory.OreDictManager.*; +import com.hbm.inventory.RecipesCommon.AStack; +import com.hbm.inventory.RecipesCommon.ComparableStack; +import com.hbm.inventory.RecipesCommon.NbtComparableStack; +import com.hbm.inventory.RecipesCommon.OreDictStack; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class NuclearTransmutationRecipes { + + public static HashMap recipesOutput = new HashMap<>(); + public static HashMap recipesEnergy = new HashMap<>(); + + public static void registerRecipes() { + + //input, output + addRecipe(new OreDictStack(U.ingot()), new ItemStack(ModItems.ingot_schraranium, 1), 5_000_000L); + addRecipe(new OreDictStack(U.crystal()), new ItemStack(ModItems.crystal_schraranium, 1), 5_000_000L); + } + + public static void addRecipe(AStack input, ItemStack output, long energy){ + recipesOutput.put(input, output); + recipesEnergy.put(input, energy); + } + + public static ItemStack getOutput(ItemStack stack) { + if(stack == null) + return null; + + ItemStack outputItem = recipesOutput.get(new ComparableStack(stack)); + if(outputItem != null) + return outputItem; + outputItem = recipesOutput.get(new NbtComparableStack(stack)); + if(outputItem != null) + return outputItem; + int[] ids = OreDictionary.getOreIDs(new ItemStack(stack.getItem(), 1, stack.getItemDamage())); + for(int id = 0; id < ids.length; id++) { + OreDictStack oreStack = new OreDictStack(OreDictionary.getOreName(ids[id])); + outputItem = recipesOutput.get(oreStack); + if(outputItem != null) + return outputItem; + } + return null; + } + + public static long getEnergy(ItemStack stack) { + if(stack == null) + return -1; + + Long outputItem = recipesEnergy.get(new ComparableStack(stack)); + if(outputItem != null) + return outputItem; + outputItem = recipesEnergy.get(new NbtComparableStack(stack)); + if(outputItem != null) + return outputItem; + int[] ids = OreDictionary.getOreIDs(new ItemStack(stack.getItem(), 1, stack.getItemDamage())); + for(int id = 0; id < ids.length; id++) { + OreDictStack oreStack = new OreDictStack(OreDictionary.getOreName(ids[id])); + outputItem = recipesEnergy.get(oreStack); + if(outputItem != null) + return outputItem; + } + return -1; + } +} diff --git a/src/main/java/com/hbm/inventory/RBMKOutgasserRecipes.java b/src/main/java/com/hbm/inventory/RBMKOutgasserRecipes.java index bb820afef7..7fbaee9696 100644 --- a/src/main/java/com/hbm/inventory/RBMKOutgasserRecipes.java +++ b/src/main/java/com/hbm/inventory/RBMKOutgasserRecipes.java @@ -9,6 +9,7 @@ import com.hbm.forgefluid.ModForgeFluids; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemHazard; import com.hbm.items.machine.ItemFluidIcon; import static com.hbm.inventory.OreDictManager.*; @@ -35,38 +36,95 @@ public static void registerOverrides() { addRecipe(1500, LI.ingot(), ItemFluidIcon.getStackWithQuantity(ModForgeFluids.tritium, 800)); addRecipe(1200, LI.dust(), ItemFluidIcon.getStackWithQuantity(ModForgeFluids.tritium, 800)); addRecipe(240, LI.dustTiny(), ItemFluidIcon.getStackWithQuantity(ModForgeFluids.tritium, 120)); - addRecipe(360000, GOLD.ingot(), new ItemStack(ModItems.ingot_au198)); - addRecipe(80000, GOLD.nugget(), new ItemStack(ModItems.nugget_au198)); - addRecipe(350000, GOLD.dust(), new ItemStack(ModItems.powder_au198)); addRecipe(6000, Blocks.BROWN_MUSHROOM, new ItemStack(ModBlocks.mush)); addRecipe(6000, Blocks.RED_MUSHROOM, new ItemStack(ModBlocks.mush)); addRecipe(18000, Items.MUSHROOM_STEW, new ItemStack(ModItems.glowing_stew)); + + addRecipe(360000, GOLD.ingot(), new ItemStack(ModItems.ingot_au198)); + addRecipe(360000 * ItemHazard.nugget, GOLD.nugget(), new ItemStack(ModItems.nugget_au198)); + addRecipe(360000 * ItemHazard.powder, GOLD.dust(), new ItemStack(ModItems.powder_au198)); + addRecipe(360000 * ItemHazard.powder * ItemHazard.block, ModBlocks.sand_gold, new ItemStack(ModBlocks.sand_gold198)); + addRecipe(360000 * ItemHazard.block, GOLD.block(), new ItemStack(ModBlocks.block_au198)); + addRecipe(90000, TH232.ingot(), new ItemStack(ModItems.ingot_u233)); + addRecipe(90000 * ItemHazard.billet, TH232.billet(), new ItemStack(ModItems.billet_thorium_fuel)); + addRecipe(90000 * ItemHazard.nugget, TH232.nugget(), new ItemStack(ModItems.nugget_thorium_fuel)); + addRecipe(90000 * ItemHazard.block, TH232.block(), new ItemStack(ModBlocks.block_thorium_fuel)); + addRecipe(60000, U233.ingot(), new ItemStack(ModItems.ingot_u235)); - addRecipe(100000, U235.ingot(), new ItemStack(ModItems.ingot_neptunium)); + addRecipe(60000 * ItemHazard.billet, U233.billet(), new ItemStack(ModItems.billet_u235)); + addRecipe(60000 * ItemHazard.nugget, U233.nugget(), new ItemStack(ModItems.nugget_u235)); + addRecipe(60000 * ItemHazard.block, U233.block(), new ItemStack(ModBlocks.block_u235)); + + addRecipe(100000, U235.ingot(), new ItemStack(ModItems.ingot_neptunium_fuel)); + addRecipe(100000 * ItemHazard.billet, U235.billet(), new ItemStack(ModItems.billet_neptunium_fuel)); + addRecipe(100000 * ItemHazard.nugget, U235.nugget(), new ItemStack(ModItems.nugget_neptunium_fuel)); + addRecipe(170000, NP237.ingot(), new ItemStack(ModItems.ingot_pu238)); - addRecipe(120000, U238.ingot(), new ItemStack(ModItems.ingot_pu239)); + addRecipe(170000 * ItemHazard.billet, NP237.billet(), new ItemStack(ModItems.billet_pu238)); + addRecipe(170000 * ItemHazard.nugget, NP237.nugget(), new ItemStack(ModItems.nugget_pu238)); + addRecipe(170000 * ItemHazard.block, NP237.block(), new ItemStack(ModBlocks.block_pu238)); + + addRecipe(190000, U238.ingot(), new ItemStack(ModItems.ingot_pu239)); + addRecipe(190000 * ItemHazard.billet, U238.billet(), new ItemStack(ModItems.billet_pu239)); + addRecipe(190000 * ItemHazard.nugget, U238.nugget(), new ItemStack(ModItems.nugget_pu239)); + addRecipe(190000 * ItemHazard.block, U238.block(), new ItemStack(ModBlocks.block_pu239)); + addRecipe(150000, PU238.ingot(), new ItemStack(ModItems.ingot_pu239)); + addRecipe(150000 * ItemHazard.billet, PU238.billet(), new ItemStack(ModItems.billet_pu239)); + addRecipe(150000 * ItemHazard.nugget, PU238.nugget(), new ItemStack(ModItems.nugget_pu239)); + addRecipe(150000 * ItemHazard.block, PU238.block(), new ItemStack(ModBlocks.block_pu239)); + addRecipe(210000, PU239.ingot(), new ItemStack(ModItems.ingot_pu240)); + addRecipe(210000 * ItemHazard.billet, PU239.billet(), new ItemStack(ModItems.billet_pu240)); + addRecipe(210000 * ItemHazard.nugget, PU239.nugget(), new ItemStack(ModItems.nugget_pu240)); + addRecipe(210000 * ItemHazard.block, PU239.block(), new ItemStack(ModBlocks.block_pu240)); + addRecipe(2000000, PU240.ingot(), new ItemStack(ModItems.ingot_pu241)); + addRecipe(2000000 * ItemHazard.billet, PU240.billet(), new ItemStack(ModItems.billet_pu241)); + addRecipe(2000000 * ItemHazard.nugget, PU240.nugget(), new ItemStack(ModItems.nugget_pu241)); + addRecipe(6000000, PU241.ingot(), new ItemStack(ModItems.ingot_am241)); + addRecipe(6000000 * ItemHazard.billet, PU241.billet(), new ItemStack(ModItems.billet_am241)); + addRecipe(6000000 * ItemHazard.nugget, PU241.nugget(), new ItemStack(ModItems.nugget_am241)); + addRecipe(750000, AM241.ingot(), new ItemStack(ModItems.ingot_am242)); - addRecipe(69000, SA326.ingot(), new ItemStack(ModItems.ingot_solinium)); + addRecipe(750000 * ItemHazard.billet, AM241.billet(), new ItemStack(ModItems.billet_am242)); + addRecipe(750000 * ItemHazard.nugget, AM241.nugget(), new ItemStack(ModItems.nugget_am242)); + + addRecipe(690000, SA326.ingot(), new ItemStack(ModItems.ingot_solinium)); + addRecipe(690000 * ItemHazard.billet, SA326.billet(), new ItemStack(ModItems.billet_solinium)); + addRecipe(690000 * ItemHazard.nugget, SA326.nugget(), new ItemStack(ModItems.nugget_solinium)); + addRecipe(690000 * ItemHazard.block, SA326.block(), new ItemStack(ModBlocks.block_solinium)); + addRecipe(50000, CO.ingot(), new ItemStack(ModItems.ingot_co60)); - addRecipe(90000, CO.dust(), new ItemStack(ModItems.powder_co60)); + addRecipe(50000 * ItemHazard.nugget,CO.nugget(), new ItemStack(ModItems.nugget_co60)); + addRecipe(50000 * ItemHazard.powder, CO.dust(), new ItemStack(ModItems.powder_co60)); + addRecipe(50000 * ItemHazard.powder_tiny, CO.dustTiny(), new ItemStack(ModItems.powder_co60_tiny)); + addRecipe(55000, SR.ingot(), new ItemStack(ModItems.ingot_sr90)); - addRecipe(59000, SR.dust(), new ItemStack(ModItems.powder_sr90)); + addRecipe(55000 * ItemHazard.nugget, SR.nugget(), new ItemStack(ModItems.nugget_sr90)); + addRecipe(55000 * ItemHazard.powder, SR.dust(), new ItemStack(ModItems.powder_sr90)); + addRecipe(45000, I.ingot(), new ItemStack(ModItems.ingot_i131)); - addRecipe(35000, I.dust(), new ItemStack(ModItems.powder_i131)); + addRecipe(45000 * ItemHazard.powder, I.dust(), new ItemStack(ModItems.powder_i131)); + addRecipe(45000 * ItemHazard.powder_tiny, I.dustTiny(), new ItemStack(ModItems.powder_i131_tiny)); + addRecipe(450000, AC.ingot(), new ItemStack(ModItems.ingot_ac227)); - addRecipe(350000, AC.dust(), new ItemStack(ModItems.powder_ac227)); + addRecipe(450000 * ItemHazard.nugget, AC.nugget(), new ItemStack(ModItems.nugget_ac227)); + addRecipe(450000 * ItemHazard.powder, AC.dust(), new ItemStack(ModItems.powder_ac227)); + addRecipe(80000, CS.dust(), new ItemStack(ModItems.powder_cs137)); addRecipe(120000, AT.dust(), new ItemStack(ModItems.powder_at209)); - addRecipe(90000, ModItems.billet_australium, new ItemStack(ModItems.billet_australium_lesser)); + + addRecipe(120000 * ItemHazard.billet, ModItems.billet_australium, new ItemStack(ModItems.billet_australium_lesser)); + addRecipe(120000 * ItemHazard.nugget, ModItems.nugget_australium, new ItemStack(ModItems.nugget_australium_lesser)); + addRecipe(14000000, PB.ingot(), new ItemStack(ModItems.ingot_pb209)); - addRecipe(12000000, PB.dust(), new ItemStack(ModItems.powder_pb209)); + addRecipe(14000000 * ItemHazard.nugget, PB.nugget(), new ItemStack(ModItems.nugget_pb209)); + addRecipe(14000000 * ItemHazard.powder, PB.dust(), new ItemStack(ModItems.powder_pb209)); + addRecipe(1800000, NB.ingot(), new ItemStack(ModItems.ingot_technetium)); - addRecipe(50000, U238.ingot(), new ItemStack(ModItems.ingot_ra226)); addRecipe(32000, ModItems.nugget_unobtainium_lesser, new ItemStack(ModItems.nugget_unobtainium)); addRecipe(3000, ModBlocks.block_scrap, new ItemStack(ModBlocks.block_fallout)); addRecipe(2000, Blocks.STONE, new ItemStack(ModBlocks.sellafield_slaked)); @@ -95,6 +153,18 @@ public static void addRecipe(int requiredFlux, Block in, ItemStack out) { public static void addRecipe(int requiredFlux, String in, ItemStack out) { rbmkOutgasserRecipes.put(new ComparableStack(OreDictionary.getOres(in).get(0)), new Object[] {requiredFlux, out}); } + + public static void addRecipe(float requiredFlux, String in, ItemStack out) { + addRecipe((int)requiredFlux, in, out); + } + + public static void addRecipe(float requiredFlux, Item in, ItemStack out) { + addRecipe((int)requiredFlux, in, out); + } + + public static void addRecipe(float requiredFlux, Block in, ItemStack out) { + addRecipe((int)requiredFlux, in, out); + } public static void removeRecipe(ItemStack in) { rbmkOutgasserRecipes.remove(new ComparableStack(in)); diff --git a/src/main/java/com/hbm/inventory/SILEXRecipes.java b/src/main/java/com/hbm/inventory/SILEXRecipes.java index 55eec3894a..13e6beb52b 100644 --- a/src/main/java/com/hbm/inventory/SILEXRecipes.java +++ b/src/main/java/com/hbm/inventory/SILEXRecipes.java @@ -223,6 +223,20 @@ public static void register() { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 4 + 5 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 6 + 7 * i)) ); + // HEN // + recipes.put(new ComparableStack(ModItems.rbmk_pellet_hen, 1, i), new SILEXRecipe(600, 100, EnumWavelengths.UV) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 84 - i * 14)) + .addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu240) : new ItemStack(ModItems.nugget_technetium), 6 + i * 7)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 4 * i)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 10 + 3 * i)) ); + + recipes.put(new ComparableStack(ModItems.rbmk_pellet_hen, 1, i + 5), new SILEXRecipe(600, 100, EnumWavelengths.UV) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 4)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 80 - i * 14)) + .addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu241) : new ItemStack(ModItems.nugget_technetium), 6 + i * 7)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 4 * i)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 10 + 3 * i)) ); + // MOX // recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i), new SILEXRecipe(600, 100, EnumWavelengths.VISIBLE) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mox_fuel), 84 - i * 20)) diff --git a/src/main/java/com/hbm/inventory/StorageDrumRecipes.java b/src/main/java/com/hbm/inventory/StorageDrumRecipes.java new file mode 100644 index 0000000000..dfe25c2e7b --- /dev/null +++ b/src/main/java/com/hbm/inventory/StorageDrumRecipes.java @@ -0,0 +1,83 @@ +package com.hbm.inventory; + +import java.util.HashMap; +import java.util.HashSet; + +import com.hbm.config.VersatileConfig; +import com.hbm.inventory.RecipesCommon.ComparableStack; +import com.hbm.items.ModItems; +import com.hbm.items.special.ItemWasteLong; +import com.hbm.items.special.ItemWasteShort; + +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class StorageDrumRecipes { + + public static HashMap recipeOutputs = new HashMap<>(); + public static HashSet outputs = new HashSet<>(); + public static HashMap recipeWastes = new HashMap<>(); + + public static void registerRecipes() { + + //input, output + + for(int i = 0; i < ItemWasteLong.WasteClass.values().length; i++){ + ItemWasteLong.WasteClass waste = ItemWasteLong.WasteClass.values()[i]; + addRecipe(new ComparableStack(ModItems.nuclear_waste_long, 1, i), + new ItemStack(ModItems.nuclear_waste_long_depleted, 1, i), + VersatileConfig.getLongDecayChance(), + waste.liquid, + waste.gas + ); + addRecipe(new ComparableStack(ModItems.nuclear_waste_long_tiny, 1, i), + new ItemStack(ModItems.nuclear_waste_long_depleted_tiny, 1, i), + (int)(VersatileConfig.getLongDecayChance()*0.1), + (int)(waste.liquid*0.1), + (int)(waste.gas*0.1) + ); + } + + for(int i = 0; i < ItemWasteShort.WasteClass.values().length; i++){ + ItemWasteShort.WasteClass waste = ItemWasteShort.WasteClass.values()[i]; + addRecipe(new ComparableStack(ModItems.nuclear_waste_short, 1, i), + new ItemStack(ModItems.nuclear_waste_short_depleted, 1, i), + VersatileConfig.getShortDecayChance(), + waste.liquid, + waste.gas + ); + addRecipe(new ComparableStack(ModItems.nuclear_waste_short_tiny, 1, i), + new ItemStack(ModItems.nuclear_waste_short_depleted_tiny, 1, i), + (int)(VersatileConfig.getShortDecayChance()*0.1), + (int)(waste.liquid*0.1), + (int)(waste.gas*0.1) + ); + } + + addRecipe(new ComparableStack(ModItems.nugget_au198, 1), new ItemStack(ModItems.nugget_mercury, 1), (int)(VersatileConfig.getLongDecayChance()*0.01), 500, 500); + addRecipe(new ComparableStack(ModItems.ingot_au198, 1), new ItemStack(ModItems.bottle_mercury, 1), (int)(VersatileConfig.getLongDecayChance()*0.001), 50, 50); + } + + public static void addRecipe(ComparableStack input, ItemStack output, int chance, int wasteLiquid, int wasteGas){ + recipeOutputs.put(input, output); + recipeWastes.put(input, new int[]{chance, wasteLiquid, wasteGas}); + outputs.add(output); + } + + public static ItemStack getOutput(ItemStack stack) { + if(stack == null) + return null; + return recipeOutputs.get(new ComparableStack(stack)); + } + + public static int[] getWaste(ItemStack stack) { + if(stack == null) + return null; + return recipeWastes.get(new ComparableStack(stack)); + } + + public static boolean isOutputItem(ItemStack stack){ + return outputs.contains(new ComparableStack(stack)); + } +} diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index d3e9f4691b..1be494dc6d 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1447,9 +1447,9 @@ public class ModItems { public static final Item tritium_deuterium_cake = new ItemCustomLore("tritium_deuterium_cake").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1); - public static final Item pile_rod_uranium = new ItemPileRod("pile_rod_uranium").setCreativeTab(MainRegistry.controlTab); - public static final Item pile_rod_plutonium = new ItemPileRod("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab); - public static final Item pile_rod_source = new ItemPileRod("pile_rod_source").setCreativeTab(MainRegistry.controlTab); + public static final Item pile_rod_uranium = new ItemPileRod(ItemHazard.billet * 3 * ItemHazard.u, "pile_rod_uranium").setCreativeTab(MainRegistry.controlTab); + public static final Item pile_rod_plutonium = new ItemPileRod(ItemHazard.billet * 3 * ItemHazard.pu, "pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab); + public static final Item pile_rod_source = new ItemPileRod(3 * ItemHazard.rabe, "pile_rod_source").setCreativeTab(MainRegistry.controlTab); public static final Item pile_rod_boron = new ItemPileRod("pile_rod_boron").setCreativeTab(MainRegistry.controlTab); //That's a lot of rods @@ -2649,7 +2649,7 @@ public class ModItems { public static final Item rbmk_fuel_empty = new ItemBase("rbmk_fuel_empty").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab); public static final ItemRBMKRod rbmk_fuel_ueu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_ueu, "rbmk_fuel_ueu") .setYield(100000000D) - .setStats(15) + .setStats(7.5) .setFunction(EnumBurnFunc.LOG_TEN) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) .setHeat(0.65) //0.5 is too much of a nerf in heat; pu239 buildup justifies it being on par with MEU ig @@ -2659,7 +2659,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_meu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_meu, "rbmk_fuel_meu") .setYield(100000000D) - .setStats(20) + .setStats(10) .setFunction(EnumBurnFunc.LOG_TEN) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) .setHeat(0.65) //0.75 was a bit too much... @@ -2669,7 +2669,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_heu233 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu233, "rbmk_fuel_heu233") .setYield(100000000D) - .setStats(27.5D) + .setStats(0.275D) .setFunction(EnumBurnFunc.LINEAR) .setHeat(1.25D) .setMeltingPoint(2865) @@ -2678,7 +2678,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_heu235 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu235, "rbmk_fuel_heu235") .setYield(100000000D) - .setStats(50) //Consistency with HEN; its critical mass is too high to justify a linear function + .setStats(5) //Consistency with HEN; its critical mass is too high to justify a linear function .setFunction(EnumBurnFunc.SQUARE_ROOT) .setMeltingPoint(2865) .setFuelColor(0.513F, 0.541F, 0.498F) @@ -2696,7 +2696,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_lep = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_lep, "rbmk_fuel_lep") .setYield(100000000D) - .setStats(35) + .setStats(17.5) .setFunction(EnumBurnFunc.LOG_TEN) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) .setHeat(0.75D) @@ -2706,7 +2706,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_mep = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mep, "rbmk_fuel_mep") .setYield(100000000D) - .setStats(35, 20) + .setStats(3.5, 20) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setMeltingPoint(2744) .setFuelColor(0.314F, 0.349F, 0.337F) @@ -2714,7 +2714,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_hep239 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hep239, "rbmk_fuel_hep") .setYield(100000000D) - .setStats(30) + .setStats(0.3) .setFunction(EnumBurnFunc.LINEAR) .setHeat(1.25D) .setMeltingPoint(2744) @@ -2723,7 +2723,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_hep241 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hep241, "rbmk_fuel_hep241") .setYield(100000000D) - .setStats(40) + .setStats(0.4) .setFunction(EnumBurnFunc.LINEAR) .setHeat(1.75D) .setMeltingPoint(2744) @@ -2732,36 +2732,37 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_lea = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_lea, "rbmk_fuel_lea") .setYield(100000000D) - .setStats(60, 10) + .setStats(6, 10) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) .setHeat(1.5D) - .setMeltingPoint(2386) + .setMeltingPoint(2986) .setFuelColor(0.514F, 0.467F, 0.455F) .addRadiation(ItemHazard.amf * ItemHazard.rod_rbmk).toItem() ; public static final ItemRBMKRod rbmk_fuel_mea = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mea, "rbmk_fuel_mea") .setYield(100000000D) - .setStats(35, 20) + .setStats(0.9, 20, 600) .setFunction(EnumBurnFunc.ARCH) - .setHeat(1.75D) - .setMeltingPoint(2386) + .setXenon(0.02D, 50D) + .setHeat(1.6D) + .setMeltingPoint(2986) .setFuelColor(0.545F, 0.424F, 0.443F) .addRadiation(ItemHazard.amrg * ItemHazard.rod_rbmk).toItem() ; public static final ItemRBMKRod rbmk_fuel_hea241 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hea241, "rbmk_fuel_hea241") .setYield(100000000D) - .setStats(65, 15) + .setStats(6.5, 15) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setHeat(1.85D) - .setMeltingPoint(2386) + .setMeltingPoint(2986) .setNeutronTypes(NType.FAST, NType.FAST) .setFuelColor(0.545F, 0.424F, 0.443F) .addRadiation(ItemHazard.am241 * ItemHazard.rod_rbmk).toItem() ; public static final ItemRBMKRod rbmk_fuel_hea242 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hea242, "rbmk_fuel_hea242") .setYield(100000000D) - .setStats(45) + .setStats(0.45) .setFunction(EnumBurnFunc.LINEAR) .setHeat(2D) .setMeltingPoint(2386) @@ -2770,7 +2771,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_men = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_men, "rbmk_fuel_men") .setYield(100000000D) - .setStats(30) + .setStats(3) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) .setHeat(0.75) @@ -2781,7 +2782,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_hen = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hen, "rbmk_fuel_hen") .setYield(100000000D) - .setStats(40) + .setStats(4) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setMeltingPoint(2800) .setNeutronTypes(NType.FAST, NType.FAST) @@ -2790,7 +2791,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_mox = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mox, "rbmk_fuel_mox") .setYield(100000000D) - .setStats(40) + .setStats(10) .setFunction(EnumBurnFunc.LOG_TEN) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) .setMeltingPoint(2815) @@ -2799,7 +2800,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_les = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_les, "rbmk_fuel_les") .setYield(100000000D) - .setStats(50) + .setStats(5) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setHeat(1.25D) .setMeltingPoint(2500) @@ -2809,7 +2810,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_mes = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mes, "rbmk_fuel_mes") .setYield(100000000D) - .setStats(75D) + .setStats(0.75D, 0, 750) .setFunction(EnumBurnFunc.ARCH) .setHeat(1.5D) .setMeltingPoint(2750) @@ -2818,7 +2819,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_hes = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hes, "rbmk_fuel_hes") .setYield(100000000D) - .setStats(90) + .setStats(0.9) .setFunction(EnumBurnFunc.LINEAR) .setDepletionFunction(EnumDepleteFunc.LINEAR) .setHeat(1.75D) @@ -2828,7 +2829,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_leaus = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_leaus, "rbmk_fuel_leaus") .setYield(100000000D) - .setStats(30) + .setStats(0.3) .setFunction(EnumBurnFunc.SIGMOID) .setDepletionFunction(EnumDepleteFunc.LINEAR) .setXenon(0.05D, 50D) @@ -2839,7 +2840,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_heaus = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heaus, "rbmk_fuel_heaus") .setYield(100000000D) - .setStats(35) + .setStats(3.5) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setXenon(0.05D, 50D) .setHeat(2D) @@ -2849,7 +2850,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_unobtainium = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_unobtainium, "rbmk_fuel_unobtainium") .setYield(250000000D) - .setStats(400, 1) + .setStats(40, 1) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setDepletionFunction(EnumDepleteFunc.BOOSTED_SLOPE) .setHeat(0.01D) @@ -2886,7 +2887,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_pu238be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_pu238be, "rbmk_fuel_pu238be") .setYield(50000000D) - .setStats(40, 40) + .setStats(4, 40) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setHeat(0.1D) .setDiffusion(0.05D) @@ -2897,29 +2898,29 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_balefire_gold = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_balefire_gold, "rbmk_fuel_balefire_gold") .setYield(100000000D) - .setStats(50, 10) + .setStats(0.8, 10) .setFunction(EnumBurnFunc.ARCH) .setDepletionFunction(EnumDepleteFunc.LINEAR) .setXenon(0.0D, 50D) - .setMeltingPoint(2000) + .setMeltingPoint(5000) .setFuelColor(0.902F, 0.714F, 0.227F) .setCherenkovColor(0.6F, 0F, 1F) .addRadiation(ItemHazard.au198 * ItemHazard.rod_rbmk).toItem() ; public static final ItemRBMKRod rbmk_fuel_flashlead = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_flashlead, "rbmk_fuel_flashlead") .setYield(250000000D) - .setStats(40, 50) + .setStats(1, 50, 1500) .setFunction(EnumBurnFunc.ARCH) .setDepletionFunction(EnumDepleteFunc.LINEAR) .setXenon(0.0D, 50D) - .setMeltingPoint(2050) + .setMeltingPoint(5050) .setFuelColor(0.682F, 0.521F, 0.125F) .setCherenkovColor(0.6F, 0F, 1F) .addRadiation(ItemHazard.aupb * ItemHazard.rod_rbmk).toItem() ; public static final ItemRBMKRod rbmk_fuel_zfb_bismuth = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_zfb_bismuth, "rbmk_fuel_zfb_bismuth") .setYield(50000000D) - .setStats(20) + .setStats(2) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setHeat(1.75D) .setMeltingPoint(2744) @@ -2928,7 +2929,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_zfb_pu241 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_zfb_pu241, "rbmk_fuel_zfb_pu241") .setYield(50000000D) - .setStats(20) + .setStats(2) .setFunction(EnumBurnFunc.SQUARE_ROOT) .setMeltingPoint(2865) .setFuelColor(0.462F, 0.459F, 0.384F) @@ -2936,7 +2937,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_zfb_am_mix = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_zfb_am_mix, "rbmk_fuel_zfb_am_mix") .setYield(50000000D) - .setStats(20) + .setStats(0.2) .setFunction(EnumBurnFunc.LINEAR) .setHeat(1.75D) .setMeltingPoint(2744) @@ -2945,7 +2946,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_balefire = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_balefire, "rbmk_fuel_balefire") .setYield(100000000D) - .setStats(100, 35) + .setStats(1, 35) .setFunction(EnumBurnFunc.LINEAR) .setXenon(0.0D, 50D) .setHeat(3D) @@ -2956,7 +2957,7 @@ public class ModItems { ; public static final ItemRBMKRod rbmk_fuel_drx = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_drx, "rbmk_fuel_drx") .setYield(1000000D) - .setStats(1000, 10) + .setStats(0.1, 10) .setFunction(EnumBurnFunc.QUADRATIC) .setHeat(0.1D) .setMeltingPoint(100000) diff --git a/src/main/java/com/hbm/items/armor/ItemModGasmask.java b/src/main/java/com/hbm/items/armor/ItemModGasmask.java index 2a263e7be0..53e0489f87 100644 --- a/src/main/java/com/hbm/items/armor/ItemModGasmask.java +++ b/src/main/java/com/hbm/items/armor/ItemModGasmask.java @@ -64,7 +64,7 @@ public void addInformation(ItemStack stack, World worldIn, List list, IT @Override public void addDesc(List list, ItemStack stack, ItemStack armor){ list.add("§a " + stack.getDisplayName() + " (gas protection)"); - ArmorUtil.addGasMaskTooltip(stack, null, list, null); + ArmorUtil.addGasMaskTooltip(stack, null, list, ITooltipFlag.TooltipFlags.NORMAL); } @Override diff --git a/src/main/java/com/hbm/items/machine/ItemPileRod.java b/src/main/java/com/hbm/items/machine/ItemPileRod.java index 7e9d90e8ac..4d4021ae1f 100644 --- a/src/main/java/com/hbm/items/machine/ItemPileRod.java +++ b/src/main/java/com/hbm/items/machine/ItemPileRod.java @@ -3,6 +3,7 @@ import java.util.List; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemHazard; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.item.Item; @@ -10,13 +11,14 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; -public class ItemPileRod extends Item { +public class ItemPileRod extends ItemHazard { public ItemPileRod(String s){ - this.setUnlocalizedName(s); - this.setRegistryName(s); - - ModItems.ALL_ITEMS.add(this); + super(s); + } + + public ItemPileRod(float radiation, String s){ + super(radiation, s); } @Override @@ -38,6 +40,7 @@ public void addInformation(ItemStack stack, World worldIn, List tooltip, if(this == ModItems.pile_rod_source || this == ModItems.pile_rod_plutonium) { tooltip.add(TextFormatting.LIGHT_PURPLE + "[Neutron Source]"); } + super.addInformation(stack, worldIn, tooltip, flagIn); } } \ No newline at end of file diff --git a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java index a5b44d6812..a663331450 100644 --- a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java +++ b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java @@ -27,6 +27,7 @@ public class ItemRBMKRod extends Item implements IItemHazard { public String fullName = ""; //full name of the fuel rod public double reactivity; //endpoint of the function public double selfRate; //self-inflicted flux from self-igniting fuels + public double archLength = 1000; //used for arches of the function public EnumBurnFunc function = EnumBurnFunc.LOG_TEN; public EnumDepleteFunc depFunc = EnumDepleteFunc.GENTLE_SLOPE; public double xGen = 0.5D; //multiplier for xenon production @@ -101,6 +102,13 @@ public ItemRBMKRod setStats(double funcEnd, double selfRate) { return this; } + public ItemRBMKRod setStats(double funcEnd, double selfRate, double archLength) { + this.reactivity = funcEnd; + this.selfRate = selfRate; + this.archLength = archLength; + return this; + } + public ItemRBMKRod setFunction(EnumBurnFunc func) { this.function = func; return this; @@ -252,11 +260,11 @@ public static enum EnumBurnFunc { PLATEU(TextFormatting.GREEN + "SAFE / EULER"), //(1 - e^(-x/25)) * reactivity * 100 SIGMOID(TextFormatting.GREEN + "SAFE / SIGMOID"), //100 / (1 + e^(-(x - 50) / 10)) <- tiny amount of reactivity at x=0 ! LOG_TEN(TextFormatting.YELLOW + "MEDIUM / LOGARITHMIC"), //log10(x + 1) * reactivity * 50 - ARCH(TextFormatting.YELLOW + "MEDIUM / NEGATIVE-QUADRATIC"), //x-(x²/1000) * reactivity SQUARE_ROOT(TextFormatting.YELLOW + "MEDIUM / SQUARE ROOT"), //sqrt(x) * 10 * reactivity + ARCH(TextFormatting.GOLD + "RISKY / NEGATIVE-QUADRATIC"), //x-(x²/archLength) * reactivity LINEAR(TextFormatting.RED + "DANGEROUS / LINEAR"), //x * reactivity - QUADRATIC(TextFormatting.RED + "DANGEROUS / QUADRATIC"), //x^2 / 100 * reactivity - EXPERIMENTAL(TextFormatting.RED + "EXPERIMENTAL / SINE SLOPE"); //x * (sin(x) + 1) + QUADRATIC(TextFormatting.DARK_RED + "DANGEROUS / QUADRATIC"), //x^2 / 100 * reactivity + EXPERIMENTAL(TextFormatting.WHITE + "EXPERIMENTAL / SINE SLOPE"); //x * (sin(x) + 1) public String title = ""; @@ -275,13 +283,13 @@ public double reactivityFunc(double in, double enrichment) { switch(this.function) { case PASSIVE: return selfRate * enrichment; - case LOG_TEN: return Math.log10(flux + 1) * 0.5D * reactivity; + case LOG_TEN: return Math.log10(flux + 1) * reactivity; case PLATEU: return (1 - Math.pow(Math.E, -flux / 25D)) * reactivity; - case ARCH: return Math.max(flux - (flux * flux / 100000D) / 100D * reactivity, 0D); - case SIGMOID: return reactivity / (1 + Math.pow(Math.E, -(flux - 50D) / 10D)); - case SQUARE_ROOT: return Math.sqrt(flux) * reactivity / 10D; - case LINEAR: return flux / 100D * reactivity; - case QUADRATIC: return flux * flux / 10000D * reactivity; + case ARCH: return Math.max((flux - (flux * flux / archLength)) * reactivity, 0D); + case SIGMOID: return reactivity / (1 + Math.pow(Math.E, -0.1D * flux + 5)); + case SQUARE_ROOT: return Math.sqrt(flux) * reactivity; //reactivity in decipercent + case LINEAR: return flux * reactivity; //reactivity in percent + case QUADRATIC: return flux * flux * reactivity; //reactivity in percent case EXPERIMENTAL: return flux * (Math.sin(flux) + 1) * reactivity; } @@ -295,19 +303,19 @@ public String getFuncDescription(ItemStack stack) { switch(this.function) { case PASSIVE: function = TextFormatting.RED + "" + selfRate; break; - case LOG_TEN: function = "log10(%1$s + 1) * 0.5 * %2$s"; + case LOG_TEN: function = "log10(%1$s + 1) * %2$s"; break; - case PLATEU: function = "(1 - e^-%1$s / 25)) * %2$s"; + case PLATEU: function = "(1 - e^(-%1$s / 25)) * %2$s"; break; - case ARCH: function = "(%1$s - %1$s² / 10000) / 100 * %2$s [0;∞]"; + case ARCH: function = "(%1$s - %1$s² / "+archLength+") * %2$s"; break; - case SIGMOID: function = "%2$s / (1 + e^(-(%1$s - 50) / 10)"; + case SIGMOID: function = "%2$s / (1 + e^(-0.1 * %1$s + 5)"; break; - case SQUARE_ROOT: function = "sqrt(%1$s) * %2$s / 10"; + case SQUARE_ROOT: function = "sqrt(%1$s) * %2$s"; break; - case LINEAR: function = "%1$s / 100 * %2$s"; + case LINEAR: function = "%1$s * %2$s"; break; - case QUADRATIC: function = "%1$s² / 10000 * %2$s"; + case QUADRATIC: function = "%1$s² * %2$s"; break; case EXPERIMENTAL: function = "%1$s * (sin(%1$s) + 1) * %2$s"; break; diff --git a/src/main/java/com/hbm/items/tool/ItemGuideBook.java b/src/main/java/com/hbm/items/tool/ItemGuideBook.java index 672129a4c5..3cf15380ff 100644 --- a/src/main/java/com/hbm/items/tool/ItemGuideBook.java +++ b/src/main/java/com/hbm/items/tool/ItemGuideBook.java @@ -93,35 +93,74 @@ public static List statFacRBMK() { List pages = new ArrayList<>(); pages.add(new GuidePage("book.rbmk.page1").setScale(2F).addTitle("book.rbmk.title1", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk1.png"), 90, 80, 60)); - pages.add(new GuidePage("book.rbmk.page2").setScale(2F).addTitle("book.rbmk.title2", 0x800000, 1F) - .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk2.png"), 95, 52, 52)); + + pages.add(new GuidePage("book.rbmk.page_schematic").setScale(2F).addTitle("book.rbmk.title_schematic", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/schematic.png"), 95, 56, 52)); + pages.add(new GuidePage("book.rbmk.page3").setScale(2F).addTitle("book.rbmk.title3", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk3.png"), 95, 88, 52)); + pages.add(new GuidePage("book.rbmk.page10").setScale(2F).addTitle("book.rbmk.title10", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk10.png"), 95, 88, 52)); + pages.add(new GuidePage("book.rbmk.page8").setScale(2F).addTitle("book.rbmk.title8", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk8.png"), 95, 88, 52)); + pages.add(new GuidePage("book.rbmk.page9").setScale(2F).addTitle("book.rbmk.title9", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk9.png"), 95, 88, 52)); pages.add(new GuidePage("book.rbmk.page4").setScale(2F).addTitle("book.rbmk.title4", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk4.png"), 95, 88, 52)); pages.add(new GuidePage("book.rbmk.page5").setScale(2F).addTitle("book.rbmk.title5", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk5.png"), 95, 80, 42)); pages.add(new GuidePage("book.rbmk.page6").setScale(2F).addTitle("book.rbmk.title6", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk6.png"), 90, 100, 60)); + + pages.add(new GuidePage("book.rbmk.page_fluxgraph").setScale(2F).addTitle("book.rbmk.title_fluxgraph", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/fluxgraph.png"), 95, 95, 47)); + pages.add(new GuidePage("book.rbmk.page_flux").setScale(2F).addTitle("book.rbmk.title_flux", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk_flux.png"), 95, 88, 52)); + pages.add(new GuidePage("book.rbmk.page_flux_explain").setScale(2F).addTitle("book.rbmk.title_flux_explain", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_explain.png"), 95, 95, 48)); + + pages.add(new GuidePage("book.rbmk.page_func_passive").setScale(2F).addTitle("book.rbmk.title_func_passive", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_passive.png"), 85, 95, 48)); + pages.add(new GuidePage("book.rbmk.page_func_euler").setScale(2F).addTitle("book.rbmk.title_func_euler", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_euler.png"), 85, 95, 48)); + pages.add(new GuidePage("book.rbmk.page_func_sigmoid").setScale(2F).addTitle("book.rbmk.title_func_sigmoid", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_sigmoid.png"), 85, 95, 48)); + pages.add(new GuidePage("book.rbmk.page_func_logarithmic").setScale(2F).addTitle("book.rbmk.title_func_logarithmic", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_logarithmic.png"), 85, 95, 48)); + pages.add(new GuidePage("book.rbmk.page_func_square_root").setScale(2F).addTitle("book.rbmk.title_func_square_root", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_square_root.png"), 85, 95, 48)); + pages.add(new GuidePage("book.rbmk.page_func_neg_quad").setScale(2F).addTitle("book.rbmk.title_func_neg_quad", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_neg_quad.png"), 85, 95, 48)); + pages.add(new GuidePage("book.rbmk.page_func_linear").setScale(2F).addTitle("book.rbmk.title_func_linear", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_linear.png"), 85, 95, 48)); + pages.add(new GuidePage("book.rbmk.page_func_quadratic").setScale(2F).addTitle("book.rbmk.title_func_quadratic", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/func_quadratic.png"), 85, 95, 48)); + + pages.add(new GuidePage("book.rbmk.page2").setScale(2F).addTitle("book.rbmk.title2", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk2.png"), 95, 52, 52)); pages.add(new GuidePage("book.rbmk.page7").setScale(2F).addTitle("book.rbmk.title7", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk7.png"), 95, 52, 52)); - pages.add(new GuidePage("book.rbmk.page8").setScale(2F).addTitle("book.rbmk.title8", 0x800000, 1F) - .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk8.png"), 95, 88, 52)); - pages.add(new GuidePage("book.rbmk.page9").setScale(2F).addTitle("book.rbmk.title9", 0x800000, 1F) - .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk9.png"), 95, 88, 52)); - pages.add(new GuidePage("book.rbmk.page10").setScale(2F).addTitle("book.rbmk.title10", 0x800000, 1F) - .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk10.png"), 95, 88, 52)); + pages.add(new GuidePage("book.rbmk.page_tips").setScale(2F).addTitle("book.rbmk.title_tips", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/steamconnector.png"), 90, 18, 60)); + pages.add(new GuidePage("book.rbmk.page11").setScale(2F).addTitle("book.rbmk.title11", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk11.png"), 75, 85, 72)); pages.add(new GuidePage("book.rbmk.page12").setScale(2F).addTitle("book.rbmk.title12", 0x800000, 1F) - .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk12.png"), 90, 80, 60)); + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk12.png"), 90, 95, 48)); pages.add(new GuidePage("book.rbmk.page13").setScale(2F).addTitle("book.rbmk.title13", 0x800000, 1F)); pages.add(new GuidePage("book.rbmk.page14").setScale(2F) - .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk13.png"), 70, 103, 78)); + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk13.png"), 70, 103, 72)); pages.add(new GuidePage("book.rbmk.page15").setScale(2F).addTitle("book.rbmk.title15", 0x800000, 1F) - .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk15.png"), 100, 48, 48)); + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/starter_designs.png"), 95, 95, 48)); + + + pages.add(new GuidePage("book.rbmk.page_mistakes").setScale(2F).addTitle("book.rbmk.title_mistakes", 0x800000, 1F) + .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/fluxinteractions.png"), 105, 95, 43)); + pages.add(new GuidePage("book.rbmk.page16").setScale(2F).addTitle("book.rbmk.title16", 0x800000, 1F) .addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk16.png"), 50, 70, 100)); + pages.add(new GuidePage("book.rbmk.page_post_meltdown").setScale(2F).addTitle("book.rbmk.title_post_meltdown", 0x800000, 1F)); + pages.add(new GuidePage("").setScale(2F).addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/meltdown.png"), 45, 75, 80)); return pages; } diff --git a/src/main/java/com/hbm/lib/HbmWorldGen.java b/src/main/java/com/hbm/lib/HbmWorldGen.java index 1f3c6740f9..1b869195b2 100644 --- a/src/main/java/com/hbm/lib/HbmWorldGen.java +++ b/src/main/java/com/hbm/lib/HbmWorldGen.java @@ -556,7 +556,7 @@ private void generateStructures(World world, Random rand, int i, int j) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); - CellularDungeonFactory.meteor.generate(world, x, 10, z, rand); + CellularDungeonFactory.meteor.generate(world, x, 12, z, rand); if(GeneralConfig.enableDebugMode) MainRegistry.logger.info("[Debug] Successfully spawned meteor dungeon at " + x + " 10 " + z); diff --git a/src/main/java/com/hbm/lib/Library.java b/src/main/java/com/hbm/lib/Library.java index 7cf9dad49d..db00f5989d 100644 --- a/src/main/java/com/hbm/lib/Library.java +++ b/src/main/java/com/hbm/lib/Library.java @@ -113,7 +113,7 @@ public class Library { public static final int[] powersOfTen = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000}; - public static DecimalFormat numberformat = new DecimalFormat("#.00"); + public static DecimalFormat numberformat = new DecimalFormat("0.00"); //the old list that allowed superuser mode for the ZOMG //currently unused @@ -143,6 +143,16 @@ public static boolean isObstructed(World world, double x, double y, double z, do return pos != null && pos.typeOfHit != Type.MISS; } + public static int getColorProgress(double fraction){ + int r = (int)(255*Math.min(1, fraction*-2+2)); + int g = (int)(255*Math.min(1, fraction*2)); + return 65536 * r + 256 * g; + } + + public static String getPercentage(double fraction){ + return numberformat.format(roundFloat(fraction*100D, 2)); + } + public static String getShortNumber(long l) { boolean negative = l < 0; if(negative){ diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 014bdee706..4775d1516f 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -1233,6 +1233,7 @@ public static void reg2(){ addRecipeAuto(new ItemStack(ModBlocks.sat_dock, 1), new Object[] { "SSS", "PCP", 'S', STEEL.ingot(), 'P', ANY_PLASTIC.ingot(), 'C', ModBlocks.crate_iron }); addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.book_guide), 1), new Object[] { "IBI", "LBL", "IBI", 'B', Items.BOOK, 'I', new ItemStack(Items.DYE, 1, 0), 'L', new ItemStack(Items.DYE, 1, 4) }); + addRecipeAuto(new ItemStack(ModItems.book_guide, 1, 1), new Object[] { "G", "B", "C", 'B', Items.BOOK, 'G', ModItems.rbmk_lid_glass, 'C', ModItems.rbmk_lid }); addShapelessAuto(new ItemStack(ModItems.book_guide, 1, 2), new Object[] { Items.BOOK, ModItems.powder_meteorite }); addRecipeAuto(new ItemStack(ModBlocks.rail_highspeed, 16), new Object[] { "S S", "SIS", "S S", 'S', STEEL.ingot(), 'I', IRON.plate() }); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index bc048c4663..108c370a3b 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -241,6 +241,8 @@ import com.hbm.inventory.PotionRecipes; import com.hbm.inventory.SAFERecipes; import com.hbm.inventory.BoilerRecipes; +import com.hbm.inventory.StorageDrumRecipes; +import com.hbm.inventory.NuclearTransmutationRecipes; import com.hbm.inventory.control_panel.ControlEvent; import com.hbm.inventory.control_panel.ControlRegistry; import com.hbm.items.ModItems; @@ -614,6 +616,7 @@ public void preInit(FMLPreInitializationEvent event) { GameRegistry.registerTileEntity(TileEntityConverterRfHe.class, new ResourceLocation(RefStrings.MODID, "tileentity_converter_rf_he")); GameRegistry.registerTileEntity(TileEntityMachineTurbine.class, new ResourceLocation(RefStrings.MODID, "tileentity_machine_turbine")); GameRegistry.registerTileEntity(TileEntityFFFluidDuct.class, new ResourceLocation(RefStrings.MODID, "tileentity_ff_fluidduct")); + GameRegistry.registerTileEntity(TileEntityTurretCIWS.class, new ResourceLocation(RefStrings.MODID, "tileentity_turret_ciws")); GameRegistry.registerTileEntity(TileEntityTurretCheapo.class, new ResourceLocation(RefStrings.MODID, "tileentity_turret_cheapo")); GameRegistry.registerTileEntity(TileEntityTurretRocket.class, new ResourceLocation(RefStrings.MODID, "tileentity_turret_rocket")); GameRegistry.registerTileEntity(TileEntityTurretLight.class, new ResourceLocation(RefStrings.MODID, "tileentity_turret_light")); @@ -1070,6 +1073,8 @@ public void postInit(FMLPostInitializationEvent event) { RBMKOutgasserRecipes.registerOverrides(); DFCRecipes.register(); SAFERecipes.registerRecipes(); + StorageDrumRecipes.registerRecipes(); + NuclearTransmutationRecipes.registerRecipes(); FluidContainerRegistry.registerContainer(Item.getItemFromBlock(ModBlocks.lox_barrel), ModItems.tank_steel, new FluidStack(ModForgeFluids.oxygen, 10000)); FluidContainerRegistry.registerContainer(Item.getItemFromBlock(ModBlocks.pink_barrel), ModItems.tank_steel, new FluidStack(ModForgeFluids.kerosene, 10000)); diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index 310dca18af..e17ddd5d16 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -161,7 +161,6 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; -import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; @@ -347,9 +346,9 @@ else if(randomArmorNumber <= 2<<10){ else if(randomArmorNumber <= 2<<11){ entity.setItemStackToSlot(EntityEquipmentSlot.HEAD, new ItemStack(ModItems.hazmat_helmet, 1, world.rand.nextInt(ModItems.hazmat_helmet.getMaxDamage(ItemStack.EMPTY)))); - entity.setItemStackToSlot(EntityEquipmentSlot.CHEST, new ItemStack(ModItems.hazmat_helmet, 1, world.rand.nextInt(ModItems.hazmat_helmet.getMaxDamage(ItemStack.EMPTY)))); - entity.setItemStackToSlot(EntityEquipmentSlot.LEGS, new ItemStack(ModItems.hazmat_helmet, 1, world.rand.nextInt(ModItems.hazmat_helmet.getMaxDamage(ItemStack.EMPTY)))); - entity.setItemStackToSlot(EntityEquipmentSlot.FEET, new ItemStack(ModItems.hazmat_helmet, 1, world.rand.nextInt(ModItems.hazmat_helmet.getMaxDamage(ItemStack.EMPTY)))); + entity.setItemStackToSlot(EntityEquipmentSlot.CHEST, new ItemStack(ModItems.hazmat_plate, 1, world.rand.nextInt(ModItems.hazmat_helmet.getMaxDamage(ItemStack.EMPTY)))); + entity.setItemStackToSlot(EntityEquipmentSlot.LEGS, new ItemStack(ModItems.hazmat_legs, 1, world.rand.nextInt(ModItems.hazmat_helmet.getMaxDamage(ItemStack.EMPTY)))); + entity.setItemStackToSlot(EntityEquipmentSlot.FEET, new ItemStack(ModItems.hazmat_boots, 1, world.rand.nextInt(ModItems.hazmat_helmet.getMaxDamage(ItemStack.EMPTY)))); } else if(randomArmorNumber <= 2<<12){ @@ -419,40 +418,6 @@ else if(randomHandNumber == 12) } } - @SubscribeEvent - public void itemCrafted(ItemCraftedEvent e) { - EntityPlayer player = e.player; - Item item = e.crafting.getItem(); - - /*if (item == ModItems.gun_mp40) { - e.player.addStat(MainRegistry.achFreytag, 1); - } - if (item == ModItems.piston_selenium || item == ModItems.gun_b92) { - e.player.addStat(MainRegistry.achSelenium, 1); - } - if (item == ModItems.battery_potatos) { - e.player.addStat(MainRegistry.achPotato, 1); - } - if (item == ModItems.gun_revolver_pip) { - e.player.addStat(MainRegistry.achC44, 1); - }*/ - if(item == Item.getItemFromBlock(ModBlocks.machine_difurnace_off)) { - AdvancementManager.grantAchievement(player, AdvancementManager.bobMetalworks); - } - if(item == Item.getItemFromBlock(ModBlocks.machine_assembler) && AdvancementManager.hasAdvancement(player, AdvancementManager.bobMetalworks)) { - AdvancementManager.grantAchievement(player, AdvancementManager.bobAssembly); - } - if(item == Item.getItemFromBlock(ModBlocks.brick_concrete) && AdvancementManager.hasAdvancement(player, AdvancementManager.bobAssembly)) { - AdvancementManager.grantAchievement(player, AdvancementManager.bobChemistry); - } - if(item == Item.getItemFromBlock(ModBlocks.machine_boiler_electric_off) && AdvancementManager.hasAdvancement(player, AdvancementManager.bobChemistry)) { - AdvancementManager.grantAchievement(player, AdvancementManager.bobOil); - } - if(item == ModItems.ingot_uranium_fuel && AdvancementManager.hasAdvancement(player, AdvancementManager.bobOil)) { - AdvancementManager.grantAchievement(player, AdvancementManager.bobNuclear); - } - } - private static final String hash = "cce6b36fbaa6ec2327c1af5cbcadc4e2d340738ab9328c459365838e79d12e5e"; diff --git a/src/main/java/com/hbm/render/model/ModelM65.java b/src/main/java/com/hbm/render/model/ModelM65.java index 4b96849636..d69d12acf6 100644 --- a/src/main/java/com/hbm/render/model/ModelM65.java +++ b/src/main/java/com/hbm/render/model/ModelM65.java @@ -1,25 +1,26 @@ +// Date: 10.08.2018 10:17:16 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + package com.hbm.render.model; import org.lwjgl.opengl.GL11; +import com.hbm.handler.ArmorUtil; +import net.minecraft.inventory.EntityEquipmentSlot; + import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; public class ModelM65 extends ModelBiped { - + // fields public ModelRenderer mask; - public ModelRenderer Shape1; - public ModelRenderer Shape2; - public ModelRenderer Shape3; - public ModelRenderer Shape4; - public ModelRenderer Shape5; - public ModelRenderer Shape6; - public ModelRenderer Shape7; - public ModelRenderer Shape8; - public ModelRenderer Shape9; - public ModelRenderer Shape10; + public ModelRenderer filter; public ModelM65() { textureWidth = 32; @@ -28,76 +29,77 @@ public ModelM65() { float yOffset = 0.5F; mask = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 8, 8, 8); - Shape1.setRotationPoint(-4F, -8F + yOffset, -4F); - Shape1.setTextureSize(32, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(mask, Shape1); - Shape2 = new ModelRenderer(this, 0, 16); - Shape2.addBox(0F, 0F, 0F, 3, 3, 1); - Shape2.setRotationPoint(-1.5F, -3.5F + yOffset, -5F); - Shape2.setTextureSize(32, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(mask, Shape2); - Shape3 = new ModelRenderer(this, 0, 20); - Shape3.addBox(0F, -2F, 0F, 2, 2, 1); - Shape3.setRotationPoint(-1F, -3.5F + yOffset, -5F); - Shape3.setTextureSize(32, 32); - Shape3.mirror = true; - setRotation(Shape3, -0.4799655F, 0F, 0F); - convertToChild(mask, Shape3); - Shape4 = new ModelRenderer(this, 8, 16); - Shape4.addBox(0F, 0F, -2F, 3, 2, 2); - Shape4.setRotationPoint(-1.5F, -2F + yOffset, -4F); - Shape4.setTextureSize(32, 32); - Shape4.mirror = true; - setRotation(Shape4, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape4); - Shape5 = new ModelRenderer(this, 0, 23); - Shape5.addBox(0F, 0F, 0F, 3, 3, 0); - Shape5.setRotationPoint(-3.5F, -6F + yOffset, -4.2F); - Shape5.setTextureSize(32, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - convertToChild(mask, Shape5); - Shape6 = new ModelRenderer(this, 0, 26); - Shape6.addBox(0F, 0F, 0F, 3, 3, 0); - Shape6.setRotationPoint(0.5F, -6F + yOffset, -4.2F); - Shape6.setTextureSize(32, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - convertToChild(mask, Shape6); - Shape7 = new ModelRenderer(this, 6, 20); - Shape7.addBox(0F, 0F, 0F, 2, 2, 1); - Shape7.setRotationPoint(-1F, -3.2F + yOffset, -6F); - Shape7.setTextureSize(32, 32); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - convertToChild(mask, Shape7); - Shape8 = new ModelRenderer(this, 6, 23); - Shape8.addBox(0F, 0F, -3F, 2, 2, 1); - Shape8.setRotationPoint(-1F, -2F + yOffset, -4F); - Shape8.setTextureSize(32, 32); - Shape8.mirror = true; - setRotation(Shape8, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape8); - Shape9 = new ModelRenderer(this, 18, 21); - Shape9.addBox(0F, -1F, -5F, 3, 4, 2); - Shape9.setRotationPoint(-1.5F, -2F + yOffset, -4F); - Shape9.setTextureSize(32, 32); - Shape9.mirror = true; - setRotation(Shape9, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape9); - Shape10 = new ModelRenderer(this, 18, 16); - Shape10.addBox(0F, -0.5F, -5F, 4, 3, 2); - Shape10.setRotationPoint(-2F, -2F + yOffset, -4F); - Shape10.setTextureSize(32, 32); - Shape10.mirror = true; - setRotation(Shape10, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape10); + filter = new ModelRenderer(this, 0, 0); + ModelRenderer maskHead = new ModelRenderer(this, 0, 0); + maskHead.addBox(0F, 0F, 0F, 8, 8, 8); + maskHead.setRotationPoint(-4F, -8F + yOffset, -4F); + maskHead.setTextureSize(32, 32); + maskHead.mirror = true; + setRotation(maskHead, 0F, 0F, 0F); + convertToChild(mask, maskHead); + ModelRenderer nose = new ModelRenderer(this, 0, 16); + nose.addBox(0F, 0F, 0F, 3, 3, 1); + nose.setRotationPoint(-1.5F, -3.5F + yOffset, -5F); + nose.setTextureSize(32, 32); + nose.mirror = true; + setRotation(nose, 0F, 0F, 0F); + convertToChild(mask, nose); + ModelRenderer outlet = new ModelRenderer(this, 0, 20); + outlet.addBox(0F, -2F, 0F, 2, 2, 1); + outlet.setRotationPoint(-1F, -3.5F + yOffset, -5F); + outlet.setTextureSize(32, 32); + outlet.mirror = true; + setRotation(outlet, -0.4799655F, 0F, 0F); + convertToChild(mask, outlet); + ModelRenderer noseSlope = new ModelRenderer(this, 8, 16); + noseSlope.addBox(0F, 0F, -2F, 3, 2, 2); + noseSlope.setRotationPoint(-1.5F, -2F + yOffset, -4F); + noseSlope.setTextureSize(32, 32); + noseSlope.mirror = true; + setRotation(noseSlope, 0.6108652F, 0F, 0F); + convertToChild(mask, noseSlope); + ModelRenderer eye1 = new ModelRenderer(this, 0, 23); + eye1.addBox(0F, 0F, 0F, 3, 3, 0); + eye1.setRotationPoint(-3.5F, -6F + yOffset, -4.2F); + eye1.setTextureSize(32, 32); + eye1.mirror = true; + setRotation(eye1, 0F, 0F, 0F); + convertToChild(mask, eye1); + ModelRenderer eye2 = new ModelRenderer(this, 0, 26); + eye2.addBox(0F, 0F, 0F, 3, 3, 0); + eye2.setRotationPoint(0.5F, -6F + yOffset, -4.2F); + eye2.setTextureSize(32, 32); + eye2.mirror = true; + setRotation(eye2, 0F, 0F, 0F); + convertToChild(mask, eye2); + ModelRenderer iForgot = new ModelRenderer(this, 6, 20); + iForgot.addBox(0F, 0F, 0F, 2, 2, 1); + iForgot.setRotationPoint(-1F, -3.2F + yOffset, -6F); + iForgot.setTextureSize(32, 32); + iForgot.mirror = true; + setRotation(iForgot, 0F, 0F, 0F); + convertToChild(mask, iForgot); + ModelRenderer filterConnector = new ModelRenderer(this, 6, 23); + filterConnector.addBox(0F, 0F, -3F, 2, 2, 1); + filterConnector.setRotationPoint(-1F, -2F + yOffset, -4F); + filterConnector.setTextureSize(32, 32); + filterConnector.mirror = true; + setRotation(filterConnector, 0.6108652F, 0F, 0F); + convertToChild(filter, filterConnector); + ModelRenderer filter1 = new ModelRenderer(this, 18, 21); + filter1.addBox(0F, -1F, -5F, 3, 4, 2); + filter1.setRotationPoint(-1.5F, -2F + yOffset, -4F); + filter1.setTextureSize(32, 32); + filter1.mirror = true; + setRotation(filter1, 0.6108652F, 0F, 0F); + convertToChild(filter, filter1); + ModelRenderer filter2 = new ModelRenderer(this, 18, 16); + filter2.addBox(0F, -0.5F, -5F, 4, 3, 2); + filter2.setRotationPoint(-2F, -2F + yOffset, -4F); + filter2.setTextureSize(32, 32); + filter2.mirror = true; + setRotation(filter2, 0.6108652F, 0F, 0F); + convertToChild(filter, filter2); } @Override @@ -116,18 +118,42 @@ public void setRotationAngles(float f, float f1, float f2, float f3, float f4, f this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY; this.mask.rotateAngleX = this.bipedHead.rotateAngleX; + this.filter.rotationPointX = this.bipedHead.rotationPointX; + this.filter.rotationPointY = this.bipedHead.rotationPointY; + this.filter.rotateAngleY = this.bipedHead.rotateAngleY; + this.filter.rotateAngleX = this.bipedHead.rotateAngleX; } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - GL11.glPushMatrix(); - double d = 1D / 16D * 18D; - //GL11.glTranslated(0, 1/16D, 0); - GL11.glScaled(d, d, d); - GL11.glScaled(1.01D, 1.01D, 1.01D); - this.mask.render(par7); - GL11.glPopMatrix(); + public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { + setRotationAngles(par2, par3, par4, par5, par6, par7, entity); + + if(this.isChild) { + float f6 = 2.0F; + GL11.glPushMatrix(); + GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6); + GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F); + double d = 1D / 16D * 18D; + GL11.glScaled(d, d, d); + GL11.glScaled(1.01D, 1.01D, 1.01D); + this.mask.render(par7); + + if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getItemStackFromSlot(EntityEquipmentSlot.HEAD)) != null) + this.filter.render(par7); + + GL11.glPopMatrix(); + } else { + GL11.glPushMatrix(); + double d = 1D / 16D * 18D; + GL11.glScaled(d, d, d); + GL11.glScaled(1.01D, 1.01D, 1.01D); + this.mask.render(par7); + + if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getItemStackFromSlot(EntityEquipmentSlot.HEAD)) != null) + this.filter.render(par7); + + GL11.glPopMatrix(); + } } private void setRotation(ModelRenderer model, float x, float y, float z) { diff --git a/src/main/java/com/hbm/render/tileentity/RenderCable.java b/src/main/java/com/hbm/render/tileentity/RenderCable.java index d9f902ec7c..5a55711dc8 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderCable.java +++ b/src/main/java/com/hbm/render/tileentity/RenderCable.java @@ -4,6 +4,7 @@ import com.hbm.main.ResourceManager; import com.hbm.lib.Library; +import com.hbm.blocks.ModBlocks; import com.hbm.tileentity.network.energy.TileEntityCableBaseNT; import net.minecraft.client.renderer.GlStateManager; @@ -14,6 +15,8 @@ public class RenderCable extends TileEntitySpecialRenderer extends TileE @Override public void render(T te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) { + if(te.getBlockType() == ModBlocks.fluid_duct_solid) + return; GL11.glPushMatrix(); GlStateManager.enableLighting(); GlStateManager.shadeModel(GL11.GL_SMOOTH); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java index 3f9710db44..8ccf34b9be 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java @@ -1,7 +1,6 @@ package com.hbm.tileentity.machine; -import com.hbm.config.VersatileConfig; -import com.hbm.inventory.MachineRecipes; +import com.hbm.inventory.NuclearTransmutationRecipes; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemCapacitor; import com.hbm.lib.HBMSoundHandler; @@ -47,7 +46,7 @@ public String getName() { public boolean isItemValidForSlot(int i, ItemStack stack) { switch (i) { case 0: - if (MachineRecipes.mODE(stack, "ingotUranium")) + if (NuclearTransmutationRecipes.getOutput(stack) != null) return true; break; case 2: @@ -177,12 +176,24 @@ public int getProgressScaled(int i) { return (process * i) / processSpeed; } + public boolean hasCoil(){ + return inventory.getStackInSlot(2).getItem() == ModItems.redcoil_capacitor && ItemCapacitor.getDura(inventory.getStackInSlot(2)) > 0; + } + public boolean canProcess() { - if (power >= 4990000 && MachineRecipes.mODE(inventory.getStackInSlot(0), "ingotUranium") - && inventory.getStackInSlot(2).getItem() == ModItems.redcoil_capacitor - && ItemCapacitor.getDura(inventory.getStackInSlot(2)) > 0 - && (inventory.getStackInSlot(1).isEmpty() || (inventory.getStackInSlot(1).getItem() == VersatileConfig.getTransmutatorItem() - && inventory.getStackInSlot(1).getCount() < inventory.getStackInSlot(1).getMaxStackSize()))) { + if(!hasCoil()) + return false; + long recipePower = NuclearTransmutationRecipes.getEnergy(inventory.getStackInSlot(0)); + + if(recipePower == -1) + return false; + + if(recipePower > power) + return false; + + ItemStack outputItem = NuclearTransmutationRecipes.getOutput(inventory.getStackInSlot(0)); + if (inventory.getStackInSlot(1).isEmpty() || (inventory.getStackInSlot(1).getItem() == outputItem.getItem() + && inventory.getStackInSlot(1).getCount() < inventory.getStackInSlot(1).getMaxStackSize())) { return true; } return false; @@ -197,16 +208,15 @@ public void process() { if (process >= processSpeed) { - power = 0; + power -= NuclearTransmutationRecipes.getEnergy(inventory.getStackInSlot(0)); + if(power < 0) + power = 0; process = 0; inventory.getStackInSlot(0).shrink(1); - if (inventory.getStackInSlot(0).isEmpty()) { - inventory.setStackInSlot(0, ItemStack.EMPTY); - } - + if (inventory.getStackInSlot(1).isEmpty()) { - inventory.setStackInSlot(1, new ItemStack(VersatileConfig.getTransmutatorItem())); + inventory.setStackInSlot(1, NuclearTransmutationRecipes.getOutput(inventory.getStackInSlot(0)).copy()); } else { inventory.getStackInSlot(1).grow(1); } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityStorageDrum.java b/src/main/java/com/hbm/tileentity/machine/TileEntityStorageDrum.java index 3ddfcd0a9f..c32d8455c6 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityStorageDrum.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityStorageDrum.java @@ -2,14 +2,13 @@ import java.util.List; -import com.hbm.config.VersatileConfig; import com.hbm.forgefluid.FFUtils; import com.hbm.forgefluid.ModForgeFluids; +import com.hbm.inventory.StorageDrumRecipes; import com.hbm.interfaces.IItemHazard; import com.hbm.interfaces.ITankPacketAcceptor; import com.hbm.items.ModItems; -import com.hbm.items.special.ItemWasteLong; -import com.hbm.items.special.ItemWasteShort; + import com.hbm.packet.FluidTankPacket; import com.hbm.packet.PacketDispatcher; import com.hbm.render.amlfrom1710.Vec3; @@ -77,43 +76,20 @@ public void update() { if(item instanceof IItemHazard && world.getTotalWorldTime() % 20 == 0) { rad += ((IItemHazard)item).getModule().radiation; } - - int meta = inventory.getStackInSlot(i).getItemDamage(); - - if(item == ModItems.nuclear_waste_long && world.rand.nextInt(VersatileConfig.getLongDecayChance()) == 0) { - ItemWasteLong.WasteClass wasteClass = ItemWasteLong.WasteClass.values()[ItemWasteLong.rectify(meta)]; - liquid += wasteClass.liquid; - gas += wasteClass.gas; - inventory.setStackInSlot(i, new ItemStack(ModItems.nuclear_waste_long_depleted, 1, meta)); - - } else if(item == ModItems.nuclear_waste_long_tiny && world.rand.nextInt(VersatileConfig.getLongDecayChance() / 10) == 0) { - ItemWasteLong.WasteClass wasteClass = ItemWasteLong.WasteClass.values()[ItemWasteLong.rectify(meta)]; - liquid += wasteClass.liquid / 10; - gas += wasteClass.gas / 10; - inventory.setStackInSlot(i, new ItemStack(ModItems.nuclear_waste_long_depleted_tiny, 1, meta)); - - } else if(item == ModItems.nuclear_waste_short && world.rand.nextInt(VersatileConfig.getShortDecayChance()) == 0) { - ItemWasteShort.WasteClass wasteClass = ItemWasteShort.WasteClass.values()[ItemWasteLong.rectify(meta)]; - liquid += wasteClass.liquid; - gas += wasteClass.gas; - inventory.setStackInSlot(i, new ItemStack(ModItems.nuclear_waste_short_depleted, 1, meta)); - - } else if(item == ModItems.nuclear_waste_short_tiny && world.rand.nextInt(VersatileConfig.getShortDecayChance() / 10) == 0) { - ItemWasteShort.WasteClass wasteClass = ItemWasteShort.WasteClass.values()[ItemWasteLong.rectify(meta)]; - liquid += wasteClass.liquid / 10; - gas += wasteClass.gas / 10; - inventory.setStackInSlot(i, new ItemStack(ModItems.nuclear_waste_short_depleted_tiny, 1, meta)); - - } else if(item == ModItems.nugget_au198 && world.rand.nextInt(VersatileConfig.getShortDecayChance() / 100) == 0) { - inventory.setStackInSlot(i, new ItemStack(ModItems.nugget_mercury, 1, meta)); - - } else if(item == ModItems.ingot_au198 && world.rand.nextInt(VersatileConfig.getShortDecayChance() / 1000) == 0) { - inventory.setStackInSlot(i, new ItemStack(ModItems.nugget_mercury, 9, meta)); - + + int[] wasteData = StorageDrumRecipes.getWaste(inventory.getStackInSlot(i)); + if(wasteData != null){ + if(world.rand.nextInt(wasteData[0]) == 0){ + ItemStack outputStack = StorageDrumRecipes.getOutput(inventory.getStackInSlot(i)); + if(outputStack != null){ + liquid += wasteData[1]; + gas += wasteData[2]; + inventory.setStackInSlot(i, outputStack); + } + } } else { ContaminationUtil.neutronActivateItem(inventory.getStackInSlot(i), 0.0F, decayRate); } - } } @@ -144,59 +120,14 @@ public void update() { PacketDispatcher.wrapper.sendToAllAround(new FluidTankPacket(pos, tanks), new TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 10)); if(rad > 0) { - radiate(world, pos.getZ(), pos.getY(), pos.getX(), rad); + ContaminationUtil.radiate(world, pos.getZ(), pos.getY(), pos.getX(), 32, rad); } } } - - @SuppressWarnings("deprecation") - private void radiate(World world, int x, int y, int z, float rads) { - - double range = 32D; - - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5).grow(range, range, range)); - - for(EntityLivingBase e : entities) { - - Vec3 vec = Vec3.createVectorHelper(e.posX - (x + 0.5), (e.posY + e.getEyeHeight()) - (y + 0.5), e.posZ - (z + 0.5)); - double len = vec.lengthVector(); - vec = vec.normalize(); - - float res = 0; - - for(int i = 1; i < len; i++) { - - int ix = (int)Math.floor(x + 0.5 + vec.xCoord * i); - int iy = (int)Math.floor(y + 0.5 + vec.yCoord * i); - int iz = (int)Math.floor(z + 0.5 + vec.zCoord * i); - - res += world.getBlockState(new BlockPos(ix, iy, iz)).getBlock().getExplosionResistance(null); - } - - if(res < 1) - res = 1; - - float eRads = rads; - eRads /= (float)res; - eRads /= (float)(len * len); - - ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads); - } - } @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - - Item item = itemStack.getItem(); - - if(item == ModItems.nuclear_waste_long || - item == ModItems.nuclear_waste_long_tiny || - item == ModItems.nuclear_waste_short || - item == ModItems.nuclear_waste_short_tiny || - item == ModItems.nugget_au198) - return true; - - return false; + return StorageDrumRecipes.getOutput(itemStack) != null || ContaminationUtil.isContaminated(itemStack); } @Override @@ -206,17 +137,7 @@ public boolean canInsertItem(int i, ItemStack itemStack, int j) { @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - - Item item = itemStack.getItem(); - - if(item == ModItems.nuclear_waste_long_depleted || - item == ModItems.nuclear_waste_long_depleted_tiny || - item == ModItems.nuclear_waste_short_depleted || - item == ModItems.nuclear_waste_short_depleted_tiny || - item == ModItems.nugget_mercury) - return true; - - return false; + return !ContaminationUtil.isContaminated(itemStack) && StorageDrumRecipes.getOutput(itemStack) == null; } @Override @@ -224,7 +145,6 @@ public int[] getAccessibleSlotsFromSide(EnumFacing side) { return slots_arr; } - public void fillFluidInit(FluidTank type) { fillFluid(this.pos.getX() - 1, this.pos.getY(), this.pos.getZ(), type); fillFluid(this.pos.getX() + 1, this.pos.getY(), this.pos.getZ(), type); diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java index e616f7c7c3..83591c9037 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java @@ -404,7 +404,7 @@ protected void standardMelt(int reduce) { } } else { - world.setBlockState(new BlockPos(pos.getX(), pos.getY() + i, pos.getZ()), Blocks.AIR.getDefaultState()); + world.setBlockToAir(new BlockPos(pos.getX(), pos.getY() + i, pos.getZ())); } IBlockState state = world.getBlockState(pos.up(i)); world.notifyBlockUpdate(pos.up(i), state, state, 3); @@ -455,6 +455,7 @@ public void meltdown() { maxZ = rbmk.pos.getZ(); } + //Convert every rbmk part into debris for(TileEntityRBMKBase rbmk : columns) { int distFromMinX = rbmk.pos.getX() - minX; @@ -467,6 +468,7 @@ public void meltdown() { rbmk.onMelt(minDist + 1); } + //Adding extra rads near corium blocks for(TileEntityRBMKBase rbmk : columns) { if(rbmk instanceof TileEntityRBMKRod && world.getBlockState(new BlockPos(rbmk.pos.getX(), rbmk.pos.getY(), rbmk.pos.getZ())).getBlock() == ModBlocks.corium_block) { @@ -520,6 +522,7 @@ public void meltdown() { RBMKBase.digamma = false; } + //Family and Friends private void getFF(int x, int y, int z) { TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); diff --git a/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterHeRf.java b/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterHeRf.java index 166db28d09..93e0f1dde4 100644 --- a/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterHeRf.java +++ b/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterHeRf.java @@ -7,11 +7,14 @@ import api.hbm.energy.IEnergyConnector; import cofh.redstoneflux.api.IEnergyProvider; import cofh.redstoneflux.api.IEnergyReceiver; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.energy.CapabilityEnergy; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; -public class TileEntityConverterHeRf extends TileEntityLoadedBase implements ITickable, IEnergyConnector, IEnergyProvider { +public class TileEntityConverterHeRf extends TileEntityLoadedBase implements ITickable, IEnergyConnector, IEnergyProvider, IEnergyStorage { //Thanks to the great people of Fusion Warfare for helping me with the original implementation of the RF energy API @@ -25,7 +28,7 @@ public void update() { this.updateStandardConnections(world, pos); } } - + //RF @Override public boolean canConnectEnergy(EnumFacing from) { return true; @@ -74,6 +77,16 @@ public long transferPower(long power) { toRF -= rfTransferred; //to prevent energy duping } + + if(entity != null && entity.hasCapability(CapabilityEnergy.ENERGY, dir.getOpposite().toEnumFacing())) { + IEnergyStorage storage = entity.getCapability(CapabilityEnergy.ENERGY, dir.getOpposite().toEnumFacing()); + if(storage.canReceive()){ + rfTransferred = storage.receiveEnergy(toRF, false); + totalTransferred += rfTransferred; + + toRF -= rfTransferred; //to prevent energy duping + } + } } recursionBrake = false; @@ -103,4 +116,51 @@ public long getTransferWeight() { return getMaxPower(); } } + + //FE + @Override + public boolean canExtract(){ + return true; + } + + @Override + public boolean canReceive(){ + return false; + } + + @Override + public int getMaxEnergyStored(){ + return Integer.MAX_VALUE; + } + + @Override + public int getEnergyStored(){ + return 0; + } + + @Override + public int extractEnergy(int maxExtract, boolean simulate){ + return maxExtract; + } + + @Override + public int receiveEnergy(int maxReceive, boolean simulate){ + return 0; + } + + @Override + public boolean hasCapability(Capability capability, EnumFacing facing){ + if(capability == CapabilityEnergy.ENERGY){ + return true; + } + return super.hasCapability(capability, facing); + } + + @Override + public T getCapability(Capability capability, EnumFacing facing){ + if(capability == CapabilityEnergy.ENERGY){ + return (T) this; + } + return super.getCapability(capability, facing); + } } diff --git a/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterRfHe.java b/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterRfHe.java index 8e58664d13..60ee959ee2 100644 --- a/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterRfHe.java +++ b/src/main/java/com/hbm/tileentity/network/energy/TileEntityConverterRfHe.java @@ -5,10 +5,13 @@ import api.hbm.energy.IEnergyGenerator; import cofh.redstoneflux.api.IEnergyReceiver; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.energy.CapabilityEnergy; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -public class TileEntityConverterRfHe extends TileEntityLoadedBase implements IEnergyGenerator, IEnergyReceiver { +public class TileEntityConverterRfHe extends TileEntityLoadedBase implements IEnergyGenerator, IEnergyReceiver, IEnergyStorage { private long subBuffer; private boolean recursionBrake = false; @@ -36,7 +39,6 @@ public int getEnergyStored(EnumFacing from) { } @Override - public int getMaxEnergyStored(EnumFacing from) { return Integer.MAX_VALUE; } @@ -65,4 +67,66 @@ public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return (int) ((capacity - subBuffer) * GeneralConfig.rfConversionRate); } + + //FE + @Override + public boolean canExtract(){ + return false; + } + + @Override + public boolean canReceive(){ + return true; + } + + @Override + public int getMaxEnergyStored(){ + return Integer.MAX_VALUE; + } + + @Override + public int getEnergyStored(){ + return 0; + } + + @Override + public int extractEnergy(int maxExtract, boolean simulate){ + return 0; + } + + @Override + public int receiveEnergy(int maxReceive, boolean simulate){ + if(recursionBrake) + return 0; + + if(simulate) + return maxReceive; + + recursionBrake = true; + + long capacity = maxReceive / GeneralConfig.rfConversionRate; + subBuffer = capacity; + + this.sendPower(world, pos); + + recursionBrake = false; + + return (int) ((capacity - subBuffer) * GeneralConfig.rfConversionRate); + } + + @Override + public boolean hasCapability(Capability capability, EnumFacing facing){ + if(capability == CapabilityEnergy.ENERGY){ + return true; + } + return super.hasCapability(capability, facing); + } + + @Override + public T getCapability(Capability capability, EnumFacing facing){ + if(capability == CapabilityEnergy.ENERGY){ + return (T) this; + } + return super.getCapability(capability, facing); + } } diff --git a/src/main/java/com/hbm/util/ContaminationUtil.java b/src/main/java/com/hbm/util/ContaminationUtil.java index 3f6c0ab78c..09ed621397 100644 --- a/src/main/java/com/hbm/util/ContaminationUtil.java +++ b/src/main/java/com/hbm/util/ContaminationUtil.java @@ -49,6 +49,8 @@ public class ContaminationUtil { + public static final String NTM_NEUTRON_NBT_KEY = "ntmNeutron"; + /** * Calculates how much radiation can be applied to this entity by calculating resistance * @param entity @@ -274,8 +276,8 @@ public static float getNeutronRads(ItemStack stack){ if(stack != null && !stack.isEmpty() && !isRadItem(stack)){ if(stack.hasTagCompound()){ NBTTagCompound nbt = stack.getTagCompound(); - if(nbt.hasKey("ntmNeutron")){ - return nbt.getFloat("ntmNeutron") * stack.getCount(); + if(nbt.hasKey(NTM_NEUTRON_NBT_KEY)){ + return nbt.getFloat(NTM_NEUTRON_NBT_KEY) * stack.getCount(); } } } @@ -304,8 +306,8 @@ public static void neutronActivateItem(ItemStack stack, float rad, float decay){ nbt = new NBTTagCompound(); } float prevActivation = 0; - if(nbt.hasKey("ntmNeutron")){ - prevActivation = nbt.getFloat("ntmNeutron"); + if(nbt.hasKey(NTM_NEUTRON_NBT_KEY)){ + prevActivation = nbt.getFloat(NTM_NEUTRON_NBT_KEY); } if(prevActivation + rad == 0) @@ -313,9 +315,9 @@ public static void neutronActivateItem(ItemStack stack, float rad, float decay){ float newActivation = prevActivation * decay + (rad / stack.getCount()); if(prevActivation * decay + rad < 0.0001F || (rad <= 0 && newActivation < 0.001F )){ - nbt.removeTag("ntmNeutron"); + nbt.removeTag(NTM_NEUTRON_NBT_KEY); } else { - nbt.setFloat("ntmNeutron", newActivation); + nbt.setFloat(NTM_NEUTRON_NBT_KEY, newActivation); } if(nbt.hasNoTags()){ stack.setTagCompound(null); @@ -324,6 +326,14 @@ public static void neutronActivateItem(ItemStack stack, float rad, float decay){ } } } + + public static boolean isContaminated(ItemStack stack){ + if(!stack.hasTagCompound()) + return false; + if(stack.getTagCompound().hasKey(NTM_NEUTRON_NBT_KEY)) + return true; + return false; + } public static String getPreffixFromRad(double rads) { diff --git a/src/main/resources/assets/hbm/advancements/bobassembly.json b/src/main/resources/assets/hbm/advancements/bobassembly.json index 0c48cfc6f6..f874e70d7d 100644 --- a/src/main/resources/assets/hbm/advancements/bobassembly.json +++ b/src/main/resources/assets/hbm/advancements/bobassembly.json @@ -12,9 +12,16 @@ }, "parent": "hbm:bobmetalworks", "criteria": { - "impossible": { - "trigger": "minecraft:impossible" - } + "crafting_table": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "hbm:machine_assembler" + } + ] + } + } }, "rewards": { "experience": 50 diff --git a/src/main/resources/assets/hbm/advancements/bobchemistry.json b/src/main/resources/assets/hbm/advancements/bobchemistry.json index 34a7cd092a..a1f94f79e7 100644 --- a/src/main/resources/assets/hbm/advancements/bobchemistry.json +++ b/src/main/resources/assets/hbm/advancements/bobchemistry.json @@ -12,9 +12,16 @@ }, "parent": "hbm:bobassembly", "criteria": { - "impossible": { - "trigger": "minecraft:impossible" - } + "crafting_table": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "hbm:brick_concrete" + } + ] + } + } }, "rewards": { "experience": 100 diff --git a/src/main/resources/assets/hbm/advancements/bobmetalworks.json b/src/main/resources/assets/hbm/advancements/bobmetalworks.json index 2af2487f0e..ca152380d8 100644 --- a/src/main/resources/assets/hbm/advancements/bobmetalworks.json +++ b/src/main/resources/assets/hbm/advancements/bobmetalworks.json @@ -12,9 +12,16 @@ }, "parent": "hbm:progress_anvil", "criteria": { - "impossible": { - "trigger": "minecraft:impossible" - } + "crafting_table": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "hbm:machine_difurnace_off" + } + ] + } + } }, "rewards": { "experience": 25 diff --git a/src/main/resources/assets/hbm/advancements/bobnuclear.json b/src/main/resources/assets/hbm/advancements/bobnuclear.json index f274a5d0d7..e144c51ff4 100644 --- a/src/main/resources/assets/hbm/advancements/bobnuclear.json +++ b/src/main/resources/assets/hbm/advancements/bobnuclear.json @@ -12,9 +12,16 @@ }, "parent": "hbm:boboil", "criteria": { - "impossible": { - "trigger": "minecraft:impossible" - } + "crafting_table": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "hbm:ingot_uranium_fuel" + } + ] + } + } }, "rewards": { "experience": 200 diff --git a/src/main/resources/assets/hbm/advancements/boboil.json b/src/main/resources/assets/hbm/advancements/boboil.json index 4867123827..a2e679dcc1 100644 --- a/src/main/resources/assets/hbm/advancements/boboil.json +++ b/src/main/resources/assets/hbm/advancements/boboil.json @@ -12,9 +12,16 @@ }, "parent": "hbm:bobchemistry", "criteria": { - "impossible": { - "trigger": "minecraft:impossible" - } + "crafting_table": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "hbm:machine_boiler_electric_off" + } + ] + } + } }, "rewards": { "experience": 100 diff --git a/src/main/resources/assets/hbm/lang/en_us.lang b/src/main/resources/assets/hbm/lang/en_us.lang index 9defc8e41b..20123f7830 100644 --- a/src/main/resources/assets/hbm/lang/en_us.lang +++ b/src/main/resources/assets/hbm/lang/en_us.lang @@ -418,7 +418,7 @@ trait.rbmk.depletion=Depletion: %s trait.rbmk.diffusion=Diffusion: %s trait.rbmk.fluxFunc=Flux function: %s trait.rbmk.funcType=Function type: %s -trait.rbmk.heat=Heat per tick at full power: %s +trait.rbmk.heat=Heat per output flux: %s trait.rbmk.melt=Melting point: %s trait.rbmk.neutron.any=All Neutrons trait.rbmk.neutron.fast=Fast Neutrons @@ -436,7 +436,7 @@ trait.rbmx.depletion=Crustyness: %s trait.rbmx.diffusion=Flow: %s trait.rbmx.fluxFunc=Doom function: %s trait.rbmx.funcType=Function specification: %s -trait.rbmx.heat=Crust per tick at full power: %s +trait.rbmx.heat=Crust per emitted entropy: %s trait.rbmx.melt=Crush depth: %s trait.rbmk.neutron.any.x=All non-euclidean shapes trait.rbmk.neutron.fast.x=Elliptic non-euclidean shapes @@ -685,15 +685,15 @@ hbm.achievement.fiend2=Delinquent 2: Delinquent Harder hbm.achievement.fiend2.desc=Be meaner. hbm.achievement.bobmetalworks=Metalworks -hbm.achievement.bobmetalworks.desc=Vault-tec Support Level 1 (Blast Furnace via Anvil) +hbm.achievement.bobmetalworks.desc=Vault-tec Support Level 1 (Blast Furnace) hbm.achievement.bobassembly=Fabrication -hbm.achievement.bobassembly.desc=Vault-tec Support Level 2 (Assembly Machine via Anvil) +hbm.achievement.bobassembly.desc=Vault-tec Support Level 2 (Assembly Machine) hbm.achievement.bobchemistry=Chemistry -hbm.achievement.bobchemistry.desc=Vault-tec Support Level 3 (Craft Concrete Bricks) +hbm.achievement.bobchemistry.desc=Vault-tec Support Level 3 (Concrete Bricks) hbm.achievement.boboil=Petroleum -hbm.achievement.boboil.desc=Vault-tec Support Level 4 (Craft Electric Boiler) +hbm.achievement.boboil.desc=Vault-tec Support Level 4 (Electric Boiler) hbm.achievement.bobnuclear=Atomic Science -hbm.achievement.bobnuclear.desc=Vault-tec Support Level 5 (Craft Uranium Fuel) +hbm.achievement.bobnuclear.desc=Vault-tec Support Level 5 (Uranium Fuel) hbm.achievement.bobhidden=Hidden Catalog hbm.achievement.bobhidden.desc=Kill a tainted creeper with a falling boxcar. @@ -813,7 +813,7 @@ rbmk.console.rod_extraction=Monitor average control rod extraction rbmk.console.fuel_depletion=Monitor average fuel depletion rbmk.console.fuel_poison=Monitor average xenon poisoning rbmk.console.fuel_temp=Monitor average fuel temperature -rbmk.console.flux=Monitor average incoming flux +rbmk.console.flux=Monitor average emitted flux rbmk.control.level=Extension: %s rbmk.control.red=§cRed Group rbmk.control.yellow=§eYellow Group @@ -822,7 +822,7 @@ rbmk.control.blue=§1Blue Group rbmk.control.purple=§5Purple Group rbmk.moderated=Moderated rbmk.rod.name=Rod Type: -rbmk.rod.flux=Total incoming flux: %s +rbmk.rod.flux=Total emitted flux: %s rbmk.rod.depletion=Depletion: %s rbmk.rod.xenon=Xenon poison: %s rbmk.rod.coreTemp=Core temperature: %s @@ -974,72 +974,76 @@ tile.volcanic_lava_block.name=Volcanic Lava tile.corium_block.name=Liquid Corium tile.schrabidic_block.name=Schrabidic Acid -book.rbmk.cover=My first RBMK:$Basics of$building a$reactor +book.rbmk.cover=HOW 2 RBMK:$The Basics$of Reactor$Construction book.rbmk.title1=Introduction -book.rbmk.page1=§lRBMK§r is fully modular nuclear reactor. Unlike most other reactors, there is no "core" and no size restrictions, rather behavior and efficiency of reactor depends on how it is built and how various parts interact with each other. +book.rbmk.page1=The §lRBMK§r is a fully modular nuclear reactor. Unlike most other reactors, there is no "core", and no size limitations, rather, the behavior and efficiency of the reactor comes from how it is built and how the different pieces interact with each other. + +book.rbmk.title_schematic=Overview +book.rbmk.page_schematic=In the reactor fission creates heat which converts water into steam. That steam flows via pipes to steam turbines which generate electricity and convert the steam to a lower tier steam. Low-pressure steam flows to a condenser which converts it back to water. A tank in input/output mode acts as a backup water reservior. + book.rbmk.title2=Heat -book.rbmk.page2=As reactor runs, it will generate §lheat§r. Heat will spread between parts, slowly decreasing in the process. The goal is to generate as much heat as possible without melting the reactor, and to transfer heat into steam passages that cool reactor and produce steam. +book.rbmk.page2=As the reactor operates, it will generate §lheat§r. Heat will spread between parts, slowly decreasing in the process. The goal is to produce as much heat as possible without melting the reactor, and to move that heat to a §lsteam channel§r which cools the reactor and produces steam. book.rbmk.title3=Fuel Rod -book.rbmk.page3=The §lfuel rod§r will capture neutron flux, causing fuel inside the rod to react, releasing neutrons in the process. Neutrons are released in all four main directions with a maximum range of 5 blocks. The amount of released neutrons depends on fuel used. -book.rbmk.title4=Regulating Rod -book.rbmk.page4=The §lcontrol rod§r will reduce number of neutrons passing through. Fully inserted, it will block all neutrons; when inserted halfway, it will only block half. Control rods are used to regulate activity of the reactor and shut it down. -book.rbmk.title5=Regulating Rods - Usage -book.rbmk.title5.scale=0.9 -book.rbmk.page5=The current bar insertion will be displayed in the center of GUI. The colored buttons on left will add the control bar to the color group, which is useful for quickly selecting grouped bars on §lRBMK§r console. The buttons on right allow you to manually insert in 25%% increments. -book.rbmk.title6=Automatic Control Rods -book.rbmk.page6=§LAutomatic control rods§r are almost identical to regular control rods, but they cannot be manually adjusted, instead they will adjust position of the rod based on current temperature. Which function to use and how deep to insert and at what temperature must be determined first. +book.rbmk.page3=When nuclear fuel fissions it releases neutrons. They cause more fission when hitting another fuel rod and are released in all four cardinal directions with a maximum range of 5 blocks. The amount of heat generated depends on the amount of emitted neutrons. +book.rbmk.title4=Control Rod +book.rbmk.page4=The §lcontrol rod§r will decrease the amount of neutrons passing though it. Fully inserted, it will block all neutrons, at half insertion, it will only block half. Control rods are used to regulate the reactor's activity and to turn it off. Too much flux cause overheating and meltdown. +book.rbmk.title5=Control Rod - Usage +book.rbmk.page5=The center of the GUI will display the current rod insertion. The colored buttons on the left will add a control rod to a color group, which is useful to quickly select grouped rods from the §lRBMK console§r. The buttons on the right allow for manual insertion in increments of 25%%. +book.rbmk.title6=Automatic Control Rod +book.rbmk.page6=§lAutomatic control rods§r function nearly identical to regular control rods, but they cannot be configured manually, instead they will adjust the rod position based on the current temperature. What function to use and how deep to insert at what temperature has to be defined first. book.rbmk.title7=Steam Channel -book.rbmk.page7=The §lsteam channel§r is only part that will actively reduce reactor heat level. If a component is above the boiling point of a given type of steam, it will try to consume as much water and produce as much steam as needed to cool below boiling point. +book.rbmk.page7=The §lsteam channel§r is the only part that will actively reduce the reactor's heat level. If the column temperature exceeds the boiling point of the steam type, it will try to consume as much water and produce as much steam as needed to cool back below the boiling point. Normal: 100 °C, Dense: 300°C, Super: 450°C, Ultra: 600°C book.rbmk.title8=Neutron Reflector -book.rbmk.page8=The §lneutron reflector§r will block passage of neutrons, instead neutrons will be reflected back onto the fuel rod they came from. This is useful for using neutrons that would otherwise be wasted simply by leaving reactor. +book.rbmk.page8=The §lneutron reflector§r will block neutrons from passing it, instead the neutrons will be reflected back at the fuel rod they came from. This is useful for utilizing neutrons that would otherwise be wasted by simply exiting the reactor. book.rbmk.title9=Neutron Absorber -book.rbmk.page9=§lNeutron absorber§r simply blocks neutrons. The absorbed neutrons will not generate heat and will be effectively destroyed. This is useful for preventing fuel rods from reacting that would otherwise be within reach. -book.rbmk.title10=Graphite Retarder -book.rbmk.page10=§lGraphite moderator§r converts fast neutrons passing through it into slow neutrons. Most fuels are split into fast neutrons, while slow neutrons are required for fission, so use of moderators is highly recommended. +book.rbmk.page9=The §lneutron absorber§r will simply block neutrons. Neutrons absorbed will not generate heat and be effectively voided. This is useful to prevent fuel rods from reacting that would otherwise be in range. +book.rbmk.title10=Graphite Moderator +book.rbmk.page10=The §lgraphite moderator§r will convert fast neutrons passing through it into slow neutrons. If the incoming flux speed is not the right one for the fuel then efficiency will be greatly reduced. Slowflux at fuel that needs Fastflux: -50%% effectiveness. Fastflux at fuel that needs Slowflux: -70%% effectiveness. book.rbmk.title11=Structural Column -book.rbmk.page11=§lStructural column§r does not affect neutrons in any way and has no special application. It is recommended to fill the reactor with structured pillars where there are no other parts, since the structured pillars are capable of transferring heat. +book.rbmk.page11=The §lstructural column§r will not interfere with neutrons, nor does it have special uses. It is recommended to fill the reactor with structural columns where no other parts will be, because structural columns are capable of transporting heat. book.rbmk.title12=Console -book.rbmk.page12=§lRBMK console§r allows you to control the reactor from afar. Using the §ldevice to connect the console RBMK§r on the RBMK part and then on the console will connect the reactor and the console. The console can only control 15x15 parts, for large reactors you can use multiple consoles. -book.rbmk.title13=Using the console -book.rbmk.page13=Clicking on parts will select and deselect them. With the colored buttons, you can quickly select all the control rods in that color group. Button "A" will select all control rods, "X" will deselect all. -book.rbmk.page14=Entering a number between 0 and 100 in green box and then pressing button next to it will set all selected control rods to that position. Button "AZ-5" will lead to full insertion of all control rods. -book.rbmk.title15=Fuel -book.rbmk.page15=The §lfuel§r response depends on many factors. The main ones are §lfortification§r, §lxenon poisoning§r and number of incoming §lneutrons§r. Xenon builds up when fuel is low in neutrons and burns out during normal operation. The efficiency of neutrons depends on the type, most fuels §lare best split by§r §lslow neutrons§r. -book.rbmk.title16=Melting -book.rbmk.page16=§4§lAVOID. - -#book.rbmk.cover=HOW 2 RBMK:$The Basics$of Reactor$Construction -#book.rbmk.title1=Introduction -#book.rbmk.page1=The §lRBMK§r is a fully modular nuclear reactor. Unlike most other reactors, there is no "core", and no size limitations, rather, the behavior and efficiency of the reactor comes from how it is built and how the different pieces interact with each other. -#book.rbmk.title2=Heat -#book.rbmk.page2=As the reactor operates, it will generate §lheat§r. Heat will spread between parts, slowly decreasing in the process. The goal is to produce as much heat as possible without melting the reactor, and to move that heat to a §lsteam channel§r which cools the reactor and produces steam. -#book.rbmk.title3=Fuel Rod -#book.rbmk.page3=The §lfuel rod§r will capture neutron flux, causing the fuel inside the fuel rod to react, giving off neutrons in the process. Neutrons are released in all four cardinal directions with a maximum range of 5 blocks. The amount of neutrons released depends on the §lfuel§r used. -#book.rbmk.title4=Control Rod -#book.rbmk.page4=The §lcontrol rod§r will decrease the amount of neutrons passing though it. Fully inserted, it will block all neutrons, at half insertion, it will only block half. Control rods are used to regulate the reactor's activity and to turn it off. -#book.rbmk.title5=Control Rod - Usage -#book.rbmk.page5=The center of the GUI will display the current rod insertion. The colored buttons on the left will add a control rod to a color group, which is useful to quickly select grouped rods from the §lRBMK console§r. The buttons on the right allow for manual insertion in increments of 25%%. -#book.rbmk.title6=Automatic Control Rod -#book.rbmk.page6=§lAutomatic control rods§r function nearly identical to regular control rods, but they cannot be configured manually, instead they will adjust the rod position based on the current temperature. What function to use and how deep to insert at what temperature has to be defined first. -#book.rbmk.title7=Steam Channel -#book.rbmk.page7=The §lsteam channel§r is the only part that will actively reduce the reactor's heat level. If the component's temperature exceeds the boiling point of the set steam type, it will try to consume as much water and produce as much steam as needed to cool back below the boiling point. -#book.rbmk.title8=Neutron Reflector -#book.rbmk.page8=The §lneutron reflector§r will block neutrons from passing it, instead the neutrons will be reflected back at the fuel rod they came from. This is useful for utilizing neutrons that would otherwise be wasted by simply exiting the reactor. -#book.rbmk.title9=Neutron Absorber -#book.rbmk.page9=The §lneutron absorber§r will simply block neutrons. Neutrons absorbed will not generate heat and be effectively voided. This is useful to prevent fuel rods from reacting that would otherwise be in range. -#book.rbmk.title10=Graphite Moderator -#book.rbmk.page10=The §lgraphite moderator§r will convert fast neutrons passing through it into slow neutrons. Most fuels fission into fast neutrons while needing slow neutrons to split, so using moderators is strongly recommended. -#book.rbmk.title11=Structural Column -#book.rbmk.page11=The §lstructural column§r will not interfere with neutrons, nor does it have special uses. It is recommended to fill the reactor with structural columns where no other parts will be, because structural columns are capable of transporting heat. -#book.rbmk.title12=Console -#book.rbmk.page12=The §lRBMK console§r lets you control the reactor from afar. Using the §lRBMK§r §lconsole linking device§r on an RBMK part and then the console will link the reactor to the console. The console can only manage 15x15 parts, for larger reactors you might want to use multiple consoles. -#book.rbmk.title13=Console Usage -#book.rbmk.page13=Clicking on the parts will select and deselect them. Using the colored buttons, you can quickly select all control rods of that color group. Button 'A' will select all control rods, 'X' will deselect all. -#book.rbmk.page14=Entering a number 0-100 in the green box and then hitting the button next to it will set all selected control rods to this position. Button 'AZ-5' will cause all control rods to fully insert. -#book.rbmk.title15=Fuel -#book.rbmk.page15=The §lfuel§r's reactivity is based on multiple factors. The main ones are the §lenrichment§r, §lxenon poison§r and the amount of incoming §lneutrons§r. Xenon builds up when the fuel receives few neutrons and burns away during normal operation. The effectivity of neutrons depends on the type, most fuels §lsplit best with slow neutrons§r. -#book.rbmk.title16=Meltdown -#book.rbmk.page16=§4§lAvoid. +book.rbmk.page12=The §lRBMK console§r lets you control the reactor from afar. Using the §lRBMK§r §lconsole linking device§r on an RBMK part and then the console will link the reactor to the console. The console can only manage 15x15 parts, for larger reactors you might want to use multiple consoles. +book.rbmk.title13=Console Usage +book.rbmk.page13=Clicking on the parts will select and deselect them. Using the colored buttons, you can quickly select all control rods of that color group. Button 'A' will select all control rods, 'X' will deselect all. You can change what stats are displayed by clicking on the icon. Select what rbmk columns you want to go into the stats and then hit save. This way you can f.ex. make average temperatures of fuel rods visible or show flux amounts. +book.rbmk.page14=Entering a number 0-100 in the green box and then hitting the button next to it will set all selected control rods to this position. Button 'AZ-5' will cause all control rods to fully insert. +book.rbmk.title15=RBMK Designing +book.rbmk.page15=When designing a new RBMK you need to think about where flux goes. The left design has a lot of power potential but no way to stop flux and shut it down. The one on the right can be shut down and started again without needing Self-igniting rods if the corners have Self-sustaining rods as they can use the reflectors to stay active. +book.rbmk.title16=Meltdown Criteria +book.rbmk.page16=RBMKs explode if column temperature > 1500°C or if fuel skin temp > fuel melting point. §4§lAvoid Meltdown§r by doing these: Shut down before changing fuel rods. Think about what happens to incoming flux after removal. Remove them in order from most dangerous to least dangerous. + +book.rbmk.title_fluxgraph=Xenon Poison +book.rbmk.page_fluxgraph=§l50 Flux emitted§r from the left RBMK fuel rod. The control rod lets §l80%% pass through so 40§r Flux. §5§lXenon poison §5§lblocks 75%%§r of incoming flux. 10 Flux actually reaches right RBMK fuel rod. Xenon poison comes with low flux. +book.rbmk.title_flux=Flux +book.rbmk.page_flux=The stream of emitted neutrons is called flux. Neutrons are what split atoms in the fuel rod which creates heat. The flux function f(x) determines how much flux is emitted and heat is produced given input flux x. Example: flux function is §lsqrt(input) * 2 = output§r. So with input of 10 flux then the output is sqrt(10) * 2 = 6.325 flux. + +book.rbmk.title_flux_explain=Flux Functions +book.rbmk.page_flux_explain=Flux output * heat/flux = Heat output. For max heat you want much flux and or high heat/flux. X-axis is input flux and Y-axis is output flux. Most fuels have f(0) = 0 so at 0 input they have 0 output. They don't start on their own and need flux input to get going. You get that initial input via §4Self-igniting§r rods which are always on. + +book.rbmk.title_func_passive=Passive +book.rbmk.page_func_passive=Self-Sustaining: §2Yes§r Reflector use: §8Irrelevant§r Example: f(x) = 50 +book.rbmk.title_func_euler=Euler +book.rbmk.page_func_euler=Self-Sustaining: §8No§r Reflector use: §2Beneficial§r Example: f(x) = (1 - e^(-x/25)) * 20 +book.rbmk.title_func_sigmoid=Sigmoid +book.rbmk.page_func_sigmoid=Self-Sustaining: §8No§r Reflector use: §2Beneficial§r Example: f(x) = 30 / (1 + e^(-0.1x + 5)) +book.rbmk.title_func_logarithmic=Logarithmic +book.rbmk.page_func_logarithmic=Self-Sustaining: §2Yes§r Reflector use: §2Beneficial§r Example: f(x) = log10(x) * 10 +book.rbmk.title_func_square_root=Square Root +book.rbmk.page_func_square_root=Self-Sustaining: §2Yes§r Reflector use: §2Beneficial§r Example: f(x) = √x * 2 +book.rbmk.title_func_neg_quad=Negative Quadratic +book.rbmk.page_func_neg_quad=Self-Sustaining = §6Maybe§r Reflector use: §6Risky§r Example: f(x) = x - x² * 0.001 +book.rbmk.title_func_linear=Linear +book.rbmk.page_func_linear=Self-Sustaining: §8No§r Reflector use: §4Dangerous§r Example: f(x) = x * 0.5 Place next to MEDIUM, SAFE, PASSIVE but not higher fuels. +book.rbmk.title_func_quadratic=Quadratic +book.rbmk.page_func_quadratic=Self-Sustaining: §8No§r Reflector use: §4§lInsane§r Example: f(x) = x² * 0.1 Only place next to SAFE and PASSIVE fuels or absorbers. + +book.rbmk.title_tips=Tips +book.rbmk.page_tips=Radiation will leak if flux gets outside of the reactor (it was not blocked or reflected) or if flux reaches a rbmk columns without a lid. Steam connectors are used for performance and accessibility of steam channels. Irradiation channels are absorbers that use incoming flux for recipes. + +book.rbmk.title_mistakes=Common Mistakes +book.rbmk.page_mistakes=§lInfo§r: Empty RBMK Fuel Columns are transparent to flux. §lScenario§r: You replace the depleted fuel rod in pink. The red column has a fuel with a §4DANGEROUS§r class flux function. You take out the fuel rod of pink and the RBMK explodes. So what happened? Flux from red was no longer absorbed by pink and got reflected back. This creates a feedbackloop which made the temperature go brrr. + +book.rbmk.title_post_meltdown=Post Meltdown Protocol +book.rbmk.page_post_meltdown=The RBMK exploded - what now? The 2 dangers are radiation and heat. Use blocks with high blast resistance to shield yourself from the intese radiation so you can get close and fire protection against heat. RBMKs slowly cool down and decay into regular debris. If Boron sand is next to burning or radiating rbmk debris it speeds the decay up and reduces radiation levels. Build RBMKs in underground rooms that have nuke proof blast resistance so radiation spread is limited. Block corium flow below fuel channels with blocks with high blast resistance so Corebblestone formation is hindered. chem.TEST=Test chem.ARSENIC=Arsenic Extraction @@ -2502,7 +2506,7 @@ item.rbmk_pellet_ra226be.name=Ra226Be Neutron Source Pellet item.rbmk_pellet_thmeu.name=ThMEU Fuel Pellet item.rbmk_pellet_ueu.name=NU Fuel Pellet item.rbmk_tool.name=RBMK Console Linking Device -item.rbmk_tool.desc=Sneak and right-click RBMK to save the position,$sneak and right-click console to link! +item.rbmk_tool.desc=Sneak and right-click RBMK to save the position,$sneak and right-click console/crane to link! item.rbmk_tool.linked=Position set! item.rbmk_tool.set=RBMK linked! item.reacher.name=Tungsten Reacher diff --git a/src/main/resources/assets/hbm/textures/blocks/machine_converter_he_rf.png b/src/main/resources/assets/hbm/textures/blocks/machine_converter_he_rf.png index c3535d9f68..24151b3431 100644 Binary files a/src/main/resources/assets/hbm/textures/blocks/machine_converter_he_rf.png and b/src/main/resources/assets/hbm/textures/blocks/machine_converter_he_rf.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/machine_converter_rf_he.png b/src/main/resources/assets/hbm/textures/blocks/machine_converter_rf_he.png index 21e102708f..c6bdef6c1d 100644 Binary files a/src/main/resources/assets/hbm/textures/blocks/machine_converter_rf_he.png and b/src/main/resources/assets/hbm/textures/blocks/machine_converter_rf_he.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/fluxgraph.png b/src/main/resources/assets/hbm/textures/gui/book/fluxgraph.png new file mode 100644 index 0000000000..a5e066fecb Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/fluxgraph.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/fluxinteractions.png b/src/main/resources/assets/hbm/textures/gui/book/fluxinteractions.png new file mode 100644 index 0000000000..9e1ab09684 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/fluxinteractions.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_euler.png b/src/main/resources/assets/hbm/textures/gui/book/func_euler.png new file mode 100644 index 0000000000..876b883149 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_euler.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_explain.png b/src/main/resources/assets/hbm/textures/gui/book/func_explain.png new file mode 100644 index 0000000000..90360e7bdc Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_explain.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_linear.png b/src/main/resources/assets/hbm/textures/gui/book/func_linear.png new file mode 100644 index 0000000000..071ccaa136 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_linear.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_logarithmic.png b/src/main/resources/assets/hbm/textures/gui/book/func_logarithmic.png new file mode 100644 index 0000000000..e71e1fb226 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_logarithmic.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_neg_quad.png b/src/main/resources/assets/hbm/textures/gui/book/func_neg_quad.png new file mode 100644 index 0000000000..c01c974c34 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_neg_quad.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_passive.png b/src/main/resources/assets/hbm/textures/gui/book/func_passive.png new file mode 100644 index 0000000000..467659e119 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_passive.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_quadratic.png b/src/main/resources/assets/hbm/textures/gui/book/func_quadratic.png new file mode 100644 index 0000000000..5b3795f208 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_quadratic.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_sigmoid.png b/src/main/resources/assets/hbm/textures/gui/book/func_sigmoid.png new file mode 100644 index 0000000000..03fc297f13 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_sigmoid.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/func_square_root.png b/src/main/resources/assets/hbm/textures/gui/book/func_square_root.png new file mode 100644 index 0000000000..f44ee461ef Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/func_square_root.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/meltdown.png b/src/main/resources/assets/hbm/textures/gui/book/meltdown.png new file mode 100644 index 0000000000..43bfddc563 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/meltdown.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/rbmk13.png b/src/main/resources/assets/hbm/textures/gui/book/rbmk13.png index 8ff48548ce..95da9b7d6e 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/book/rbmk13.png and b/src/main/resources/assets/hbm/textures/gui/book/rbmk13.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/rbmk15.png b/src/main/resources/assets/hbm/textures/gui/book/rbmk15.png deleted file mode 100644 index a64e5adce7..0000000000 Binary files a/src/main/resources/assets/hbm/textures/gui/book/rbmk15.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/rbmk2.png b/src/main/resources/assets/hbm/textures/gui/book/rbmk2.png index a578202c15..f44300bcf0 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/book/rbmk2.png and b/src/main/resources/assets/hbm/textures/gui/book/rbmk2.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/rbmk7.png b/src/main/resources/assets/hbm/textures/gui/book/rbmk7.png index 104a5bdb5c..28db13fd3a 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/book/rbmk7.png and b/src/main/resources/assets/hbm/textures/gui/book/rbmk7.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/rbmk_flux.png b/src/main/resources/assets/hbm/textures/gui/book/rbmk_flux.png new file mode 100644 index 0000000000..afc15487b0 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/rbmk_flux.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/schematic.png b/src/main/resources/assets/hbm/textures/gui/book/schematic.png new file mode 100644 index 0000000000..76116dce1a Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/schematic.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/starter_designs.png b/src/main/resources/assets/hbm/textures/gui/book/starter_designs.png new file mode 100644 index 0000000000..b1407420ee Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/starter_designs.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/book/steamconnector.png b/src/main/resources/assets/hbm/textures/gui/book/steamconnector.png new file mode 100644 index 0000000000..9389a953c8 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/book/steamconnector.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/gui_transmutator.png b/src/main/resources/assets/hbm/textures/gui/gui_transmutator.png index 9e8fef5d26..db36fd88fc 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_transmutator.png and b/src/main/resources/assets/hbm/textures/gui/gui_transmutator.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/jei/gui_nei_transmutation.png b/src/main/resources/assets/hbm/textures/gui/jei/gui_nei_transmutation.png new file mode 100644 index 0000000000..ca8f1f682d Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/jei/gui_nei_transmutation.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/reactors/gui_rbmk_console.png b/src/main/resources/assets/hbm/textures/gui/reactors/gui_rbmk_console.png index 72196ea3c7..6ddb23d3d0 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/reactors/gui_rbmk_console.png and b/src/main/resources/assets/hbm/textures/gui/reactors/gui_rbmk_console.png differ diff --git a/src/main/resources/assets/hbm/textures/items/crystal_cobalt.png b/src/main/resources/assets/hbm/textures/items/crystal_cobalt.png index 6657aeac86..f3c34b1525 100644 Binary files a/src/main/resources/assets/hbm/textures/items/crystal_cobalt.png and b/src/main/resources/assets/hbm/textures/items/crystal_cobalt.png differ diff --git a/src/main/resources/assets/hbm/textures/items/egg_balefire.png b/src/main/resources/assets/hbm/textures/items/egg_balefire.png index 4e11740ee7..b6e070ef71 100644 Binary files a/src/main/resources/assets/hbm/textures/items/egg_balefire.png and b/src/main/resources/assets/hbm/textures/items/egg_balefire.png differ diff --git a/src/main/resources/assets/hbm/textures/items/egg_balefire_blank.png b/src/main/resources/assets/hbm/textures/items/egg_balefire_blank.png deleted file mode 100644 index 821de3938d..0000000000 Binary files a/src/main/resources/assets/hbm/textures/items/egg_balefire_blank.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/egg_balefire_blank_e.png b/src/main/resources/assets/hbm/textures/items/egg_balefire_blank_e.png deleted file mode 100644 index 821de3938d..0000000000 Binary files a/src/main/resources/assets/hbm/textures/items/egg_balefire_blank_e.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/egg_balefire_e.png b/src/main/resources/assets/hbm/textures/items/egg_balefire_e.png index 6c435eea87..b6e070ef71 100644 Binary files a/src/main/resources/assets/hbm/textures/items/egg_balefire_e.png and b/src/main/resources/assets/hbm/textures/items/egg_balefire_e.png differ diff --git a/src/main/resources/assets/hbm/textures/items/egg_balefire_shard.png b/src/main/resources/assets/hbm/textures/items/egg_balefire_shard.png index 48b70cab1b..1b0fd865fa 100644 Binary files a/src/main/resources/assets/hbm/textures/items/egg_balefire_shard.png and b/src/main/resources/assets/hbm/textures/items/egg_balefire_shard.png differ diff --git a/src/main/resources/assets/hbm/textures/items/egg_balefire_shard_e.png b/src/main/resources/assets/hbm/textures/items/egg_balefire_shard_e.png index 394d8a8ba4..1b0fd865fa 100644 Binary files a/src/main/resources/assets/hbm/textures/items/egg_balefire_shard_e.png and b/src/main/resources/assets/hbm/textures/items/egg_balefire_shard_e.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_balefire.png b/src/main/resources/assets/hbm/textures/items/rod_balefire.png index 626dd61ed6..f8a4bb4a82 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_balefire.png and b/src/main/resources/assets/hbm/textures/items/rod_balefire.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing.png b/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing.png index bd1cb23660..a994ada741 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing.png and b/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing_e.png b/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing_e.png index 5c25d5c501..1671b4841c 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing_e.png and b/src/main/resources/assets/hbm/textures/items/rod_balefire_blazing_e.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_balefire_e.png b/src/main/resources/assets/hbm/textures/items/rod_balefire_e.png index 8dc2e1d295..e6d57ae234 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_balefire_e.png and b/src/main/resources/assets/hbm/textures/items/rod_balefire_e.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire.png b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire.png index 15f18c4f9b..a86f277137 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire.png and b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing.png b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing.png index 84b5f54f90..543dca780a 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing.png and b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing_e.png b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing_e.png index 64ca0e976f..4cee352196 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing_e.png and b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_blazing_e.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_e.png b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_e.png index 38ff20085e..8f29822df7 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_e.png and b/src/main/resources/assets/hbm/textures/items/rod_dual_balefire_e.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire.png b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire.png index 31308b0dd5..4290720dc1 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire.png and b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing.png b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing.png index 7c44ffe6ed..ac21fc2691 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing.png and b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing_e.png b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing_e.png index 8bf8ac3c4d..a458b50097 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing_e.png and b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_blazing_e.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_e.png b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_e.png index 8f6be6f3f3..cde7279b69 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_e.png and b/src/main/resources/assets/hbm/textures/items/rod_quad_balefire_e.png differ