mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 23:45:48 +00:00
Proxies run on initialize instead of constructors
This commit is contained in:
1 parent
741a439a13
commit
625118f062
17 files changed
+65
-53
No files matched your search
@@ -103,13 +103,13 @@ public class TConstruct
|
||||
{
|
||||
PHConstruct.initProps(event.getModConfigurationDirectory());
|
||||
|
||||
pulsar.registerPulse(new TinkerWorld());
|
||||
pulsar.registerPulse(new TinkerTools());
|
||||
pulsar.registerPulse(new TinkerSmeltery());
|
||||
pulsar.registerPulse(new TinkerMechworks());
|
||||
pulsar.registerPulse(new TinkerArmor());
|
||||
/*pulsar.registerPulse(new TinkerPrayers());
|
||||
pulsar.registerPulse(new TinkerCropify());*/
|
||||
pulsar.registerPulse(new TinkerWorld());
|
||||
pulsar.registerPulse(new TinkerTools());
|
||||
pulsar.registerPulse(new TinkerSmeltery());
|
||||
pulsar.registerPulse(new TinkerMechworks());
|
||||
pulsar.registerPulse(new TinkerArmor());
|
||||
/*pulsar.registerPulse(new TinkerPrayers());
|
||||
pulsar.registerPulse(new TinkerCropify());*/
|
||||
|
||||
TConstructRegistry.materialTab = new TabTools("TConstructMaterials");
|
||||
TConstructRegistry.toolTab = new TabTools("TConstructTools");
|
||||
|
||||
@@ -57,7 +57,8 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
public static HiddenPlayerModel vest = new HiddenPlayerModel(0.25f, 1);
|
||||
public static BeltModel belt = new BeltModel();
|
||||
|
||||
public ArmorProxyClient()
|
||||
@Override
|
||||
public void initialize()
|
||||
{
|
||||
registerGuiHandler();
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
@@ -13,7 +13,8 @@ public class ArmorProxyCommon implements IGuiHandler
|
||||
public static final int inventoryGui = 100;
|
||||
public static final int armorGuiID = 101;
|
||||
public static final int knapsackGuiID = 102;
|
||||
public ArmorProxyCommon()
|
||||
|
||||
public void initialize()
|
||||
{
|
||||
registerGuiHandler();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.armor;
|
||||
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import mantle.pulsar.pulse.PulseProxy;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -32,7 +33,6 @@ import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import tconstruct.world.items.GoldenHead;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
@@ -79,7 +79,7 @@ public class TinkerArmor
|
||||
MinecraftForge.EVENT_BUS.register(new TinkerArmorEvents());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
|
||||
@@ -142,15 +142,16 @@ public class TinkerArmor
|
||||
GameRegistry.registerItem(travelBelt, "travelBelt");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
craftingTableRecipes();
|
||||
addRecipesForDryingRack();
|
||||
TConstructRegistry.equipableTab.init(travelGoggles.getDefaultItem());
|
||||
proxy.initialize();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void postInit (FMLPostInitializationEvent evt)
|
||||
{
|
||||
|
||||
|
||||
@@ -668,6 +668,7 @@ public class TProxyClient extends TProxyCommon
|
||||
}
|
||||
|
||||
String[] bowstringTypes = { "string", "magicfabric", "flamestring" };
|
||||
System.out.println("Shortbow: "+TinkerTools.shortbow);
|
||||
for (int bowIter = 0; bowIter < bowstringTypes.length; bowIter++)
|
||||
{
|
||||
TConstructClientRegistry.addAlternateMaterialRenderMapping(TinkerTools.shortbow, bowIter, "tinker", bowstringTypes[bowIter], true);
|
||||
|
||||
@@ -38,10 +38,10 @@ import tconstruct.tools.logic.ToolStationLogic;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
|
||||
public class MechworksProxyClient extends MechworksProxyCommon
|
||||
{
|
||||
public MechworksProxyClient()
|
||||
{
|
||||
public void initialize()
|
||||
{
|
||||
registerGuiHandler();
|
||||
registerGuiHandler();
|
||||
}
|
||||
|
||||
protected void registerGuiHandler()
|
||||
|
||||
@@ -8,12 +8,13 @@ import tconstruct.mechworks.logic.TileEntityLandmine;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public class MechworksProxyCommon implements IGuiHandler
|
||||
{
|
||||
public MechworksProxyCommon()
|
||||
{
|
||||
public void initialize()
|
||||
{
|
||||
registerGuiHandler();
|
||||
}
|
||||
// public static int drawbridgeID = 9; // Moved to TMechworks
|
||||
|
||||
public static int drawbridgeID = 9;
|
||||
public static final int landmineID = 10;
|
||||
|
||||
protected void registerGuiHandler()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.mechworks;
|
||||
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import mantle.pulsar.pulse.PulseProxy;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -15,7 +16,6 @@ import tconstruct.mechworks.entity.item.ExplosivePrimed;
|
||||
import tconstruct.mechworks.itemblocks.ItemBlockLandmine;
|
||||
import tconstruct.mechworks.logic.TileEntityLandmine;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
@@ -38,7 +38,7 @@ public class TinkerMechworks
|
||||
// Traps
|
||||
public static Block landmine;
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
// Traps
|
||||
@@ -60,12 +60,13 @@ public class TinkerMechworks
|
||||
EntityRegistry.registerModEntity(ExplosivePrimed.class, "SlimeExplosive", 6, TConstruct.instance, 32, 5, true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
proxy.initialize();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void postInit (FMLPostInitializationEvent evt)
|
||||
{
|
||||
|
||||
|
||||
@@ -15,18 +15,19 @@ import tconstruct.smeltery.logic.SmelteryLogic;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
|
||||
public class SmelteryProxyClient extends SmelteryProxyCommon
|
||||
{
|
||||
public SmelteryProxyClient()
|
||||
{
|
||||
@Override
|
||||
public void initialize()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
registerGuiHandler();
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerGuiHandler()
|
||||
{
|
||||
super.registerGuiHandler();
|
||||
TProxyCommon.registerClientGuiHandler(smelteryGuiID, this);
|
||||
TProxyCommon.registerServerGuiHandler(smelteryGuiID, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,9 +12,9 @@ public class SmelteryProxyCommon implements IGuiHandler
|
||||
{
|
||||
public static final int smelteryGuiID = 7;
|
||||
|
||||
public SmelteryProxyCommon()
|
||||
public void initialize()
|
||||
{
|
||||
registerGuiHandler();
|
||||
registerGuiHandler();
|
||||
}
|
||||
|
||||
protected void registerGuiHandler()
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
|
||||
import mantle.blocks.BlockUtils;
|
||||
import mantle.blocks.abstracts.MultiServantLogic;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import mantle.pulsar.pulse.PulseProxy;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -76,7 +77,6 @@ import tconstruct.smeltery.logic.TankAirLogic;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
@@ -178,7 +178,7 @@ public class TinkerSmeltery
|
||||
MinecraftForge.EVENT_BUS.register(new TinkerSmelteryEvents());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
|
||||
@@ -559,13 +559,13 @@ public class TinkerSmeltery
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
|
||||
proxy.initialize();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void postInit (FMLPostInitializationEvent evt)
|
||||
{
|
||||
craftingTableRecipes();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package tconstruct.tools;
|
||||
|
||||
import mantle.items.abstracts.CraftingItem;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import mantle.pulsar.pulse.PulseProxy;
|
||||
import mantle.utils.RecipeRemover;
|
||||
@@ -97,7 +98,6 @@ import tconstruct.world.blocks.SoilBlock;
|
||||
import tconstruct.world.itemblocks.CraftedSoilItemBlock;
|
||||
import tconstruct.world.items.GoldenHead;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
@@ -201,9 +201,10 @@ public class TinkerTools
|
||||
MinecraftForge.EVENT_BUS.register(new TinkerToolEvents());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
System.out.println("This is the ultimate showdown");
|
||||
//Blocks
|
||||
TinkerTools.toolStationWood = new ToolStationBlock(Material.wood).setBlockName("ToolStation");
|
||||
TinkerTools.toolForge = new ToolForgeBlock(Material.iron).setBlockName("ToolForge");
|
||||
@@ -391,7 +392,7 @@ public class TinkerTools
|
||||
return 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
addPartMapping();
|
||||
@@ -399,9 +400,10 @@ public class TinkerTools
|
||||
addRecipesForChisel();
|
||||
craftingTableRecipes();
|
||||
setupToolTabs();
|
||||
proxy.initialize();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void postInit (FMLPostInitializationEvent evt)
|
||||
{
|
||||
vanillaToolRecipes();
|
||||
|
||||
@@ -46,8 +46,9 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class ToolProxyClient extends ToolProxyCommon
|
||||
{
|
||||
public ToolProxyClient()
|
||||
{
|
||||
@Override
|
||||
public void initialize()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
registerGuiHandler();
|
||||
|
||||
@@ -21,7 +21,11 @@ public class ToolProxyCommon implements IGuiHandler
|
||||
|
||||
public ToolProxyCommon()
|
||||
{
|
||||
registerGuiHandler();
|
||||
}
|
||||
|
||||
public void initialize ()
|
||||
{
|
||||
registerGuiHandler();
|
||||
}
|
||||
|
||||
protected void registerGuiHandler()
|
||||
|
||||
@@ -59,14 +59,6 @@ public class TPlayerHandler
|
||||
|
||||
public void onPlayerLogin (EntityPlayer entityplayer)
|
||||
{
|
||||
TPlayerStats playerData = new TPlayerStats();//playerStats.remove(entityplayer.getPersistentID());
|
||||
playerStats.put(entityplayer.getPersistentID(), playerData); //TODO: wtf was going on with removing a nonexistant player in the login?!
|
||||
if (playerData != null)
|
||||
{
|
||||
playerData.saveNBTData(entityplayer.getEntityData());
|
||||
}
|
||||
|
||||
// TConstruct.logger.info("Player: "+entityplayer);
|
||||
// Lookup player
|
||||
TPlayerStats stats = TPlayerStats.get(entityplayer);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.world;
|
||||
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import mantle.pulsar.pulse.PulseProxy;
|
||||
import mantle.utils.RecipeRemover;
|
||||
@@ -79,7 +80,6 @@ import tconstruct.world.itemblocks.WoolSlab1Item;
|
||||
import tconstruct.world.itemblocks.WoolSlab2Item;
|
||||
import tconstruct.world.items.OreBerries;
|
||||
import tconstruct.world.items.StrangeFood;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
@@ -140,7 +140,7 @@ public class TinkerWorld
|
||||
MinecraftForge.EVENT_BUS.register(new TinkerWorldEvents());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
//Blocks
|
||||
@@ -284,7 +284,7 @@ public class TinkerWorld
|
||||
FluidType.registerFluidType("Slime", TinkerWorld.slimeGel, 0, 250, TinkerWorld.blueSlimeFluid, false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
craftingTableRecipes();
|
||||
@@ -292,12 +292,13 @@ public class TinkerWorld
|
||||
oreRegistry();
|
||||
addLoot();
|
||||
createEntities();
|
||||
proxy.initialize();
|
||||
|
||||
GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0);
|
||||
MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@Handler
|
||||
public void postInit (FMLPostInitializationEvent evt)
|
||||
{
|
||||
|
||||
|
||||
@@ -8,4 +8,9 @@ public class TinkerWorldProxyCommon
|
||||
|
||||
}
|
||||
|
||||
public void initialize ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user