mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
and that's that
This commit is contained in:
parent
92fd9014a8
commit
0edf9a42fa
@ -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
|
||||
|
||||
@ -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),\
|
||||
|
||||
@ -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<? extends TemplateRecipeHandler> handlerClass = handler.getClass();
|
||||
Class<? extends TemplateRecipeHandler> 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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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<TemplateRecipeHandler> handlerList() {
|
||||
ArrayList<TemplateRecipeHandler> 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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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?
|
||||
|
||||
119
src/main/java/com/hbm/main/NEIRegistry.java
Normal file
119
src/main/java/com/hbm/main/NEIRegistry.java
Normal file
@ -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<TemplateRecipeHandler> handlers = new ArrayList();
|
||||
|
||||
public static List<TemplateRecipeHandler> 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;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user