Remove manual entries if IC2 isn't loaded
This commit is contained in:
parent
2b3bad1149
commit
a732ffa6a9
|
@ -77,6 +77,7 @@ public class ClientProxy extends CommonProxy {
|
|||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
if (IndustrialWires.hasIC2) {
|
||||
ConnLoader.baseModels.put("ic2_conn_tin", new ResourceLocation("immersiveengineering:block/connector/connector_lv.obj"));
|
||||
ConnLoader.textureReplacements.put("ic2_conn_tin", ImmutableMap.of("#immersiveengineering:blocks/connector_connector_lv",
|
||||
IndustrialWires.MODID + ":blocks/ic2_conn_tin"));
|
||||
|
@ -109,7 +110,7 @@ public class ClientProxy extends CommonProxy {
|
|||
ConnLoader.baseModels.put("ic2_relay_glass", new ResourceLocation("immersiveengineering:block/connector/relay_hv.obj"));
|
||||
ConnLoader.textureReplacements.put("ic2_relay_glass", ImmutableMap.of("#immersiveengineering:blocks/connector_relay_hv",
|
||||
IndustrialWires.MODID + ":blocks/ic2_relay_glass"));
|
||||
|
||||
}
|
||||
ConnLoader.baseModels.put("rs_panel_conn", new ResourceLocation("industrialwires:block/rs_panel_conn.obj"));
|
||||
OBJLoader.INSTANCE.addDomain(IndustrialWires.MODID);
|
||||
ModelLoaderRegistry.registerLoader(new PanelModelLoader());
|
||||
|
@ -120,6 +121,7 @@ public class ClientProxy extends CommonProxy {
|
|||
public void postInit() {
|
||||
super.postInit();
|
||||
ManualInstance m = ManualHelper.getManual();
|
||||
if (IndustrialWires.hasIC2) {
|
||||
PositionedItemStack[][] wireRecipes = new PositionedItemStack[3][10];
|
||||
int xBase = 15;
|
||||
Ingredient tinCable = IC2TRHelper.getStack("cable", "type:tin,insulation:0");
|
||||
|
@ -156,16 +158,6 @@ public class ClientProxy extends CommonProxy {
|
|||
wireRecipes[i][9] = new PositionedItemStack(tmp, 18 * 4 + xBase, 18);
|
||||
}
|
||||
|
||||
ClientUtils.mc().getItemColors().registerItemColorHandler((stack, pass) -> {
|
||||
if (pass == 1) {
|
||||
PanelComponent pc = ItemPanelComponent.componentFromStack(stack);
|
||||
if (pc != null) {
|
||||
return 0xff000000 | pc.getColor();
|
||||
}
|
||||
}
|
||||
return ~0;
|
||||
}, IndustrialWires.panelComponent);
|
||||
|
||||
m.addEntry("industrialwires.wires", "industrialwires",
|
||||
new ManualPages.CraftingMulti(m, "industrialwires.wires0", new ItemStack(IndustrialWires.ic2conn, 1, 0), new ItemStack(IndustrialWires.ic2conn, 1, 1), new ItemStack(IndustrialWires.ic2conn, 1, 2), new ItemStack(IndustrialWires.ic2conn, 1, 3),
|
||||
new ItemStack(IndustrialWires.ic2conn, 1, 4), new ItemStack(IndustrialWires.ic2conn, 1, 5), new ItemStack(IndustrialWires.ic2conn, 1, 6), new ItemStack(IndustrialWires.ic2conn, 1, 7)),
|
||||
|
@ -179,6 +171,17 @@ public class ClientProxy extends CommonProxy {
|
|||
new ManualPages.Crafting(m, "industrialwires.mechConv2", new ItemStack(IndustrialWires.mechConv, 1, 0))
|
||||
);
|
||||
}
|
||||
}
|
||||
ClientUtils.mc().getItemColors().registerItemColorHandler((stack, pass) -> {
|
||||
if (pass == 1) {
|
||||
PanelComponent pc = ItemPanelComponent.componentFromStack(stack);
|
||||
if (pc != null) {
|
||||
return 0xff000000 | pc.getColor();
|
||||
}
|
||||
}
|
||||
return ~0;
|
||||
}, IndustrialWires.panelComponent);
|
||||
|
||||
Config.manual_doubleA.put("iwJacobsUsage", IWConfig.HVStuff.jacobsUsageEU);
|
||||
Config.manual_int.put("iwKeysOnRing", IWConfig.maxKeysOnRing);
|
||||
m.addEntry("industrialwires.jacobs", "industrialwires",
|
||||
|
|
Loading…
Reference in a new issue