diff --git a/build.properties b/build.properties index e72d22b4cb5..aba5803b247 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ minecraft_version=1.6.4 forge_version=9.11.1.964 -mantle_version=05fabd +mantle_version=40158a FMP_version=1.0.0.211 CCLIB_version=1.0.0.44 NEI_version=1.6.1.8 diff --git a/src/main/java/tconstruct/client/TProxyClient.java b/src/main/java/tconstruct/client/TProxyClient.java index e22fcf119b9..9f05655d426 100644 --- a/src/main/java/tconstruct/client/TProxyClient.java +++ b/src/main/java/tconstruct/client/TProxyClient.java @@ -98,11 +98,6 @@ public Object getClientGuiElement (int ID, EntityPlayer player, World world, int if (ID == furnaceID) return new FurnaceGui(player.inventory, (FurnaceLogic) world.getBlockTileEntity(x, y, z)); - if (ID == manualGuiID) - { - ItemStack stack = player.getCurrentEquippedItem(); - return new GuiManual(stack, TProxyClient.getManualFromStack(stack)); - } if (ID == inventoryGui) { GuiInventory inventory = new GuiInventory(player); diff --git a/src/main/java/tconstruct/common/TProxyCommon.java b/src/main/java/tconstruct/common/TProxyCommon.java index bab23847759..89b21afddee 100644 --- a/src/main/java/tconstruct/common/TProxyCommon.java +++ b/src/main/java/tconstruct/common/TProxyCommon.java @@ -34,7 +34,7 @@ public class TProxyCommon implements IGuiHandler public static int armorGuiID = 101; public static int knapsackGuiID = 102; - public static int manualGuiID = -1; + // public static int manualGuiID = -1;// moved to Mantle @Override public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) diff --git a/src/main/java/tconstruct/items/CraftingItem.java b/src/main/java/tconstruct/items/CraftingItem.java index 68df2dce2f6..73b0b6eeb46 100644 --- a/src/main/java/tconstruct/items/CraftingItem.java +++ b/src/main/java/tconstruct/items/CraftingItem.java @@ -19,63 +19,20 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class CraftingItem extends Item +public class CraftingItem extends mantle.items.abstracts.CraftingItem { - public String[] textureNames; - public String[] unlocalizedNames; - public String folder; - public Icon[] icons; public CraftingItem(int id, String[] names, String[] tex, String folder) { - super(id); - this.setCreativeTab(TConstructRegistry.materialTab); - this.setMaxDamage(0); - this.setHasSubtypes(true); - this.textureNames = tex; - this.unlocalizedNames = names; - this.folder = folder; - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage (int meta) - { - int arr = MathHelper.clamp_int(meta, 0, unlocalizedNames.length); - return icons[arr]; + super(id, names, tex, folder, "tinker", TConstructRegistry.materialTab); } @Override - @SideOnly(Side.CLIENT) - public void registerIcons (IconRegister iconRegister) + public void onCreated (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - this.icons = new Icon[textureNames.length]; - - for (int i = 0; i < this.icons.length; ++i) + if (par1ItemStack.itemID == TRepo.blankPattern.itemID) { - if (!(textureNames[i].equals(""))) - this.icons[i] = iconRegister.registerIcon("tinker:" + folder + textureNames[i]); + par3EntityPlayer.addStat(TAchievements.achievements.get("tconstruct.pattern"), 1); } } - - public String getUnlocalizedName (ItemStack stack) - { - int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, unlocalizedNames.length); - return getUnlocalizedName() + "." + unlocalizedNames[arr]; - } - - public void getSubItems (int id, CreativeTabs tab, List list) - { - for (int i = 0; i < unlocalizedNames.length; i++) - if (!(textureNames[i].equals(""))) - list.add(new ItemStack(id, 1, i)); - } - - - @Override - public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if(par1ItemStack.itemID == TRepo.blankPattern.itemID){ - par3EntityPlayer.addStat(TAchievements.achievements.get("tconstruct.pattern"), 1); - } - } } diff --git a/src/main/java/tconstruct/items/Manual.java b/src/main/java/tconstruct/items/Manual.java index b4a71253bf9..fa19fd2e463 100644 --- a/src/main/java/tconstruct/items/Manual.java +++ b/src/main/java/tconstruct/items/Manual.java @@ -28,7 +28,7 @@ public Manual(int id) public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player) { player.addStat(TAchievements.achievements.get("tconstruct.beginner"), 1); - player.openGui(TConstruct.instance, TConstruct.proxy.manualGuiID, world, 0, 0, 0); + player.openGui(TConstruct.instance, mantle.client.MProxyClient.manualGuiID, world, 0, 0, 0); /*Side side = FMLCommonHandler.instance().getEffectiveSide(); if (side.isClient()) FMLClientHandler.instance().displayGuiScreen(player, new GuiManual(player.getCurrentEquippedItem(), getManualFromStack(stack)));*/