diff --git a/changelog b/changelog index b1b577c15..453b77c79 100644 --- a/changelog +++ b/changelog @@ -6,6 +6,8 @@ ## Changed * Arsenic is now made from only 16 oils scrap (instead of 256) in an ore acidizer using high-performance solvent (instead of chemical plant using sulfuric acid) * Meteorite and starmetal anvils have been replaced with desh and saturnite ones +* Increased the nuke flash' intensity, having 100% occupancy at the peak instead of 80% +* NTM now has integration for GTNH's fork of NEI, listing all valid crafting machines on the side of the recipe page ## Fixed * Limited assembler input to up to 10 attempts per ingredient, fixing a rare issue where the assembler freezes the server when pulling items diff --git a/gradle.properties b/gradle.properties index 8892f2442..3de92c873 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_version=1.0.27 # Empty build number makes a release type -mod_build_number=4939 +mod_build_number=4942 credits=HbMinecraft,\ \ rodolphito (explosion algorithms),\ diff --git a/src/main/java/com/hbm/handler/imc/IMCHandlerNHNEI.java b/src/main/java/com/hbm/handler/imc/IMCHandlerNHNEI.java index 4df432805..78defc553 100644 --- a/src/main/java/com/hbm/handler/imc/IMCHandlerNHNEI.java +++ b/src/main/java/com/hbm/handler/imc/IMCHandlerNHNEI.java @@ -1,66 +1,61 @@ package com.hbm.handler.imc; import codechicken.nei.recipe.TemplateRecipeHandler; -import com.hbm.config.VersatileConfig; -import com.hbm.handler.nei.*; import com.hbm.lib.RefStrings; -import com.hbm.main.NEIConfig; +import com.hbm.main.NEIRegistry; + import cpw.mods.fml.common.event.FMLInterModComms; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import java.util.ArrayList; - -import static com.hbm.main.ClientProxy.handlerList; - public class IMCHandlerNHNEI { - public static void IMCSender() { + public static void IMCSender() { - for (TemplateRecipeHandler handler: handlerList()) { + for(TemplateRecipeHandler handler : NEIRegistry.listAllHandlers()) { - Class handlerClass = handler.getClass(); + Class handlerClass = handler.getClass(); - if(handler instanceof ICompatNHNEI && ((ICompatNHNEI) handler).getMachinesForRecipe() != null) { - String blockName = "hbm:" + ((ICompatNHNEI) handler).getMachinesForRecipe()[0].getUnlocalizedName(); - String hClass = handlerClass.getName(); - sendHandler(hClass, ((ICompatNHNEI) handler).getRecipeID(), blockName); - for (ItemStack stack: ((ICompatNHNEI) handler).getMachinesForRecipe()) { - sendCatalyst(hClass, "hbm:" + stack.getUnlocalizedName()); - } - } - } + if(handler instanceof ICompatNHNEI && ((ICompatNHNEI) handler).getMachinesForRecipe() != null) { + String blockName = "hbm:" + ((ICompatNHNEI) handler).getMachinesForRecipe()[0].getUnlocalizedName(); + String hClass = handlerClass.getName(); + sendHandler(hClass, ((ICompatNHNEI) handler).getRecipeID(), blockName); + for(ItemStack stack : ((ICompatNHNEI) handler).getMachinesForRecipe()) { + sendCatalyst(hClass, "hbm:" + stack.getUnlocalizedName()); + } + } + } + } - } - private static void sendHandler(String aName, String handlerID, String aBlock) { - sendHandler(aName, handlerID, aBlock, 3); - } + private static void sendHandler(String aName, String handlerID, String aBlock) { + sendHandler(aName, handlerID, aBlock, 3); + } - private static void sendHandler(String aName, String handlerID, String aBlock, int maxRecipesPerPage) { - NBTTagCompound aNBT = new NBTTagCompound(); - aNBT.setString("handler", aName); - aNBT.setString("handlerID", handlerID); - aNBT.setString("modName", RefStrings.NAME); - aNBT.setString("modId", RefStrings.MODID); - aNBT.setBoolean("modRequired", true); - aNBT.setString("itemName", aBlock); - aNBT.setInteger("handlerHeight", 65); - aNBT.setInteger("handlerWidth", 166); - aNBT.setInteger("maxRecipesPerPage", maxRecipesPerPage); - aNBT.setInteger("yShift", 6); - FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT); - } + private static void sendHandler(String aName, String handlerID, String aBlock, int maxRecipesPerPage) { + NBTTagCompound aNBT = new NBTTagCompound(); + aNBT.setString("handler", aName); + aNBT.setString("handlerID", handlerID); + aNBT.setString("modName", RefStrings.NAME); + aNBT.setString("modId", RefStrings.MODID); + aNBT.setBoolean("modRequired", true); + aNBT.setString("itemName", aBlock); + aNBT.setInteger("handlerHeight", 65); + aNBT.setInteger("handlerWidth", 166); + aNBT.setInteger("maxRecipesPerPage", maxRecipesPerPage); + aNBT.setInteger("yShift", 6); + FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT); + } - private static void sendCatalyst(String aName, String aStack, int aPriority) { - NBTTagCompound aNBT = new NBTTagCompound(); - aNBT.setString("handlerID", aName); - aNBT.setString("catalystHandlerID", aName); - aNBT.setString("itemName", aStack); - aNBT.setInteger("priority", aPriority); - FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT); - } + private static void sendCatalyst(String aName, String aStack, int aPriority) { + NBTTagCompound aNBT = new NBTTagCompound(); + aNBT.setString("handlerID", aName); + aNBT.setString("catalystHandlerID", aName); + aNBT.setString("itemName", aStack); + aNBT.setInteger("priority", aPriority); + FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT); + } - private static void sendCatalyst(String aName, String aStack) { - sendCatalyst(aName, aStack, 0); - } + private static void sendCatalyst(String aName, String aStack) { + sendCatalyst(aName, aStack, 0); + } } diff --git a/src/main/java/com/hbm/handler/nei/RTGRecipeHandler.java b/src/main/java/com/hbm/handler/nei/RTGRecipeHandler.java index 77ea8225c..9a92cde64 100644 --- a/src/main/java/com/hbm/handler/nei/RTGRecipeHandler.java +++ b/src/main/java/com/hbm/handler/nei/RTGRecipeHandler.java @@ -11,7 +11,6 @@ public class RTGRecipeHandler extends NEIUniversalHandler { super("RTG", new ItemStack[] { new ItemStack(ModBlocks.machine_rtg_grey), new ItemStack(ModBlocks.machine_difurnace_rtg_off), - new ItemStack(ModBlocks.machine_industrial_generator), new ItemStack(ModBlocks.machine_rtg_furnace_off) }, ItemRTGPellet.getRecipeMap()); } diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index 477c52bb5..84e65898f 100644 --- a/src/main/java/com/hbm/lib/RefStrings.java +++ b/src/main/java/com/hbm/lib/RefStrings.java @@ -3,7 +3,7 @@ package com.hbm.lib; public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech Mod"; - public static final String VERSION = "1.0.27 BETA (4939)"; + public static final String VERSION = "1.0.27 BETA (4942)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index ed8282110..62e68fcc1 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -1,10 +1,6 @@ package com.hbm.main; -import codechicken.nei.recipe.TemplateRecipeHandler; -import com.hbm.config.CustomMachineConfigJSON; -import com.hbm.config.VersatileConfig; import com.hbm.handler.imc.IMCHandlerNHNEI; -import com.hbm.handler.nei.*; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; @@ -2166,62 +2162,4 @@ public class ClientProxy extends ServerProxy { if(amplify) color = ColorUtil.amplifyColor(color); return color; } - - public static ArrayList handlerList() { - ArrayList handlers = new ArrayList<>(); - - handlers.add(new AlloyFurnaceRecipeHandler()); - handlers.add(new ShredderRecipeHandler()); - handlers.add(new PressRecipeHandler()); - handlers.add(new CentrifugeRecipeHandler()); - handlers.add(new GasCentrifugeRecipeHandler()); - handlers.add(new BreederRecipeHandler()); - handlers.add(new CyclotronRecipeHandler()); - handlers.add(new AssemblerRecipeHandler()); - handlers.add(new RefineryRecipeHandler()); - handlers.add(new VacuumRecipeHandler()); - handlers.add(new CrackingHandler()); - handlers.add(new ReformingHandler()); - handlers.add(new HydrotreatingHandler()); - handlers.add(new BoilerRecipeHandler()); - handlers.add(new ChemplantRecipeHandler()); - handlers.add(new CrystallizerRecipeHandler()); - handlers.add(new BookRecipeHandler()); - handlers.add(new FusionRecipeHandler()); - handlers.add(new HadronRecipeHandler()); - handlers.add(new SILEXRecipeHandler()); - handlers.add(new SmithingRecipeHandler()); - handlers.add(new AnvilRecipeHandler()); - handlers.add(new FuelPoolHandler()); - handlers.add(new FluidRecipeHandler()); - handlers.add(new RadiolysisRecipeHandler()); - handlers.add(new CrucibleSmeltingHandler()); - handlers.add(new CrucibleAlloyingHandler()); - handlers.add(new CrucibleCastingHandler()); - handlers.add(new ToolingHandler()); - handlers.add(new ConstructionHandler()); - - //universal boyes - handlers.add(new ZirnoxRecipeHandler()); - if(VersatileConfig.rtgDecay()) { - handlers.add(new RTGRecipeHandler()); - } - handlers.add(new LiquefactionHandler()); - handlers.add(new SolidificationHandler()); - handlers.add(new CokingHandler()); - handlers.add(new FractioningHandler()); - handlers.add(new BoilingHandler()); - handlers.add(new CombinationHandler()); - handlers.add(new SawmillHandler()); - handlers.add(new MixerHandler()); - handlers.add(new OutgasserHandler()); - handlers.add(new ElectrolyserFluidHandler()); - handlers.add(new ElectrolyserMetalHandler()); - handlers.add(new AshpitHandler()); - handlers.add(new ArcWelderHandler()); - handlers.add(new ExposureChamberHandler()); - - for(CustomMachineConfigJSON.MachineConfiguration conf : CustomMachineConfigJSON.niceList) handlers.add(new CustomMachineHandler(conf)); - return handlers; - } } diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index d8bf978c2..ebc4c3d4b 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -171,7 +171,7 @@ public class ModEventHandlerClient { GL11.glDepthMask(false); tess.startDrawingQuads(); float brightness = (flashTimestamp + flashDuration - System.currentTimeMillis()) / (float) flashDuration; - tess.setColorRGBA_F(1F, 1F, 1F, brightness * 0.8F); + tess.setColorRGBA_F(1F, 1F, 1F, brightness * 1F); tess.addVertex(width, 0, 0); tess.addVertex(0, 0, 0); tess.addVertex(0, height, 0); diff --git a/src/main/java/com/hbm/main/NEIConfig.java b/src/main/java/com/hbm/main/NEIConfig.java index d161a3645..3671b9a2f 100644 --- a/src/main/java/com/hbm/main/NEIConfig.java +++ b/src/main/java/com/hbm/main/NEIConfig.java @@ -1,16 +1,10 @@ package com.hbm.main; -import java.util.ArrayList; import java.util.List; import codechicken.nei.recipe.*; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre; -import com.hbm.config.CustomMachineConfigJSON; -import com.hbm.config.CustomMachineConfigJSON.MachineConfiguration; -import com.hbm.config.VersatileConfig; -import com.hbm.handler.imc.IMCHandlerNHNEI; -import com.hbm.handler.nei.*; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemBattery; import com.hbm.lib.RefStrings; @@ -25,12 +19,11 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import static com.hbm.main.ClientProxy.handlerList; - public class NEIConfig implements IConfigureNEI { + @Override public void loadConfig() { - for (TemplateRecipeHandler handler: handlerList()) { + for (TemplateRecipeHandler handler: NEIRegistry.listAllHandlers()) { registerHandler(handler); } //Some things are even beyond my control...or are they? diff --git a/src/main/java/com/hbm/main/NEIRegistry.java b/src/main/java/com/hbm/main/NEIRegistry.java new file mode 100644 index 000000000..d8bcfd593 --- /dev/null +++ b/src/main/java/com/hbm/main/NEIRegistry.java @@ -0,0 +1,119 @@ +package com.hbm.main; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.config.CustomMachineConfigJSON; +import com.hbm.config.VersatileConfig; +import com.hbm.handler.nei.AlloyFurnaceRecipeHandler; +import com.hbm.handler.nei.AnvilRecipeHandler; +import com.hbm.handler.nei.ArcWelderHandler; +import com.hbm.handler.nei.AshpitHandler; +import com.hbm.handler.nei.AssemblerRecipeHandler; +import com.hbm.handler.nei.BoilerRecipeHandler; +import com.hbm.handler.nei.BoilingHandler; +import com.hbm.handler.nei.BookRecipeHandler; +import com.hbm.handler.nei.BreederRecipeHandler; +import com.hbm.handler.nei.CentrifugeRecipeHandler; +import com.hbm.handler.nei.ChemplantRecipeHandler; +import com.hbm.handler.nei.CokingHandler; +import com.hbm.handler.nei.CombinationHandler; +import com.hbm.handler.nei.ConstructionHandler; +import com.hbm.handler.nei.CrackingHandler; +import com.hbm.handler.nei.CrucibleAlloyingHandler; +import com.hbm.handler.nei.CrucibleCastingHandler; +import com.hbm.handler.nei.CrucibleSmeltingHandler; +import com.hbm.handler.nei.CrystallizerRecipeHandler; +import com.hbm.handler.nei.CustomMachineHandler; +import com.hbm.handler.nei.CyclotronRecipeHandler; +import com.hbm.handler.nei.ElectrolyserFluidHandler; +import com.hbm.handler.nei.ElectrolyserMetalHandler; +import com.hbm.handler.nei.ExposureChamberHandler; +import com.hbm.handler.nei.FluidRecipeHandler; +import com.hbm.handler.nei.FractioningHandler; +import com.hbm.handler.nei.FuelPoolHandler; +import com.hbm.handler.nei.FusionRecipeHandler; +import com.hbm.handler.nei.GasCentrifugeRecipeHandler; +import com.hbm.handler.nei.HadronRecipeHandler; +import com.hbm.handler.nei.HydrotreatingHandler; +import com.hbm.handler.nei.LiquefactionHandler; +import com.hbm.handler.nei.MixerHandler; +import com.hbm.handler.nei.OutgasserHandler; +import com.hbm.handler.nei.PressRecipeHandler; +import com.hbm.handler.nei.RTGRecipeHandler; +import com.hbm.handler.nei.RadiolysisRecipeHandler; +import com.hbm.handler.nei.RefineryRecipeHandler; +import com.hbm.handler.nei.ReformingHandler; +import com.hbm.handler.nei.SILEXRecipeHandler; +import com.hbm.handler.nei.SawmillHandler; +import com.hbm.handler.nei.ShredderRecipeHandler; +import com.hbm.handler.nei.SmithingRecipeHandler; +import com.hbm.handler.nei.SolidificationHandler; +import com.hbm.handler.nei.ToolingHandler; +import com.hbm.handler.nei.VacuumRecipeHandler; +import com.hbm.handler.nei.ZirnoxRecipeHandler; + +import codechicken.nei.recipe.TemplateRecipeHandler; + +public class NEIRegistry { + + public static List handlers = new ArrayList(); + + public static List listAllHandlers() { + + if(!handlers.isEmpty()) return handlers; + + handlers.add(new AlloyFurnaceRecipeHandler()); + handlers.add(new ShredderRecipeHandler()); + handlers.add(new PressRecipeHandler()); + handlers.add(new CentrifugeRecipeHandler()); + handlers.add(new GasCentrifugeRecipeHandler()); + handlers.add(new BreederRecipeHandler()); + handlers.add(new CyclotronRecipeHandler()); + handlers.add(new AssemblerRecipeHandler()); + handlers.add(new RefineryRecipeHandler()); + handlers.add(new VacuumRecipeHandler()); + handlers.add(new CrackingHandler()); + handlers.add(new ReformingHandler()); + handlers.add(new HydrotreatingHandler()); + handlers.add(new BoilerRecipeHandler()); + handlers.add(new ChemplantRecipeHandler()); + handlers.add(new CrystallizerRecipeHandler()); + handlers.add(new BookRecipeHandler()); + handlers.add(new FusionRecipeHandler()); + handlers.add(new HadronRecipeHandler()); + handlers.add(new SILEXRecipeHandler()); + handlers.add(new SmithingRecipeHandler()); + handlers.add(new AnvilRecipeHandler()); + handlers.add(new FuelPoolHandler()); + handlers.add(new FluidRecipeHandler()); + handlers.add(new RadiolysisRecipeHandler()); + handlers.add(new CrucibleSmeltingHandler()); + handlers.add(new CrucibleAlloyingHandler()); + handlers.add(new CrucibleCastingHandler()); + handlers.add(new ToolingHandler()); + handlers.add(new ConstructionHandler()); + + //universal boyes + handlers.add(new ZirnoxRecipeHandler()); + if(VersatileConfig.rtgDecay()) handlers.add(new RTGRecipeHandler()); + handlers.add(new LiquefactionHandler()); + handlers.add(new SolidificationHandler()); + handlers.add(new CokingHandler()); + handlers.add(new FractioningHandler()); + handlers.add(new BoilingHandler()); + handlers.add(new CombinationHandler()); + handlers.add(new SawmillHandler()); + handlers.add(new MixerHandler()); + handlers.add(new OutgasserHandler()); + handlers.add(new ElectrolyserFluidHandler()); + handlers.add(new ElectrolyserMetalHandler()); + handlers.add(new AshpitHandler()); + handlers.add(new ArcWelderHandler()); + handlers.add(new ExposureChamberHandler()); + + for(CustomMachineConfigJSON.MachineConfiguration conf : CustomMachineConfigJSON.niceList) handlers.add(new CustomMachineHandler(conf)); + + return handlers; + } +}