use of buildcraft.factory.BlockPlainPipe in project BuildCraft by BuildCraft.
the class BuildCraftFactory method fmlPreInit.
@Mod.EventHandler
public void fmlPreInit(FMLPreInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel(DefaultProps.NET_CHANNEL_NAME + "-FACTORY", new ChannelHandler(), new PacketHandler());
BuildcraftRecipeRegistry.complexRefinery = ComplexRefineryRecipeManager.INSTANCE;
String plc = "Allows admins to whitelist or blacklist pumping of specific fluids in specific dimensions.\n" + "Eg. \"-/-1/Lava\" will disable lava in the nether. \"-/*/Lava\" will disable lava in any dimension. \"+/0/*\" will enable any fluid in the overworld.\n" + "Entries are comma seperated, banned fluids have precedence over allowed ones." + "Default is \"+/*/*,+/-1/Lava\" - the second redundant entry (\"+/-1/lava\") is there to show the format.";
BuildCraftCore.mainConfigManager.register("general.miningDepth", 256, "Should the mining well only be usable once after placing?", RestartRequirement.NONE);
BuildCraftCore.mainConfigManager.get("general.miningDepth").setMinValue(2).setMaxValue(256);
BuildCraftCore.mainConfigManager.register("general.pumpDimensionControl", DefaultProps.PUMP_DIMENSION_LIST, plc, RestartRequirement.NONE);
BuildCraftCore.mainConfigManager.register("general.pumpsNeedRealPower", false, "Do pumps need real (non-redstone) power?", RestartRequirement.WORLD);
reloadConfig(RestartRequirement.GAME);
miningWellBlock = (BlockMiningWell) CompatHooks.INSTANCE.getBlock(BlockMiningWell.class);
if (BCRegistry.INSTANCE.registerBlock(miningWellBlock.setUnlocalizedName("miningWellBlock"), false)) {
plainPipeBlock = new BlockPlainPipe();
BCRegistry.INSTANCE.registerBlock(plainPipeBlock.setUnlocalizedName("plainPipeBlock"), true);
}
autoWorkbenchBlock = (BlockAutoWorkbench) CompatHooks.INSTANCE.getBlock(BlockAutoWorkbench.class);
BCRegistry.INSTANCE.registerBlock(autoWorkbenchBlock.setUnlocalizedName("autoWorkbenchBlock"), false);
tankBlock = (BlockTank) CompatHooks.INSTANCE.getBlock(BlockTank.class);
BCRegistry.INSTANCE.registerBlock(tankBlock.setUnlocalizedName("tankBlock"), false);
pumpBlock = (BlockPump) CompatHooks.INSTANCE.getBlock(BlockPump.class);
BCRegistry.INSTANCE.registerBlock(pumpBlock.setUnlocalizedName("pumpBlock"), false);
floodGateBlock = (BlockFloodGate) CompatHooks.INSTANCE.getBlock(BlockFloodGate.class);
BCRegistry.INSTANCE.registerBlock(floodGateBlock.setUnlocalizedName("floodGateBlock"), false);
refineryBlock = (BlockRefinery) CompatHooks.INSTANCE.getBlock(BlockRefinery.class);
BCRegistry.INSTANCE.registerBlock(refineryBlock.setUnlocalizedName("refineryBlock"), false);
chuteBlock = (BlockChute) CompatHooks.INSTANCE.getBlock(BlockChute.class);
BCRegistry.INSTANCE.registerBlock(chuteBlock.setUnlocalizedName("blockChute"), false);
if (Loader.isModLoaded("BuildCraft|Energy")) {
energyHeaterBlock = (BlockEnergyHeater) CompatHooks.INSTANCE.getBlock(BlockEnergyHeater.class);
BCRegistry.INSTANCE.registerBlock(energyHeaterBlock.setUnlocalizedName("blockEnergyHeater"), false);
heatExchangeBlock = (BlockHeatExchange) CompatHooks.INSTANCE.getBlock(BlockHeatExchange.class);
BCRegistry.INSTANCE.registerBlock(heatExchangeBlock.setUnlocalizedName("blockHeatExchange"), false);
distillerBlock = (BlockDistiller) CompatHooks.INSTANCE.getBlock(BlockDistiller.class);
BCRegistry.INSTANCE.registerBlock(distillerBlock.setUnlocalizedName("blockDistiller"), false);
plasticSheetItem = new ItemBuildCraft();
plasticSheetItem.setUnlocalizedName("plasticSheet");
plasticSheetItem.setLocalizationRuleArray("item.plasticSheet.singular", "item.plasticSheet.plural");
plasticSheetItem.setLocalizationRule((stack) -> stack == null ? 0 : stack.stackSize > 1 ? 1 : 0);
BCRegistry.INSTANCE.registerItem(plasticSheetItem, false);
ComplexRefiningManager.preInit();
}
FactoryProxy.proxy.preInit();
MinecraftForge.EVENT_BUS.register(this);
}
Aggregations