mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
bals
This commit is contained in:
parent
9ef7668702
commit
84326bedb4
@ -5,4 +5,7 @@
|
||||
## Fixed
|
||||
* Fixed missing battery socket tooltip
|
||||
* Potentially fixed an issue in regards to some hidden structures spawning
|
||||
* Fixed FEnSU not immediately applying the muffler effect when used
|
||||
* Fixed FEnSU not immediately applying the muffler effect when used
|
||||
* Fixed fluid counter valve not having a recipe
|
||||
* Fixed issue where `/ntmreload` would break registered fluids from addons
|
||||
* Fixed yet another issue regarding crates
|
||||
@ -103,6 +103,13 @@ public class FluidType {
|
||||
|
||||
/** For CompatFluidRegistry */
|
||||
public FluidType(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
|
||||
setupForeign(name, id, color, p, f, r, symbol, texture);
|
||||
|
||||
Fluids.foreignFluids.add(this);
|
||||
Fluids.metaOrder.add(this);
|
||||
}
|
||||
|
||||
public FluidType setupForeign(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
|
||||
this.stringId = name;
|
||||
this.color = color;
|
||||
this.unlocalized = "hbmfluid." + name.toLowerCase(Locale.US);
|
||||
@ -115,7 +122,7 @@ public class FluidType {
|
||||
|
||||
this.id = id;
|
||||
Fluids.register(this, id);
|
||||
Fluids.foreignFluids.add(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FluidType setTemp(int temperature) {
|
||||
|
||||
@ -884,7 +884,7 @@ public class Fluids {
|
||||
}
|
||||
}
|
||||
|
||||
private static HashMap<String, FluidType> fluidMigration = new HashMap(); // since reloading would create new fluid instances, and those break existing machines
|
||||
public static HashMap<String, FluidType> fluidMigration = new HashMap(); // since reloading would create new fluid instances, and those break existing machines
|
||||
|
||||
public static void reloadFluids(){
|
||||
File folder = MainRegistry.configHbmDir;
|
||||
@ -901,6 +901,7 @@ public class Fluids {
|
||||
customFluids.clear();
|
||||
|
||||
for(FluidType type : foreignFluids) {
|
||||
fluidMigration.put(type.getName(), type);
|
||||
idMapping.remove(type.getID());
|
||||
registerOrder.remove(type);
|
||||
nameMapping.remove(type.getName());
|
||||
|
||||
@ -580,6 +580,7 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModBlocks.fluid_duct_gauge), new Object[] { ModBlocks.fluid_duct_paintable, STEEL.ingot(), DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_valve, 1), new Object[] { "S", "W", 'S', Blocks.lever, 'W', ModBlocks.fluid_duct_paintable });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_switch, 1), new Object[] { "S", "W", 'S', REDSTONE.dust(), 'W', ModBlocks.fluid_duct_paintable });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_counter_valve, 1), new Object[] { "S", "W", 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'W', ModBlocks.fluid_switch });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_pump, 1), new Object[] { " S ", "PGP", "IMI", 'S', STEEL.shell(), 'P', STEEL.pipe(), 'G', GRAPHITE.ingot(), 'I', STEEL.ingot(), 'M', ModItems.motor });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 8), new Object[] { "CRC", 'C', CU.plateCast(), 'R', ANY_RUBBER.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 24), new Object[] { "CRC", 'C', CU.plateWelded(), 'R', ANY_RUBBER.ingot() });
|
||||
|
||||
@ -10,8 +10,9 @@ public class CompatFluidRegistry {
|
||||
|
||||
/** Registers a fluid with a custom ID. */
|
||||
public static FluidType registerFluid(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
|
||||
FluidType type = new FluidType(name, id, color, p, f, r, symbol, texture);
|
||||
Fluids.metaOrder.add(type);
|
||||
FluidType type = Fluids.fluidMigration.get(name);
|
||||
if(type == null) type = new FluidType(name, id, color, p, f, r, symbol, texture);
|
||||
else type.setupForeign(name, id, color, p, f, r, symbol, texture);
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user