diff --git a/mods/tinker/resources/lang/en_US.xml b/mods/tinker/resources/lang/en_US.xml
index a77e530..a56fefa 100644
--- a/mods/tinker/resources/lang/en_US.xml
+++ b/mods/tinker/resources/lang/en_US.xml
@@ -29,7 +29,7 @@
Aluminum Ore
Stone Slag
- Smeltery
+ Smeltery Controller
Smeltery Drain
Seared Bricks
Lava Tank
diff --git a/mods/tinker/resources/manuals/materials.xml b/mods/tinker/resources/manuals/materials.xml
index 88f2a32..8998bac 100644
--- a/mods/tinker/resources/manuals/materials.xml
+++ b/mods/tinker/resources/manuals/materials.xml
@@ -9,31 +9,18 @@ Volume 1
By Skyla
-
-Introduction
-Worktables
-Tools
-Materials
-Abilities
-Modifiers
-Notes
-1
-2
-3
-4
-5
-6
+
+Table of Contents
+
+This book is -not- anywhere near finished. Please don't read me yet.
-Welcome to the first edition of Materials and You: A Guide to Tools and Abilities. Within you will find details on each tool and anything you can make them from. You will also find the key to becoming a great Tool Tinker: changing tools after they're created. Many of the best known tools have changed so much since their inception that they may as well be somethign else.
-
-This book is a magic copy. Whenever the original is updated, this book will automatically copy the source.
+Welcome to the first edition of Materials and You: A Guide to Tools and Abilities. Within you will find details on each tool and anything you can make them from. You will also find the key to becoming a great Tool Tinker: changing tools after they're created. Many of the best known tools have changed so much since their inception that they may as well be somethign else.
-Worktables
-
+Worktables
In general:
- Tools are made from parts
diff --git a/mods/tinker/resources/manuals/smeltery.xml b/mods/tinker/resources/manuals/smeltery.xml
index 53ba44b..b9a7958 100644
--- a/mods/tinker/resources/manuals/smeltery.xml
+++ b/mods/tinker/resources/manuals/smeltery.xml
@@ -9,20 +9,21 @@ By Thruul M'gon
+Table of Contents
Introduction
smelterybook
3
- Smeltery
- smeltery
- 6
+ Casting
+ castingtable
+ 8
- Recipes
- blankcast
- 9
+ Construction
+ smeltery
+ 5
Alloys
@@ -30,56 +31,103 @@ By Thruul M'gon
9
- Casting
- castingtable
- 14
+ Recipes
+ blankcast
+ 9
-Welcome, puny Tinker, to the world of metalcraft.
-
-
-
-Alloys are made when two metals are mixed in precise proportions. Currently known alloys are:
+Welcome to the world of metalcraft. Within these pages you will learn the secrets of crafting rare and precious metals into usable materials.
-Bronze, made from Copper(3) and Tin(1)
-Aluminum Brass, made from Aluminum(3) and Copper(1)
-Manyullyn, made from Cobalt(1) and Ardite(1)
-Alumite, made from Aluminum(5), Iron(2), and Obsidian(2)
+You will learn how to cast everything from the softest Iron to the hardest Manyullyn into whatever shape you desire and create alloy mixes from obscure materials. As always, experimentation is key!
+
+The main structure for melting liquids is called the Smeltery. It is larger than structures you may be familiar with, but the method for construction is relatively simple. It operates much like a furnace with a drain.
-Worktables
-
+When working with the Smeltery, there are a few things to keep in mind:
-In general:
-- Tools are made from parts
-- Parts are created from materials using a pattern
+* Ores naturally have more material than processed versions, such as ingots. The Smeltery will preserve the full value of the ores - roughly twice as much as a regular furnace would provide.
-We will create three separate areas for the creation of tools. The first will be for shaping patterns, the second for crafting parts out of materials, and the last will be the main station for finished products.
+* Mixing two metals in the Smeltery may result in an alloy. The process happens automatically.
+
+* If you need more space to process metal, add more layers.
+
+
+
+The Smeltery is a multi-block structure. You will need the following materials to get started.
+-
+ 1 Smeltery Controller
+ smeltery
+
+-
+ 1 Lava Tank
+ lavatank
+
+-
+ 9 Seared Bricks
+ searedbrick
+
+-
+ Any combination of 10 Seared Bricks, Lava Tanks, or Drains
+
+ drain
+
+-
+ 1 Faucet
+ faucet
+
+-
+ 1 Casting Table
+ castingtable
+
-Blank patterns are where the
-
-
+Begin construction by laying a 3x3 bed of seared bricks. Leave any space above these bricks open; you will be constructing a shell around a 3x3 hollow inside.
-
-Blank Wood Pattern
-woodpattern
+Place the Controller one layer up and the lava tank anywhere on the same level. Fill in the rest of the space with seared bricks, lava tanks, or drains as you like.
+
+The small end of drains should be facing the outside. If you're successful, the Controller will light up and start working. Fill the tank with lava, the basin with metal, and watch it go.
+
+The structure must be a 5x5 shell due to the amount of heat lava gives off. There are no vertical restrictions to the size of the basin.
-The Stencil Table is where you shape blank patterns into something useful. This is done by punching a hole in precisely the shape you want the end result to look like. Materials can be place in the hole and combined until they resemble the end product.
-
+Larger basins will hold more metal, of course, and the Controller can be on any level so long as there is a lava tank to match.
+
+When you are ready to pour liquid metal from the Smeltery, put a faucet on a drain and a casting table below it.
+
+Other liquid removal objects will work, but are frowned upon. An example picture is provided for your convienence.
-
-Stencil Table
-stenciltable
+
+Figure 1a
+
+
+
+Alloys are made when two metals are mixed in precise proportions. Currently known alloys are:
+-
+ Bronze, made from Copper(3) and Tin(1)
+ bronzeingot
+
+-
+ Aluminum Brass, made from Aluminum(3) and Copper(1)
+ alubrassingot
+
+-
+ Manyullyn, made from Cobalt(1) and Ardite(1)
+ manyullyningot
+
+-
+ Alumite, made from Aluminum(5), Iron(2), and Obsidian(2)
+ alumiteingot
+
+
+
-
+To be continued...
\ No newline at end of file
diff --git a/mods/tinker/resources/manuals/smelterysmall.png b/mods/tinker/resources/manuals/smelterysmall.png
new file mode 100644
index 0000000..c1d8733
Binary files /dev/null and b/mods/tinker/resources/manuals/smelterysmall.png differ
diff --git a/mods/tinker/tconstruct/TAfterEventHandler.java b/mods/tinker/tconstruct/TAfterEventHandler.java
deleted file mode 100644
index 085a29c..0000000
--- a/mods/tinker/tconstruct/TAfterEventHandler.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package mods.tinker.tconstruct;
-
-import java.util.Random;
-
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.Item;
-import net.minecraftforge.event.ForgeSubscribe;
-import net.minecraftforge.event.entity.player.ArrowLooseEvent;
-
-public class TAfterEventHandler
-{
- Random rand = new Random();
-
- /* Bows */
- @ForgeSubscribe
- public void arrowShoot (ArrowLooseEvent event)
- {
- event.setCanceled(true);
- int j = event.charge;
-
- boolean flag = event.entityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, event.bow) > 0;
-
- if (flag || event.entityPlayer.inventory.hasItem(Item.arrow.itemID))
- {
- float f = (float)j / 20.0F;
- f = (f * f + f * 2.0F) / 3.0F;
-
- if ((double)f < 0.1D)
- {
- return;
- }
-
- if (f > 1.0F)
- {
- f = 1.0F;
- }
-
- EntityArrow entityarrow = new EntityArrow(event.entityPlayer.worldObj, event.entityPlayer, f * 2.0F);
-
- if (f == 1.0F)
- {
- entityarrow.setIsCritical(true);
- }
-
- int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, event.bow);
-
- entityarrow.setDamage(1.5D + k * 0.45D);
-
- int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, event.bow);
-
- if (l > 0)
- {
- entityarrow.setKnockbackStrength(l);
- }
-
- if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, event.bow) > 0)
- {
- entityarrow.setFire(100);
- }
-
- event.bow.damageItem(1, event.entityPlayer);
- event.entityPlayer.worldObj.playSoundAtEntity(event.entityPlayer, "random.bow", 1.0F, 1.0F / (rand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
-
- if (flag)
- {
- entityarrow.canBePickedUp = 2;
- }
- else
- {
- event.entityPlayer.inventory.consumeInventoryItem(Item.arrow.itemID);
- }
-
- if (!event.entityPlayer.worldObj.isRemote)
- {
- event.entityPlayer.worldObj.spawnEntityInWorld(entityarrow);
- }
- }
- }
-}
diff --git a/mods/tinker/tconstruct/TConstruct.java b/mods/tinker/tconstruct/TConstruct.java
index 7d7bb91..9fd23f9 100644
--- a/mods/tinker/tconstruct/TConstruct.java
+++ b/mods/tinker/tconstruct/TConstruct.java
@@ -23,7 +23,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
* @author: mDiyo
*/
-@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.2.2")
+@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.2.3")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.TPacketHandler.class)
public class TConstruct
{
@@ -63,9 +63,8 @@ public class TConstruct
public void init (FMLInitializationEvent evt)
{
GameRegistry.registerWorldGenerator(new TBaseWorldGenerator());
- playerTracker = new TPlayerHandler();
- MinecraftForge.EVENT_BUS.register(playerTracker);
- GameRegistry.registerPlayerTracker(playerTracker);
+ GameRegistry.registerFuelHandler(content);
+ GameRegistry.registerCraftingHandler(new TCraftingHandler());
NetworkRegistry.instance().registerGuiHandler(instance, new TGuiHandler());
}
@@ -74,12 +73,13 @@ public class TConstruct
{
content.modIntegration();
content.oreRegistry();
- lateEvents = new TAfterEventHandler();
- MinecraftForge.EVENT_BUS.register(lateEvents);
+
+ playerTracker = new TPlayerHandler();
+ GameRegistry.registerPlayerTracker(playerTracker);
+ MinecraftForge.EVENT_BUS.register(playerTracker);
}
public static TEventHandler events;
- public static TAfterEventHandler lateEvents;
public static TPlayerHandler playerTracker;
public static TContent content;
diff --git a/mods/tinker/tconstruct/TContent.java b/mods/tinker/tconstruct/TContent.java
index c1501c8..4af1004 100644
--- a/mods/tinker/tconstruct/TContent.java
+++ b/mods/tinker/tconstruct/TContent.java
@@ -1,5 +1,6 @@
package mods.tinker.tconstruct;
+import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
@@ -177,7 +178,6 @@ public class TContent implements IFuelHandler
addSmelteryRecipes();
addCraftingRecipes();
setupToolTabs();
- GameRegistry.registerFuelHandler(this);
}
void createEntities ()
@@ -346,7 +346,7 @@ public class TContent implements IFuelHandler
//Thaumcraft
TConstructRegistry.addToolMaterial(21, "Thaumium", 2, 2, 250, 600, 2, 1.3F, 1, 0f);
- //Metallurgy
+ /*//Metallurgy
TConstructRegistry.addToolMaterial(22, "Heptazion", 2, 2, 300, 800, 1, 1.0F, 0, 0f);
TConstructRegistry.addToolMaterial(23, "Damascus Steel", 2, 3, 500, 600, 2, 1.35F, 1, 0f);
TConstructRegistry.addToolMaterial(24, "Angmallen", 2, 2, 300, 800, 2, 0.8F, 0, 0f);
@@ -366,7 +366,7 @@ public class TContent implements IFuelHandler
TConstructRegistry.addToolMaterial(36, "Quicksilver", 2, 4, 1100, 1400, 3, 1.0F, 1, 0f);
TConstructRegistry.addToolMaterial(37, "Haderoth", 2, 4, 1250, 1200, 3, 1.0F, 2, 0f);
TConstructRegistry.addToolMaterial(38, "Celenegil", 3, 5, 1600, 1400, 3, 1.0F, 2, 0f);
- TConstructRegistry.addToolMaterial(39, "Tartarite", 3, 7, 3000, 1400, 5, 1.6667F, 4, 0f);
+ TConstructRegistry.addToolMaterial(39, "Tartarite", 3, 7, 3000, 1400, 5, 1.6667F, 4, 0f);*/
PatternBuilder pb = PatternBuilder.instance;
if (PHConstruct.enableTWood)
@@ -540,6 +540,7 @@ public class TContent implements IFuelHandler
}
}
+ WeakReference tool = new WeakReference(null);
void addSmelteryRecipes ()
{
//Ore
diff --git a/mods/tinker/tconstruct/TCraftingHandler.java b/mods/tinker/tconstruct/TCraftingHandler.java
new file mode 100644
index 0000000..0241339
--- /dev/null
+++ b/mods/tinker/tconstruct/TCraftingHandler.java
@@ -0,0 +1,29 @@
+package mods.tinker.tconstruct;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import cpw.mods.fml.common.ICraftingHandler;
+
+public class TCraftingHandler implements ICraftingHandler
+{
+
+ @Override
+ public void onCrafting (EntityPlayer player, ItemStack item, IInventory craftMatrix)
+ {
+ if (item.getItem().itemID == TContent.smeltery.blockID)
+ {
+ NBTTagCompound tags = player.getEntityData().getCompoundTag("TConstruct");
+ if (!tags.getBoolean("smelteryManual"))
+ {
+ tags.setBoolean("smelteryManual", true);
+ AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TContent.manualBook, 1, 2));
+ }
+ }
+ }
+
+ @Override
+ public void onSmelting (EntityPlayer player, ItemStack item) {}
+
+}
diff --git a/mods/tinker/tconstruct/client/TProxyClient.java b/mods/tinker/tconstruct/client/TProxyClient.java
index 83332ab..1180cf5 100644
--- a/mods/tinker/tconstruct/client/TProxyClient.java
+++ b/mods/tinker/tconstruct/client/TProxyClient.java
@@ -249,6 +249,14 @@ public class TProxyClient extends TProxyCommon
TConstructClientRegistry.registerManualIcon("blankcast", new ItemStack(TContent.blankPattern, 1, 1));
TConstructClientRegistry.registerManualIcon("castingtable", new ItemStack(TContent.searedBlock));
TConstructClientRegistry.registerManualIcon("liquidiron", new ItemStack(TContent.liquidMetalStill));
+ TConstructClientRegistry.registerManualIcon("lavatank", new ItemStack(TContent.lavaTank));
+ TConstructClientRegistry.registerManualIcon("searedbrick", new ItemStack(TContent.smeltery, 1, 2));
+ TConstructClientRegistry.registerManualIcon("drain", new ItemStack(TContent.smeltery, 1, 1));
+ TConstructClientRegistry.registerManualIcon("faucet", new ItemStack(TContent.searedBlock, 1, 1));
+ TConstructClientRegistry.registerManualIcon("bronzeingot", new ItemStack(TContent.materials, 1, 13));
+ TConstructClientRegistry.registerManualIcon("alubrassingot", new ItemStack(TContent.materials, 1, 14));
+ TConstructClientRegistry.registerManualIcon("manyullyningot", new ItemStack(TContent.materials, 1, 5));
+ TConstructClientRegistry.registerManualIcon("alumiteingot", new ItemStack(TContent.materials, 1, 15));
}
public static Document getManualFromStack (ItemStack stack)
diff --git a/mods/tinker/tconstruct/client/gui/GuiManual.java b/mods/tinker/tconstruct/client/gui/GuiManual.java
index 4ed54ca..800db64 100644
--- a/mods/tinker/tconstruct/client/gui/GuiManual.java
+++ b/mods/tinker/tconstruct/client/gui/GuiManual.java
@@ -42,16 +42,12 @@ public class GuiManual extends GuiScreen
ItemStack[] iconsRight;
String[] multiTextRight;
- //CustomFont font;
- //int guiscale;
-
public GuiManual(ItemStack stack, Document doc)
{
this.mc = Minecraft.getMinecraft();
this.itemstackBook = stack;
currentPage = 0; //Stack page
manual = doc;
- //font = new CustomFont(mc, "Times New Roman", 16);
}
@Override
@@ -64,16 +60,6 @@ public class GuiManual extends GuiScreen
this.height = h;
this.buttonList.clear();
this.initGui();
-
- /*int scale = 0;
-
- while (width / (scale + 1) >= 160)
- {
- scale++;
- }
-
- guiscale = scale;*/
- //font.scale = scale;
}
public void initGui ()
@@ -100,7 +86,7 @@ public class GuiManual extends GuiScreen
void updateText ()
{
- if (currentPage >= maxPages - 1)
+ if (currentPage >= maxPages)
currentPage = maxPages - 2;
if (currentPage % 2 == 1)
currentPage--;
@@ -114,26 +100,58 @@ public class GuiManual extends GuiScreen
{
Element element = (Element) node;
pageLeftType = element.getAttribute("type");
-
+
if (pageLeftType.equals("text") || pageLeftType.equals("intro"))
{
NodeList nodes = element.getElementsByTagName("text");
if (nodes != null)
textLeft = nodes.item(0).getTextContent();
}
-
+
else if (pageLeftType.equals("contents"))
{
- NodeList nodes = element.getElementsByTagName("link");
+ NodeList nodes = element.getElementsByTagName("text");
+ if (nodes != null)
+ textLeft = nodes.item(0).getTextContent();
+
+ nodes = element.getElementsByTagName("link");
multiTextLeft = new String[nodes.getLength()];
iconsLeft = new ItemStack[nodes.getLength()];
for (int i = 0; i < nodes.getLength(); i++)
{
NodeList children = nodes.item(i).getChildNodes();
- multiTextLeft[i] = children.item(0).getTextContent();
- iconsLeft[i] = TConstructClientRegistry.getManualIcon(children.item(1).getTextContent());
+ multiTextLeft[i] = children.item(1).getTextContent();
+ iconsLeft[i] = TConstructClientRegistry.getManualIcon(children.item(3).getTextContent());
}
}
+
+ else if (pageLeftType.equals("sidebar"))
+ {
+ NodeList nodes = element.getElementsByTagName("text");
+ if (nodes != null)
+ textLeft = nodes.item(0).getTextContent();
+
+ nodes = element.getElementsByTagName("item");
+ multiTextLeft = new String[nodes.getLength()];
+ iconsLeft = new ItemStack[nodes.getLength()];
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ NodeList children = nodes.item(i).getChildNodes();
+ multiTextLeft[i] = children.item(1).getTextContent();
+ iconsLeft[i] = TConstructClientRegistry.getManualIcon(children.item(3).getTextContent());
+ }
+ }
+
+ else if (pageLeftType.equals("picture"))
+ {
+ NodeList nodes = element.getElementsByTagName("text");
+ if (nodes != null)
+ textLeft = nodes.item(0).getTextContent();
+
+ nodes = element.getElementsByTagName("picture");
+ if (nodes != null)
+ multiTextLeft[0] = nodes.item(0).getTextContent();
+ }
}
node = nList.item(currentPage + 1);
@@ -141,18 +159,21 @@ public class GuiManual extends GuiScreen
{
Element element = (Element) node;
pageRightType = element.getAttribute("type");
-
+
if (pageRightType.equals("text") || pageRightType.equals("intro"))
{
NodeList nodes = element.getElementsByTagName("text");
if (nodes != null)
textRight = nodes.item(0).getTextContent();
}
-
+
else if (pageRightType.equals("contents"))
{
- //Minecraft.getMinecraft().getLogAgent().logInfo("Contents!");
- NodeList nodes = element.getElementsByTagName("link");
+ NodeList nodes = element.getElementsByTagName("text");
+ if (nodes != null)
+ textRight = nodes.item(0).getTextContent();
+
+ nodes = element.getElementsByTagName("link");
multiTextRight = new String[nodes.getLength()];
iconsRight = new ItemStack[nodes.getLength()];
for (int i = 0; i < nodes.getLength(); i++)
@@ -162,6 +183,34 @@ public class GuiManual extends GuiScreen
iconsRight[i] = TConstructClientRegistry.getManualIcon(children.item(3).getTextContent());
}
}
+
+ else if (pageRightType.equals("sidebar"))
+ {
+ NodeList nodes = element.getElementsByTagName("text");
+ if (nodes != null)
+ textRight = nodes.item(0).getTextContent();
+
+ nodes = element.getElementsByTagName("item");
+ multiTextRight = new String[nodes.getLength()];
+ iconsRight = new ItemStack[nodes.getLength()];
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ NodeList children = nodes.item(i).getChildNodes();
+ multiTextRight[i] = children.item(1).getTextContent();
+ iconsRight[i] = TConstructClientRegistry.getManualIcon(children.item(3).getTextContent());
+ }
+ }
+
+ else if (pageRightType.equals("picture"))
+ {
+ NodeList nodes = element.getElementsByTagName("text");
+ if (nodes != null)
+ textRight = nodes.item(0).getTextContent();
+
+ nodes = element.getElementsByTagName("picture");
+ if (nodes != null)
+ multiTextRight[0] = nodes.item(0).getTextContent();
+ }
}
else
{
@@ -172,55 +221,77 @@ public class GuiManual extends GuiScreen
public void drawScreen (int par1, int par2, float par3)
{
-
- //int texID = this.mc.renderEngine.getTexture();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture("/mods/tinker/textures/gui/bookright.png");
int localWidth = (this.width) / 2;
byte localHeight = 8;
this.drawTexturedModalRect(localWidth, localHeight, 0, 0, this.bookImageWidth, this.bookImageHeight);
- //texID = this.mc.renderEngine.getTexture("/mods/tinker/textures/gui/bookleft.png");
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- //this.mc.renderEngine.bindTexture(texID);
this.mc.renderEngine.bindTexture("/mods/tinker/textures/gui/bookleft.png");
localWidth = localWidth - this.bookImageWidth;
this.drawTexturedModalRect(localWidth, localHeight, 256 - this.bookImageWidth, 0, this.bookImageWidth, this.bookImageHeight);
super.drawScreen(par1, par2, par3);
+
+ //Workaround
+ if (pageLeftType.equals("picture"))
+ {
+ drawPicture(multiTextLeft[0], localWidth + 16, localHeight + 12);
+ }
+ if (pageRightType.equals("picture"))
+ {
+ drawPicture(multiTextRight[0], localWidth + 220, localHeight + 12);
+ }
- //if (textLeft != null)
- //{
- if (pageLeftType.equals("text"))
- {
- if (textLeft != null)
- drawTextPage(textLeft, localWidth + 16, localHeight + 12);
- }
- else if (pageLeftType.equals("intro"))
- {
- if (textLeft != null)
- drawTitlePage(textLeft, localWidth + 16, localHeight + 12);
- }
- else if (pageLeftType.equals("contents"))
- drawContentTablePage(iconsLeft, localWidth + 16, localHeight + 12);
- //}
- //if (textRight != null)
- //{
- if (pageRightType.equals("text"))
- {
- if (textRight != null)
- drawTextPage(textRight, localWidth + 220, localHeight + 12);
- }
- else if (pageRightType.equals("intro"))
- {
- if (textRight != null)
- drawTitlePage(textRight, localWidth + 220, localHeight + 12);
- }
- else if (pageRightType.equals("contents"))
- drawContentTablePage(iconsRight, localWidth + 220, localHeight + 12);
- //}
+ if (pageLeftType.equals("text"))
+ {
+ if (textLeft != null)
+ drawTextPage(textLeft, localWidth + 16, localHeight + 12);
+ }
+ else if (pageLeftType.equals("intro"))
+ {
+ if (textLeft != null)
+ drawTitlePage(textLeft, localWidth + 16, localHeight + 12);
+ }
+ else if (pageLeftType.equals("contents"))
+ {
+ drawContentTablePage(textLeft, iconsLeft, multiTextLeft, localWidth + 16, localHeight + 12);
+ }
+ else if (pageLeftType.equals("sidebar"))
+ {
+ drawSidebarPage(textLeft, iconsLeft, multiTextLeft, localWidth + 16, localHeight + 12);
+ }
+ else if (pageLeftType.equals("picture"))
+ {
+ drawPicturePage(textLeft, localWidth + 16, localHeight + 12);
+ }
+
+ if (pageRightType.equals("text"))
+ {
+ if (textRight != null)
+ drawTextPage(textRight, localWidth + 220, localHeight + 12);
+ }
+ else if (pageRightType.equals("intro"))
+ {
+ if (textRight != null)
+ drawTitlePage(textRight, localWidth + 220, localHeight + 12);
+ }
+ else if (pageRightType.equals("contents"))
+ {
+ drawContentTablePage(textRight, iconsRight, multiTextRight, localWidth + 220, localHeight + 12);
+ }
+ else if (pageRightType.equals("sidebar"))
+ {
+ drawSidebarPage(textRight, iconsRight, multiTextRight, localWidth + 220, localHeight + 12);
+ }
+ else if (pageRightType.equals("picture"))
+ {
+ drawPicturePage(textRight, localWidth + 220, localHeight + 12);
+ }
}
+ /* Page types */
public void drawTextPage (String text, int localWidth, int localHeight)
{
this.fontRenderer.drawSplitString(text, localWidth, localHeight, 178, 0);
@@ -231,13 +302,41 @@ public class GuiManual extends GuiScreen
this.fontRenderer.drawSplitString(text, localWidth, localHeight, 178, 0);
}
- public void drawContentTablePage (ItemStack[] icons, int localWidth, int localHeight)
+ public void drawContentTablePage (String info, ItemStack[] icons, String[] multiText, int localWidth, int localHeight)
{
- this.fontRenderer.drawString("\u00a7nTable of Contents", localWidth+50, localHeight+4, 0);
+ if (info != null)
+ this.fontRenderer.drawString("\u00a7n"+info, localWidth + 50, localHeight + 4, 0);
for (int i = 0; i < icons.length; i++)
{
- renderitem.renderItemIntoGUI(fontRenderer, mc.renderEngine, icons[i], localWidth+16, localHeight + 18*i + 18);
- this.fontRenderer.drawString(multiTextRight[i], localWidth+38, localHeight + 18*i + 18, 0);
+ renderitem.renderItemIntoGUI(fontRenderer, mc.renderEngine, icons[i], localWidth + 16, localHeight + 18 * i + 18);
+ int yOffset = 18;
+ if (multiText[i].length() > 40)
+ yOffset = 13;
+ this.fontRenderer.drawString(multiText[i], localWidth + 38, localHeight + 18 * i + yOffset, 0);
}
}
+
+ public void drawSidebarPage (String info, ItemStack[] icons, String[] multiText, int localWidth, int localHeight)
+ {
+ this.fontRenderer.drawSplitString(info, localWidth, localHeight, 178, 0);
+ for (int i = 0; i < icons.length; i++)
+ {
+ renderitem.renderItemIntoGUI(fontRenderer, mc.renderEngine, icons[i], localWidth + 8, localHeight + 18 * i + 36);
+ int yOffset = 39;
+ if (multiText[i].length() > 40)
+ yOffset = 34;
+ this.fontRenderer.drawSplitString(multiText[i], localWidth + 30, localHeight + 18 * i + yOffset, 140, 0);
+ }
+ }
+
+ public void drawPicture(String picture, int localWidth, int localHeight)
+ {
+ this.mc.renderEngine.bindTexture(picture);
+ this.drawTexturedModalRect(localWidth, localHeight+12, 0, 0, 170, 144);
+ }
+
+ public void drawPicturePage(String info, int localWidth, int localHeight)
+ {
+ this.fontRenderer.drawSplitString(info, localWidth+8, localHeight, 178, 0);
+ }
}
diff --git a/mods/tinker/tconstruct/logic/SmelteryLogic.java b/mods/tinker/tconstruct/logic/SmelteryLogic.java
index f934400..ec8c64a 100644
--- a/mods/tinker/tconstruct/logic/SmelteryLogic.java
+++ b/mods/tinker/tconstruct/logic/SmelteryLogic.java
@@ -42,6 +42,7 @@ public class SmelteryLogic extends InventoryLogic
int maxTemp;
public int useTime;
public int fuelGague;
+ boolean inUse;
ArrayList lavaTanks;
CoordTuple activeLavaTank;
@@ -208,12 +209,16 @@ public class SmelteryLogic extends InventoryLogic
{
if (useTime > 0)
{
+ inUse = false;
for (int i = 0; i < 9 * layers; i++)
{
if (meltingTemps[i] > 20 && this.isStackInSlot(i))
{
if (activeTemps[i] < internalTemp && activeTemps[i] < meltingTemps[i])
+ {
activeTemps[i] += 1;
+ inUse = true;
+ }
else if (meltingTemps[i] >= activeTemps[i])
{
if (!worldObj.isRemote)
@@ -293,7 +298,7 @@ public class SmelteryLogic extends InventoryLogic
{
fuelGague = 0;
}
- if (tankContainer instanceof ITankContainer)
+ if (tankContainer instanceof ITankContainer && inUse)
{
LiquidStack liquid = ((ITankContainer) tankContainer).drain(ForgeDirection.DOWN, 50, false);
if (liquid != null && liquid.itemID == Block.lavaStill.blockID)
diff --git a/mods/tinker/tconstruct/player/TPlayerHandler.java b/mods/tinker/tconstruct/player/TPlayerHandler.java
index 1d03036..6434856 100644
--- a/mods/tinker/tconstruct/player/TPlayerHandler.java
+++ b/mods/tinker/tconstruct/player/TPlayerHandler.java
@@ -1,18 +1,25 @@
package mods.tinker.tconstruct.player;
+import java.lang.ref.WeakReference;
import java.util.HashMap;
+import java.util.Random;
import mods.tinker.tconstruct.AbilityHelper;
import mods.tinker.tconstruct.PHConstruct;
import mods.tinker.tconstruct.TContent;
import mods.tinker.tconstruct.client.TProxyClient;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EnumEntitySize;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.projectile.EntityArrow;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingFallEvent;
+import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.PlayerDropsEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IPlayerTracker;
@@ -34,11 +41,13 @@ public class TPlayerHandler implements IPlayerTracker
tags.setCompoundTag("TConstruct", new NBTTagCompound());
}
TPlayerStats stats = new TPlayerStats();
- stats.player = entityplayer;
+ stats.player = new WeakReference(entityplayer);
stats.level = entityplayer.experienceLevel;
stats.health = 20; //More hp in the future
stats.hunger = entityplayer.getFoodStats().getFoodLevel();
stats.diary = tags.getCompoundTag("TConstruct").getBoolean("diary");
+ stats.stationManual = tags.getCompoundTag("TConstruct").getBoolean("stationManual");
+ stats.smelteryManual = tags.getCompoundTag("TConstruct").getBoolean("smelteryManual");
if (!stats.diary)
{
tags.getCompoundTag("TConstruct").setBoolean("diary", true);
@@ -70,21 +79,26 @@ public class TPlayerHandler implements IPlayerTracker
{
//Boom!
TPlayerStats stats = getPlayerStats(entityplayer.username);
- stats.player = entityplayer;
+ stats.player = new WeakReference(entityplayer);
+
if (PHConstruct.keepLevels)
entityplayer.experienceLevel = stats.level;
if (PHConstruct.keepHunger)
entityplayer.getFoodStats().setFoodLevel(stats.hunger);
- NBTTagCompound tags = entityplayer.getEntityData().getCompoundTag("TConstruct");
- tags.setBoolean("diary", stats.diary);
-
+ NBTTagCompound tags = entityplayer.getEntityData();
+ NBTTagCompound tTag = new NBTTagCompound();
+ tTag.setBoolean("diary", stats.diary);
+ tTag.setBoolean("stationManual", stats.stationManual);
+ tTag.setBoolean("smelteryManual", stats.smelteryManual);
+ tags.setCompoundTag("TConstruct", tTag);
+
Side side = FMLCommonHandler.instance().getEffectiveSide();
if (side == Side.CLIENT)
{
TProxyClient.controlInstance.resetControls();
}
}
-
+
@ForgeSubscribe
public void livingFall (LivingFallEvent evt) //Only for negating fall damage
{
@@ -98,7 +112,7 @@ public class TPlayerHandler implements IPlayerTracker
//System.out.println("Client side: "+evt.entityLiving.motionY);
}
//else
- //System.out.println("Server side");
+ //System.out.println("Server side");
evt.distance -= 1;
//evt.distance = 0;
@@ -107,7 +121,7 @@ public class TPlayerHandler implements IPlayerTracker
//evt.entityLiving.motionY = 10.2;
}
}
-
+
/*@ForgeSubscribe
public void livingUpdate (LivingUpdateEvent evt)
{
@@ -164,56 +178,124 @@ public class TPlayerHandler implements IPlayerTracker
}
else
{
- return stats.player;
+ return stats.player.get();
}
}
-
+
/* Modify Player */
- public void updateSize(String user, float offset)
+ public void updateSize (String user, float offset)
{
/*EntityPlayer player = getEntityPlayer(user);
setEntitySize(0.6F, offset, player);
player.yOffset = offset - 0.18f;*/
}
-
- public static void setEntitySize(float width, float height, Entity entity)
- {
- System.out.println("Size: "+height);
- if (width != entity.width || height != entity.height)
- {
- entity.width = width;
- entity.height = height;
- entity.boundingBox.maxX = entity.boundingBox.minX + (double)entity.width;
- entity.boundingBox.maxZ = entity.boundingBox.minZ + (double)entity.width;
- entity.boundingBox.maxY = entity.boundingBox.minY + (double)entity.height;
- }
- float que = width % 2.0F;
+ public static void setEntitySize (float width, float height, Entity entity)
+ {
+ System.out.println("Size: " + height);
+ if (width != entity.width || height != entity.height)
+ {
+ entity.width = width;
+ entity.height = height;
+ entity.boundingBox.maxX = entity.boundingBox.minX + (double) entity.width;
+ entity.boundingBox.maxZ = entity.boundingBox.minZ + (double) entity.width;
+ entity.boundingBox.maxY = entity.boundingBox.minY + (double) entity.height;
+ }
- if ((double)que < 0.375D)
- {
- entity.myEntitySize = EnumEntitySize.SIZE_1;
- }
- else if ((double)que < 0.75D)
- {
- entity.myEntitySize = EnumEntitySize.SIZE_2;
- }
- else if ((double)que < 1.0D)
- {
- entity.myEntitySize = EnumEntitySize.SIZE_3;
- }
- else if ((double)que < 1.375D)
- {
- entity.myEntitySize = EnumEntitySize.SIZE_4;
- }
- else if ((double)que < 1.75D)
- {
- entity.myEntitySize = EnumEntitySize.SIZE_5;
- }
- else
- {
- entity.myEntitySize = EnumEntitySize.SIZE_6;
- }
- //entity.yOffset = height;
- }
+ float que = width % 2.0F;
+
+ if ((double) que < 0.375D)
+ {
+ entity.myEntitySize = EnumEntitySize.SIZE_1;
+ }
+ else if ((double) que < 0.75D)
+ {
+ entity.myEntitySize = EnumEntitySize.SIZE_2;
+ }
+ else if ((double) que < 1.0D)
+ {
+ entity.myEntitySize = EnumEntitySize.SIZE_3;
+ }
+ else if ((double) que < 1.375D)
+ {
+ entity.myEntitySize = EnumEntitySize.SIZE_4;
+ }
+ else if ((double) que < 1.75D)
+ {
+ entity.myEntitySize = EnumEntitySize.SIZE_5;
+ }
+ else
+ {
+ entity.myEntitySize = EnumEntitySize.SIZE_6;
+ }
+ //entity.yOffset = height;
+ }
+
+ Random rand = new Random();
+
+ /* Bows */
+ @ForgeSubscribe
+ public void arrowShoot (ArrowLooseEvent event)
+ {
+ event.setCanceled(true);
+ int j = event.charge;
+
+ boolean flag = event.entityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, event.bow) > 0;
+
+ if (flag || event.entityPlayer.inventory.hasItem(Item.arrow.itemID))
+ {
+ float f = (float) j / 20.0F;
+ f = (f * f + f * 2.0F) / 3.0F;
+
+ if ((double) f < 0.1D)
+ {
+ return;
+ }
+
+ if (f > 1.0F)
+ {
+ f = 1.0F;
+ }
+
+ EntityArrow entityarrow = new EntityArrow(event.entityPlayer.worldObj, event.entityPlayer, f * 2.0F);
+
+ if (f == 1.0F)
+ {
+ entityarrow.setIsCritical(true);
+ }
+
+ int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, event.bow);
+
+ entityarrow.setDamage(1.5D + k * 0.45D);
+
+ int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, event.bow);
+
+ if (l > 0)
+ {
+ entityarrow.setKnockbackStrength(l);
+ }
+
+ if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, event.bow) > 0)
+ {
+ entityarrow.setFire(100);
+ }
+
+ event.bow.damageItem(1, event.entityPlayer);
+ event.entityPlayer.worldObj.playSoundAtEntity(event.entityPlayer, "random.bow", 1.0F, 1.0F / (rand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
+
+ if (flag)
+ {
+ entityarrow.canBePickedUp = 2;
+ }
+ else
+ {
+ event.entityPlayer.inventory.consumeInventoryItem(Item.arrow.itemID);
+ }
+
+ if (!event.entityPlayer.worldObj.isRemote)
+ {
+ event.entityPlayer.worldObj.spawnEntityInWorld(entityarrow);
+ }
+ }
+ }
}
diff --git a/mods/tinker/tconstruct/player/TPlayerStats.java b/mods/tinker/tconstruct/player/TPlayerStats.java
index 9a7bb25..6c377c8 100644
--- a/mods/tinker/tconstruct/player/TPlayerStats.java
+++ b/mods/tinker/tconstruct/player/TPlayerStats.java
@@ -1,14 +1,18 @@
package mods.tinker.tconstruct.player;
+import java.lang.ref.WeakReference;
+
import net.minecraft.entity.player.EntityPlayer;
public class TPlayerStats
{
- public EntityPlayer player;
+ public WeakReference player;
public int level;
public int health;
public int hunger;
public boolean diary;
+ public boolean stationManual;
+ public boolean smelteryManual;
//public boolean prevOnGround;
//public double prevMotionY;
diff --git a/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java b/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
index 0d3880f..87dba27 100644
--- a/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
+++ b/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
@@ -4,6 +4,7 @@ import java.util.Random;
import mods.tinker.tconstruct.PHConstruct;
import mods.tinker.tconstruct.TContent;
+import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
@@ -20,12 +21,12 @@ public class TBaseWorldGenerator
//cobalt = new ManhattanOreGenerator(TContent.oreSlag.blockID, 1, 2, 4, 100, true, false, Block.netherrack.blockID);
//ardite = new ManhattanOreGenerator(TContent.oreSlag.blockID, 2, 2, 4, 100, true, false, Block.netherrack.blockID);
- copper = new WorldGenMinable(TContent.oreSlag.blockID, 3, 9);
- tin = new WorldGenMinable(TContent.oreSlag.blockID, 4, 9);
- aluminum = new WorldGenMinable(TContent.oreSlag.blockID, 5, 16);
+ copper = new WorldGenMinable(TContent.oreSlag.blockID, 3, 9, Block.stone.blockID);
+ tin = new WorldGenMinable(TContent.oreSlag.blockID, 4, 9, Block.stone.blockID);
+ aluminum = new WorldGenMinable(TContent.oreSlag.blockID, 5, 16, Block.stone.blockID);
- cobalt = new NetherOreGenerator(TContent.oreSlag.blockID, 1, 3);
- ardite = new NetherOreGenerator(TContent.oreSlag.blockID, 2, 3);
+ cobalt = new WorldGenMinable(TContent.oreSlag.blockID, 1, 3, Block.netherrack.blockID);
+ ardite = new WorldGenMinable(TContent.oreSlag.blockID, 2, 3, Block.netherrack.blockID);
}
@Override
@@ -101,6 +102,6 @@ public class TBaseWorldGenerator
WorldGenMinable copper;
WorldGenMinable tin;
WorldGenMinable aluminum;
- NetherOreGenerator cobalt;
- NetherOreGenerator ardite;
+ WorldGenMinable cobalt;
+ WorldGenMinable ardite;
}
diff --git a/mods/tinker/textures/entity/wagon.png b/mods/tinker/textures/entity/wagon.png
new file mode 100644
index 0000000..e67e29e
Binary files /dev/null and b/mods/tinker/textures/entity/wagon.png differ
diff --git a/mods/tinker/textures/entity/wagontexture.png b/mods/tinker/textures/entity/wagontexture.png
new file mode 100644
index 0000000..817de29
Binary files /dev/null and b/mods/tinker/textures/entity/wagontexture.png differ
diff --git a/mods/tinker/textures/items/bone_chunk.png b/mods/tinker/textures/items/bone_chunk.png
new file mode 100644
index 0000000..8c67a7a
Binary files /dev/null and b/mods/tinker/textures/items/bone_chunk.png differ
diff --git a/mods/tinker/textures/items/materials.png b/mods/tinker/textures/items/materials.png
new file mode 100644
index 0000000..37386c5
Binary files /dev/null and b/mods/tinker/textures/items/materials.png differ
diff --git a/mods/tinker/textures/items/materials/bucket_angmallen.png b/mods/tinker/textures/items/materials/bucket_angmallen.png
new file mode 100644
index 0000000..a71eafd
Binary files /dev/null and b/mods/tinker/textures/items/materials/bucket_angmallen.png differ
diff --git a/mods/tinker/textures/items/materials/bucket_dsteel.png b/mods/tinker/textures/items/materials/bucket_dsteel.png
new file mode 100644
index 0000000..a71eafd
Binary files /dev/null and b/mods/tinker/textures/items/materials/bucket_dsteel.png differ
diff --git a/mods/tinker/textures/items/materials/bucket_heptazion.png b/mods/tinker/textures/items/materials/bucket_heptazion.png
new file mode 100644
index 0000000..a71eafd
Binary files /dev/null and b/mods/tinker/textures/items/materials/bucket_heptazion.png differ
diff --git a/mods/tinker/textures/items/materials/pattern_ingot.png b/mods/tinker/textures/items/materials/pattern_ingot.png
new file mode 100644
index 0000000..8c67a7a
Binary files /dev/null and b/mods/tinker/textures/items/materials/pattern_ingot.png differ
diff --git a/mods/tinker/textures/items/materials/tinkerbook_diary.png b/mods/tinker/textures/items/materials/tinkerbook_diary.png
new file mode 100644
index 0000000..ecfdbad
Binary files /dev/null and b/mods/tinker/textures/items/materials/tinkerbook_diary.png differ
diff --git a/mods/tinker/textures/items/paper_chunk.png b/mods/tinker/textures/items/paper_chunk.png
new file mode 100644
index 0000000..8c67a7a
Binary files /dev/null and b/mods/tinker/textures/items/paper_chunk.png differ
diff --git a/mods/tinker/textures/items/patterns.png b/mods/tinker/textures/items/patterns.png
new file mode 100644
index 0000000..c264315
Binary files /dev/null and b/mods/tinker/textures/items/patterns.png differ