diff options
Diffstat (limited to 'src/main/java/lance5057/tDefense/proxy/CommonProxy.java')
| -rw-r--r-- | src/main/java/lance5057/tDefense/proxy/CommonProxy.java | 115 |
1 files changed, 56 insertions, 59 deletions
diff --git a/src/main/java/lance5057/tDefense/proxy/CommonProxy.java b/src/main/java/lance5057/tDefense/proxy/CommonProxy.java index a6b34ae..23505fd 100644 --- a/src/main/java/lance5057/tDefense/proxy/CommonProxy.java +++ b/src/main/java/lance5057/tDefense/proxy/CommonProxy.java @@ -6,6 +6,9 @@ import lance5057.tDefense.armor.items.straps.ItemStrapsInv; import lance5057.tDefense.armor.items.straps.StrapsContainer; import lance5057.tDefense.armor.items.straps.StrapsGui; import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.color.IItemColor; +import net.minecraft.client.renderer.color.ItemColors; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.util.EnumHand; @@ -20,97 +23,91 @@ 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; - - public void preInit() - { +public class CommonProxy implements IGuiHandler { + // public static ModifierSoulHandler SoulHandler = null; + + public void preInit() { } - public void init() - { - + public void init() { + } - public void registerTileEntitySpecialRenderer() - { + public void registerTileEntitySpecialRenderer() { } - - public void reloadRenderers() - { + + public void reloadRenderers() { } public void postInit() { // TODO Auto-generated method stub - + } - public void registerToolModel(ToolCore tool) - { - + public void registerToolModel(ToolCore tool) { + } - - public void registerPartModel(ToolPart part) - { - + + public void registerPartModel(ToolPart part) { + } - - public void registerMatColor(Material mat, int color) - { - + + 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_ANVIL_INV) -// return new Container_FinishingAnvil(player.inventory, -// (TileEntity_FinishingAnvil) world.getTileEntity(x, y, z)); - if(ID == TinkersDefense.GUI_STRAPS_INV) - return new StrapsContainer(player, player.inventory, new ItemStrapsInv(player.getHeldItem(EnumHand.MAIN_HAND))); + 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_ANVIL_INV) + // return new Container_FinishingAnvil(player.inventory, + // (TileEntity_FinishingAnvil) world.getTileEntity(x, y, z)); + if (ID == TinkersDefense.GUI_STRAPS_INV) + return new StrapsContainer(player, player.inventory, + new ItemStrapsInv(player.getHeldItem(EnumHand.MAIN_HAND))); return null; } @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_ANVIL_INV) -// return new Gui_FinishingAnvil(player.inventory, -// (TileEntity_FinishingAnvil) world.getTileEntity(x, y, z)); - if(ID == TinkersDefense.GUI_STRAPS_INV) - return new StrapsGui((StrapsContainer) new StrapsContainer(player, player.inventory, new ItemStrapsInv(player.getHeldItem(EnumHand.MAIN_HAND)))); + 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_ANVIL_INV) + // return new Gui_FinishingAnvil(player.inventory, + // (TileEntity_FinishingAnvil) world.getTileEntity(x, y, z)); + if (ID == TinkersDefense.GUI_STRAPS_INV) + return new StrapsGui((StrapsContainer) new StrapsContainer(player, player.inventory, + new ItemStrapsInv(player.getHeldItem(EnumHand.MAIN_HAND)))); return null; } - - public void registerItemRenderer(Item item, int meta, String id) - { - + + public void registerItemRenderer(Item item, int meta, String id) { + } - - public void registerFluidModels(Fluid fluid) - { - + + public void registerFluidModels(Fluid fluid) { + } - - public void registerItemBlockRenderer(Block block, int meta, String file) + + public void registerItemBlockRenderer(Block block, int meta, String file) { + + } + + public void registerItemColorHandler(IItemColor c, Item i) { } - + @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { TinkersDefense.mats.registerItems(event); - TinkersDefense.parts.registerItems(event); + TinkersDefense.parts.registerItems(event); TinkersDefense.tools.registerItems(event); } } |
