mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 05:02:39 +00:00
Tool API 0.1
This commit is contained in:
1 parent
e6deb3dc4a
commit
b89fbce46f
623 files changed
+1132
-657
No files matched your search
@@ -8,9 +8,11 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import tinker.common.IPattern;
|
||||
import tinker.tconstruct.blocks.EquipBlock;
|
||||
import tinker.tconstruct.blocks.TConstructBlock;
|
||||
import tinker.tconstruct.blocks.ToolStationBlock;
|
||||
import tinker.tconstruct.client.gui.ToolGuiElement;
|
||||
import tinker.tconstruct.crafting.PatternBuilder;
|
||||
import tinker.tconstruct.crafting.ToolBuilder;
|
||||
import tinker.tconstruct.items.CraftingItem;
|
||||
@@ -41,8 +43,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 TConstructContent implements IFuelHandler
|
||||
{
|
||||
//Patterns and other materials
|
||||
public static Item blankPattern;
|
||||
@@ -52,7 +53,7 @@ public class TConstructContent
|
||||
public static Item woodPattern;
|
||||
//public static Item stonePattern;
|
||||
//public static Item netherPattern;
|
||||
|
||||
|
||||
//Tools
|
||||
public static ToolCore pickaxe;
|
||||
public static ToolCore shovel;
|
||||
@@ -60,14 +61,14 @@ public class TConstructContent
|
||||
public static ToolCore broadsword;
|
||||
public static ToolCore longsword;
|
||||
public static ToolCore rapier;
|
||||
|
||||
|
||||
public static ToolCore frypan;
|
||||
public static ToolCore battlesign;
|
||||
//public static ToolCore longbow;
|
||||
|
||||
|
||||
public static ToolCore mattock;
|
||||
public static ToolCore lumberaxe;
|
||||
|
||||
|
||||
//Tool parts
|
||||
public static Item pickaxeHead;
|
||||
public static Item shovelHead;
|
||||
@@ -77,42 +78,44 @@ public class TConstructContent
|
||||
public static Item medGuard;
|
||||
public static Item crossbar;
|
||||
public static Item binding;
|
||||
|
||||
|
||||
public static Item frypanHead;
|
||||
public static Item signHead;
|
||||
|
||||
|
||||
public static Item lumberHead;
|
||||
|
||||
|
||||
//Crafting blocks
|
||||
public static Block woodCrafter;
|
||||
public static Block smeltery;
|
||||
|
||||
|
||||
public static Block heldItemBlock;
|
||||
public static Block ores;
|
||||
public static Block lavaTank;
|
||||
public static Block craftedSoil;
|
||||
public static Block searedBrick;
|
||||
//public static Block axle;
|
||||
|
||||
|
||||
//Tool modifiers
|
||||
public static ModElectric modE;
|
||||
|
||||
|
||||
public TConstructContent()
|
||||
{
|
||||
createEntities();
|
||||
createItems();
|
||||
addRenderMappings();
|
||||
registerMaterials();
|
||||
addToolRecipes();
|
||||
addCraftingRecipes();
|
||||
setupToolTabs();
|
||||
addToolButtons();
|
||||
GameRegistry.registerFuelHandler(this);
|
||||
}
|
||||
|
||||
void createEntities()
|
||||
|
||||
void createEntities ()
|
||||
{
|
||||
EntityRegistry.registerModEntity(tinker.tconstruct.entity.CartEntity.class, "Small Wagon", 0, TConstruct.instance, 32, 5, true);
|
||||
}
|
||||
|
||||
|
||||
void createItems ()
|
||||
{
|
||||
woodCrafter = new ToolStationBlock(PHConstruct.woodCrafter, Material.wood);
|
||||
@@ -121,26 +124,26 @@ public class TConstructContent
|
||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PartCrafterLogic.class, "PartCrafter");
|
||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternChestLogic.class, "PatternHolder");
|
||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternShaperLogic.class, "PatternShaper");
|
||||
|
||||
|
||||
heldItemBlock = new EquipBlock(PHConstruct.heldItemBlock, Material.wood);
|
||||
GameRegistry.registerBlock(heldItemBlock, "HeldItemBlock");
|
||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.FrypanLogic.class, "FrypanLogic");
|
||||
|
||||
|
||||
//ores = new TBaseOre(PHTools.ores, 48);
|
||||
//GameRegistry.registerBlock(ores, tinker.toolconstruct.blocks.TBaseOreItem.class, "TConstruct.ores");
|
||||
|
||||
|
||||
//lavaTank = new LavaTankBlock(PHConstruct.lavaTank);
|
||||
//GameRegistry.registerBlock(lavaTank, "LavaTank");
|
||||
//GameRegistry.registerTileEntity(tinker.tconstruct.logic.LavaTankLogic.class, "TConstruct.LavaTank");
|
||||
|
||||
|
||||
//smeltery = new SmelteryBlock(PHConstruct.smeltery);
|
||||
//GameRegistry.registerBlock(smeltery, "Smeltery");
|
||||
//GameRegistry.registerTileEntity(tinker.tconstruct.logic.SmelteryLogic.class, "TConstruct.Smeltery");
|
||||
|
||||
|
||||
craftedSoil = new TConstructBlock(PHConstruct.craftedSoil, 96, Material.sand, 3.0F, 2);
|
||||
craftedSoil.stepSound = Block.soundGravelFootstep;
|
||||
GameRegistry.registerBlock(craftedSoil, tinker.tconstruct.blocks.CraftedSoilItemBlock.class, "CraftedSoil");
|
||||
|
||||
|
||||
searedBrick = new TConstructBlock(PHConstruct.searedBrick, 80, Material.iron, 10.0F, 1);
|
||||
GameRegistry.registerBlock(searedBrick, tinker.tconstruct.blocks.SearedBrickItemBlock.class, "SearedBrick");
|
||||
MinecraftForge.setBlockHarvestLevel(searedBrick, 0, "pickaxe", 2);
|
||||
@@ -152,20 +155,20 @@ public class TConstructContent
|
||||
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");
|
||||
|
||||
|
||||
pickaxe = new Pickaxe(PHConstruct.pickaxe, pickaxeTexture);
|
||||
shovel = new Shovel(PHConstruct.shovel, shovelTexture);
|
||||
axe = new Axe(PHConstruct.axe, axeTexture);
|
||||
broadsword = new Broadsword(PHConstruct.broadsword, broadswordTexture);
|
||||
longsword = new Longsword(PHConstruct.longsword, longswordTexture);
|
||||
rapier = new Rapier(PHConstruct.rapier, rapierTexture);
|
||||
|
||||
|
||||
frypan = new FryingPan(PHConstruct.frypan, frypanTexture);
|
||||
battlesign = new BattleSign(PHConstruct.battlesign, signTexture);
|
||||
//longbow = new RangedWeapon(PHConstruct.longbow, bowTexture);
|
||||
mattock = new Mattock(PHConstruct.mattock, mattockTexture);
|
||||
lumberaxe = new LumberAxe(PHConstruct.lumberaxe, lumberaxeTexture);
|
||||
|
||||
|
||||
pickaxeHead = new ToolPart(PHConstruct.pickaxeHead, 0, baseHeads).setItemName("tconstruct.PickaxeHead");
|
||||
shovelHead = new ToolPart(PHConstruct.shovelHead, 64, baseHeads).setItemName("tconstruct.ShovelHead");
|
||||
axeHead = new ToolPart(PHConstruct.axeHead, 128, baseHeads).setItemName("tconstruct.AxeHead");
|
||||
@@ -174,43 +177,86 @@ public class TConstructContent
|
||||
medGuard = new ToolPart(PHConstruct.medGuard, 128, swordparts).setItemName("tconstruct.MediumGuard");
|
||||
crossbar = new ToolPart(PHConstruct.crossbar, 192, swordparts).setItemName("tconstruct.Crossbar");
|
||||
binding = new ToolPart(PHConstruct.binding, 0, baseAccessories).setItemName("tconstruct.Binding");
|
||||
|
||||
|
||||
frypanHead = new ToolPart(PHConstruct.frypanHead, 0, jokeparts).setItemName("tconstruct.FrypanHead");
|
||||
signHead = new ToolPart(PHConstruct.signHead, 64, jokeparts).setItemName("tconstruct.SignHead");
|
||||
|
||||
|
||||
//lumberHead = new ToolPart(PHConstruct.lumberHead, 0, broadheads).setItemName("tconstruct.LumberHead");
|
||||
}
|
||||
|
||||
public static Item[] patternOutputs;
|
||||
|
||||
void registerMaterials ()
|
||||
|
||||
void addRenderMappings ()
|
||||
{
|
||||
PatternBuilder pb = PatternBuilder.instance;
|
||||
pb.registerFullMaterial(Block.planks, 2, "wood", new ItemStack(Item.stick), new ItemStack(Item.stick), 0);
|
||||
pb.registerFullMaterial(Block.stone, 2, "stone", 1);
|
||||
pb.registerMaterial(Block.cobblestone, 2, "stone");
|
||||
pb.registerFullMaterial(Item.ingotIron, 2, "iron", 2);
|
||||
pb.registerFullMaterial(Item.flint, 2, "flint", 3);
|
||||
pb.registerFullMaterial(Block.cactus, 2, "cactus", 4);
|
||||
pb.registerFullMaterial(Item.bone, 2, "bone", new ItemStack(Item.dyePowder, 1, 15), new ItemStack(Item.bone), 5);
|
||||
pb.registerFullMaterial(Block.obsidian, 2, "obsidian", 6);
|
||||
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, 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 };
|
||||
for (int iter = 0; iter < patternOutputs.length; iter++)
|
||||
String[] partTypes = { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn", "copper", "bronze" };
|
||||
String[] effectTypes = { "diamond", "emerald", "redstone", "glowstone", "moss", "ice", "lava", "blaze", "necrotic", "electric", "lapis" };
|
||||
for (int partIter = 0; partIter < partTypes.length; partIter++)
|
||||
{
|
||||
pb.addToolPattern(new ItemStack(woodPattern, 1, iter+1), patternOutputs[iter]);
|
||||
//pb.addToolPattern(new ItemStack(stonePattern, 1, iter+1), items[iter]);
|
||||
//pb.addToolPattern(new ItemStack(netherPattern, 1, iter+1), items[iter]);
|
||||
materialRenderMap(partIter, partTypes[partIter]);
|
||||
}
|
||||
for (int effectIter = 0; effectIter < effectTypes.length; effectIter++)
|
||||
{
|
||||
effectRenderMap(effectIter, effectTypes[effectIter]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void materialRenderMap (int materialID, String partialLocation)
|
||||
{
|
||||
for (ToolCore tool : TConstructRegistry.getToolMapping())
|
||||
{
|
||||
tool.partTextures.put(materialID, tool.getTextureFile() + partialLocation);
|
||||
}
|
||||
}
|
||||
|
||||
void effectRenderMap (int materialID, String partialLocation)
|
||||
{
|
||||
for (ToolCore tool : TConstructRegistry.getToolMapping())
|
||||
{
|
||||
tool.effectTextures.put(materialID, tool.getTextureFile() + partialLocation);
|
||||
}
|
||||
}
|
||||
|
||||
void registerMaterials ()
|
||||
{
|
||||
TConstructRegistry.addToolMaterial(0, "Wood", 1, 0, 59, 200, 0, 1.0F, 0, 0f);
|
||||
TConstructRegistry.addToolMaterial(1, "Stone", 1, 1, 131, 400, 1, 0.5F, 0, 1f);
|
||||
TConstructRegistry.addToolMaterial(2, "Iron", 1, 2, 250, 600, 2, 1.3F, 1, 0f);
|
||||
TConstructRegistry.addToolMaterial(3, "Flint", 1, 1, 171, 525, 2, 0.7F, 0, 1f);
|
||||
TConstructRegistry.addToolMaterial(4, "Cactus", 1, 1, 150, 500, 2, 1.0F, 0, -1f);
|
||||
TConstructRegistry.addToolMaterial(5, "Bone", 1, 1, 200, 500, 2, 1.0F, 0, 0f);
|
||||
TConstructRegistry.addToolMaterial(6, "Obsidian", 1, 3, 89, 700, 2, 0.8F, 3, 0f);
|
||||
TConstructRegistry.addToolMaterial(7, "Netherrack", 1, 2, 131, 400, 1, 1.2F, 0, 1f);
|
||||
TConstructRegistry.addToolMaterial(8, "Slime", 1, 3, 1500, 150, 0, 5.0F, 0, 0f);
|
||||
TConstructRegistry.addToolMaterial(9, "Paper", 1, 0, 131, 200, 0, 0.1F, 0, 0f);
|
||||
TConstructRegistry.addToolMaterial(10, "Cobalt", 2, 4, 800, 800, 3, 1.8F, 2, 0f);
|
||||
TConstructRegistry.addToolMaterial(11, "Ardite", 2, 4, 800, 800, 3, 1.8F, 0, 0f);
|
||||
TConstructRegistry.addToolMaterial(12, "Manyullyn", 2, 5, 1200, 1000, 4, 2.5F, 0, 0f);
|
||||
TConstructRegistry.addToolMaterial(13, "Copper", 1, 1, 180, 500, 2, 1.15F, 0, 0f);
|
||||
TConstructRegistry.addToolMaterial(14, "Bronze", 1, 2, 250, 600, 2, 1.3F, 1, 0f);
|
||||
|
||||
PatternBuilder pb = PatternBuilder.instance;
|
||||
pb.registerFullMaterial(Block.planks, 2, "Wood", new ItemStack(Item.stick), new ItemStack(Item.stick), 0);
|
||||
pb.registerFullMaterial(Block.stone, 2, "Stone", 1);
|
||||
pb.registerMaterial(Block.cobblestone, 2, "Stone");
|
||||
pb.registerFullMaterial(Item.ingotIron, 2, "Iron", 2);
|
||||
pb.registerFullMaterial(Item.flint, 2, "Flint", 3);
|
||||
pb.registerFullMaterial(Block.cactus, 2, "Cactus", 4);
|
||||
pb.registerFullMaterial(Item.bone, 2, "Bone", new ItemStack(Item.dyePowder, 1, 15), new ItemStack(Item.bone), 5);
|
||||
pb.registerFullMaterial(Block.obsidian, 2, "Obsidian", 6);
|
||||
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, 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);
|
||||
|
||||
pb.addToolPattern((IPattern) woodPattern);
|
||||
}
|
||||
|
||||
public static Item[] patternOutputs;
|
||||
|
||||
void addToolRecipes ()
|
||||
{
|
||||
|
||||
patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, axeHead, swordBlade, largeGuard, medGuard, crossbar, binding, frypanHead, signHead };
|
||||
|
||||
ToolBuilder tb = ToolBuilder.instance;
|
||||
tb.addToolRecipe(pickaxe, pickaxeHead, binding);
|
||||
tb.addToolRecipe(broadsword, swordBlade, largeGuard);
|
||||
@@ -223,37 +269,27 @@ public class TConstructContent
|
||||
tb.addToolRecipe(mattock, axeHead, shovelHead);
|
||||
//tb.addToolRecipe(longbow, toolRod, toolRod);
|
||||
//tb.addToolRecipe(lumberaxe, lumberHead);
|
||||
|
||||
|
||||
tb.registerToolMod(new ModRepair());
|
||||
tb.registerToolMod(new ModDurability(new ItemStack[] {new ItemStack(Item.diamond)}, 0, 500, 0f, 3, "Diamond", "\u00a7bDurability +500", "\u00a7b"));
|
||||
tb.registerToolMod(new ModDurability(new ItemStack[] {new ItemStack(Item.emerald)}, 1, 0, 0.5f, 2, "Emerald", "\u00a72Durability +50%", "\u00a72"));
|
||||
tb.registerToolMod(new ModDurability(new ItemStack[] { new ItemStack(Item.diamond) }, 0, 500, 0f, 3, "Diamond", "\u00a7bDurability +500", "\u00a7b"));
|
||||
tb.registerToolMod(new ModDurability(new ItemStack[] { new ItemStack(Item.emerald) }, 1, 0, 0.5f, 2, "Emerald", "\u00a72Durability +50%", "\u00a72"));
|
||||
modE = new ModElectric();
|
||||
tb.registerToolMod(modE);
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] {new ItemStack(Item.redstone)}, 2, 1));
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] { new ItemStack(Item.redstone) }, 2, 1));
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] { new ItemStack(Item.redstone), new ItemStack(Item.redstone) }, 2, 2));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Item.dyePowder, 1, 4)}, 10, 1));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Item.dyePowder, 1, 4), new ItemStack(Item.dyePowder, 1, 4)}, 10, 2));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Block.blockLapis)}, 10, 9));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Item.dyePowder, 1, 4), new ItemStack(Block.blockLapis)}, 10, 10));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Block.blockLapis), new ItemStack(Block.blockLapis)}, 10, 18));
|
||||
tb.registerToolMod(new ModLapisBase(new ItemStack[] {new ItemStack(Block.blockLapis), new ItemStack(Block.blockLapis)}, 10));
|
||||
tb.registerToolMod(new ModInteger(new ItemStack[] {new ItemStack(materials, 1, 6)}, 4, "Moss", 3, "\u00a72", "Auto-Repair"));
|
||||
tb.registerToolMod(new ModBlaze(new ItemStack[] {new ItemStack(Item.blazePowder)}, 7, 1));
|
||||
tb.registerToolMod(new ModBlaze(new ItemStack[] {new ItemStack(Item.blazePowder), new ItemStack(Item.blazePowder)}, 7, 2));
|
||||
tb.registerToolMod(new ModBoolean(new ItemStack[] {new ItemStack(materials, 1, 7)}, 6, "Lava", "\u00a74", "Auto-Smelt"));
|
||||
tb.registerToolMod(new ModInteger(new ItemStack[] {new ItemStack(materials, 1, 8)}, 8, "Necrotic", 1, "\u00a78", "Life Steal"));
|
||||
|
||||
ItemStack reBattery = ic2.api.Items.getItem("reBattery");
|
||||
if (reBattery != null)
|
||||
modE.batteries.add(reBattery);
|
||||
ItemStack chargedReBattery = ic2.api.Items.getItem("chargedReBattery");
|
||||
if (chargedReBattery != null)
|
||||
modE.batteries.add(new ItemStack(chargedReBattery.getItem(), 1, -1));
|
||||
ItemStack electronicCircuit = ic2.api.Items.getItem("electronicCircuit");
|
||||
if (electronicCircuit != null)
|
||||
modE.circuits.add(electronicCircuit);
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 4) }, 10, 1));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 4), new ItemStack(Item.dyePowder, 1, 4) }, 10, 2));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] { new ItemStack(Block.blockLapis) }, 10, 9));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 4), new ItemStack(Block.blockLapis) }, 10, 10));
|
||||
tb.registerToolMod(new ModLapisIncrease(new ItemStack[] { new ItemStack(Block.blockLapis), new ItemStack(Block.blockLapis) }, 10, 18));
|
||||
tb.registerToolMod(new ModLapisBase(new ItemStack[] { new ItemStack(Block.blockLapis), new ItemStack(Block.blockLapis) }, 10));
|
||||
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(materials, 1, 6) }, 4, "Moss", 3, "\u00a72", "Auto-Repair"));
|
||||
tb.registerToolMod(new ModBlaze(new ItemStack[] { new ItemStack(Item.blazePowder) }, 7, 1));
|
||||
tb.registerToolMod(new ModBlaze(new ItemStack[] { new ItemStack(Item.blazePowder), new ItemStack(Item.blazePowder) }, 7, 2));
|
||||
tb.registerToolMod(new ModBoolean(new ItemStack[] { new ItemStack(materials, 1, 7) }, 6, "Lava", "\u00a74", "Auto-Smelt"));
|
||||
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(materials, 1, 8) }, 8, "Necrotic", 1, "\u00a78", "Life Steal"));
|
||||
}
|
||||
|
||||
|
||||
void addCraftingRecipes ()
|
||||
{
|
||||
/*GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 0), "c", 'c', Block.workbench);
|
||||
@@ -268,31 +304,31 @@ public class TConstructContent
|
||||
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, 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(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 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.stone, 's', new ItemStack(toolRod, 1, 1));
|
||||
GameRegistry.addRecipe(new ItemStack(netherPattern, 1, 0), "ps", "sp", 'p', Block.netherrack, 's', new ItemStack(toolRod, 1, 7));*/
|
||||
|
||||
|
||||
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, 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(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?
|
||||
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(craftedSoil.blockID, 0, new ItemStack(materials, 1, 1), 2f); //Slime
|
||||
FurnaceRecipes.smelting().addSmelting(craftedSoil.blockID, 1, new ItemStack(materials, 1, 2), 2f); //Seared brick item
|
||||
GameRegistry.addRecipe(new ItemStack(searedBrick, 1, 0), "pp", "pp", 'p', new ItemStack(materials, 1, 2)); //Seared brick block
|
||||
|
||||
|
||||
/*for (int i = 0; i < 12; i++)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(TConstructContent.woodPattern, 1, i + 1), "s", 's', new ItemStack(TConstructContent.woodPattern, 1, i));
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
void setupToolTabs ()
|
||||
{
|
||||
TConstruct.materialTab.init(new ItemStack(TConstructContent.woodPattern, 1, 255));
|
||||
@@ -308,9 +344,97 @@ public class TConstructContent
|
||||
|
||||
TConstruct.toolTab.init(tool);
|
||||
}
|
||||
|
||||
|
||||
static int[][] slotTypes = { new int[] { 0, 3, 0 }, //Repair
|
||||
new int[] { 1, 4, 0 }, //Pickaxe
|
||||
new int[] { 2, 5, 0 }, //Shovel
|
||||
new int[] { 2, 6, 0 }, //Axe
|
||||
//new int[] {2, 9, 0}, //Lumber Axe
|
||||
//new int[] {1, 7, 0}, //Ice Axe
|
||||
new int[] { 3, 8, 0 }, //Mattock
|
||||
new int[] { 1, 0, 1 }, //Broadsword
|
||||
new int[] { 1, 1, 1 }, //Longsword
|
||||
new int[] { 1, 2, 1 }, //Rapier
|
||||
new int[] { 2, 3, 1 }, //Frying pan
|
||||
new int[] { 2, 4, 1 } //Battlesign
|
||||
};
|
||||
|
||||
static int[][] iconCoords = { new int[] { 0, 1, 2 }, new int[] { 13, 13, 13 }, //Repair
|
||||
new int[] { 0, 0, 1 }, new int[] { 2, 3, 3 }, //Pickaxe
|
||||
new int[] { 3, 0, 13 }, new int[] { 2, 3, 13 }, //Shovel
|
||||
new int[] { 2, 0, 13 }, new int[] { 2, 3, 13 }, //Axe
|
||||
//new int[] { 6, 0, 13 }, new int[] { 2, 3, 13 }, //Lumber Axe
|
||||
//new int[] { 0, 0, 5 }, new int[] { 2, 3, 3 }, //Ice Axe
|
||||
new int[] { 2, 0, 3 }, new int[] { 2, 3, 2 }, //Mattock
|
||||
new int[] { 1, 0, 2 }, new int[] { 2, 3, 3 }, //Broadsword
|
||||
new int[] { 1, 0, 3 }, new int[] { 2, 3, 3 }, //Longsword
|
||||
new int[] { 1, 0, 4 }, new int[] { 2, 3, 3 }, //Rapier
|
||||
new int[] { 4, 0, 13 }, new int[] { 2, 3, 13 }, //Frying Pan
|
||||
new int[] { 5, 0, 13 }, new int[] { 2, 3, 13 } //Battlesign
|
||||
};
|
||||
|
||||
static String[] toolNames = { "Repair and Modification", "Pickaxe", "Shovel", "Axe",
|
||||
//"Lumber Axe",
|
||||
//"Ice Axe",
|
||||
"Mattock", "Broadsword", "Longsword", "Rapier", "Frying Pan", "Battlesign" };
|
||||
|
||||
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 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, 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 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 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 Longsword is a balanced weapon. It is useful for knocking enemies away or getting in and out of battle quickly.\n\nNatural Ability:\n- Charge Boost\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\n- Charge Boost\nDamage: High\nDurability: Low\n\nRequired parts:\n- Sword Blade\n- Crossbar\n- Handle", "The Frying is a heavy weapon that uses sheer weight to stun foes.\n\nSpecial Ability: Block\nNatural Ability: Bash\nShift+rClick: Place Frying Pan\nDamage: High\nDurability: High\n\nRequired parts:\n- Pan\n- Handle",
|
||||
//"The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nShift-rClick: Place sign\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Board\n- Handle"
|
||||
"The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Sign Board\n- Handle" };
|
||||
|
||||
void addToolButtons ()
|
||||
{
|
||||
for (int i = 0; i < toolNames.length; i++)
|
||||
{
|
||||
addToolButton(slotTypes[i][0], slotTypes[i][1], slotTypes[i][2], iconCoords[i * 2], iconCoords[i * 2 + 1], toolNames[i], toolDescriptions[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void addToolButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body)
|
||||
{
|
||||
TConstructRegistry.toolButtons.add(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body));
|
||||
}
|
||||
|
||||
public void modIntegration ()
|
||||
{
|
||||
/* IC2 */
|
||||
ItemStack reBattery = ic2.api.Items.getItem("reBattery");
|
||||
if (reBattery != null)
|
||||
modE.batteries.add(reBattery);
|
||||
ItemStack chargedReBattery = ic2.api.Items.getItem("chargedReBattery");
|
||||
if (chargedReBattery != null)
|
||||
modE.batteries.add(new ItemStack(chargedReBattery.getItem(), 1, -1));
|
||||
ItemStack electronicCircuit = ic2.api.Items.getItem("electronicCircuit");
|
||||
if (electronicCircuit != null)
|
||||
modE.circuits.add(electronicCircuit);
|
||||
|
||||
/* Thaumcraft */
|
||||
Object obj = getItem("itemResource", "thaumcraft.common.Config");
|
||||
}
|
||||
|
||||
public static Object getItem (String name, String classPackage)
|
||||
{
|
||||
try
|
||||
{
|
||||
Class c = Class.forName(classPackage);
|
||||
Object ret = c.getField(name);
|
||||
if (ret != null && (ret instanceof ItemStack || ret instanceof Item))
|
||||
return ret;
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.out.println("[TConstruct] Could not find item for " + name);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String blockTexture = "/tinkertextures/ConstructBlocks.png";
|
||||
|
||||
public static String blankSprite = "/tinkertextures/blanksprite.png";
|
||||
|
||||
public static String craftingTexture = "/tinkertextures/materials.png";
|
||||
public static String patternTexture = "/tinkertextures/tools/patterns.png";
|
||||
public static String baseHeads = "/tinkertextures/tools/baseheads.png";
|
||||
@@ -319,17 +443,17 @@ public class TConstructContent
|
||||
public static String jokeparts = "/tinkertextures/tools/jokeparts.png";
|
||||
public static String broadheads = "/tinkertextures/tools/broadheads.png";
|
||||
|
||||
public static String pickaxeTexture = "/tinkertextures/tools/pickaxes.png";
|
||||
public static String broadswordTexture = "/tinkertextures/tools/swordbroad.png";
|
||||
public static String shovelTexture = "/tinkertextures/tools/shovels.png";
|
||||
public static String axeTexture = "/tinkertextures/tools/axes.png";
|
||||
public static String longswordTexture = "/tinkertextures/tools/swordlong.png";
|
||||
public static String rapierTexture = "/tinkertextures/tools/swordrapier.png";
|
||||
public static String frypanTexture = "/tinkertextures/tools/frypans.png";
|
||||
public static String signTexture = "/tinkertextures/tools/battlesigns.png";
|
||||
public static String bowTexture = "/tinkertextures/tools/bows.png";
|
||||
public static String mattockTexture = "/tinkertextures/tools/mattock.png";
|
||||
public static String lumberaxeTexture = "/tinkertextures/tools/lumberaxe.png";
|
||||
public static String pickaxeTexture = "/tinkertextures/tools/pickaxe/";
|
||||
public static String broadswordTexture = "/tinkertextures/tools/broadsword/";
|
||||
public static String shovelTexture = "/tinkertextures/tools/shovel/";
|
||||
public static String axeTexture = "/tinkertextures/tools/axe/";
|
||||
public static String longswordTexture = "/tinkertextures/tools/longsword/";
|
||||
public static String rapierTexture = "/tinkertextures/tools/rapier/";
|
||||
public static String frypanTexture = "/tinkertextures/tools/frypan/";
|
||||
public static String signTexture = "/tinkertextures/tools/battlesign/";
|
||||
public static String bowTexture = "/tinkertextures/tools/bow/";
|
||||
public static String mattockTexture = "/tinkertextures/tools/mattock/";
|
||||
public static String lumberaxeTexture = "/tinkertextures/tools/lumberaxe/";
|
||||
|
||||
@Override
|
||||
public int getBurnTime (ItemStack fuel)
|
||||
|
||||
Reference in new issue
Block a user