From f2f2eedda86142a5c9b090f164c9a64d92e1ea66 Mon Sep 17 00:00:00 2001 From: Lance5057 Date: Sun, 26 Nov 2017 02:38:49 -0600 Subject: Added more materials, broke something in the tool table. --- .../java/lance5057/tDefense/proxy/CommonProxy.java | 63 ++++++++++++---------- 1 file changed, 36 insertions(+), 27 deletions(-) (limited to 'src/main/java/lance5057/tDefense/proxy/CommonProxy.java') diff --git a/src/main/java/lance5057/tDefense/proxy/CommonProxy.java b/src/main/java/lance5057/tDefense/proxy/CommonProxy.java index 407080d..a6b34ae 100644 --- a/src/main/java/lance5057/tDefense/proxy/CommonProxy.java +++ b/src/main/java/lance5057/tDefense/proxy/CommonProxy.java @@ -1,23 +1,25 @@ package lance5057.tDefense.proxy; +import lance5057.tDefense.Reference; import lance5057.tDefense.TinkersDefense; import lance5057.tDefense.armor.items.straps.ItemStrapsInv; import lance5057.tDefense.armor.items.straps.StrapsContainer; import lance5057.tDefense.armor.items.straps.StrapsGui; -import lance5057.tDefense.core.blocks.crestMount.Container_CrestMount; -import lance5057.tDefense.core.blocks.crestMount.Gui_CrestMount; -import lance5057.tDefense.core.blocks.crestMount.TileEntity_CrestMount; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.IGuiHandler; -import net.minecraftforge.fml.common.network.NetworkRegistry; - +import slimeknights.tconstruct.library.materials.Material; +import slimeknights.tconstruct.library.tools.ToolCore; +import slimeknights.tconstruct.library.tools.ToolPart; +@Mod.EventBusSubscriber(modid = Reference.MOD_ID) public class CommonProxy implements IGuiHandler { //public static ModifierSoulHandler SoulHandler = null; @@ -46,27 +48,27 @@ public class CommonProxy implements IGuiHandler } -// public EntityPlayer getPlayerEntity(MessageContext ctx) -// { -// return ctx.getServerHandler().playerEntity; -// } -// -// public ModelBiped getArmorModel(int id) -// { -// return null; -// } -// -// public World getClientWorld() -// { -// return null; -// } -// + public void registerToolModel(ToolCore tool) + { + + } + + public void registerPartModel(ToolPart part) + { + + } + + public void registerMatColor(Material mat, int color) + { + + } + @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - if(ID == TinkersDefense.GUI_CREST_INV) - return new Container_CrestMount(player.inventory, - (TileEntity_CrestMount) world.getTileEntity(new BlockPos(x, y, z))); +// if(ID == TinkersDefense.GUI_CREST_INV) +// return new Container_CrestMount(player.inventory, +// (TileEntity_CrestMount) world.getTileEntity(new BlockPos(x, y, z))); // if(ID == TinkersDefense.GUI_ANVIL_INV) // return new Container_FinishingAnvil(player.inventory, // (TileEntity_FinishingAnvil) world.getTileEntity(x, y, z)); @@ -79,9 +81,9 @@ public class CommonProxy implements IGuiHandler @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - if(ID == TinkersDefense.GUI_CREST_INV) - return new Gui_CrestMount(player.inventory, - (TileEntity_CrestMount) world.getTileEntity(new BlockPos(x, y, z))); +// if(ID == TinkersDefense.GUI_CREST_INV) +// return new Gui_CrestMount(player.inventory, +// (TileEntity_CrestMount) world.getTileEntity(new BlockPos(x, y, z))); // if(ID == TinkersDefense.GUI_ANVIL_INV) // return new Gui_FinishingAnvil(player.inventory, // (TileEntity_FinishingAnvil) world.getTileEntity(x, y, z)); @@ -104,4 +106,11 @@ public class CommonProxy implements IGuiHandler { } + + @SubscribeEvent + public static void registerItems(RegistryEvent.Register event) { + TinkersDefense.mats.registerItems(event); + TinkersDefense.parts.registerItems(event); + TinkersDefense.tools.registerItems(event); + } } -- cgit v1.2.3