diff options
author | kekzdealer <kekzdealer@gmail.com> | 2020-06-02 01:49:21 +0200 |
---|---|---|
committer | kekzdealer <kekzdealer@gmail.com> | 2020-06-02 01:49:21 +0200 |
commit | cf4206d981762fbcd00ab62f89034eb351559356 (patch) | |
tree | 3cd4b775525be72fb867186ad14678dc73ca5d26 /src/main/java/kekztech/KekzCore.java | |
parent | 36832d19447ede49cf85a8480ae5c869d1263e3c (diff) | |
download | GT5-Unofficial-cf4206d981762fbcd00ab62f89034eb351559356.tar.gz GT5-Unofficial-cf4206d981762fbcd00ab62f89034eb351559356.tar.bz2 GT5-Unofficial-cf4206d981762fbcd00ab62f89034eb351559356.zip |
Refactored into sided proxies
Diffstat (limited to 'src/main/java/kekztech/KekzCore.java')
-rw-r--r-- | src/main/java/kekztech/KekzCore.java | 53 |
1 files changed, 8 insertions, 45 deletions
diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java index 10d9281c49..49f7cfa54e 100644 --- a/src/main/java/kekztech/KekzCore.java +++ b/src/main/java/kekztech/KekzCore.java @@ -3,11 +3,13 @@ package kekztech; import client.renderer.TESR_SECapacitor; import client.renderer.TESR_SETether; import common.Blocks; +import common.CommonProxy; import common.Recipes; import common.Researches; import common.tileentities.*; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -46,60 +48,21 @@ public class KekzCore { @Mod.Instance("kekztech") public static KekzCore instance; - public static GTMTE_SOFuelCellMK1 sofc1; - public static GTMTE_SOFuelCellMK2 sofc2; - public static GTMTE_ModularNuclearReactor mdr; - public static GTMTE_FluidMultiStorage fms; - public static GTMTE_ItemServer is; - public static GTMTE_LapotronicSuperCapacitor lsc; - public static GTMTE_SpaceElevator se; - + @SidedProxy(clientSide = "client.ClientProxy", serverSide = "kekztech.ServerProxy") + public static CommonProxy proxy; + @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { - // Items - ErrorItem.getInstance().registerItem(); - MetaItem_ReactorComponent.getInstance().registerItem(); - MetaItem_CraftingComponent.getInstance().registerItem(); - Items.registerOreDictNames(); - - Blocks.preInit(); - - // Register TileEntities - GameRegistry.registerTileEntity(TE_TFFTMultiHatch.class, "kekztech_tfftmultihatch_tile"); - //GameRegistry.registerTileEntity(TE_ItemServerIOPort.class, "kekztech_itemserverioport_tile"); - GameRegistry.registerTileEntity(TE_ItemProxyCable.class, "kekztech_itemproxycable_tile"); - GameRegistry.registerTileEntity(TE_ItemProxySource.class, "kekztech_itemproxysource_tile"); - GameRegistry.registerTileEntity(TE_ItemProxyEndpoint.class, "kekztech_itemproxyendpoint_tile"); - GameRegistry.registerTileEntity(TE_ThaumiumReinforcedJar.class, "kekztech_thaumiumreinforcedjar"); - GameRegistry.registerTileEntity(TE_IchorJar.class, "kekztech_ichorjar"); - - // Register guis - NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); - - // Register TESR - ClientRegistry.bindTileEntitySpecialRenderer(TE_SpaceElevatorTether.class, new TESR_SETether()); - ClientRegistry.bindTileEntitySpecialRenderer(TE_SpaceElevatorCapacitor.class, new TESR_SECapacitor()); - - Researches.preInit(); + proxy.preInit(event); } @Mod.EventHandler public void init(FMLInitializationEvent event) { - // Multiblock controllers - sofc1 = new GTMTE_SOFuelCellMK1(13101, "multimachine.fuelcellmk1", "Solid-Oxide Fuel Cell Mk I"); - sofc2 = new GTMTE_SOFuelCellMK2(13102, "multimachine.fuelcellmk2", "Solid-Oxide Fuel Cell Mk II"); - mdr = new GTMTE_ModularNuclearReactor(13103, "multimachine.nuclearreactor", "Nuclear Reactor"); - fms = new GTMTE_FluidMultiStorage(13104, "multimachine.tf_fluidtank", "T.F.F.T"); - //is = new GTMTE_ItemServer(13105, "multimachine.itemserver", "Item Server"); - lsc = new GTMTE_LapotronicSuperCapacitor(13106, "multimachine.supercapacitor", "Lapotronic Supercapacitor"); - se = new GTMTE_SpaceElevator(13107, "multimachine.spaceelevator", "Space Elevator"); - // Register renderer - //RenderingRegistry.registerBlockHandler(ConduitRenderer.getInstance()); + proxy.init(event); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { - Recipes.postInit(); - Researches.postInit(); + proxy.postInit(event); } } |