diff --git a/resources/manuals/materials.xml b/resources/manuals/materials.xml
new file mode 100644
index 00000000..66488663
--- /dev/null
+++ b/resources/manuals/materials.xml
@@ -0,0 +1,9 @@
+
+
+
+
+Materials and You
+A Guide to Tools and Abilities
+
+
+
\ No newline at end of file
diff --git a/tinker/tconstruct/TConstruct.java b/tinker/tconstruct/TConstruct.java
index 04467c97..3d80cfed 100644
--- a/tinker/tconstruct/TConstruct.java
+++ b/tinker/tconstruct/TConstruct.java
@@ -28,8 +28,8 @@ import cpw.mods.fml.common.network.NetworkRegistry;
* @author: mDiyo
*/
-@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.0")
-@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels={"TConstruct"}, packetHandler = tinker.tconstruct.TConstructPacketHandler.class)
+@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.2")
+@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels={"TConstruct"}, packetHandler = tinker.tconstruct.TPacketHandler.class)
public class TConstruct
{
/* Instance of this mod, used for grabbing prototype fields */
@@ -47,9 +47,9 @@ public class TConstruct
materialTab = new TabTools("TConstructMaterials");
toolTab = new TabTools("TConstructTools");
blockTab = new TabTools("TConstructBlocks");
- content = new TConstructContent();
+ content = new TContent();
- NetworkRegistry.instance().registerGuiHandler(instance, new TConstructGuiHandler());
+ NetworkRegistry.instance().registerGuiHandler(instance, new TGuiHandler());
}
@Init
@@ -91,7 +91,7 @@ public class TConstruct
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Bronze");
}
- public static TConstructContent content;
+ public static TContent content;
public static Random tRand = new Random();
public static TabTools toolTab;
diff --git a/tinker/tconstruct/TConstructRegistry.java b/tinker/tconstruct/TConstructRegistry.java
index 410fc29f..15b11a4e 100644
--- a/tinker/tconstruct/TConstructRegistry.java
+++ b/tinker/tconstruct/TConstructRegistry.java
@@ -18,13 +18,12 @@ public class TConstructRegistry
public static ArrayList toolButtons = new ArrayList(20);
public static HashMap toolMaterials = new HashMap(60);
- /* Mappings */
+ //Tools
public static void addToolMapping(ToolCore tool)
{
tools.add(tool);
}
- //Tools
public static ArrayList getToolMapping()
{
return tools;
diff --git a/tinker/tconstruct/TConstructContent.java b/tinker/tconstruct/TContent.java
similarity index 98%
rename from tinker/tconstruct/TConstructContent.java
rename to tinker/tconstruct/TContent.java
index 7054c986..251816c3 100644
--- a/tinker/tconstruct/TConstructContent.java
+++ b/tinker/tconstruct/TContent.java
@@ -1,10 +1,5 @@
package tinker.tconstruct;
-import java.io.File;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
@@ -13,12 +8,6 @@ import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.ShapedOreRecipe;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
import tinker.common.IPattern;
import tinker.tconstruct.blocks.EquipBlock;
import tinker.tconstruct.blocks.TConstructBlock;
@@ -31,6 +20,7 @@ import tinker.tconstruct.items.Materials;
import tinker.tconstruct.items.Pattern;
import tinker.tconstruct.items.PatternManual;
import tinker.tconstruct.items.ToolPart;
+import tinker.tconstruct.items.ToolShard;
import tinker.tconstruct.modifiers.ModBlaze;
import tinker.tconstruct.modifiers.ModBoolean;
import tinker.tconstruct.modifiers.ModDurability;
@@ -55,7 +45,7 @@ import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
-public class TConstructContent implements IFuelHandler
+public class TContent implements IFuelHandler
{
//Patterns and other materials
public static Item blankPattern;
@@ -112,7 +102,7 @@ public class TConstructContent implements IFuelHandler
//Tool modifiers
public static ModElectric modE;
- public TConstructContent()
+ public TContent()
{
createEntities();
createItems();
@@ -165,7 +155,7 @@ public class TConstructContent implements IFuelHandler
blankPattern = new CraftingItem(PHConstruct.blankPattern, 96, craftingTexture).setItemName("tconstruct.BlankPattern");
materials = new Materials(PHConstruct.materials, 128, craftingTexture).setItemName("tconstruct.Materials");
toolRod = new ToolPart(PHConstruct.toolRod, 0, craftingTexture).setItemName("tconstruct.ToolRod");
- toolShard = new ToolPart(PHConstruct.toolShard, 64, craftingTexture).setItemName("tconstruct.ToolShard");
+ toolShard = new ToolShard(PHConstruct.toolShard, 64, craftingTexture).setItemName("tconstruct.ToolShard");
woodPattern = new Pattern(PHConstruct.woodPattern, 0, patternTexture).setItemName("tconstruct.Pattern");
//stonePattern = new Pattern(PHTools.stonePattern, 64, patternTexture).setItemName("tconstruct.Pattern");
//netherPattern = new Pattern(PHTools.netherPattern, 128, patternTexture).setItemName("tconstruct.Pattern");
@@ -348,7 +338,7 @@ public class TConstructContent implements IFuelHandler
void setupToolTabs ()
{
- TConstruct.materialTab.init(new ItemStack(TConstructContent.woodPattern, 1, 255));
+ TConstruct.materialTab.init(new ItemStack(TContent.woodPattern, 1, 255));
TConstruct.blockTab.init(new ItemStack(woodCrafter));
ItemStack tool = new ItemStack(longsword, 1, 0);
diff --git a/tinker/tconstruct/TConstructGuiHandler.java b/tinker/tconstruct/TGuiHandler.java
similarity index 89%
rename from tinker/tconstruct/TConstructGuiHandler.java
rename to tinker/tconstruct/TGuiHandler.java
index 8bd605d1..3cf87cbc 100644
--- a/tinker/tconstruct/TConstructGuiHandler.java
+++ b/tinker/tconstruct/TGuiHandler.java
@@ -1,9 +1,13 @@
package tinker.tconstruct;
+import org.w3c.dom.Document;
+
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tinker.common.InventoryLogic;
+import tinker.tconstruct.client.TProxyClient;
import tinker.tconstruct.client.gui.FrypanGui;
import tinker.tconstruct.client.gui.GuiManual;
import tinker.tconstruct.client.gui.PartCrafterGui;
@@ -19,7 +23,7 @@ import tinker.tconstruct.logic.SmelteryLogic;
import tinker.tconstruct.logic.ToolStationLogic;
import cpw.mods.fml.common.network.IGuiHandler;
-public class TConstructGuiHandler implements IGuiHandler
+public class TGuiHandler implements IGuiHandler
{
public static int stationID = 0;
public static int partID = 1;
@@ -58,7 +62,10 @@ public class TConstructGuiHandler implements IGuiHandler
if (ID == pshaperID)
return new PatternShaperGui(player.inventory, (PatternShaperLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
if (ID == manualGui)
- return new GuiManual(player.getCurrentEquippedItem());
+ {
+ ItemStack stack = player.getCurrentEquippedItem();
+ return new GuiManual(stack, TProxyClient.getManualFromStack(stack));
+ }
return null;
}
diff --git a/tinker/tconstruct/TConstructPacketHandler.java b/tinker/tconstruct/TPacketHandler.java
similarity index 98%
rename from tinker/tconstruct/TConstructPacketHandler.java
rename to tinker/tconstruct/TPacketHandler.java
index f7ace639..aa32cebb 100644
--- a/tinker/tconstruct/TConstructPacketHandler.java
+++ b/tinker/tconstruct/TPacketHandler.java
@@ -21,7 +21,7 @@ import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
-public class TConstructPacketHandler implements IPacketHandler
+public class TPacketHandler implements IPacketHandler
{
@Override
diff --git a/tinker/tconstruct/blocks/EquipBlock.java b/tinker/tconstruct/blocks/EquipBlock.java
index 98efe0c0..f71175d0 100644
--- a/tinker/tconstruct/blocks/EquipBlock.java
+++ b/tinker/tconstruct/blocks/EquipBlock.java
@@ -9,7 +9,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tinker.common.InventoryBlock;
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructGuiHandler;
+import tinker.tconstruct.TGuiHandler;
import tinker.tconstruct.client.FrypanRender;
import tinker.tconstruct.logic.FrypanLogic;
@@ -85,7 +85,7 @@ public class EquipBlock extends InventoryBlock
@Override
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
{
- return TConstructGuiHandler.frypanID;
+ return TGuiHandler.frypanID;
}
@Override
diff --git a/tinker/tconstruct/blocks/SmelteryBlock.java b/tinker/tconstruct/blocks/SmelteryBlock.java
index 9e51b64c..6fd1b34a 100644
--- a/tinker/tconstruct/blocks/SmelteryBlock.java
+++ b/tinker/tconstruct/blocks/SmelteryBlock.java
@@ -12,7 +12,7 @@ import tinker.common.IFacingLogic;
import tinker.common.InventoryBlock;
import tinker.common.InventoryLogic;
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.logic.SmelteryLogic;
public class SmelteryBlock extends InventoryBlock
@@ -32,7 +32,7 @@ public class SmelteryBlock extends InventoryBlock
public String getTextureFile ()
{
- return TConstructContent.blockTexture;
+ return TContent.blockTexture;
}
public int getBlockTextureFromSideAndMetadata (int side, int meta)
diff --git a/tinker/tconstruct/blocks/TBaseOre.java b/tinker/tconstruct/blocks/TBaseOre.java
index 536f8220..1ff2d6e9 100644
--- a/tinker/tconstruct/blocks/TBaseOre.java
+++ b/tinker/tconstruct/blocks/TBaseOre.java
@@ -3,7 +3,7 @@ import java.util.List;
import java.util.Random;
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -38,7 +38,7 @@ public class TBaseOre extends Block
public String getTextureFile()
{
- return TConstructContent.blockTexture;
+ return TContent.blockTexture;
}
@Override
diff --git a/tinker/tconstruct/blocks/TConstructBlock.java b/tinker/tconstruct/blocks/TConstructBlock.java
index 965aba9a..ea9e63f9 100644
--- a/tinker/tconstruct/blocks/TConstructBlock.java
+++ b/tinker/tconstruct/blocks/TConstructBlock.java
@@ -7,7 +7,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
public class TConstructBlock extends Block
{
@@ -35,7 +35,7 @@ public class TConstructBlock extends Block
@Override
public String getTextureFile ()
{
- return TConstructContent.blockTexture;
+ return TContent.blockTexture;
}
@Override
diff --git a/tinker/tconstruct/blocks/ToolStationBlock.java b/tinker/tconstruct/blocks/ToolStationBlock.java
index c5ad6fd7..492c9b89 100644
--- a/tinker/tconstruct/blocks/ToolStationBlock.java
+++ b/tinker/tconstruct/blocks/ToolStationBlock.java
@@ -12,7 +12,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tinker.common.InventoryBlock;
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.client.TableRender;
import tinker.tconstruct.logic.PartCrafterLogic;
import tinker.tconstruct.logic.PatternChestLogic;
@@ -31,7 +31,7 @@ public class ToolStationBlock extends InventoryBlock
public String getTextureFile ()
{
- return TConstructContent.blockTexture;
+ return TContent.blockTexture;
}
public int getBlockTextureFromSideAndMetadata (int side, int meta)
diff --git a/tinker/tconstruct/client/TProxyClient.java b/tinker/tconstruct/client/TProxyClient.java
index cf96480e..8b3c1487 100644
--- a/tinker/tconstruct/client/TProxyClient.java
+++ b/tinker/tconstruct/client/TProxyClient.java
@@ -9,13 +9,14 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import net.minecraft.client.Minecraft;
+import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import org.w3c.dom.Document;
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.TConstructRegistry;
import tinker.tconstruct.TProxyCommon;
import tinker.tconstruct.tools.ToolCore;
@@ -35,7 +36,7 @@ public class TProxyClient extends TProxyCommon
RenderingRegistry.registerBlockHandler(new FrypanRender());
//RenderingRegistry.registerBlockHandler(new AxleRender());
- MinecraftForgeClient.preloadTexture(TConstructContent.blockTexture);
+ MinecraftForgeClient.preloadTexture(TContent.blockTexture);
IItemRenderer render = new SuperCustomToolRenderer();
for (ToolCore tool : TConstructRegistry.tools)
{
@@ -80,6 +81,13 @@ public class TProxyClient extends TProxyCommon
}
}
+ for (int i = 0; i < shardNames.length; i++)
+ {
+ String internalName = "item.tconstruct.ToolShard."+toolMaterialNames[i]+".name";
+ String visibleName = shardNames[i];
+ LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
+ }
+
for (int i = 0; i < materialItemNames.length; i++)
{
String internalName = "item.tconstruct.Materials."+materialItemInternalNames[i]+".name";
@@ -95,45 +103,24 @@ public class TProxyClient extends TProxyCommon
}
//LanguageRegistry.addName(TConstructContent.smeltery, "Smeltery");
- LanguageRegistry.addName(TConstructContent.manualBook, "Tinker's Log");
- LanguageRegistry.addName(TConstructContent.blankPattern, "Blank Pattern");
- LanguageRegistry.addName(TConstructContent.pickaxe, "Pickaxe");
- LanguageRegistry.addName(TConstructContent.shovel, "Shovel");
- LanguageRegistry.addName(TConstructContent.axe, "Axe");
- LanguageRegistry.addName(TConstructContent.broadsword, "Broadsword");
- LanguageRegistry.addName(TConstructContent.longsword, "Longsword");
- LanguageRegistry.addName(TConstructContent.rapier, "Rapier");
- LanguageRegistry.addName(TConstructContent.frypan, "Frying Pan");
- LanguageRegistry.addName(TConstructContent.battlesign, "Battlesign");
- LanguageRegistry.addName(TConstructContent.mattock, "Mattock");
- LanguageRegistry.addName(TConstructContent.lumberaxe, "Lumber Axe");
+ LanguageRegistry.addName(TContent.manualBook, "Tinker's Log");
+ LanguageRegistry.addName(TContent.blankPattern, "Blank Pattern");
+ LanguageRegistry.addName(TContent.pickaxe, "Pickaxe");
+ LanguageRegistry.addName(TContent.shovel, "Shovel");
+ LanguageRegistry.addName(TContent.axe, "Axe");
+ LanguageRegistry.addName(TContent.broadsword, "Broadsword");
+ LanguageRegistry.addName(TContent.longsword, "Longsword");
+ LanguageRegistry.addName(TContent.rapier, "Rapier");
+ LanguageRegistry.addName(TContent.frypan, "Frying Pan");
+ LanguageRegistry.addName(TContent.battlesign, "Battlesign");
+ LanguageRegistry.addName(TContent.mattock, "Mattock");
+ LanguageRegistry.addName(TContent.lumberaxe, "Lumber Axe");
}
- @Override
- public File getLocation()
- {
- return Minecraft.getMinecraftDir();
- }
-
- public static Document volume1;
-
- public void readManuals ()
- {
- try
- {
- InputStream stream = TConstruct.class.getResourceAsStream("/manuals/diary.xml");
- DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
- Document doc = dBuilder.parse(stream);
- doc.getDocumentElement().normalize();
-
- volume1 = doc;
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
+
+ public static final String[] shardNames = new String[] {
+ "Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard", "Slime Crystal Fragment", "Paper",
+ "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk" };
public static final String[] materialItemInternalNames = new String[] {
"PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone" };
@@ -145,14 +132,58 @@ public class TProxyClient extends TProxyCommon
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
public static final String[] materialTypes = new String[] {
- "ToolRod", "PickaxeHead", "ToolShard", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" };
+ "ToolRod", "PickaxeHead", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" };
public static final String[] materialNames = new String[] {
- " Rod", " Pickaxe Head", " Shard", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" };
+ " Rod", " Pickaxe Head", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" };
public static final String[] patterns = new String[] {
"blank", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" };
public static final String[] patternNames = new String[] {
"Blank", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" };
+
+ public static Document diary;
+ public static Document volume1;
+
+ public void readManuals ()
+ {
+ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+ diary = readManual("/manuals/diary.xml", dbFactory);
+ volume1 = readManual("/manuals/materials.xml", dbFactory);
+ }
+
+ Document readManual(String location, DocumentBuilderFactory dbFactory)
+ {
+ try
+ {
+ InputStream stream = TConstruct.class.getResourceAsStream(location);
+ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
+ Document doc = dBuilder.parse(stream);
+ doc.getDocumentElement().normalize();
+ return doc;
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static Document getManualFromStack(ItemStack stack)
+ {
+ switch (stack.getItemDamage())
+ {
+ case 0: return diary;
+ case 1: return volume1;
+ }
+
+ return null;
+ }
+
+ @Override
+ public File getLocation()
+ {
+ return Minecraft.getMinecraftDir();
+ }
}
diff --git a/tinker/tconstruct/client/gui/GuiManual.java b/tinker/tconstruct/client/gui/GuiManual.java
index 9b001018..664a7aa9 100644
--- a/tinker/tconstruct/client/gui/GuiManual.java
+++ b/tinker/tconstruct/client/gui/GuiManual.java
@@ -21,6 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class GuiManual extends GuiScreen
{
ItemStack itemstackBook;
+ Document manual;
int bookImageWidth = 166;
int bookImageHeight = 200;
int bookTotalPages = 1;
@@ -29,13 +30,19 @@ public class GuiManual extends GuiScreen
private TurnPageButton buttonNextPage;
private TurnPageButton buttonPreviousPage;
+ String pageLeftType;
+ String pageRightType;
String textLeft;
String textRight;
- public GuiManual(ItemStack stack)
+ private final int textHash = "text".hashCode();
+ private final int titleHash = "title".hashCode();
+
+ public GuiManual(ItemStack stack, Document doc)
{
this.itemstackBook = stack;
currentPage = 0; //Stack page
+ manual = doc;
}
@Override
@@ -62,7 +69,7 @@ public class GuiManual extends GuiScreen
public void initGui()
{
- maxPages = TProxyClient.volume1.getElementsByTagName("page").getLength();
+ maxPages = manual.getElementsByTagName("page").getLength();
updateText();
int xPos = (this.width) / 2;
this.controlList.add(this.buttonNextPage = new TurnPageButton(1, xPos+bookImageWidth-50, 180, true));
@@ -84,31 +91,36 @@ public class GuiManual extends GuiScreen
void updateText()
{
- if (currentPage < 0)
- currentPage = 0;
if (currentPage >= maxPages)
currentPage = maxPages-2;
if (currentPage % 2 == 1)
currentPage--;
+ if (currentPage < 0)
+ currentPage = 0;
- //Document doc = TProxyClient.volume1;
- NodeList nList = TProxyClient.volume1.getElementsByTagName("page");
+ NodeList nList = manual.getElementsByTagName("page");
- Node nNode = nList.item(currentPage);
- if (nNode.getNodeType() == Node.ELEMENT_NODE)
+ Node node = nList.item(currentPage);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
{
- Element eElement = (Element) nNode;
- textLeft = eElement.getElementsByTagName("text").item(0).getTextContent();
+ Element element = (Element) node;
+ //System.out.println("TypeL: "+eElement.getAttribute("type"));
+ pageLeftType = element.getAttribute("type");
+ textLeft = element.getElementsByTagName("text").item(0).getTextContent();
}
- nNode = nList.item(currentPage+1);
- if (nNode != null && nNode.getNodeType() == Node.ELEMENT_NODE)
+ node = nList.item(currentPage+1);
+ if (node != null && node.getNodeType() == Node.ELEMENT_NODE)
{
- Element eElement = (Element) nNode;
- textRight = eElement.getElementsByTagName("text").item(0).getTextContent();
+ Element element = (Element) node;
+ pageRightType = element.getAttribute("type");
+ textRight = element.getElementsByTagName("text").item(0).getTextContent();
}
else
+ {
+ pageRightType = "blank";
textRight = null;
+ }
}
public void drawScreen(int par1, int par2, float par3)
@@ -117,20 +129,35 @@ public class GuiManual extends GuiScreen
int texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/bookright.png");
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture(texID);
- int var5 = (this.width) / 2;
- byte var6 = 8;
- this.drawTexturedModalRect(var5, var6, 0, 0, this.bookImageWidth, this.bookImageHeight);
+ int localWidth = (this.width) / 2;
+ byte localHeight = 8;
+ this.drawTexturedModalRect(localWidth, localHeight, 0, 0, this.bookImageWidth, this.bookImageHeight);
texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/bookleft.png");
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture(texID);
- var5 = var5 - this.bookImageWidth;
- this.drawTexturedModalRect(var5, var6, 256 - this.bookImageWidth, 0, this.bookImageWidth, this.bookImageHeight);
+ localWidth = localWidth - this.bookImageWidth;
+ this.drawTexturedModalRect(localWidth, localHeight, 256 - this.bookImageWidth, 0, this.bookImageWidth, this.bookImageHeight);
if (textLeft != null)
- this.fontRenderer.drawSplitString(textLeft, (var5 + 80), var6 + 16 + 16, 200, 0);
+ {
+ if (pageLeftType.equals("text"))
+ drawTextPage(textLeft, localWidth + 80, localHeight + 32);
+ else if (pageLeftType.equals("title"))
+ drawTitlePage(textLeft, localWidth + 80, localHeight + 32);
+ }
if (textRight != null)
- this.fontRenderer.drawSplitString(textRight, (var5 + 320), var6 + 16 + 16, 200, 0);
+ drawTextPage(textRight, localWidth + 320, localHeight + 32);
super.drawScreen(par1, par2, par3);
}
+
+ public void drawTextPage(String text, int localWidth, int localHeight)
+ {
+ this.fontRenderer.drawSplitString(text, localWidth, localHeight, 200, 0);
+ }
+
+ public void drawTitlePage(String text, int localWidth, int localHeight)
+ {
+ this.fontRenderer.drawSplitString(text, localWidth, localHeight, 200, 0);
+ }
}
diff --git a/tinker/tconstruct/client/gui/PatternShaperGui.java b/tinker/tconstruct/client/gui/PatternShaperGui.java
index 48e70a0d..0ebb29a0 100644
--- a/tinker/tconstruct/client/gui/PatternShaperGui.java
+++ b/tinker/tconstruct/client/gui/PatternShaperGui.java
@@ -15,7 +15,7 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.network.PacketDispatcher;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.container.PatternShaperContainer;
import tinker.tconstruct.logic.PatternShaperLogic;
@@ -85,19 +85,19 @@ public class PatternShaperGui extends GuiContainer
if (button.id == 0)
{
patternIndex++;
- if (patternIndex > TConstructContent.patternOutputs.length - 1)
+ if (patternIndex > TContent.patternOutputs.length - 1)
patternIndex = 0;
}
else if (button.id == 1)
{
patternIndex--;
if (patternIndex < 0)
- patternIndex = TConstructContent.patternOutputs.length - 1;
+ patternIndex = TContent.patternOutputs.length - 1;
}
ItemStack pattern = logic.getStackInSlot(0);
- if (pattern != null && pattern.getItem() == TConstructContent.blankPattern)
+ if (pattern != null && pattern.getItem() == TContent.blankPattern)
{
- ItemStack stack = new ItemStack(TConstructContent.woodPattern, 1, patternIndex + 1);
+ ItemStack stack = new ItemStack(TContent.woodPattern, 1, patternIndex + 1);
logic.setInventorySlotContents(1, stack);
updateServer(stack);
}
diff --git a/tinker/tconstruct/crafting/PatternBuilder.java b/tinker/tconstruct/crafting/PatternBuilder.java
index b9f4f2ed..3866bc5c 100644
--- a/tinker/tconstruct/crafting/PatternBuilder.java
+++ b/tinker/tconstruct/crafting/PatternBuilder.java
@@ -9,7 +9,7 @@ import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import tinker.common.IPattern;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.items.Pattern;
public class PatternBuilder
@@ -18,7 +18,7 @@ public class PatternBuilder
//Map items to their parts with a hashmap
List materials = new ArrayList();
HashMap materialSets = new HashMap();
-
+
//We could use IRecipe if it wasn't tied to InventoryCrafting
List toolPatterns = new ArrayList();
@@ -33,7 +33,7 @@ public class PatternBuilder
materialSets.put(key, new MaterialSet(shard, rod, materialID));
materials.add(new ItemKey(shard.getItem(), shard.getItemDamage(), 1, key));
}
-
+
// 1 + 2 = EVERYTHING
public void registerFullMaterial (ItemStack material, int value, String key, ItemStack shard, ItemStack rod, int materialID)
{
@@ -53,53 +53,56 @@ public class PatternBuilder
if (material != null && pattern != null)
{
ItemKey key = getItemKey(material);
- MaterialSet mat = (MaterialSet) materialSets.get(key.key);
- ItemStack toolPart = getMatchingPattern(pattern, mat);
-
- if (key != null && toolPart != null)
+ if (key != null)
{
- int patternValue = ((Pattern)pattern.getItem()).getPatternCost(pattern.getItemDamage());
- int totalMaterial = key.value * material.stackSize;
-
- if (totalMaterial < patternValue) // Not enough material
- return null;
-
- else if ( patternValue == key.value ) //Material only
- return new ItemStack[] { toolPart, null };
-
- else
+ MaterialSet mat = (MaterialSet) materialSets.get(key.key);
+ ItemStack toolPart = getMatchingPattern(pattern, mat);
+
+ if (toolPart != null)
{
- if (patternValue % 2 == 1)
- {
- return new ItemStack[] { toolPart, mat.shard.copy() }; //Material + shard
- }
- else
+ int patternValue = ((Pattern) pattern.getItem()).getPatternCost(pattern.getItemDamage());
+ int totalMaterial = key.value * material.stackSize;
+
+ if (totalMaterial < patternValue) // Not enough material
+ return null;
+
+ else if (patternValue == key.value) //Material only
return new ItemStack[] { toolPart, null };
- }
- /*if ( patternValue < totalMaterial )
- {
- if (otherPattern != null)
+
+ else
{
- int otherValue = ((Pattern)otherPattern.getItem()).getPatternCost(otherPattern.getItemDamage());
- if (patternValue + otherValue <= key.value)
+ if (patternValue % 2 == 1)
{
- Item otherPart = getMatchingPattern(otherPattern);
- return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), new ItemStack(otherPart, 1, mat.materialID) }; //Material + Material
+ return new ItemStack[] { toolPart, mat.shard.copy() }; //Material + shard
}
+ else
+ return new ItemStack[] { toolPart, null };
}
- return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), mat.shard.copy() }; //Material + Shard, copy to avoid weirdness with the itemstack reference
+ /*if ( patternValue < totalMaterial )
+ {
+ if (otherPattern != null)
+ {
+ int otherValue = ((Pattern)otherPattern.getItem()).getPatternCost(otherPattern.getItemDamage());
+ if (patternValue + otherValue <= key.value)
+ {
+ Item otherPart = getMatchingPattern(otherPattern);
+ return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), new ItemStack(otherPart, 1, mat.materialID) }; //Material + Material
+ }
+ }
+ return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), mat.shard.copy() }; //Material + Shard, copy to avoid weirdness with the itemstack reference
+ }
+
+ else if ( patternValue == key.value )
+ return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), null }; //Material only
+
+ else
+ return null; //Not a valid match*/
}
-
- else if ( patternValue == key.value )
- return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), null }; //Material only
-
- else
- return null; //Not a valid match*/
- }
+ }
}
return null;
}
-
+
public int getPartID (ItemStack material)
{
if (material != null)
@@ -113,7 +116,7 @@ public class PatternBuilder
}
return -1;
}
-
+
public int getPartValue (ItemStack material)
{
if (material != null)
@@ -124,19 +127,19 @@ public class PatternBuilder
}
return 0;
}
-
+
public ItemKey getItemKey (ItemStack material)
{
Item mat = material.getItem();
int damage = material.getItemDamage();
for (ItemKey ik : materials)
{
- if ( mat == ik.item && (ik.damage == -1 || damage == ik.damage))
+ if (mat == ik.item && (ik.damage == -1 || damage == ik.damage))
return ik;
}
return null;
}
-
+
public ItemStack getMatchingPattern (ItemStack stack, MaterialSet set)
{
Item item = stack.getItem();
@@ -147,7 +150,7 @@ public class PatternBuilder
}
return null;
}
-
+
//Small data classes. I would prefer the struct from C#, but we do what we can.
public class ItemKey
{
@@ -155,6 +158,7 @@ public class PatternBuilder
public final int damage;
public final int value;
public final String key;
+
public ItemKey(Item i, int d, int v, String s)
{
item = i;
@@ -163,7 +167,7 @@ public class PatternBuilder
key = s;
}
}
-
+
/*public class PatternKey
{
public final IToolPart item;
@@ -177,7 +181,7 @@ public class PatternBuilder
return item.getPatternOutput();
}
}*/
-
+
public class MaterialSet
{
public final ItemStack shard;
@@ -191,17 +195,35 @@ public class PatternBuilder
materialID = id;
}
}
-
+
//Helper Methods
- public void registerMaterial (Block material, int value, String key) { registerMaterial(new ItemStack(material, 1, -1), value, key); }
- public void registerMaterial (Item material, int value, String key) { registerMaterial(new ItemStack(material, 1, -1), value, key); }
-
+ public void registerMaterial (Block material, int value, String key)
+ {
+ registerMaterial(new ItemStack(material, 1, -1), value, key);
+ }
+
+ public void registerMaterial (Item material, int value, String key)
+ {
+ registerMaterial(new ItemStack(material, 1, -1), value, key);
+ }
+
public void registerFullMaterial (Block material, int value, String key, ItemStack shard, ItemStack rod, int materialID)
- { registerFullMaterial(new ItemStack(material, 1, -1), value, key, shard, rod, materialID); }
+ {
+ registerFullMaterial(new ItemStack(material, 1, -1), value, key, shard, rod, materialID);
+ }
+
public void registerFullMaterial (Item material, int value, String key, ItemStack shard, ItemStack rod, int materialID)
- { registerFullMaterial(new ItemStack(material, 1, -1), value, key, shard, rod, materialID); }
+ {
+ registerFullMaterial(new ItemStack(material, 1, -1), value, key, shard, rod, materialID);
+ }
+
public void registerFullMaterial (Block material, int value, String key, int materialID)
- { registerFullMaterial(new ItemStack(material, 1, -1), value, key, new ItemStack(TConstructContent.toolShard, 1, materialID), new ItemStack(TConstructContent.toolRod, 1, materialID), materialID); }
+ {
+ registerFullMaterial(new ItemStack(material, 1, -1), value, key, new ItemStack(TContent.toolShard, 1, materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID);
+ }
+
public void registerFullMaterial (Item material, int value, String key, int materialID)
- { registerFullMaterial(new ItemStack(material, 1, -1), value, key, new ItemStack(TConstructContent.toolShard, 1, materialID), new ItemStack(TConstructContent.toolRod, 1, materialID), materialID); }
+ {
+ registerFullMaterial(new ItemStack(material, 1, -1), value, key, new ItemStack(TContent.toolShard, 1, materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID);
+ }
}
\ No newline at end of file
diff --git a/tinker/tconstruct/crafting/ToolBuilder.java b/tinker/tconstruct/crafting/ToolBuilder.java
index 712c2001..5c20e0ab 100644
--- a/tinker/tconstruct/crafting/ToolBuilder.java
+++ b/tinker/tconstruct/crafting/ToolBuilder.java
@@ -58,7 +58,7 @@ public class ToolBuilder
if (headStack.getItem() instanceof IToolPart)
{
head = ((IToolPart) headStack.getItem()).getMaterialID(headStack);
- handle = ((IToolPart) handleStack.getItem()).getMaterialID(handleStack);
+ //handle = ((IToolPart) handleStack.getItem()).getMaterialID(handleStack);
}
else
validMaterials = false;
diff --git a/tinker/tconstruct/crafting/ToolRecipe.java b/tinker/tconstruct/crafting/ToolRecipe.java
index a1af3302..c77ca333 100644
--- a/tinker/tconstruct/crafting/ToolRecipe.java
+++ b/tinker/tconstruct/crafting/ToolRecipe.java
@@ -1,6 +1,6 @@
package tinker.tconstruct.crafting;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.tools.ToolCore;
import net.minecraft.item.Item;
@@ -31,14 +31,14 @@ public class ToolRecipe
public boolean validHandle(Item handle)
{
- return (handle == TConstructContent.toolRod || handle == Item.stick || handle == Item.bone);
+ return (handle == TContent.toolRod || handle == Item.stick || handle == Item.bone);
}
public boolean validAccessory(Item acc)
{
if (accessory == null && acc == null)
return true;
- else if (accessory == TConstructContent.toolRod)
+ else if (accessory == TContent.toolRod)
return validHandle(acc);
else if (accessory == acc)
return true;
diff --git a/tinker/tconstruct/items/Pattern.java b/tinker/tconstruct/items/Pattern.java
index 8780c7eb..a57e3b62 100644
--- a/tinker/tconstruct/items/Pattern.java
+++ b/tinker/tconstruct/items/Pattern.java
@@ -8,7 +8,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import tinker.common.IPattern;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.crafting.PatternBuilder.MaterialSet;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -97,9 +97,9 @@ public class Pattern extends CraftingItem
public ItemStack getPatternOutput (ItemStack stack, MaterialSet set)
{
int type = stack.getItemDamage();
- if (type != 0 && type < TConstructContent.patternOutputs.length - 1)
+ if (type != 0 && type < TContent.patternOutputs.length - 1)
{
- return new ItemStack(TConstructContent.patternOutputs[type - 1], 1, set.materialID);
+ return new ItemStack(TContent.patternOutputs[type - 1], 1, set.materialID);
}
return null;
}
diff --git a/tinker/tconstruct/items/PatternManual.java b/tinker/tconstruct/items/PatternManual.java
index 5757bc6f..55c7b5f9 100644
--- a/tinker/tconstruct/items/PatternManual.java
+++ b/tinker/tconstruct/items/PatternManual.java
@@ -1,29 +1,38 @@
package tinker.tconstruct.items;
-import java.util.List;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+
+import org.w3c.dom.Document;
+
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructContent;
-import tinker.tconstruct.TConstructGuiHandler;
+import tinker.tconstruct.TContent;
+import tinker.tconstruct.TGuiHandler;
+import tinker.tconstruct.client.TProxyClient;
+import tinker.tconstruct.client.gui.GuiManual;
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
public class PatternManual extends CraftingItem
{
public PatternManual(int id)
{
- super(id, 144, TConstructContent.craftingTexture);
+ super(id, 144, TContent.craftingTexture);
setItemName("tconstruct.PatternManual");
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
- player.openGui(TConstruct.instance, TConstructGuiHandler.manualGui, world, 0, 0, 0);
+ player.openGui(TConstruct.instance, TGuiHandler.manualGui, world, 0, 0, 0);
+ /*Side side = FMLCommonHandler.instance().getEffectiveSide();
+ if (side.isClient())
+ FMLClientHandler.instance().displayGuiScreen(player, new GuiManual(player.getCurrentEquippedItem(), getManualFromStack(stack)));*/
return stack;
}
+
+
}
diff --git a/tinker/tconstruct/items/ToolShard.java b/tinker/tconstruct/items/ToolShard.java
new file mode 100644
index 00000000..a6868175
--- /dev/null
+++ b/tinker/tconstruct/items/ToolShard.java
@@ -0,0 +1,27 @@
+package tinker.tconstruct.items;
+
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class ToolShard extends ToolPart
+{
+
+ public ToolShard(int id, int icon, String tex)
+ {
+ super(id, icon, tex);
+ this.setHasSubtypes(true);
+ this.setMaxDamage(0);
+ }
+
+ public void getSubItems(int id, CreativeTabs tab, List list)
+ {
+ for (int i = 1; i < 5; i++)
+ list.add(new ItemStack(id, 1, i));
+ for (int i = 6; i < 9; i++)
+ list.add(new ItemStack(id, 1, i));
+ for (int i = 10; i < 15; i++)
+ list.add(new ItemStack(id, 1, i));
+ }
+}
diff --git a/tinker/tconstruct/logic/PartCrafterLogic.java b/tinker/tconstruct/logic/PartCrafterLogic.java
index c4866547..29568824 100644
--- a/tinker/tconstruct/logic/PartCrafterLogic.java
+++ b/tinker/tconstruct/logic/PartCrafterLogic.java
@@ -7,7 +7,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tinker.common.InventoryLogic;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.container.PartCrafterChestContainer;
import tinker.tconstruct.container.PartCrafterContainer;
import tinker.tconstruct.crafting.PatternBuilder;
diff --git a/tinker/tconstruct/logic/PatternShaperLogic.java b/tinker/tconstruct/logic/PatternShaperLogic.java
index 6b1b7307..b6fa5b92 100644
--- a/tinker/tconstruct/logic/PatternShaperLogic.java
+++ b/tinker/tconstruct/logic/PatternShaperLogic.java
@@ -5,7 +5,7 @@ import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import tinker.common.InventoryLogic;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.container.PatternShaperContainer;
public class PatternShaperLogic extends InventoryLogic
@@ -40,7 +40,7 @@ public class PatternShaperLogic extends InventoryLogic
{
super.setInventorySlotContents(slot, itemstack);
if (slot == 0)
- setInventorySlotContents(1, new ItemStack(TConstructContent.woodPattern, 1, 1));
+ setInventorySlotContents(1, new ItemStack(TContent.woodPattern, 1, 1));
}
@Override
diff --git a/tinker/tconstruct/logic/SmelteryLogic.java b/tinker/tconstruct/logic/SmelteryLogic.java
index e6262aed..3ff3df9b 100644
--- a/tinker/tconstruct/logic/SmelteryLogic.java
+++ b/tinker/tconstruct/logic/SmelteryLogic.java
@@ -16,7 +16,7 @@ import net.minecraftforge.liquids.LiquidStack;
import tinker.common.IActiveLogic;
import tinker.common.IFacingLogic;
import tinker.common.InventoryLogic;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.container.SmelteryContainer;
import tinker.tconstruct.crafting.Smeltery;
@@ -299,17 +299,17 @@ public class SmelteryLogic extends InventoryLogic
{
int southID = worldObj.getBlockId(xPos, y, z-2);
int northID = worldObj.getBlockId(xPos, y, z+2);
- if (southID == TConstructContent.searedBrick.blockID)
+ if (southID == TContent.searedBrick.blockID)
numBricks++;
- else if (southID == TConstructContent.lavaTank.blockID)
+ else if (southID == TContent.lavaTank.blockID)
{
tankCoords = new int[] {xPos, y, z-2};
lavaTank = true;
}
- if (northID == TConstructContent.searedBrick.blockID)
+ if (northID == TContent.searedBrick.blockID)
numBricks++;
- else if (northID == TConstructContent.lavaTank.blockID)
+ else if (northID == TContent.lavaTank.blockID)
{
tankCoords = new int[] {xPos, y, z+2};
lavaTank = true;
@@ -319,17 +319,17 @@ public class SmelteryLogic extends InventoryLogic
{
int westID = worldObj.getBlockId(x-2, y, zPos);
int eastID = worldObj.getBlockId(x+2, y, zPos);
- if (westID == TConstructContent.searedBrick.blockID)
+ if (westID == TContent.searedBrick.blockID)
numBricks++;
- else if (westID == TConstructContent.lavaTank.blockID)
+ else if (westID == TContent.lavaTank.blockID)
{
tankCoords = new int[] {x-2, y, zPos};
lavaTank = true;
}
- if (eastID == TConstructContent.searedBrick.blockID)
+ if (eastID == TContent.searedBrick.blockID)
numBricks++;
- else if (eastID == TConstructContent.lavaTank.blockID)
+ else if (eastID == TContent.lavaTank.blockID)
{
tankCoords = new int[] {x+2, y, zPos};
lavaTank = true;
@@ -341,7 +341,7 @@ public class SmelteryLogic extends InventoryLogic
{
for (int zPos = z-1; zPos <= z+1; zPos++)
{
- if (worldObj.getBlockId(xPos, y-1, zPos) == TConstructContent.searedBrick.blockID)
+ if (worldObj.getBlockId(xPos, y-1, zPos) == TContent.searedBrick.blockID)
numBricks++;
}
}
diff --git a/tinker/tconstruct/tools/Axe.java b/tinker/tconstruct/tools/Axe.java
index 4052405c..32fb95f0 100644
--- a/tinker/tconstruct/tools/Axe.java
+++ b/tinker/tconstruct/tools/Axe.java
@@ -3,7 +3,7 @@ package tinker.tconstruct.tools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLiving;
@@ -52,7 +52,7 @@ public class Axe extends HarvestTool
@Override
protected Item getHeadItem ()
{
- return TConstructContent.axeHead;
+ return TContent.axeHead;
}
@Override
diff --git a/tinker/tconstruct/tools/BattleSign.java b/tinker/tconstruct/tools/BattleSign.java
index 96f9c536..1020844b 100644
--- a/tinker/tconstruct/tools/BattleSign.java
+++ b/tinker/tconstruct/tools/BattleSign.java
@@ -1,7 +1,7 @@
package tinker.tconstruct.tools;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@@ -108,7 +108,7 @@ public class BattleSign extends Weapon
@Override
protected Item getHeadItem ()
{
- return TConstructContent.signHead;
+ return TContent.signHead;
}
@Override
diff --git a/tinker/tconstruct/tools/Broadsword.java b/tinker/tconstruct/tools/Broadsword.java
index 4e954de7..52ee24ff 100644
--- a/tinker/tconstruct/tools/Broadsword.java
+++ b/tinker/tconstruct/tools/Broadsword.java
@@ -1,7 +1,7 @@
package tinker.tconstruct.tools;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLiving;
@@ -20,13 +20,13 @@ public class Broadsword extends Weapon
@Override
protected Item getHeadItem ()
{
- return TConstructContent.swordBlade;
+ return TContent.swordBlade;
}
@Override
protected Item getAccessoryItem ()
{
- return TConstructContent.largeGuard;
+ return TContent.largeGuard;
}
public float getDurabilityModifier ()
diff --git a/tinker/tconstruct/tools/FryingPan.java b/tinker/tconstruct/tools/FryingPan.java
index 7c45a9a0..96665c0a 100644
--- a/tinker/tconstruct/tools/FryingPan.java
+++ b/tinker/tconstruct/tools/FryingPan.java
@@ -10,7 +10,7 @@ import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.logic.EquipLogic;
public class FryingPan extends Weapon
@@ -77,13 +77,13 @@ public class FryingPan extends Weapon
{
return false;
}
- else if (!TConstructContent.heldItemBlock.canPlaceBlockAt(world, x, y, z))
+ else if (!TContent.heldItemBlock.canPlaceBlockAt(world, x, y, z))
{
return false;
}
else
{
- world.setBlockAndMetadataWithNotify(x, y, z, TConstructContent.heldItemBlock.blockID, 0);
+ world.setBlockAndMetadataWithNotify(x, y, z, TContent.heldItemBlock.blockID, 0);
EquipLogic logic = (EquipLogic) world.getBlockTileEntity(x, y, z);
logic.setEquipmentItem(stack);
@@ -97,7 +97,7 @@ public class FryingPan extends Weapon
@Override
protected Item getHeadItem ()
{
- return TConstructContent.frypanHead;
+ return TContent.frypanHead;
}
@Override
diff --git a/tinker/tconstruct/tools/Longsword.java b/tinker/tconstruct/tools/Longsword.java
index 8e324fb3..db2339ba 100644
--- a/tinker/tconstruct/tools/Longsword.java
+++ b/tinker/tconstruct/tools/Longsword.java
@@ -1,7 +1,7 @@
package tinker.tconstruct.tools;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLiving;
@@ -48,13 +48,13 @@ public class Longsword extends Weapon
@Override
protected Item getHeadItem ()
{
- return TConstructContent.swordBlade;
+ return TContent.swordBlade;
}
@Override
protected Item getAccessoryItem ()
{
- return TConstructContent.medGuard;
+ return TContent.medGuard;
}
/*@Override
diff --git a/tinker/tconstruct/tools/LumberAxe.java b/tinker/tconstruct/tools/LumberAxe.java
index fc947a8f..87822b08 100644
--- a/tinker/tconstruct/tools/LumberAxe.java
+++ b/tinker/tconstruct/tools/LumberAxe.java
@@ -13,7 +13,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
public class LumberAxe extends HarvestTool
{
@@ -170,7 +170,7 @@ public class LumberAxe extends HarvestTool
@Override
protected Item getHeadItem ()
{
- return TConstructContent.lumberHead;
+ return TContent.lumberHead;
}
@Override
diff --git a/tinker/tconstruct/tools/Mattock.java b/tinker/tconstruct/tools/Mattock.java
index 4d637e6f..55ca4fb8 100644
--- a/tinker/tconstruct/tools/Mattock.java
+++ b/tinker/tconstruct/tools/Mattock.java
@@ -1,7 +1,7 @@
package tinker.tconstruct.tools;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
@@ -63,13 +63,13 @@ public class Mattock extends DualHarvestTool
@Override
protected Item getHeadItem ()
{
- return TConstructContent.axeHead;
+ return TContent.axeHead;
}
@Override
protected Item getAccessoryItem ()
{
- return TConstructContent.shovelHead;
+ return TContent.shovelHead;
}
protected String getRenderString (int renderPass, boolean broken)
diff --git a/tinker/tconstruct/tools/Pickaxe.java b/tinker/tconstruct/tools/Pickaxe.java
index 79c17514..9d7634de 100644
--- a/tinker/tconstruct/tools/Pickaxe.java
+++ b/tinker/tconstruct/tools/Pickaxe.java
@@ -1,6 +1,6 @@
package tinker.tconstruct.tools;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
@@ -36,13 +36,13 @@ public class Pickaxe extends HarvestTool
@Override
protected Item getHeadItem ()
{
- return TConstructContent.pickaxeHead;
+ return TContent.pickaxeHead;
}
@Override
protected Item getAccessoryItem ()
{
- return TConstructContent.binding;
+ return TContent.binding;
}
protected String getRenderString (int renderPass, boolean broken)
diff --git a/tinker/tconstruct/tools/RangedWeapon.java b/tinker/tconstruct/tools/RangedWeapon.java
index e0f9dd6c..18a46cb5 100644
--- a/tinker/tconstruct/tools/RangedWeapon.java
+++ b/tinker/tconstruct/tools/RangedWeapon.java
@@ -2,7 +2,7 @@ package tinker.tconstruct.tools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
@@ -33,13 +33,13 @@ public abstract class RangedWeapon extends ToolCore
@Override
protected Item getHeadItem ()
{
- return TConstructContent.toolRod;
+ return TContent.toolRod;
}
@Override
protected Item getAccessoryItem ()
{
- return TConstructContent.toolRod;
+ return TContent.toolRod;
}
@SideOnly(Side.CLIENT)
diff --git a/tinker/tconstruct/tools/Rapier.java b/tinker/tconstruct/tools/Rapier.java
index af860cb6..c66a3e02 100644
--- a/tinker/tconstruct/tools/Rapier.java
+++ b/tinker/tconstruct/tools/Rapier.java
@@ -1,7 +1,7 @@
package tinker.tconstruct.tools;
import tinker.tconstruct.AbilityHelper;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLiving;
@@ -59,13 +59,13 @@ public class Rapier extends Weapon
@Override
protected Item getHeadItem ()
{
- return TConstructContent.swordBlade;
+ return TContent.swordBlade;
}
@Override
protected Item getAccessoryItem ()
{
- return TConstructContent.crossbar;
+ return TContent.crossbar;
}
protected String getRenderString (int renderPass, boolean broken)
diff --git a/tinker/tconstruct/tools/Shovel.java b/tinker/tconstruct/tools/Shovel.java
index c510816c..43346b22 100644
--- a/tinker/tconstruct/tools/Shovel.java
+++ b/tinker/tconstruct/tools/Shovel.java
@@ -2,7 +2,7 @@ package tinker.tconstruct.tools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
@@ -37,7 +37,7 @@ public class Shovel extends HarvestTool
@Override
protected Item getHeadItem ()
{
- return TConstructContent.shovelHead;
+ return TContent.shovelHead;
}
@Override
diff --git a/tinker/tconstruct/tools/ToolCore.java b/tinker/tconstruct/tools/ToolCore.java
index ebc8c33a..27343a81 100644
--- a/tinker/tconstruct/tools/ToolCore.java
+++ b/tinker/tconstruct/tools/ToolCore.java
@@ -20,7 +20,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import tinker.tconstruct.AbilityHelper;
import tinker.tconstruct.TConstruct;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import tinker.tconstruct.TConstructRegistry;
import tinker.tconstruct.crafting.ToolBuilder;
import tinker.tconstruct.modifiers.ToolMod;
@@ -100,7 +100,7 @@ public abstract class ToolCore extends Item
@Override
public String getTextureFile () //Repurposed for default texture locations
{
- return TConstructContent.craftingTexture;
+ return TContent.craftingTexture;
}
public String getToolTextureFile ()
@@ -141,7 +141,7 @@ public abstract class ToolCore extends Item
}
}
- return TConstructContent.blankSprite;
+ return TContent.blankSprite;
}
@SideOnly(Side.CLIENT)
@@ -167,7 +167,7 @@ public abstract class ToolCore extends Item
return (effectTextures.get((Integer) tags.getInteger("Effect3")) + getEffectString(renderPass));
}
- return TConstructContent.blankSprite;
+ return TContent.blankSprite;
}
protected abstract String getRenderString(int renderPass, boolean broken);
@@ -462,7 +462,7 @@ public abstract class ToolCore extends Item
protected Item getHandleItem ()
{
- return TConstructContent.toolRod;
+ return TContent.toolRod;
}
public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5)
diff --git a/tinker/tconstruct/worldgen/TBaseWorldGenerator.java b/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
index 374cd2af..7985f736 100644
--- a/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
+++ b/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
@@ -2,7 +2,7 @@ package tinker.tconstruct.worldgen;
import java.util.Random;
-import tinker.tconstruct.TConstructContent;
+import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.world.World;
@@ -15,8 +15,8 @@ public class TBaseWorldGenerator
{
public TBaseWorldGenerator()
{
- cobalt = new ManhattanOreGenerator(TConstructContent.ores.blockID, 0, 2, 4, 100, Block.netherrack.blockID);
- ardite = new ManhattanOreGenerator(TConstructContent.ores.blockID, 1, 2, 4, 100, Block.netherrack.blockID);
+ cobalt = new ManhattanOreGenerator(TContent.ores.blockID, 0, 2, 4, 100, Block.netherrack.blockID);
+ ardite = new ManhattanOreGenerator(TContent.ores.blockID, 1, 2, 4, 100, Block.netherrack.blockID);
}
@Override