Mostly working
@ -18,7 +18,7 @@ public class DisplayBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity (World world, int metadata)
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
{
|
||||
return new ShieldrackLogic();
|
||||
//return null;
|
||||
|
@ -22,10 +22,19 @@ public abstract class InventoryBlock extends BlockContainer
|
||||
}
|
||||
|
||||
/* Logic backend */
|
||||
public TileEntity createNewTileEntity (World var1) { return null; }
|
||||
public abstract TileEntity createNewTileEntity(World world, int metadata);
|
||||
public TileEntity createNewTileEntity (World var1)
|
||||
{ return null; }
|
||||
public abstract TileEntity createTileEntity(World world, int metadata);
|
||||
public abstract Integer getGui(World world, int x, int y, int z, EntityPlayer entityplayer);
|
||||
public abstract Object getModInstance();
|
||||
|
||||
/*public void onBlockAdded(World par1World, int x, int y, int z)
|
||||
{
|
||||
System.out.println("Added");
|
||||
//super.onBlockAdded(par1World, x, y, z);
|
||||
par1World.setBlockTileEntity(x, y, z, this.createTileEntity(par1World, par1World.getBlockMetadata(x, y, z)));
|
||||
}*/
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
|
||||
|
@ -23,7 +23,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
* @author: mDiyo
|
||||
*/
|
||||
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.14", dependencies = "before:*")
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.22", dependencies = "before:*")
|
||||
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.TPacketHandler.class)
|
||||
public class TConstruct
|
||||
{
|
||||
|
@ -265,20 +265,20 @@ public class TContent implements IFuelHandler
|
||||
void registerItems ()
|
||||
{
|
||||
titleIcon = new TitleIcon(PHConstruct.uselessItem).setUnlocalizedName("tconstruct.titleicon");
|
||||
String[] blanks = new String[] {"blankpattern", "blankcast"};
|
||||
blankPattern = new CraftingItem(PHConstruct.blankPattern, blanks, blanks).setUnlocalizedName("tconstruct.blankpattern");
|
||||
String[] blanks = new String[] {"blank_pattern", "blank_cast"};
|
||||
blankPattern = new CraftingItem(PHConstruct.blankPattern, blanks, blanks, "materials/").setUnlocalizedName("tconstruct.Pattern");
|
||||
String[] craftingMaterials = new String[] {
|
||||
"PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone",
|
||||
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot" };
|
||||
String[] craftingTextures = new String[] {
|
||||
"material_paper_stack", "material_slime_crystal", "material_seared_brick", "material_cobalt_ingot", "material_ardite_ingot", "material_manyullyn_ingot",
|
||||
"material_mossball", "material_lava_crystal", "material_necrotic_bone", "material_copper_ingot", "material_tin_ingot", "material_aluminum_ingot",
|
||||
"material_raw_aluminum", "material_bronze_ingot", "material_alubrass_ingot", "material_alumite_ingot", "material_steel_ingot" };
|
||||
materials = new CraftingItem(PHConstruct.materials, craftingMaterials, craftingTextures).setUnlocalizedName("tconstruct.Materials");
|
||||
"material_paperstack", "material_slimecrystal", "material_searedbrick", "material_cobaltingot", "material_arditeingot", "material_manyullyningot",
|
||||
"material_mossball", "material_lavacrystal", "material_necroticbone", "material_copperingot", "material_tiningot", "material_aluminumingot",
|
||||
"material_aluminumraw", "material_bronzeingot", "material_alubrassingot", "material_alumiteingot", "material_steelingot" };
|
||||
materials = new CraftingItem(PHConstruct.materials, craftingMaterials, craftingTextures, "materials/").setUnlocalizedName("tconstruct.Materials");
|
||||
toolRod = new ToolPart(PHConstruct.toolRod, "ToolRod", "_rod").setUnlocalizedName("tconstruct.ToolRod");
|
||||
toolShard = new ToolShard(PHConstruct.toolShard, "ToolShard", "_shard").setUnlocalizedName("tconstruct.ToolShard");
|
||||
woodPattern = new Pattern(PHConstruct.woodPattern, "WoodPattern").setUnlocalizedName("tconstruct.Pattern");
|
||||
metalPattern = new MetalPattern(PHConstruct.metalPattern, "MetalPattern").setUnlocalizedName("tconstruct.MetalPattern");
|
||||
toolShard = new ToolShard(PHConstruct.toolShard, "ToolShard", "_chunk").setUnlocalizedName("tconstruct.ToolShard");
|
||||
woodPattern = new Pattern(PHConstruct.woodPattern, "WoodPattern", "pattern_", "materials/").setUnlocalizedName("tconstruct.Pattern");
|
||||
metalPattern = new MetalPattern(PHConstruct.metalPattern, "MetalPattern", "cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern");
|
||||
//stonePattern = new Pattern(PHTools.stonePattern, 64, patternTexture).setUnlocalizedName("tconstruct.Pattern");
|
||||
//netherPattern = new Pattern(PHTools.netherPattern, 128, patternTexture).setUnlocalizedName("tconstruct.Pattern");
|
||||
|
||||
|
56
mods/tinker/tconstruct/ai/CoreAI.java
Normal file
@ -0,0 +1,56 @@
|
||||
package mods.tinker.tconstruct.ai;
|
||||
|
||||
import mods.tinker.tconstruct.entity.GolemBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class CoreAI
|
||||
{
|
||||
public void initAI (GolemBase golem, boolean flag)
|
||||
{
|
||||
}
|
||||
|
||||
public void idle (GolemBase golem)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public void update (GolemBase golem)
|
||||
{
|
||||
}
|
||||
|
||||
public void lateUpdate (GolemBase golem)
|
||||
{
|
||||
}
|
||||
|
||||
public void interact (GolemBase golem)
|
||||
{
|
||||
}
|
||||
|
||||
public boolean patrol (GolemBase golem)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean follow (GolemBase golem)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean attack (GolemBase golem, Entity entity, float f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean protect (GolemBase golem)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onWork (GolemBase golem)
|
||||
{
|
||||
}
|
||||
|
||||
public void undoAI (GolemBase golem, boolean flag)
|
||||
{
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -33,12 +34,17 @@ public class EquipBlock extends InventoryBlock
|
||||
{
|
||||
return new String[] { "toolstation_top" };
|
||||
}
|
||||
|
||||
public Icon getBlockTextureFromSideAndMetadata (int side, int meta)
|
||||
{
|
||||
return Block.blockSteel.getBlockTextureFromSideAndMetadata(side, meta);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
/*@SideOnly(Side.CLIENT)
|
||||
public void func_94332_a (IconRegister par1IconRegister)
|
||||
{
|
||||
this.field_94336_cN = par1IconRegister.func_94245_a(Block.blockSteel.getUnlocalizedName());
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock ()
|
||||
@ -64,7 +70,8 @@ public class EquipBlock extends InventoryBlock
|
||||
return 0;
|
||||
}
|
||||
|
||||
public TileEntity createNewTileEntity (World world, int metadata)
|
||||
@Override
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
{
|
||||
return new FrypanLogic();
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity (World world, int metadata)
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
|
@ -204,7 +204,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity (World world, int metadata)
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
|
@ -126,7 +126,8 @@ public class ToolStationBlock extends InventoryBlock
|
||||
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);
|
||||
}
|
||||
|
||||
public TileEntity createNewTileEntity (World world, int metadata)
|
||||
@Override
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
|
@ -47,8 +47,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
public boolean renderSmeltery (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
return true;
|
||||
/*SmelteryLogic logic = (SmelteryLogic) world.getBlockTileEntity(x, y, z);
|
||||
SmelteryLogic logic = (SmelteryLogic) world.getBlockTileEntity(x, y, z);
|
||||
if (logic.validStructure)
|
||||
{
|
||||
int posX = logic.centerPos.x - 1, posY = logic.centerPos.y, posZ = logic.centerPos.z - 1;
|
||||
@ -67,14 +66,14 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
if (blockToRender.itemID < 4096) //Block
|
||||
{
|
||||
Block liquidBlock = Block.blocksList[blockToRender.itemID];
|
||||
ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
|
||||
//ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
|
||||
BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, blockToRender.getItemDamage(), posX + i % 3, posY + i / 9, posZ + i / 3, renderer, world);
|
||||
}
|
||||
else
|
||||
//Item
|
||||
{
|
||||
Item liquidItem = Item.itemsList[blockToRender.itemID];
|
||||
ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
|
||||
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
|
||||
int metadata = blockToRender.getItemDamage();
|
||||
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), metadata, posX, posY + i / 9, posZ, renderer, world);
|
||||
}
|
||||
@ -103,7 +102,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
if (liquid.itemID < 4096) //Block
|
||||
{
|
||||
Block liquidBlock = Block.blocksList[liquid.itemID];
|
||||
ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
|
||||
//ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
|
||||
for (int i = 0; i < 9; i++)
|
||||
BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, liquid.itemMeta, posX + i % 3, posY+yBase, posZ + i / 3, renderer, world);
|
||||
}
|
||||
@ -111,7 +110,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
//Item
|
||||
{
|
||||
Item liquidItem = Item.itemsList[liquid.itemID];
|
||||
ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
|
||||
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
|
||||
for (int i = 0; i < 9; i++)
|
||||
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), liquid.itemMeta, posX, posY+yBase, posZ, renderer, world);
|
||||
}
|
||||
@ -125,10 +124,10 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;*/
|
||||
return false;
|
||||
}
|
||||
|
||||
/*void renderLayer(SmelteryLogic logic, int start, int posX, int posY, int posZ, RenderBlocks renderer, IBlockAccess world)
|
||||
void renderLayer(SmelteryLogic logic, int start, int posX, int posY, int posZ, RenderBlocks renderer, IBlockAccess world)
|
||||
{
|
||||
renderer.setRenderBounds(-0.001F, -0.001F, -0.001F, 1.001F, 1.001F, 1.001F);
|
||||
for (int i = 0; i < 9; i++)
|
||||
@ -144,20 +143,20 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
if (blockToRender.itemID < 4096) //Block
|
||||
{
|
||||
Block liquidBlock = Block.blocksList[blockToRender.itemID];
|
||||
ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
|
||||
//ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
|
||||
BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, blockToRender.getItemDamage(), posX + i % 3, posY, posZ + i / 3, renderer, world);
|
||||
}
|
||||
else
|
||||
//Item
|
||||
{
|
||||
Item liquidItem = Item.itemsList[blockToRender.itemID];
|
||||
ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
|
||||
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
|
||||
int metadata = blockToRender.getItemDamage();
|
||||
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), metadata, posX + i % 3, posY, posZ + i / 3, renderer, world);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory ()
|
||||
|
@ -196,8 +196,12 @@ public class TProxyClient extends TProxyCommon
|
||||
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
|
||||
}
|
||||
|
||||
LanguageRegistry.addName(TContent.manualBook, "Tinker's Log");
|
||||
LanguageRegistry.addName(TContent.blankPattern, "Blank Pattern");
|
||||
//LanguageRegistry.addName(TContent.manualBook, "Tinker's Log");
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization("item.tconstruct.diary.diary.name", "en_US", "Tinker's Log");
|
||||
LanguageRegistry.instance().addStringLocalization("item.tconstruct.Pattern.blank_pattern.name", "en_US", "Blank Pattern");
|
||||
LanguageRegistry.instance().addStringLocalization("item.tconstruct.Pattern.blank_cast.name", "en_US", "Cast");
|
||||
//LanguageRegistry.addName(TContent.blankPattern, "Blank Pattern");
|
||||
LanguageRegistry.addName(TContent.pickaxe, "Pickaxe");
|
||||
LanguageRegistry.addName(TContent.shovel, "Shovel");
|
||||
LanguageRegistry.addName(TContent.axe, "Axe");
|
||||
@ -252,7 +256,7 @@ public class TProxyClient extends TProxyCommon
|
||||
|
||||
public static final String[] materialNames = new String[] { " Rod", " Pickaxe Head", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" };
|
||||
|
||||
public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" };
|
||||
public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign" };
|
||||
|
||||
public static final String[] patternNames = new String[] { "Ingot", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" };
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class FrypanGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.func_98187_b("/tinkertextures/gui/frypan.png");
|
||||
mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/frypan.png");
|
||||
int cornerX = (width - xSize) / 2;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
|
@ -130,15 +130,15 @@ public class GuiManual extends GuiScreen
|
||||
|
||||
//int texID = this.mc.renderEngine.getTexture();
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/bookright.png");
|
||||
this.mc.renderEngine.func_98187_b("/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("/tinkertextures/gui/bookleft.png");
|
||||
//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.func_98187_b("/tinkertextures/gui/bookleft.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/bookleft.png");
|
||||
localWidth = localWidth - this.bookImageWidth;
|
||||
this.drawTexturedModalRect(localWidth, localHeight, 256 - this.bookImageWidth, 0, this.bookImageWidth, this.bookImageHeight);
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class PartCrafterGui extends GuiContainer
|
||||
{
|
||||
// Draw the background
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/toolparts.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/toolparts.png");
|
||||
int cornerX = (this.width - this.xSize) / 2;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
||||
@ -160,18 +160,18 @@ public class PartCrafterGui extends GuiContainer
|
||||
// Draw chest
|
||||
if (drawChestPart)
|
||||
{
|
||||
//texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/patternchestmini.png");
|
||||
//texID = this.mc.renderEngine.getTexture("/mods/tinker/textures/gui/patternchestmini.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//his.mc.renderEngine.bindTexture(texID);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/patternchestmini.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/patternchestmini.png");
|
||||
this.drawTexturedModalRect(cornerX-116, cornerY+11, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
// Draw description
|
||||
//texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/description.png");
|
||||
//texID = this.mc.renderEngine.getTexture("/mods/tinker/textures/gui/description.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//this.mc.renderEngine.bindTexture(texID);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/description.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/description.png");
|
||||
cornerX = (this.width + this.xSize) / 2;
|
||||
cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 126, 0, 126, this.ySize);
|
||||
|
@ -29,7 +29,7 @@ public class PatternChestGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.func_98187_b("/tinkertextures/gui/patternchest.png");
|
||||
mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/patternchest.png");
|
||||
int cornerX = (width - xSize) / 2;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
|
@ -45,7 +45,7 @@ public class PatternShaperGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/patternshaper.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/patternshaper.png");
|
||||
int cornerX = (this.width - this.xSize) / 2;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
||||
|
@ -8,12 +8,10 @@ import mods.tinker.tconstruct.logic.SmelteryLogic;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -121,28 +119,29 @@ public class SmelteryGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.func_98187_b("/tinkertextures/gui/smeltery.png");
|
||||
mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/smeltery.png");
|
||||
int cornerX = (width - xSize) / 2;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, xSize, ySize);
|
||||
|
||||
//Fuel - Lava
|
||||
/*if (logic.fuelGague > 0)
|
||||
if (logic.fuelGague > 0)
|
||||
{
|
||||
ForgeHooksClient.bindTexture(Block.lavaStill.getTextureFile(), 0);
|
||||
int renderIndex = Block.lavaStill.getBlockTextureFromSideAndMetadata(0, 0);
|
||||
int xTex = renderIndex % 16 * 16;
|
||||
int yTex = renderIndex / 16 * 16;
|
||||
//ForgeHooksClient.bindTexture(Block.lavaStill.getTextureFile(), 0);
|
||||
//int renderIndex = Block.lavaStill.getBlockTextureFromSideAndMetadata(0, 0);
|
||||
Icon inon = Block.lavaStill.getBlockTextureFromSideAndMetadata(0, 0);
|
||||
//int xTex = renderIndex % 16 * 16;
|
||||
//int yTex = renderIndex / 16 * 16;
|
||||
int fuel = logic.getScaledFuelGague(52);
|
||||
int count = 0;
|
||||
while (fuel > 0)
|
||||
{
|
||||
int size = fuel >= 16 ? 16 : fuel;
|
||||
fuel -= size;
|
||||
drawTexturedModalRect(cornerX + 117, (cornerY + 68) - size - 16 * count, xTex, yTex + 16 - size, 12, size);
|
||||
drawTexturedModalRect(cornerX + 117, (cornerY + 68) - size - 16 * count, 0, 16 - size, 12, size);
|
||||
count++;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
//Liquids - molten metal
|
||||
int base = 0;
|
||||
@ -186,13 +185,13 @@ public class SmelteryGui extends GuiContainer
|
||||
//Liquid gague
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
mc.renderEngine.func_98187_b("/tinkertextures/gui/smeltery.png");
|
||||
mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/smeltery.png");
|
||||
drawTexturedModalRect(cornerX + 54, cornerY + 16, xSize, 76, 52, 52);
|
||||
//drawTexturedModalRect(cornerX+111, cornerY+16, xSize, 128, 52, 52);
|
||||
|
||||
//Side inventory
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.func_98187_b("/tinkertextures/gui/smelteryside.png");
|
||||
mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/smelteryside.png");
|
||||
if (logic.layers == 1)
|
||||
{
|
||||
drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 43);
|
||||
|
@ -20,7 +20,7 @@ public class ToolGuiElement
|
||||
iconsY = yi;
|
||||
title = t;
|
||||
body = b;
|
||||
texture = "/tinkertextures/gui/icons.png";
|
||||
texture = "/mods/tinker/textures/gui/icons.png";
|
||||
}
|
||||
|
||||
public ToolGuiElement(int st, int bx, int by, int[] xi, int[] yi, String t, String b, String tex)
|
||||
|
@ -289,17 +289,17 @@ public class ToolStationGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
|
||||
{
|
||||
// Draw the background
|
||||
//int texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/toolstation.png");
|
||||
//int texID = this.mc.renderEngine.getTexture("/mods/tinker/textures/gui/toolstation.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/toolstation.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/toolstation.png");
|
||||
int cornerX = (this.width - this.xSize) / 2;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
//texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/icons.png");
|
||||
//texID = this.mc.renderEngine.getTexture("/mods/tinker/textures/gui/icons.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//this.mc.renderEngine.bindTexture(texID);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/icons.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/icons.png");
|
||||
// Draw the slots
|
||||
|
||||
for (int i = 0; i < slotX.length; i++)
|
||||
@ -312,10 +312,10 @@ public class ToolStationGui extends GuiContainer
|
||||
}
|
||||
|
||||
// Draw description
|
||||
//texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/description.png");
|
||||
//texID = this.mc.renderEngine.getTexture("/mods/tinker/textures/gui/description.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//this.mc.renderEngine.bindTexture(texID);
|
||||
this.mc.renderEngine.func_98187_b("/tinkertextures/gui/description.png");
|
||||
this.mc.renderEngine.func_98187_b("/mods/tinker/textures/gui/description.png");
|
||||
cornerX = (this.width + this.xSize) / 2;
|
||||
cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, 126, this.ySize + 30);
|
||||
|
212
mods/tinker/tconstruct/entity/GolemBase.java
Normal file
@ -0,0 +1,212 @@
|
||||
package mods.tinker.tconstruct.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import mods.tinker.common.fancyitem.FancyEntityItem;
|
||||
import mods.tinker.tconstruct.ai.CoreAI;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GolemBase extends EntityCreature
|
||||
{
|
||||
public String creator;
|
||||
public int maxHealth;
|
||||
public int baseAttack;
|
||||
public boolean paused;
|
||||
float bodyHeight;
|
||||
float bodyWidth;
|
||||
int movementType;
|
||||
|
||||
protected ItemStack[] inventory;
|
||||
protected FancyEntityItem coreItem;
|
||||
public ArrayList<CoreAI> aiList = new ArrayList<CoreAI>();
|
||||
|
||||
public GolemBase(World world)
|
||||
{
|
||||
super(world);
|
||||
setInitialStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxHealth ()
|
||||
{
|
||||
return maxHealth;
|
||||
}
|
||||
|
||||
protected void setInitialStats()
|
||||
{
|
||||
maxHealth = 20;
|
||||
baseAttack = 3;
|
||||
paused = false;
|
||||
inventory = new ItemStack[0];
|
||||
}
|
||||
|
||||
/* AI */
|
||||
public void addCoreAI(CoreAI ai, boolean flag)
|
||||
{
|
||||
aiList.add(ai);
|
||||
//tier2key.onInit(this, flag);
|
||||
}
|
||||
|
||||
protected void updateWanderPath ()
|
||||
{
|
||||
if (!paused)
|
||||
super.updateWanderPath();
|
||||
}
|
||||
|
||||
protected void coreRoutine()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void guardRoutine()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void followRoutine()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void protectRoutine()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/* Types */
|
||||
public void setTraits()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/* Other */
|
||||
protected boolean canDespawn ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Effects */
|
||||
public void sparkle ()
|
||||
{
|
||||
Random random = worldObj.rand;
|
||||
double d = (double) ((float) posX + random.nextFloat() * 2.0F) - 1.0D;
|
||||
double d1 = (float) posY + random.nextFloat() * (float) bodyHeight;
|
||||
double d2 = (double) ((float) posZ + random.nextFloat() * 2.0F) - 1.0D;
|
||||
double d3 = (double) ((float) posX + random.nextFloat() * 2.0F) - 1.0D;
|
||||
double d4 = (float) posY + random.nextFloat() * (float) bodyHeight;
|
||||
double d5 = (double) ((float) posZ + random.nextFloat() * 2.0F) - 1.0D;
|
||||
switch (0)//(state)
|
||||
{
|
||||
case 0:
|
||||
worldObj.spawnParticle("reddust", d, d1, d2, 0.0D, 1.0D, 0.0D);
|
||||
worldObj.spawnParticle("reddust", d3, d4, d5, 0.0D, 1.0D, 0.0D);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
worldObj.spawnParticle("reddust", d, d1, d2, -1D, 0.0D, 1.0D);
|
||||
worldObj.spawnParticle("reddust", d3, d4, d5, -1D, 0.0D, 1.0D);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
worldObj.spawnParticle("reddust", d, d1, d2, 1.0D, 0.0D, 0.0D);
|
||||
worldObj.spawnParticle("reddust", d3, d4, d5, 1.0D, 0.0D, 0.0D);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
worldObj.spawnParticle("reddust", d, d1, d2, 1.0D, 1.0D, 1.0D);
|
||||
worldObj.spawnParticle("reddust", d3, d4, d5, 1.0D, 1.0D, 1.0D);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
worldObj.spawnParticle("reddust", d, d1, d2, 0.46000000000000002D, 0.28999999999999998D, 0.19D);
|
||||
worldObj.spawnParticle("reddust", d3, d4, d5, 0.46000000000000002D, 0.28999999999999998D, 0.19D);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void sparkle (double d, double d1, double d2)
|
||||
{
|
||||
Random random = worldObj.rand;
|
||||
double d3 = (double) ((float) posX + random.nextFloat() * 2.0F) - 1.0D;
|
||||
double d4 = (float) posY + random.nextFloat() * (float) bodyHeight;
|
||||
double d5 = (double) ((float) posZ + random.nextFloat() * 2.0F) - 1.0D;
|
||||
double d6 = (double) ((float) posX + random.nextFloat() * 2.0F) - 1.0D;
|
||||
double d7 = (float) posY + random.nextFloat() * (float) bodyHeight;
|
||||
double d8 = (double) ((float) posZ + random.nextFloat() * 2.0F) - 1.0D;
|
||||
worldObj.spawnParticle("reddust", d3, d4, d5, d, d1, d2);
|
||||
worldObj.spawnParticle("reddust", d6, d7, d8, d, d1, d2);
|
||||
}
|
||||
|
||||
public void shineRadius (float f, double d, double d1, double d2)
|
||||
{
|
||||
shineRadius(f, d, d1, d2, 2, "reddust");
|
||||
}
|
||||
|
||||
public void shineRadius (float f, double d, double d1, double d2, int i, String s)
|
||||
{
|
||||
d++;
|
||||
Random random = new Random();
|
||||
float f1 = 0.7F;
|
||||
float f2 = bodyHeight / 5;
|
||||
for (int j = 1; j <= 2; j++)
|
||||
{
|
||||
float f3 = f / (float) j;
|
||||
for (double d3 = 0.0D; d3 < 1.5707963D; d3 += 0.10000000000000001D)
|
||||
{
|
||||
float f4 = (float) ((double) f3 * Math.cos(d3));
|
||||
float f5 = (float) ((double) f3 * Math.sin(d3));
|
||||
for (int k = 0; k < i; k++)
|
||||
{
|
||||
worldObj.spawnParticle(s, ((float) posX + f4 + random.nextFloat() * f1) - 0.5F, (float) posY + f2, ((float) posZ + f5 + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
}
|
||||
|
||||
for (int l = 0; l < i; l++)
|
||||
{
|
||||
worldObj.spawnParticle(s, (((float) posX - f4) + random.nextFloat() * f1) - 0.5F, (float) posY + f2, ((float) posZ + f5 + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
}
|
||||
|
||||
for (int i1 = 0; i1 < i; i1++)
|
||||
{
|
||||
worldObj.spawnParticle(s, ((float) posX + f4 + random.nextFloat() * f1) - 0.5F, (float) posY + f2, (((float) posZ - f5) + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
}
|
||||
|
||||
for (int j1 = 0; j1 < i; j1++)
|
||||
{
|
||||
worldObj.spawnParticle(s, (((float) posX - f4) + random.nextFloat() * f1) - 0.5F, (float) posY + f2, (((float) posZ - f5) + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void shineRadius (float f, double d, double d1, double d2, boolean flag)
|
||||
{
|
||||
d--;
|
||||
Random random = new Random();
|
||||
float f1 = 0.7F;
|
||||
float f2 = f;
|
||||
String s = "reddust";
|
||||
float f3 = (float) bodyHeight / 5F;
|
||||
for (double d3 = 0.0D; d3 < 1.5707963D; d3 += 0.20000000000000001D)
|
||||
{
|
||||
float f4 = (float) Math.sin(d3);
|
||||
float f5 = (float) Math.cos(d3);
|
||||
float f6 = f2 * f4;
|
||||
for (double d4 = 0.0D; d4 < 1.5707963D; d4 += 0.20000000000000001D)
|
||||
{
|
||||
float f7 = (float) Math.sin(d4);
|
||||
float f8 = (float) Math.cos(d4);
|
||||
float f9 = f2 * f8 * f5;
|
||||
float f10 = f2 * f7 * f5;
|
||||
worldObj.spawnParticle(s, ((float) posX + f9 + random.nextFloat() * f1) - 0.5F, (float) posY + f3 + f6 + random.nextFloat() * f1, ((float) posZ + f10 + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
worldObj.spawnParticle(s, (((float) posX - f9) + random.nextFloat() * f1) - 0.5F, (float) posY + f3 + f6 + random.nextFloat() * f1, ((float) posZ + f10 + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
worldObj.spawnParticle(s, ((float) posX + f9 + random.nextFloat() * f1) - 0.5F, (float) posY + f3 + f6 + random.nextFloat() * f1, (((float) posZ - f10) + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
worldObj.spawnParticle(s, (((float) posX - f9) + random.nextFloat() * f1) - 0.5F, (float) posY + f3 + f6 + random.nextFloat() * f1, (((float) posZ - f10) + random.nextFloat() * f1) - 0.5F, d, d1, d2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -16,8 +16,9 @@ public class CraftingItem extends Item
|
||||
{
|
||||
public String[] textureNames;
|
||||
public String[] unlocalizedNames;
|
||||
public String folder;
|
||||
public Icon[] icons;
|
||||
public CraftingItem(int id, String[] names, String[] tex)
|
||||
public CraftingItem(int id, String[] names, String[] tex, String f)
|
||||
{
|
||||
super(id);
|
||||
this.setCreativeTab(TConstruct.materialTab);
|
||||
@ -25,6 +26,7 @@ public class CraftingItem extends Item
|
||||
this.setHasSubtypes(true);
|
||||
textureNames = tex;
|
||||
unlocalizedNames = names;
|
||||
folder = f;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -40,7 +42,7 @@ public class CraftingItem extends Item
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
this.icons[i] = iconRegister.func_94245_a("tinker:"+textureNames[i]);
|
||||
this.icons[i] = iconRegister.func_94245_a("tinker:"+folder+textureNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ public class FilledBucket extends ItemBucket
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
this.icons[i] = iconRegister.func_94245_a("tinker"+materialNames[i]);
|
||||
this.icons[i] = iconRegister.func_94245_a("tinker:materials/bucket_"+textureNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,4 +211,8 @@ public class FilledBucket extends ItemBucket
|
||||
public static final String[] materialNames = new String[] {
|
||||
"Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "AlBrass", "Manyullyn", "Alumite", "Obsidian", "Steel",
|
||||
"Manganese", "Heptazion", "DSteel", "Angmallen"};
|
||||
|
||||
public static final String[] textureNames = new String[] {
|
||||
"iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel",
|
||||
"manganese", "heptazion", "dsteel", "angmallen"};
|
||||
}
|
||||
|
@ -8,9 +8,9 @@ import net.minecraft.item.ItemStack;
|
||||
public class MetalPattern extends Pattern
|
||||
{
|
||||
|
||||
public MetalPattern(int id, String partType)
|
||||
public MetalPattern(int id, String partType, String patternType, String folder)
|
||||
{
|
||||
super(id, partType);
|
||||
super(id, partType, patternType, folder);
|
||||
}
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
|
@ -5,9 +5,11 @@ import java.util.List;
|
||||
import mods.tinker.common.IPattern;
|
||||
import mods.tinker.tconstruct.TContent;
|
||||
import mods.tinker.tconstruct.crafting.PatternBuilder.MaterialSet;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -15,9 +17,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class Pattern extends CraftingItem
|
||||
implements IPattern
|
||||
{
|
||||
public Pattern(int id, String partType)
|
||||
public Pattern(int id, String partType, String patternType, String folder)
|
||||
{
|
||||
super(id, getNames(partType), getNames(partType));
|
||||
super(id, patternName, getPatternNames(patternType), folder);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setContainerItem(this);
|
||||
@ -25,16 +27,27 @@ public class Pattern extends CraftingItem
|
||||
|
||||
}
|
||||
|
||||
private static String[] getNames (String partType)
|
||||
private static String[] getPatternNames (String partType)
|
||||
{
|
||||
String[] names = new String[patternName.length];
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
names[i] = patternName[i]+partType;
|
||||
names[i] = partType+patternName[i];
|
||||
return names;
|
||||
}
|
||||
|
||||
public static final String[] patternName = new String[] {
|
||||
"ingot", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign" };
|
||||
"ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign" };
|
||||
|
||||
/*@SideOnly(Side.CLIENT)
|
||||
public void func_94581_a(IconRegister iconRegister)
|
||||
{
|
||||
this.icons = new Icon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
this.icons[i] = iconRegister.func_94245_a("tinker:"+textureNames[i]);
|
||||
}
|
||||
}*/
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
|
@ -9,11 +9,12 @@ import net.minecraft.world.World;
|
||||
|
||||
public class PatternManual extends CraftingItem
|
||||
{
|
||||
static String[] name = new String[] {"manualDiary"};
|
||||
static String[] name = new String[] {"diary"};
|
||||
static String[] textureName = new String[] {"tinkerbook_diary"};
|
||||
public PatternManual(int id)
|
||||
{
|
||||
super(id, name, name);
|
||||
setUnlocalizedName("tconstruct.manualDiary");
|
||||
super(id, name, textureName, "materials/");
|
||||
setUnlocalizedName("tconstruct.diary");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,6 +16,6 @@ public class TitleIcon extends Item
|
||||
public void func_94581_a (IconRegister iconRegister)
|
||||
{
|
||||
TProxyClient.blankSprite = iconRegister.func_94245_a("tinker:blanksprite");
|
||||
iconIndex = iconRegister.func_94245_a("tparts");
|
||||
iconIndex = iconRegister.func_94245_a("tinker:tparts");
|
||||
}
|
||||
}
|
||||
|
@ -18,20 +18,11 @@ public class ToolPart extends CraftingItem
|
||||
{
|
||||
public ToolPart(int id, String partType, String textureType)
|
||||
{
|
||||
super(id, getNames(partType), buildTextureNames(textureType));
|
||||
super(id, toolMaterialNames, buildTextureNames(textureType), "parts/");
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
private static String[] getNames (String partType)
|
||||
{
|
||||
String[] names = new String[toolMaterialNames.length];
|
||||
for (int i = 0; i < toolMaterialNames.length; i++)
|
||||
names[i] = partType + toolMaterialNames[i];
|
||||
return names;
|
||||
}
|
||||
|
||||
|
||||
private static String[] buildTextureNames (String textureType)
|
||||
{
|
||||
String[] names = new String[toolMaterialNames.length];
|
||||
@ -40,7 +31,7 @@ public class ToolPart extends CraftingItem
|
||||
return names;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
/*@SideOnly(Side.CLIENT)
|
||||
public void func_94581_a(IconRegister iconRegister)
|
||||
{
|
||||
this.icons = new Icon[textureNames.length];
|
||||
@ -49,7 +40,7 @@ public class ToolPart extends CraftingItem
|
||||
{
|
||||
this.icons[i] = iconRegister.func_94245_a("tinker:parts/"+textureNames[i]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public static final String[] toolMaterialNames = new String[] {
|
||||
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Alumite", "Steel" };
|
||||
|
@ -221,7 +221,7 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
|
||||
|
||||
else if (renderPass == 2) // Accessory
|
||||
{
|
||||
return (handleIcons.get(tags.getInteger("RenderAccessory")));
|
||||
return (accessoryIcons.get(tags.getInteger("RenderAccessory")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,34 +0,0 @@
|
||||
package mods.tinker.tconstruct.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
|
||||
/* Sorted List implementation
|
||||
* Written by RebelKeithy
|
||||
*/
|
||||
|
||||
public class SortedList<T> extends ArrayList<T>
|
||||
{
|
||||
Comparator comp;
|
||||
|
||||
public SortedList(Comparator comp)
|
||||
{
|
||||
this.comp = comp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean add(T o)
|
||||
{
|
||||
for(int n = 0; n < this.size(); n++)
|
||||
{
|
||||
if(comp.compare(this.get(n), o) >= 0)
|
||||
{
|
||||
this.add(n+1, o);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
this.add(this.size(), o);
|
||||
return true;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
BIN
mods/tinker/textures/items/frypan/glowstone_frypan_effect.png
Normal file
After Width: | Height: | Size: 101 B |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
BIN
mods/tinker/textures/items/materials/blank_cast.png
Normal file
After Width: | Height: | Size: 633 B |
BIN
mods/tinker/textures/items/materials/blank_pattern.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
mods/tinker/textures/items/materials/bone_chunk.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
mods/tinker/textures/items/materials/bucket_alubrass.png
Normal file
After Width: | Height: | Size: 432 B |
BIN
mods/tinker/textures/items/materials/bucket_aluminum.png
Normal file
After Width: | Height: | Size: 431 B |
BIN
mods/tinker/textures/items/materials/bucket_alumite.png
Normal file
After Width: | Height: | Size: 276 B |
BIN
mods/tinker/textures/items/materials/bucket_ardite.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
mods/tinker/textures/items/materials/bucket_bronze.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
mods/tinker/textures/items/materials/bucket_cobalt.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
mods/tinker/textures/items/materials/bucket_copper.png
Normal file
After Width: | Height: | Size: 280 B |
BIN
mods/tinker/textures/items/materials/bucket_gold.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
mods/tinker/textures/items/materials/bucket_iron.png
Normal file
After Width: | Height: | Size: 286 B |
BIN
mods/tinker/textures/items/materials/bucket_manyullyn.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
mods/tinker/textures/items/materials/bucket_obsidian.png
Normal file
After Width: | Height: | Size: 281 B |
BIN
mods/tinker/textures/items/materials/bucket_steel.png
Normal file
After Width: | Height: | Size: 277 B |
BIN
mods/tinker/textures/items/materials/bucket_tin.png
Normal file
After Width: | Height: | Size: 430 B |
BIN
mods/tinker/textures/items/materials/cast_axe.png
Normal file
After Width: | Height: | Size: 546 B |
BIN
mods/tinker/textures/items/materials/cast_binding.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
mods/tinker/textures/items/materials/cast_broadaxe.png
Normal file
After Width: | Height: | Size: 541 B |
BIN
mods/tinker/textures/items/materials/cast_crossbar.png
Normal file
After Width: | Height: | Size: 547 B |
BIN
mods/tinker/textures/items/materials/cast_frypan.png
Normal file
After Width: | Height: | Size: 555 B |
BIN
mods/tinker/textures/items/materials/cast_ingot.png
Normal file
After Width: | Height: | Size: 551 B |
BIN
mods/tinker/textures/items/materials/cast_largeguard.png
Normal file
After Width: | Height: | Size: 546 B |
BIN
mods/tinker/textures/items/materials/cast_largerod.png
Normal file
After Width: | Height: | Size: 553 B |
BIN
mods/tinker/textures/items/materials/cast_mediumguard.png
Normal file
After Width: | Height: | Size: 545 B |
BIN
mods/tinker/textures/items/materials/cast_pickaxe.png
Normal file
After Width: | Height: | Size: 549 B |
BIN
mods/tinker/textures/items/materials/cast_rod.png
Normal file
After Width: | Height: | Size: 542 B |
BIN
mods/tinker/textures/items/materials/cast_shovel.png
Normal file
After Width: | Height: | Size: 562 B |
BIN
mods/tinker/textures/items/materials/cast_sign.png
Normal file
After Width: | Height: | Size: 545 B |
BIN
mods/tinker/textures/items/materials/cast_spike.png
Normal file
After Width: | Height: | Size: 541 B |
BIN
mods/tinker/textures/items/materials/cast_swordblade.png
Normal file
After Width: | Height: | Size: 562 B |
BIN
mods/tinker/textures/items/materials/grout.png
Normal file
After Width: | Height: | Size: 579 B |
BIN
mods/tinker/textures/items/materials/material_alubrassingot.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
mods/tinker/textures/items/materials/material_aluminumingot.png
Normal file
After Width: | Height: | Size: 213 B |
BIN
mods/tinker/textures/items/materials/material_aluminumraw.png
Normal file
After Width: | Height: | Size: 197 B |
BIN
mods/tinker/textures/items/materials/material_alumiteingot.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
mods/tinker/textures/items/materials/material_arditeingot.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
mods/tinker/textures/items/materials/material_bronzeingot.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
mods/tinker/textures/items/materials/material_cobaltingot.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
mods/tinker/textures/items/materials/material_copperingot.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
mods/tinker/textures/items/materials/material_lavacrystal.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
mods/tinker/textures/items/materials/material_manyullyningot.png
Normal file
After Width: | Height: | Size: 249 B |
BIN
mods/tinker/textures/items/materials/material_mossball.png
Normal file
After Width: | Height: | Size: 259 B |
BIN
mods/tinker/textures/items/materials/material_necroticbone.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
mods/tinker/textures/items/materials/material_paperstack.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
mods/tinker/textures/items/materials/material_searedbrick.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
mods/tinker/textures/items/materials/material_slimecrystal.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
mods/tinker/textures/items/materials/material_steelingot.png
Normal file
After Width: | Height: | Size: 253 B |
BIN
mods/tinker/textures/items/materials/material_tiningot.png
Normal file
After Width: | Height: | Size: 232 B |