Release!
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
BIN
resources/tinkertextures/armor/wood_1.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/tinkertextures/armor/wood_2.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 56 KiB |
@ -239,18 +239,21 @@ public class AbilityHelper
|
|||||||
int attack = (int) ((tags.getCompoundTag("InfiTool").getInteger("Attack") + damageModifier) * bonusDamage);
|
int attack = (int) ((tags.getCompoundTag("InfiTool").getInteger("Attack") + damageModifier) * bonusDamage);
|
||||||
|
|
||||||
if (player instanceof EntityPlayer)
|
if (player instanceof EntityPlayer)
|
||||||
mob.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) player), attack);
|
if (mob.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) player), attack))
|
||||||
|
{
|
||||||
|
damageTool(stack, 1, tags, player, false);
|
||||||
|
if (tags.getCompoundTag("InfiTool").getBoolean("Necrotic"))
|
||||||
|
player.heal(1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
mob.attackEntityFrom(DamageSource.causeMobDamage(player), attack);
|
mob.attackEntityFrom(DamageSource.causeMobDamage(player), attack);
|
||||||
}
|
|
||||||
//if (mob.hurtResistantTime <= 0)
|
|
||||||
damageTool(stack, 1, tags, player, false);
|
|
||||||
if (tags.getCompoundTag("InfiTool").hasKey("Fiery"))
|
|
||||||
{
|
|
||||||
System.out.println("Fiery: "+tags.getInteger("Fiery"));
|
|
||||||
mob.setFire(tags.getCompoundTag("InfiTool").getInteger("Fiery")/5+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (tags.getCompoundTag("InfiTool").hasKey("Fiery"))
|
||||||
|
{
|
||||||
|
System.out.println("Fiery: "+tags.getInteger("Fiery"));
|
||||||
|
mob.setFire(tags.getCompoundTag("InfiTool").getInteger("Fiery")/5+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DamageSource causePiercingDamage (EntityLiving mob)
|
public static DamageSource causePiercingDamage (EntityLiving mob)
|
||||||
|
@ -9,18 +9,20 @@ public enum EnumMaterial
|
|||||||
Iron (2, 250, 600, 2, 1.3F, 1, 0),
|
Iron (2, 250, 600, 2, 1.3F, 1, 0),
|
||||||
Flint (1, 171, 525, 2, 0.7F, 0, 1f),
|
Flint (1, 171, 525, 2, 0.7F, 0, 1f),
|
||||||
Cactus (1, 150, 500, 2, 1.0F, 0, -1f),
|
Cactus (1, 150, 500, 2, 1.0F, 0, -1f),
|
||||||
Obsidian (3, 89, 800, 2, 0.8F, 5, 0),
|
|
||||||
Bone (1, 200, 500, 2, 1.0F, 0, 0),
|
Bone (1, 200, 500, 2, 1.0F, 0, 0),
|
||||||
|
Obsidian (3, 89, 700, 2, 0.8F, 3, 0),
|
||||||
Netherrack (2, 131, 400, 1, 1.2F, 0, 1f),
|
Netherrack (2, 131, 400, 1, 1.2F, 0, 1f),
|
||||||
Slime (3, 1500, 150, 0, 5.0F, 0, 0),
|
Slime (3, 1500, 150, 0, 5.0F, 0, 0),
|
||||||
Paper (0, 131, 200, 0, 0.1F, 0, 0),
|
Paper (0, 131, 200, 0, 0.1F, 0, 0),
|
||||||
Cobalt (4, 800, 800, 3, 1.8F, 2, 0),
|
Cobalt (4, 800, 800, 3, 1.8F, 2, 0),
|
||||||
Ardite (4, 800, 800, 3, 1.8F, 0, 0),
|
Ardite (4, 800, 800, 3, 1.8F, 0, 0),
|
||||||
Manyullyn (5, 1200, 1000, 4, 2.5F, 0, 0),
|
Manyullyn (5, 1200, 1000, 4, 2.5F, 0, 0),
|
||||||
|
Copper (1, 180, 500, 2, 1.8F, 0, 0),
|
||||||
|
Bronze (2, 250, 600, 2, 2.5F, 1, 0),
|
||||||
Demonite (5, 1790, 900, 5, 1.66F, 0, 0),
|
Demonite (5, 1790, 900, 5, 1.66F, 0, 0),
|
||||||
Holyshell (5, 1000, 700, 1, 1.5F, 0, 0);
|
Holyshell (5, 1000, 700, 1, 1.5F, 0, 0);
|
||||||
|
|
||||||
//mining level, durability, mining speed, baseDamage, handle modifier, Durability level, shoddy/spiny level
|
//mining level, durability, mining speed, baseDamage, handle modifier, Reinforced level, shoddy/spiny level
|
||||||
|
|
||||||
private final int harvestLevel;
|
private final int harvestLevel;
|
||||||
private final int durability;
|
private final int durability;
|
||||||
@ -128,7 +130,7 @@ public enum EnumMaterial
|
|||||||
return getEnumByType(type).shoddy();
|
return getEnumByType(type).shoddy();
|
||||||
}
|
}
|
||||||
|
|
||||||
static EnumMaterial getEnumByType(int type)
|
public static EnumMaterial getEnumByType(int type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -137,16 +139,16 @@ public enum EnumMaterial
|
|||||||
case 2: return Iron;
|
case 2: return Iron;
|
||||||
case 3: return Flint;
|
case 3: return Flint;
|
||||||
case 4: return Cactus;
|
case 4: return Cactus;
|
||||||
case 5: return Obsidian;
|
case 5: return Bone;
|
||||||
case 6: return Bone;
|
case 6: return Obsidian;
|
||||||
case 7: return Netherrack;
|
case 7: return Netherrack;
|
||||||
case 8: return Slime;
|
case 8: return Slime;
|
||||||
case 9: return Paper;
|
case 9: return Paper;
|
||||||
case 10: return Cobalt;
|
case 10: return Cobalt;
|
||||||
case 11: return Ardite;
|
case 11: return Ardite;
|
||||||
case 12: return Manyullyn;
|
case 12: return Manyullyn;
|
||||||
case 13: return Demonite;
|
case 13: return Copper;
|
||||||
case 14: return Holyshell;
|
case 14: return Bronze;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import net.minecraftforge.common.MinecraftForge;
|
|||||||
import net.minecraftforge.event.ForgeSubscribe;
|
import net.minecraftforge.event.ForgeSubscribe;
|
||||||
import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
|
import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
|
||||||
import tinker.tconstruct.client.gui.ToolGuiElement;
|
import tinker.tconstruct.client.gui.ToolGuiElement;
|
||||||
|
import tinker.tconstruct.crafting.PatternBuilder;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.Mod.Init;
|
import cpw.mods.fml.common.Mod.Init;
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
import cpw.mods.fml.common.Mod.Instance;
|
||||||
@ -23,7 +24,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
|||||||
* @author: mDiyo
|
* @author: mDiyo
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "Beta 1")
|
@Mod(modid = "TConstruct", name = "TConstruct", version = "Beta 3")
|
||||||
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels={"TConstruct"}, packetHandler = tinker.tconstruct.TConstructPacketHandler.class)
|
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels={"TConstruct"}, packetHandler = tinker.tconstruct.TConstructPacketHandler.class)
|
||||||
public class TConstruct
|
public class TConstruct
|
||||||
{
|
{
|
||||||
@ -61,11 +62,18 @@ public class TConstruct
|
|||||||
@ForgeSubscribe
|
@ForgeSubscribe
|
||||||
public void registerOre(OreRegisterEvent evt)
|
public void registerOre(OreRegisterEvent evt)
|
||||||
{
|
{
|
||||||
|
System.out.println("Ore event: "+evt.Name);
|
||||||
if (evt.Name == "battery")
|
if (evt.Name == "battery")
|
||||||
content.modE.batteries.add(evt.Ore);
|
content.modE.batteries.add(evt.Ore);
|
||||||
|
|
||||||
if (evt.Name == "basicCircuit")
|
if (evt.Name == "basicCircuit")
|
||||||
content.modE.circuits.add(evt.Ore);
|
content.modE.circuits.add(evt.Ore);
|
||||||
|
|
||||||
|
if (evt.Name == "ingotCopper")
|
||||||
|
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "copper");
|
||||||
|
|
||||||
|
if (evt.Name == "ingotBronze")
|
||||||
|
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "bronze");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int[][] slotTypes = {
|
static int[][] slotTypes = {
|
||||||
@ -116,11 +124,11 @@ public class TConstruct
|
|||||||
static String[] toolDescriptions = {
|
static String[] toolDescriptions = {
|
||||||
"The main way to repair or change your tools. Place a tool and a material on the left to get started.",
|
"The main way to repair or change your tools. Place a tool and a material on the left to get started.",
|
||||||
"The Pickaxe is a basic mining tool. It is effective on stone and ores.\n\nRequired parts:\n- Pickaxe Head\n- Tool Binding\n- Handle",
|
"The Pickaxe is a basic mining tool. It is effective on stone and ores.\n\nRequired parts:\n- Pickaxe Head\n- Tool Binding\n- Handle",
|
||||||
"The Shovel is a basic digging tool. It is effective on dirt and sand.\n\nRequired parts:\n- Shovel Head\n- Handle",
|
"The Shovel is a basic digging tool. It is effective on dirt, sand, and snow.\n\nRequired parts:\n- Shovel Head\n- Handle",
|
||||||
"The Axe is a basic chopping tool. It is effective on wood and leaves.\n\nRequired parts:\n- Axe Head\n- Handle",
|
"The Axe is a basic chopping tool. It is effective on wood and leaves.\n\nRequired parts:\n- Axe Head\n- Handle",
|
||||||
//"The Lumber Axe is a broad chopping tool. It harvests wood in a wide range and can fell entire trees.\n\nRequired parts:\n- Broad Axe Head\n- Handle",
|
//"The Lumber Axe is a broad chopping tool. It harvests wood in a wide range and can fell entire trees.\n\nRequired parts:\n- Broad Axe Head\n- Handle",
|
||||||
//"The Ice Axe is a tool for harvesting ice, mining, and attacking foes.\n\nSpecial Ability:\n- Wall Climb\nNatural Ability:\n- Ice Harvest\nDamage: Moderate\n\nRequired parts:\n- Pickaxe Head\n- Spike\n- Handle",
|
//"The Ice Axe is a tool for harvesting ice, mining, and attacking foes.\n\nSpecial Ability:\n- Wall Climb\nNatural Ability:\n- Ice Harvest\nDamage: Moderate\n\nRequired parts:\n- Pickaxe Head\n- Spike\n- Handle",
|
||||||
"The Cutter Mattock is a multi-use tool. It is effective on wood, leaves, dirt, and sand.\n\nSpecial Ability: Hoe\n\nRequired parts:\n- Axe Head\n- Shovel Head\n- Handle",
|
"The Cutter Mattock is a versatile farming tool. It is effective on wood, dirt, and plants.\n\nSpecial Ability: Hoe\n\nRequired parts:\n- Axe Head\n- Shovel Head\n- Handle",
|
||||||
"The Broadsword is a defensive weapon. Blocking cuts damage in half.\n\nSpecial Ability: Block\nDamage: Moderate\nDurability: High\n\nRequired parts:\n- Sword Blade\n- Wide Guard\n- Handle",
|
"The Broadsword is a defensive weapon. Blocking cuts damage in half.\n\nSpecial Ability: Block\nDamage: Moderate\nDurability: High\n\nRequired parts:\n- Sword Blade\n- Wide Guard\n- Handle",
|
||||||
"The Longsword is a balanced weapon. It is useful for knocking enemies away or getting in and out of battle quickly.\n\nSpecial Ability: Lunge\nDamage: Moderate\nDurability: Moderate\n\nRequired parts:\n- Sword Blade\n- Hand Guard\n- Handle",
|
"The Longsword is a balanced weapon. It is useful for knocking enemies away or getting in and out of battle quickly.\n\nSpecial Ability: Lunge\nDamage: Moderate\nDurability: Moderate\n\nRequired parts:\n- Sword Blade\n- Hand Guard\n- Handle",
|
||||||
"The Rapier is an offensive weapon that relies on quick strikes to defeat foes.\n\nNatural Abilities:\n- Armor Pierce\n- Quick Strike\nDamage: High\nDurability: Low\n\nRequired parts:\n- Sword Blade\n- Crossbar\n- Handle",
|
"The Rapier is an offensive weapon that relies on quick strikes to defeat foes.\n\nNatural Abilities:\n- Armor Pierce\n- Quick Strike\nDamage: High\nDurability: Low\n\nRequired parts:\n- Sword Blade\n- Crossbar\n- Handle",
|
||||||
|
@ -8,14 +8,40 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import tinker.tconstruct.blocks.*;
|
import tinker.tconstruct.blocks.EquipBlock;
|
||||||
import tinker.tconstruct.crafting.*;
|
import tinker.tconstruct.blocks.TConstructBlock;
|
||||||
import tinker.tconstruct.items.*;
|
import tinker.tconstruct.blocks.ToolStationBlock;
|
||||||
import tinker.tconstruct.modifiers.*;
|
import tinker.tconstruct.crafting.PatternBuilder;
|
||||||
import tinker.tconstruct.tools.*;
|
import tinker.tconstruct.crafting.ToolBuilder;
|
||||||
|
import tinker.tconstruct.items.CraftingItem;
|
||||||
|
import tinker.tconstruct.items.Materials;
|
||||||
|
import tinker.tconstruct.items.Pattern;
|
||||||
|
import tinker.tconstruct.items.ToolPart;
|
||||||
|
import tinker.tconstruct.modifiers.ModBlaze;
|
||||||
|
import tinker.tconstruct.modifiers.ModBoolean;
|
||||||
|
import tinker.tconstruct.modifiers.ModDurability;
|
||||||
|
import tinker.tconstruct.modifiers.ModElectric;
|
||||||
|
import tinker.tconstruct.modifiers.ModInteger;
|
||||||
|
import tinker.tconstruct.modifiers.ModLapisBase;
|
||||||
|
import tinker.tconstruct.modifiers.ModLapisIncrease;
|
||||||
|
import tinker.tconstruct.modifiers.ModRedstone;
|
||||||
|
import tinker.tconstruct.modifiers.ModRepair;
|
||||||
|
import tinker.tconstruct.tools.Axe;
|
||||||
|
import tinker.tconstruct.tools.BattleSign;
|
||||||
|
import tinker.tconstruct.tools.Broadsword;
|
||||||
|
import tinker.tconstruct.tools.FryingPan;
|
||||||
|
import tinker.tconstruct.tools.Longsword;
|
||||||
|
import tinker.tconstruct.tools.LumberAxe;
|
||||||
|
import tinker.tconstruct.tools.Mattock;
|
||||||
|
import tinker.tconstruct.tools.Pickaxe;
|
||||||
|
import tinker.tconstruct.tools.Rapier;
|
||||||
|
import tinker.tconstruct.tools.Shovel;
|
||||||
|
import tinker.tconstruct.tools.ToolCore;
|
||||||
|
import cpw.mods.fml.common.IFuelHandler;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
public class TConstructContent
|
public class TConstructContent
|
||||||
|
implements IFuelHandler
|
||||||
{
|
{
|
||||||
//Patterns and other materials
|
//Patterns and other materials
|
||||||
public static Item blankPattern;
|
public static Item blankPattern;
|
||||||
@ -78,6 +104,7 @@ public class TConstructContent
|
|||||||
addToolRecipes();
|
addToolRecipes();
|
||||||
addCraftingRecipes();
|
addCraftingRecipes();
|
||||||
setupToolTabs();
|
setupToolTabs();
|
||||||
|
GameRegistry.registerFuelHandler(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void createItems ()
|
void createItems ()
|
||||||
@ -87,6 +114,7 @@ public class TConstructContent
|
|||||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.ToolStationLogic.class, "ToolStation");
|
GameRegistry.registerTileEntity(tinker.tconstruct.logic.ToolStationLogic.class, "ToolStation");
|
||||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PartCrafterLogic.class, "PartCrafter");
|
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PartCrafterLogic.class, "PartCrafter");
|
||||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternChestLogic.class, "PatternHolder");
|
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternChestLogic.class, "PatternHolder");
|
||||||
|
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternShaperLogic.class, "PatternShaper");
|
||||||
|
|
||||||
heldItemBlock = new EquipBlock(PHConstruct.heldItemBlock, Material.wood);
|
heldItemBlock = new EquipBlock(PHConstruct.heldItemBlock, Material.wood);
|
||||||
GameRegistry.registerBlock(heldItemBlock, "HeldItemBlock");
|
GameRegistry.registerBlock(heldItemBlock, "HeldItemBlock");
|
||||||
@ -158,11 +186,13 @@ public class TConstructContent
|
|||||||
pb.registerFullMaterial(Item.ingotIron, 2, "iron", 2);
|
pb.registerFullMaterial(Item.ingotIron, 2, "iron", 2);
|
||||||
pb.registerFullMaterial(Item.flint, 2, "flint", 3);
|
pb.registerFullMaterial(Item.flint, 2, "flint", 3);
|
||||||
pb.registerFullMaterial(Block.cactus, 2, "cactus", 4);
|
pb.registerFullMaterial(Block.cactus, 2, "cactus", 4);
|
||||||
pb.registerFullMaterial(Item.bone, 2, "bone", new ItemStack(toolShard, 1, 5), new ItemStack(Item.bone), 5);
|
pb.registerFullMaterial(Item.bone, 2, "bone", new ItemStack(Item.dyePowder, 1, 0), new ItemStack(Item.bone), 5);
|
||||||
pb.registerFullMaterial(Block.obsidian, 2, "obsidian", 6);
|
pb.registerFullMaterial(Block.obsidian, 2, "obsidian", 6);
|
||||||
pb.registerFullMaterial(Block.netherrack, 2, "netherrack", 7);
|
pb.registerFullMaterial(Block.netherrack, 2, "netherrack", 7);
|
||||||
pb.registerFullMaterial(new ItemStack(materials, 1, 1), 2, "slime", new ItemStack(toolShard, 1, 8), new ItemStack(toolRod, 1, 8), 8);
|
pb.registerFullMaterial(new ItemStack(materials, 1, 1), 2, "slime", new ItemStack(toolShard, 1, 8), new ItemStack(toolRod, 1, 8), 8);
|
||||||
pb.registerFullMaterial(new ItemStack(materials, 1, 0), 2, "paper", new ItemStack(Item.paper), new ItemStack(toolRod, 1, 9), 9);
|
pb.registerFullMaterial(new ItemStack(materials, 1, 0), 2, "paper", new ItemStack(Item.paper), new ItemStack(toolRod, 1, 9), 9);
|
||||||
|
pb.registerMaterialSet("copper", new ItemStack(toolShard, 1, 13), new ItemStack(toolRod, 1, 13), 13);
|
||||||
|
pb.registerMaterialSet("bronze", new ItemStack(toolShard, 1, 14), new ItemStack(toolRod, 1, 14), 14);
|
||||||
|
|
||||||
patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, axeHead, swordBlade, largeGuard, medGuard, crossbar, binding, frypanHead, signHead };
|
patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, axeHead, swordBlade, largeGuard, medGuard, crossbar, binding, frypanHead, signHead };
|
||||||
for (int iter = 0; iter < patternOutputs.length; iter++)
|
for (int iter = 0; iter < patternOutputs.length; iter++)
|
||||||
@ -209,10 +239,7 @@ public class TConstructContent
|
|||||||
|
|
||||||
ItemStack reBattery = ic2.api.Items.getItem("reBattery");
|
ItemStack reBattery = ic2.api.Items.getItem("reBattery");
|
||||||
if (reBattery != null)
|
if (reBattery != null)
|
||||||
modE.batteries.add(reBattery);
|
modE.batteries.add(new ItemStack(reBattery.getItem(), 1, -1));
|
||||||
ItemStack chargedReBattery = ic2.api.Items.getItem("chargedReBattery");
|
|
||||||
if (chargedReBattery != null)
|
|
||||||
modE.batteries.add(chargedReBattery);
|
|
||||||
ItemStack electronicCircuit = ic2.api.Items.getItem("electronicCircuit");
|
ItemStack electronicCircuit = ic2.api.Items.getItem("electronicCircuit");
|
||||||
if (electronicCircuit != null)
|
if (electronicCircuit != null)
|
||||||
modE.circuits.add(electronicCircuit);
|
modE.circuits.add(electronicCircuit);
|
||||||
@ -228,8 +255,12 @@ public class TConstructContent
|
|||||||
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 3), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 2));
|
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 3), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 2));
|
||||||
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 4), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 3));
|
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 4), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 3));
|
||||||
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 5), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', Block.chest);
|
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 5), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', Block.chest);
|
||||||
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 10), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', Block.planks);
|
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 10), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 0));
|
||||||
|
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 11), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 1));
|
||||||
|
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 12), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 2));
|
||||||
|
GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 13), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 3));
|
||||||
GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(woodCrafter, 1, 1), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', "logWood"));
|
GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(woodCrafter, 1, 1), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', "logWood"));
|
||||||
|
GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(woodCrafter, 1, 10), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', "plankWood"));
|
||||||
|
|
||||||
GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(blankPattern, 1, 0), "ps", "sp", 'p', "plankWood", 's', Item.stick));
|
GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(blankPattern, 1, 0), "ps", "sp", 'p', "plankWood", 's', Item.stick));
|
||||||
/*GameRegistry.addRecipe(new ItemStack(stonePattern, 1, 0), "ps", "sp", 'p', Block.cobblestone, 's', new ItemStack(toolRod, 1, 1));
|
/*GameRegistry.addRecipe(new ItemStack(stonePattern, 1, 0), "ps", "sp", 'p', Block.cobblestone, 's', new ItemStack(toolRod, 1, 1));
|
||||||
@ -238,7 +269,7 @@ public class TConstructContent
|
|||||||
|
|
||||||
GameRegistry.addRecipe(new ItemStack(materials, 1, 0), "pp", "pp", 'p', Item.paper); //Paper stack
|
GameRegistry.addRecipe(new ItemStack(materials, 1, 0), "pp", "pp", 'p', Item.paper); //Paper stack
|
||||||
GameRegistry.addRecipe(new ItemStack(materials, 1, 6), "ppp", "ppp", "ppp", 'p', Block.cobblestoneMossy); //Moss ball
|
GameRegistry.addRecipe(new ItemStack(materials, 1, 6), "ppp", "ppp", "ppp", 'p', Block.cobblestoneMossy); //Moss ball
|
||||||
GameRegistry.addRecipe(new ItemStack(materials, 1, 7), " c ", "cbc", " c ", 'b', Item.bucketLava, 'c', Item.coal); //Auto-smelt
|
GameRegistry.addRecipe(new ItemStack(materials, 1, 7), "xcx", "cbc", "xcx", 'b', Item.bucketLava, 'c', Item.coal, 'x', Block.netherrack); //Auto-smelt
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(materials, 1, 8), Item.bone, Item.rottenFlesh, Item.chickenRaw, Item.beefRaw, Item.porkRaw, Item.fishRaw); //Necrotic bone
|
GameRegistry.addShapelessRecipe(new ItemStack(materials, 1, 8), Item.bone, Item.rottenFlesh, Item.chickenRaw, Item.beefRaw, Item.porkRaw, Item.fishRaw); //Necrotic bone
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 0), Item.slimeBall, Item.slimeBall, Item.slimeBall, Item.slimeBall, Block.sand, Block.dirt); //Slimy sand
|
GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 0), Item.slimeBall, Item.slimeBall, Item.slimeBall, Item.slimeBall, Block.sand, Block.dirt); //Slimy sand
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 1), Item.clay, Block.sand, Block.gravel); //Grout, Add stone dust?
|
GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 1), Item.clay, Block.sand, Block.gravel); //Grout, Add stone dust?
|
||||||
@ -290,4 +321,12 @@ public class TConstructContent
|
|||||||
public static String bowTexture = "/tinkertextures/tools/bows.png";
|
public static String bowTexture = "/tinkertextures/tools/bows.png";
|
||||||
public static String mattockTexture = "/tinkertextures/tools/mattock.png";
|
public static String mattockTexture = "/tinkertextures/tools/mattock.png";
|
||||||
public static String lumberaxeTexture = "/tinkertextures/tools/lumberaxe.png";
|
public static String lumberaxeTexture = "/tinkertextures/tools/lumberaxe.png";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBurnTime (ItemStack fuel)
|
||||||
|
{
|
||||||
|
if (fuel.itemID == materials.itemID && fuel.getItemDamage() == 7)
|
||||||
|
return 26400;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
@ -115,6 +115,9 @@ public class ToolStationBlock extends InventoryBlock
|
|||||||
case 8: return new PatternChestLogic();
|
case 8: return new PatternChestLogic();
|
||||||
case 9: return new PatternChestLogic();
|
case 9: return new PatternChestLogic();
|
||||||
case 10: return new PatternShaperLogic();
|
case 10: return new PatternShaperLogic();
|
||||||
|
case 11: return new PatternShaperLogic();
|
||||||
|
case 12: return new PatternShaperLogic();
|
||||||
|
case 13: return new PatternShaperLogic();
|
||||||
default: return null;
|
default: return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,6 +151,11 @@ public class ToolStationBlock extends InventoryBlock
|
|||||||
{
|
{
|
||||||
list.add(new ItemStack(id, 1, iter));
|
list.add(new ItemStack(id, 1, iter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int iter = 10; iter < 14; iter++)
|
||||||
|
{
|
||||||
|
list.add(new ItemStack(id, 1, iter));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y, int z)
|
public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y, int z)
|
||||||
|
@ -7,7 +7,7 @@ public class ToolStationItemBlock extends ItemBlock
|
|||||||
{
|
{
|
||||||
public static final String blockType[] =
|
public static final String blockType[] =
|
||||||
{
|
{
|
||||||
"Crafter", "Parts", "Parts", "Parts", "Parts", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternShaper"
|
"Crafter", "Parts", "Parts", "Parts", "Parts", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternShaper", "PatternShaper", "PatternShaper", "PatternShaper"
|
||||||
};
|
};
|
||||||
|
|
||||||
public ToolStationItemBlock(int id)
|
public ToolStationItemBlock(int id)
|
||||||
|
@ -55,9 +55,9 @@ public class TProxyClient extends TProxyCommon
|
|||||||
LanguageRegistry.instance().addStringLocalization("crafters.Frypan", "Frying Pan");
|
LanguageRegistry.instance().addStringLocalization("crafters.Frypan", "Frying Pan");
|
||||||
|
|
||||||
LanguageRegistry.instance().addStringLocalization("ToolStation.Crafter.name", "Tool Station");
|
LanguageRegistry.instance().addStringLocalization("ToolStation.Crafter.name", "Tool Station");
|
||||||
LanguageRegistry.instance().addStringLocalization("ToolStation.Parts.name", "Part Crafting");
|
LanguageRegistry.instance().addStringLocalization("ToolStation.Parts.name", "Part Builder");
|
||||||
LanguageRegistry.instance().addStringLocalization("ToolStation.PatternChest.name", "Pattern Chest");
|
LanguageRegistry.instance().addStringLocalization("ToolStation.PatternChest.name", "Pattern Chest");
|
||||||
LanguageRegistry.instance().addStringLocalization("ToolStation.PatternShaper.name", "Pattern Shaper");
|
LanguageRegistry.instance().addStringLocalization("ToolStation.PatternShaper.name", "Stencil Table");
|
||||||
|
|
||||||
LanguageRegistry.instance().addStringLocalization("CraftedSoil.Slime.name", "Slimy Mud");
|
LanguageRegistry.instance().addStringLocalization("CraftedSoil.Slime.name", "Slimy Mud");
|
||||||
LanguageRegistry.instance().addStringLocalization("CraftedSoil.Grout.name", "Grout");
|
LanguageRegistry.instance().addStringLocalization("CraftedSoil.Grout.name", "Grout");
|
||||||
@ -114,7 +114,7 @@ public class TProxyClient extends TProxyCommon
|
|||||||
"Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone" };
|
"Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone" };
|
||||||
|
|
||||||
public static final String[] toolMaterialNames = new String[] {
|
public static final String[] toolMaterialNames = new String[] {
|
||||||
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn" };
|
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
|
||||||
|
|
||||||
public static final String[] materialTypes = new String[] {
|
public static final String[] materialTypes = new String[] {
|
||||||
"ToolRod", "PickaxeHead", "ToolShard", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" };
|
"ToolRod", "PickaxeHead", "ToolShard", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" };
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
package tinker.tconstruct.client.gui;
|
package tinker.tconstruct.client.gui;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import tinker.tconstruct.EnumMaterial;
|
||||||
|
import tinker.tconstruct.crafting.PatternBuilder;
|
||||||
import tinker.tconstruct.logic.PartCrafterLogic;
|
import tinker.tconstruct.logic.PartCrafterLogic;
|
||||||
|
|
||||||
public class PartCrafterGui extends GuiContainer
|
public class PartCrafterGui extends GuiContainer
|
||||||
{
|
{
|
||||||
PartCrafterLogic logic;
|
PartCrafterLogic logic;
|
||||||
String title, body = "";
|
String title, otherTitle = "";
|
||||||
boolean drawChestPart;
|
boolean drawChestPart;
|
||||||
|
boolean hasTop, hasBottom;
|
||||||
|
ItemStack topMaterial, bottomMaterial;
|
||||||
|
EnumMaterial topEnum, bottomEnum;
|
||||||
|
|
||||||
public PartCrafterGui(InventoryPlayer inventoryplayer, PartCrafterLogic partlogic, World world, int x, int y, int z)
|
public PartCrafterGui(InventoryPlayer inventoryplayer, PartCrafterLogic partlogic, World world, int x, int y, int z)
|
||||||
{
|
{
|
||||||
@ -23,7 +28,6 @@ public class PartCrafterGui extends GuiContainer
|
|||||||
drawChestPart = ((PartCrafterContainer)inventorySlots).largeInventory;
|
drawChestPart = ((PartCrafterContainer)inventorySlots).largeInventory;
|
||||||
|
|
||||||
title = "\u00A7nTool Part Crafting";
|
title = "\u00A7nTool Part Crafting";
|
||||||
body = "Place a pattern and a material on the left to get started.\n\nDescriptions not done yet, stay tuned.";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||||
@ -33,13 +37,95 @@ public class PartCrafterGui extends GuiContainer
|
|||||||
if (drawChestPart)
|
if (drawChestPart)
|
||||||
this.fontRenderer.drawString(StatCollector.translateToLocal("inventory.PatternChest"), -108, this.ySize - 148, 4210752);
|
this.fontRenderer.drawString(StatCollector.translateToLocal("inventory.PatternChest"), -108, this.ySize - 148, 4210752);
|
||||||
|
|
||||||
drawToolInformation();
|
drawMaterialInformation();
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawToolInformation ()
|
void drawDefaultInformation()
|
||||||
{
|
{
|
||||||
|
title = "\u00A7nTool Part Building";
|
||||||
this.drawCenteredString(fontRenderer, title, xSize + 63, 8, 16777215);
|
this.drawCenteredString(fontRenderer, title, xSize + 63, 8, 16777215);
|
||||||
fontRenderer.drawSplitString(body, xSize + 8, 24, 115, 16777215);
|
fontRenderer.drawSplitString("Place a pattern and a material on the left to get started.", xSize + 8, 24, 115, 16777215);
|
||||||
|
}
|
||||||
|
|
||||||
|
void drawMaterialInformation ()
|
||||||
|
{
|
||||||
|
ItemStack top = logic.getStackInSlot(1);
|
||||||
|
ItemStack bottom = logic.getStackInSlot(3);
|
||||||
|
if (topMaterial != top)
|
||||||
|
{
|
||||||
|
topMaterial = top;
|
||||||
|
int topID = PatternBuilder.instance.getPartID(top);
|
||||||
|
|
||||||
|
if (topID != -1)
|
||||||
|
{
|
||||||
|
topEnum = EnumMaterial.getEnumByType(topID);
|
||||||
|
hasTop = true;
|
||||||
|
title = "\u00A7n"+topEnum.name();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
hasTop = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bottomMaterial != bottom)
|
||||||
|
{
|
||||||
|
bottomMaterial = bottom;
|
||||||
|
int bottomID = PatternBuilder.instance.getPartID(bottom);
|
||||||
|
|
||||||
|
if (bottomID != -1)
|
||||||
|
{
|
||||||
|
bottomEnum = EnumMaterial.getEnumByType(bottomID);
|
||||||
|
hasBottom = true;
|
||||||
|
otherTitle = "\u00A7n"+bottomEnum.name();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
hasBottom = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int offset = 8;
|
||||||
|
if (hasTop)
|
||||||
|
{
|
||||||
|
this.drawCenteredString(fontRenderer, title, xSize + 63, offset, 16777215);
|
||||||
|
this.fontRenderer.drawString("Base Durability: "+topEnum.durability(), xSize + 8, offset+16, 16777215);
|
||||||
|
this.fontRenderer.drawString("Handle Modifier: "+topEnum.handleDurability()+"x", xSize + 8, offset+27, 16777215);
|
||||||
|
this.fontRenderer.drawString("Mining Speed: "+topEnum.toolSpeed()/100f, xSize + 8, offset+38, 16777215);
|
||||||
|
this.fontRenderer.drawString("Mining Level: "+getHarvestLevelName(topEnum.harvestLevel()), xSize + 8, offset+49, 16777215);
|
||||||
|
this.fontRenderer.drawString("Base Attack: "+topEnum.attack(), xSize + 8, offset+60, 16777215);
|
||||||
|
}
|
||||||
|
|
||||||
|
offset = 90;
|
||||||
|
if (hasBottom)
|
||||||
|
{
|
||||||
|
this.drawCenteredString(fontRenderer, otherTitle, xSize + 63, offset, 16777215);
|
||||||
|
this.fontRenderer.drawString("Base Durability: "+bottomEnum.durability(), xSize + 8, offset+16, 16777215);
|
||||||
|
this.fontRenderer.drawString("Handle Modifier: "+bottomEnum.handleDurability()+"x", xSize + 8, offset+27, 16777215);
|
||||||
|
this.fontRenderer.drawString("Mining Speed: "+bottomEnum.toolSpeed()/100f, xSize + 8, offset+38, 16777215);
|
||||||
|
this.fontRenderer.drawString("Mining Level: "+getHarvestLevelName(bottomEnum.harvestLevel()), xSize + 8, offset+49, 16777215);
|
||||||
|
this.fontRenderer.drawString("Base Attack: "+bottomEnum.attack(), xSize + 8, offset+60, 16777215);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasTop && !hasBottom)
|
||||||
|
drawDefaultInformation();
|
||||||
|
}
|
||||||
|
|
||||||
|
String getHarvestLevelName (int num)
|
||||||
|
{
|
||||||
|
switch (num)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
return "Stone";
|
||||||
|
case 1:
|
||||||
|
return "Iron";
|
||||||
|
case 2:
|
||||||
|
return "Redstone";
|
||||||
|
case 3:
|
||||||
|
return "Obsidian"; //Mithril
|
||||||
|
case 4:
|
||||||
|
return "Vulcanite";
|
||||||
|
case 5:
|
||||||
|
return "Adamantine";
|
||||||
|
default:
|
||||||
|
return String.valueOf(num);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
|
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
|
||||||
@ -86,6 +172,6 @@ public class PartCrafterGui extends GuiContainer
|
|||||||
this.mc.renderEngine.bindTexture(texID);
|
this.mc.renderEngine.bindTexture(texID);
|
||||||
cornerX = (this.width + this.xSize) / 2;
|
cornerX = (this.width + this.xSize) / 2;
|
||||||
cornerY = (this.height - this.ySize) / 2;
|
cornerY = (this.height - this.ySize) / 2;
|
||||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
this.drawTexturedModalRect(cornerX, cornerY, 126, 0, 126, this.ySize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,8 +171,7 @@ public class ToolStationGui extends GuiContainer
|
|||||||
|
|
||||||
fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 57, 0xffffff);
|
fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 57, 0xffffff);
|
||||||
if (tags.hasKey("Tooltip1"))
|
if (tags.hasKey("Tooltip1"))
|
||||||
;
|
fontRenderer.drawString("Modifiers:", xSize + 8, 68, 0xffffff);
|
||||||
fontRenderer.drawString("Modifiers:", xSize + 8, 68, 0xffffff);
|
|
||||||
|
|
||||||
boolean displayToolTips = true;
|
boolean displayToolTips = true;
|
||||||
int tipNum = 0;
|
int tipNum = 0;
|
||||||
@ -204,8 +203,7 @@ public class ToolStationGui extends GuiContainer
|
|||||||
|
|
||||||
fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 79, 0xffffff);
|
fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 79, 0xffffff);
|
||||||
if (tags.hasKey("Tooltip1"))
|
if (tags.hasKey("Tooltip1"))
|
||||||
;
|
fontRenderer.drawString("Modifiers:", xSize + 8, 90, 0xffffff);
|
||||||
fontRenderer.drawString("Modifiers:", xSize + 8, 90, 0xffffff);
|
|
||||||
|
|
||||||
boolean displayToolTips = true;
|
boolean displayToolTips = true;
|
||||||
int tipNum = 0;
|
int tipNum = 0;
|
||||||
@ -239,8 +237,7 @@ public class ToolStationGui extends GuiContainer
|
|||||||
|
|
||||||
fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 90, 0xffffff);
|
fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 90, 0xffffff);
|
||||||
if (tags.hasKey("Tooltip1"))
|
if (tags.hasKey("Tooltip1"))
|
||||||
;
|
fontRenderer.drawString("Modifiers:", xSize + 8, 101, 0xffffff);
|
||||||
fontRenderer.drawString("Modifiers:", xSize + 8, 101, 0xffffff);
|
|
||||||
|
|
||||||
boolean displayToolTips = true;
|
boolean displayToolTips = true;
|
||||||
int tipNum = 0;
|
int tipNum = 0;
|
||||||
@ -318,24 +315,27 @@ public class ToolStationGui extends GuiContainer
|
|||||||
this.mc.renderEngine.bindTexture(texID);
|
this.mc.renderEngine.bindTexture(texID);
|
||||||
cornerX = (this.width + this.xSize) / 2;
|
cornerX = (this.width + this.xSize) / 2;
|
||||||
cornerY = (this.height - this.ySize) / 2;
|
cornerY = (this.height - this.ySize) / 2;
|
||||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, 126, this.ySize);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void keyTyped (char par1, int keyCode)
|
protected void keyTyped (char par1, int keyCode)
|
||||||
{
|
{
|
||||||
text.textboxKeyTyped(par1, keyCode);
|
|
||||||
toolName = text.getText().trim();
|
|
||||||
logic.setToolname(toolName);
|
|
||||||
updateServer();
|
|
||||||
|
|
||||||
if (keyCode == 1)
|
if (keyCode == 1)
|
||||||
{
|
{
|
||||||
|
updateServer("");
|
||||||
Keyboard.enableRepeatEvents(false);
|
Keyboard.enableRepeatEvents(false);
|
||||||
this.mc.thePlayer.closeScreen();
|
this.mc.thePlayer.closeScreen();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text.textboxKeyTyped(par1, keyCode);
|
||||||
|
toolName = text.getText().trim();
|
||||||
|
logic.setToolname(toolName);
|
||||||
|
updateServer(toolName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateServer ()
|
void updateServer (String name)
|
||||||
{
|
{
|
||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
|
ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
|
||||||
DataOutputStream outputStream = new DataOutputStream(bos);
|
DataOutputStream outputStream = new DataOutputStream(bos);
|
||||||
@ -346,7 +346,7 @@ public class ToolStationGui extends GuiContainer
|
|||||||
outputStream.writeInt(logic.xCoord);
|
outputStream.writeInt(logic.xCoord);
|
||||||
outputStream.writeInt(logic.yCoord);
|
outputStream.writeInt(logic.yCoord);
|
||||||
outputStream.writeInt(logic.zCoord);
|
outputStream.writeInt(logic.zCoord);
|
||||||
outputStream.writeUTF(toolName);
|
outputStream.writeUTF(name);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -60,6 +60,7 @@ public class ToolBuilder
|
|||||||
|
|
||||||
//System.out.println("Tool name: "+item.getToolName());
|
//System.out.println("Tool name: "+item.getToolName());
|
||||||
int head = headStack.getItemDamage();
|
int head = headStack.getItemDamage();
|
||||||
|
System.out.println("Head:"+head);
|
||||||
int handle = handleStack.getItemDamage();
|
int handle = handleStack.getItemDamage();
|
||||||
int accessory = -1;
|
int accessory = -1;
|
||||||
if (accessoryStack != null)
|
if (accessoryStack != null)
|
||||||
|
23
tinker/tconstruct/items/TArmor.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package tinker.tconstruct.items;
|
||||||
|
|
||||||
|
import net.minecraft.item.EnumArmorMaterial;
|
||||||
|
import net.minecraft.item.ItemArmor;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.common.IArmorTextureProvider;
|
||||||
|
|
||||||
|
public class TArmor extends ItemArmor
|
||||||
|
implements IArmorTextureProvider
|
||||||
|
{
|
||||||
|
|
||||||
|
public TArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4)
|
||||||
|
{
|
||||||
|
super(par1, par2EnumArmorMaterial, par3, par4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getArmorTextureFile (ItemStack itemstack)
|
||||||
|
{
|
||||||
|
return "/tinkertextures/armor/wood_1.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -23,16 +23,16 @@ public class ToolPart extends CraftingItem
|
|||||||
|
|
||||||
public String getItemNameIS(ItemStack stack)
|
public String getItemNameIS(ItemStack stack)
|
||||||
{
|
{
|
||||||
int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 12);
|
int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 15);
|
||||||
return getItemName() + "." +toolMaterialNames[arr];
|
return getItemName() + "." +toolMaterialNames[arr];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getSubItems(int id, CreativeTabs tab, List list)
|
public void getSubItems(int id, CreativeTabs tab, List list)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 13; i++)
|
for (int i = 0; i < 15; i++)
|
||||||
list.add(new ItemStack(id, 1, i));
|
list.add(new ItemStack(id, 1, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String[] toolMaterialNames = new String[] {
|
public static final String[] toolMaterialNames = new String[] {
|
||||||
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn" };
|
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ public class ModLapisBase extends ToolMod
|
|||||||
tags.setBoolean(key, true);
|
tags.setBoolean(key, true);
|
||||||
|
|
||||||
String modName = "\u00a79Lapis (0/100)";
|
String modName = "\u00a79Lapis (0/100)";
|
||||||
int tooltipIndex = addToolTip(tool, "\u00a79Fortune", modName);
|
int tooltipIndex = addToolTip(tool, "\u00a79Luck", modName);
|
||||||
int[] keyPair = new int[] { 0, tooltipIndex };
|
int[] keyPair = new int[] { 0, tooltipIndex };
|
||||||
tags.setIntArray(key, keyPair);
|
tags.setIntArray(key, keyPair);
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import net.minecraft.enchantment.EnchantmentHelper;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import tinker.tconstruct.tools.Weapon;
|
||||||
|
|
||||||
public class ModLapisIncrease extends ToolMod
|
public class ModLapisIncrease extends ToolMod
|
||||||
{
|
{
|
||||||
@ -26,7 +27,6 @@ public class ModLapisIncrease extends ToolMod
|
|||||||
if (!tags.hasKey(key))
|
if (!tags.hasKey(key))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
System.out.println("Checking modify");
|
|
||||||
int keyPair[] = tags.getIntArray(key);
|
int keyPair[] = tags.getIntArray(key);
|
||||||
|
|
||||||
if (keyPair[0] + increase <= 100)
|
if (keyPair[0] + increase <= 100)
|
||||||
@ -43,12 +43,24 @@ public class ModLapisIncrease extends ToolMod
|
|||||||
int keyPair[] = tags.getIntArray(key);
|
int keyPair[] = tags.getIntArray(key);
|
||||||
keyPair[0] += increase;
|
keyPair[0] += increase;
|
||||||
tags.setIntArray(key, keyPair);
|
tags.setIntArray(key, keyPair);
|
||||||
if (keyPair[0] >= 100)
|
if (tool.getItem() instanceof Weapon)
|
||||||
addEnchantment(tool, Enchantment.fortune, 3);
|
{
|
||||||
else if (keyPair[0] >= 40)
|
if (keyPair[0] >= 100)
|
||||||
addEnchantment(tool, Enchantment.fortune, 2);
|
addEnchantment(tool, Enchantment.looting, 3);
|
||||||
else if (keyPair[0] >= 10)
|
else if (keyPair[0] >= 40)
|
||||||
addEnchantment(tool, Enchantment.fortune, 1);
|
addEnchantment(tool, Enchantment.looting, 2);
|
||||||
|
else if (keyPair[0] >= 10)
|
||||||
|
addEnchantment(tool, Enchantment.looting, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (keyPair[0] >= 100)
|
||||||
|
addEnchantment(tool, Enchantment.fortune, 3);
|
||||||
|
else if (keyPair[0] >= 40)
|
||||||
|
addEnchantment(tool, Enchantment.fortune, 2);
|
||||||
|
else if (keyPair[0] >= 10)
|
||||||
|
addEnchantment(tool, Enchantment.fortune, 1);
|
||||||
|
}
|
||||||
|
|
||||||
updateModTag(tool, keyPair);
|
updateModTag(tool, keyPair);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class ModRepair extends ToolMod
|
|||||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||||
tags.setBoolean("Broken", false);
|
tags.setBoolean("Broken", false);
|
||||||
int damage = tags.getInteger("Damage");
|
int damage = tags.getInteger("Damage");
|
||||||
int dur = tags.getInteger("TotalDurability");
|
int dur = tags.getInteger("BaseDurability");
|
||||||
|
|
||||||
int materialValue = 0;
|
int materialValue = 0;
|
||||||
if (input [0] != null)
|
if (input [0] != null)
|
||||||
|
@ -45,7 +45,7 @@ public class Axe extends HarvestTool
|
|||||||
return AbilityHelper.onBlockChanged(itemstack, world, bID, x, y, z, player, random);
|
return AbilityHelper.onBlockChanged(itemstack, world, bID, x, y, z, player, random);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Material[] materials = { Material.wood, Material.circuits, Material.cactus, Material.pumpkin };
|
static Material[] materials = { Material.wood, Material.leaves, Material.circuits, Material.cactus, Material.pumpkin };
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Item getHeadItem ()
|
protected Item getHeadItem ()
|
||||||
|
@ -44,8 +44,8 @@ public class Mattock extends DualHarvestTool
|
|||||||
return "shovel";
|
return "shovel";
|
||||||
}
|
}
|
||||||
|
|
||||||
static Material[] axeMaterials = { Material.wood, Material.circuits, Material.cactus, Material.pumpkin, Material.leaves };
|
static Material[] axeMaterials = { Material.wood, Material.circuits, Material.cactus, Material.pumpkin, Material.plants };
|
||||||
static Material[] shovelMaterials = { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay };
|
static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay };
|
||||||
|
|
||||||
public float getDurabilityModifier ()
|
public float getDurabilityModifier ()
|
||||||
{
|
{
|
||||||
|