Casting table underp
@ -68,4 +68,7 @@
|
||||
<entry key="item.tconstruct.bucket.DSteel.name">Liquid Damascus Steel Bucket</entry>
|
||||
<entry key="item.tconstruct.bucket.Angmallen.name">Liquid Angmallen Bucket</entry>
|
||||
|
||||
<entry key="SearedBlock.Table.name">Casting Table</entry>
|
||||
<entry key="SearedBlock.Faucet.name">Seared Faucet</entry>
|
||||
|
||||
</properties>
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
resources/tinkertextures/gui/smelteryside.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 220 B |
@ -52,33 +52,6 @@ public class PHConstruct {
|
||||
metalStill = config.getBlock("Liquid Metal Still", 1480).getInt(1480);
|
||||
//landmine = config.getBlock("Landmine", 1481).getInt(1481);
|
||||
|
||||
/*ironFlowing = config.getBlock("Liquid Iron Flowing", 1504).getInt(1504);
|
||||
ironStill = config.getBlock("Liquid Iron Still", 1505).getInt(1505);
|
||||
goldFlowing = config.getBlock("Liquid Gold Flowing", 1480).getInt(1480);
|
||||
goldStill = config.getBlock("Liquid Gold Still", 1481).getInt(1481);
|
||||
copperFlowing = config.getBlock("Liquid Copper Flowing", 1482).getInt(1482);
|
||||
copperStill = config.getBlock("Liquid Copper Still", 1483).getInt(1483);
|
||||
tinFlowing = config.getBlock("Liquid Tin Flowing", 1484).getInt(1484);
|
||||
tinStill = config.getBlock("Liquid Tin Still", 1485).getInt(1485);
|
||||
aluminumFlowing = config.getBlock("Liquid Aluminum Flowing", 1486).getInt(1486);
|
||||
aluminumStill = config.getBlock("Liquid Aluminum Still", 1487).getInt(1487);
|
||||
cobaltFlowing = config.getBlock("Liquid Cobalt Flowing", 1488).getInt(1488);
|
||||
cobaltStill = config.getBlock("Liquid Cobalt Still", 1489).getInt(1489);
|
||||
arditeFlowing = config.getBlock("Liquid Ardite Flowing", 1490).getInt(1490);
|
||||
arditeStill = config.getBlock("Liquid Ardite Still", 1491).getInt(1491);
|
||||
bronzeFlowing = config.getBlock("Liquid Bronze Flowing", 1492).getInt(1492);
|
||||
bronzeStill = config.getBlock("Liquid Bronze Still", 1493).getInt(1493);
|
||||
brassFlowing = config.getBlock("Liquid Brass Flowing", 1494).getInt(1494);
|
||||
brassStill = config.getBlock("Liquid Brass Still", 1495).getInt(1495);
|
||||
manyullynFlowing = config.getBlock("Liquid Manyullyn Flowing", 1496).getInt(1496);
|
||||
manyullynStill = config.getBlock("Liquid Manyullyn Still", 1497).getInt(1497);
|
||||
alumiteFlowing = config.getBlock("Liquid Alumite Flowing", 1498).getInt(1498);
|
||||
alumiteStill = config.getBlock("Liquid Alumite Still", 1499).getInt(1499);
|
||||
obsidianFlowing = config.getBlock("Liquid Obsidian Flowing", 1500).getInt(1500);
|
||||
obsidianStill = config.getBlock("Liquid Obsidian Still", 1501).getInt(1501);
|
||||
steelFlowing = config.getBlock("Liquid Steel Flowing", 1502).getInt(1502);
|
||||
steelStill = config.getBlock("Liquid Steel Still", 1503).getInt(1503);*/
|
||||
|
||||
manual = config.getItem("Patterns and Misc", "Tinker's Manual", 14018).getInt(14018);
|
||||
blankPattern = config.getItem("Patterns and Misc", "Blank Patterns", 14019).getInt(14019);
|
||||
materials = config.getItem("Patterns and Misc", "Materials", 14020).getInt(14020);
|
||||
@ -130,7 +103,7 @@ public class PHConstruct {
|
||||
catch (Exception e) {}
|
||||
try
|
||||
{
|
||||
Class c = Class.forName("soaryn.xycraft.XyCraft");
|
||||
Class c = Class.forName("soaryn.xycraft.core.XyCraft");
|
||||
xycraft = false;
|
||||
}
|
||||
catch (Exception e) {}
|
||||
@ -174,34 +147,6 @@ public class PHConstruct {
|
||||
//Liquids
|
||||
public static int metalFlowing;
|
||||
public static int metalStill;
|
||||
/*public static int ironFlowing;
|
||||
public static int ironStill;
|
||||
public static int goldFlowing;
|
||||
public static int goldStill;
|
||||
public static int copperFlowing;
|
||||
public static int copperStill;
|
||||
public static int tinFlowing;
|
||||
public static int tinStill;
|
||||
public static int aluminumFlowing;
|
||||
public static int aluminumStill;
|
||||
public static int cobaltFlowing;
|
||||
public static int cobaltStill;
|
||||
public static int arditeFlowing;
|
||||
public static int arditeStill;
|
||||
|
||||
public static int bronzeFlowing;
|
||||
public static int bronzeStill;
|
||||
public static int brassFlowing;
|
||||
public static int brassStill;
|
||||
public static int manyullynFlowing;
|
||||
public static int manyullynStill;
|
||||
public static int alumiteFlowing;
|
||||
public static int alumiteStill;
|
||||
|
||||
public static int obsidianFlowing;
|
||||
public static int obsidianStill;
|
||||
public static int steelFlowing;
|
||||
public static int steelStill;*/
|
||||
|
||||
//Patterns and misc
|
||||
public static int blankPattern;
|
||||
|
@ -34,7 +34,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
* @author: mDiyo
|
||||
*/
|
||||
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.12")
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.14")
|
||||
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = tinker.tconstruct.TPacketHandler.class)
|
||||
public class TConstruct
|
||||
{
|
||||
|
@ -155,8 +155,8 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.registerBlock(lavaTank, LavaTankItemBlock.class, "LavaTank");
|
||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.LavaTankLogic.class, "TConstruct.LavaTank");
|
||||
|
||||
searedBlock = new SearedBlock(PHConstruct.searedTable).setBlockName("SearedTable");
|
||||
GameRegistry.registerBlock(searedBlock, SearedTableItemBlock.class, "SearedTable");
|
||||
searedBlock = new SearedBlock(PHConstruct.searedTable).setBlockName("SearedBlock");
|
||||
GameRegistry.registerBlock(searedBlock, SearedTableItemBlock.class, "SearedBlock");
|
||||
GameRegistry.registerTileEntity(CastingTableLogic.class, "CastingTable");
|
||||
GameRegistry.registerTileEntity(FaucetLogic.class, "Faucet");
|
||||
|
||||
@ -386,7 +386,7 @@ public class TContent implements IFuelHandler
|
||||
//Blocks
|
||||
Smeltery.addMelting(Block.blockSteel, 0, 600, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*9, 0));
|
||||
Smeltery.addMelting(Block.blockGold, 0, 550, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*9, 1));
|
||||
Smeltery.addMelting(Block.obsidian, 0, 800, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*9, 11));
|
||||
Smeltery.addMelting(Block.obsidian, 0, 800, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 11));
|
||||
|
||||
//Alloys
|
||||
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 4, 7), new LiquidStack(liquidMetalStill.blockID, 3, 2), new LiquidStack(liquidMetalStill.blockID, 1, 3)); //Bronze
|
||||
@ -425,7 +425,7 @@ public class TContent implements IFuelHandler
|
||||
|
||||
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(oreSlag, 1, 0), "pp", "pp", 'p', new ItemStack(materials, 1, 2)); //Seared brick block
|
||||
//GameRegistry.addRecipe(new ItemStack(oreSlag, 1, 0), "pp", "pp", 'p', new ItemStack(materials, 1, 2)); //Seared brick block
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 1, new ItemStack(materials, 1, 3), 3f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 2, new ItemStack(materials, 1, 4), 3f);
|
||||
@ -471,7 +471,7 @@ public class TContent implements IFuelHandler
|
||||
OreDictionary.registerOre("oreArdite", new ItemStack(oreSlag, 1, 2));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(oreSlag, 1, 3));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(oreSlag, 1, 4));
|
||||
OreDictionary.registerOre("oreAluminum", new ItemStack(oreSlag, 1, 5));
|
||||
OreDictionary.registerOre("oreNaturalAluminum", new ItemStack(oreSlag, 1, 5));
|
||||
|
||||
OreDictionary.registerOre("ingotCobalt", new ItemStack(materials, 1, 3));
|
||||
OreDictionary.registerOre("ingotArdite", new ItemStack(materials, 1, 4));
|
||||
@ -593,7 +593,7 @@ public class TContent implements IFuelHandler
|
||||
{
|
||||
Smeltery.addMelting(tin, 750, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*2, 3));
|
||||
}
|
||||
ArrayList<ItemStack> aluminumOres = OreDictionary.getOres("oreAluminum");
|
||||
ArrayList<ItemStack> aluminumOres = OreDictionary.getOres("oreNaturalAluminum");
|
||||
for (ItemStack aluminum : aluminumOres)
|
||||
{
|
||||
Smeltery.addMelting(aluminum, 750, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*2, 4));
|
||||
|
@ -8,6 +8,7 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import tinker.common.InventoryBlock;
|
||||
@ -33,9 +34,12 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
case 0: return new CastingTableLogic();
|
||||
case 1: return new FaucetLogic();
|
||||
default: return null;
|
||||
case 0:
|
||||
return new CastingTableLogic();
|
||||
case 1:
|
||||
return new FaucetLogic();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,9 +49,12 @@ public class SearedBlock extends InventoryBlock
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
switch (meta)
|
||||
{
|
||||
case 0: return null;
|
||||
case 1: return null;
|
||||
default: return null;
|
||||
case 0:
|
||||
return null;
|
||||
case 1:
|
||||
return null;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,7 +63,7 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
return TConstruct.instance;
|
||||
}
|
||||
|
||||
|
||||
/* Activation */
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
|
||||
@ -70,7 +77,7 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
if (player.isSneaking())
|
||||
return false;
|
||||
|
||||
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
logic.setActive(true);
|
||||
return true;
|
||||
@ -83,16 +90,16 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
//System.out.println("Castses");
|
||||
//System.out.println("Castses");
|
||||
CastingTableLogic logic = (CastingTableLogic) world.getBlockTileEntity(x, y, z);
|
||||
if (!logic.isStackInSlot(0) && !logic.isStackInSlot(1))
|
||||
{
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
stack = player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
logic.setInventorySlotContents(0, stack);
|
||||
stack = player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
logic.setInventorySlotContents(0, stack);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if (logic.isStackInSlot(1))
|
||||
{
|
||||
ItemStack stack = logic.decrStackSize(1, 1);
|
||||
@ -105,33 +112,33 @@ public class SearedBlock extends InventoryBlock
|
||||
if (stack != null)
|
||||
addItemToInventory(player, world, x, y, z, stack);
|
||||
}
|
||||
/*ItemStack insideStack = logic.takeItemInColumn(0);
|
||||
/*ItemStack insideStack = logic.takeItemInColumn(0);
|
||||
|
||||
if (insideStack == null)
|
||||
{r
|
||||
insideStack = logic.takeItemInColumn(1 - 0);
|
||||
}
|
||||
if (insideStack == null)
|
||||
{r
|
||||
insideStack = logic.takeItemInColumn(1 - 0);
|
||||
}
|
||||
|
||||
if (insideStack != null)
|
||||
{
|
||||
this.spawnItem(world, x, y, z, insideStack);
|
||||
}*/
|
||||
}
|
||||
|
||||
if (insideStack != null)
|
||||
{
|
||||
this.spawnItem(world, x, y, z, insideStack);
|
||||
}*/
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void addItemToInventory(EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(world, (double)x + 0.5D, (double)y + 0.9325D, (double)z + 0.5D, stack);
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
|
||||
protected void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(world, (double) x + 0.5D, (double) y + 0.9325D, (double) z + 0.5D, stack);
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
entityitem.onCollideWithPlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Rendering */
|
||||
@Override
|
||||
@ -145,7 +152,7 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
return TContent.blockTexture;
|
||||
}
|
||||
|
||||
|
||||
public int getBlockTextureFromSideAndMetadata (int side, int meta)
|
||||
{
|
||||
if (meta == 0)
|
||||
@ -181,13 +188,13 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
@ -196,4 +203,86 @@ public class SearedBlock extends InventoryBlock
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 0)
|
||||
{
|
||||
this.setBlockBounds(0, 0, 0, 1, 1, 1);
|
||||
}
|
||||
if (meta == 1)
|
||||
{
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
float xMin = 0.25F;
|
||||
float xMax = 0.75F;
|
||||
float zMin = 0.25F;
|
||||
float zMax = 0.75F;
|
||||
|
||||
switch (logic.getRenderDirection())
|
||||
{
|
||||
case 2:
|
||||
zMin = 0.625F;
|
||||
zMax = 1.0F;
|
||||
break;
|
||||
case 3:
|
||||
zMax = 0.375F;
|
||||
zMin = 0F;
|
||||
break;
|
||||
case 4:
|
||||
xMin = 0.625F;
|
||||
xMax = 1.0F;
|
||||
break;
|
||||
case 5:
|
||||
xMax = 0.375F;
|
||||
xMin = 0F;
|
||||
break;
|
||||
}
|
||||
|
||||
this.setBlockBounds(xMin, 0.25F, zMin, xMax, 0.625F, zMax);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 0)
|
||||
{
|
||||
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(x, y, z, x+1, y+1, z+1);
|
||||
}
|
||||
if (meta == 1)
|
||||
{
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
float xMin = 0.25F;
|
||||
float xMax = 0.75F;
|
||||
float zMin = 0.25F;
|
||||
float zMax = 0.75F;
|
||||
|
||||
switch (logic.getRenderDirection())
|
||||
{
|
||||
case 2:
|
||||
zMin = 0.625F;
|
||||
zMax = 1.0F;
|
||||
break;
|
||||
case 3:
|
||||
zMax = 0.375F;
|
||||
zMin = 0F;
|
||||
break;
|
||||
case 4:
|
||||
xMin = 0.625F;
|
||||
xMax = 1.0F;
|
||||
break;
|
||||
case 5:
|
||||
xMax = 0.375F;
|
||||
xMin = 0F;
|
||||
break;
|
||||
}
|
||||
|
||||
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double) ((float) x + xMin), (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + xMax), (double) y + 0.625, (double) ((float) z + zMax));
|
||||
}
|
||||
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +1,13 @@
|
||||
package tinker.tconstruct.client;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texturefx.TextureCompassFX;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.item.EntityItemFrame;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.storage.MapData;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import tinker.common.fancyitem.FancyEntityItem;
|
||||
import tinker.tconstruct.logic.CastingTableLogic;
|
||||
@ -68,6 +59,11 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
|
||||
GL11.glTranslatef(1F, 1.478F, 0.55F);
|
||||
GL11.glRotatef(90F, 1, 0F, 0F);
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
if (stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
GL11.glRotatef(90F, -1, 0F, 0F);
|
||||
GL11.glTranslatef(0F, -0.1F, 0.2275F);
|
||||
}
|
||||
|
||||
RenderItem.field_82407_g = true;
|
||||
RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
|
@ -53,16 +53,13 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderer.setRenderBounds(0.25, 0.25, 0.625, 0.75, 0.375, 1);
|
||||
renderDo(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F);
|
||||
renderer.setRenderBounds(0.25, 0.25, 0.625, 0.375, 0.625, 1);
|
||||
renderDo(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.75F, 0.0F, 0.0F, 1.0F, 0.75F, 0.25F);
|
||||
renderDo(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.0F, 0.0F, 0.75F, 0.25F, 0.75F, 1.0F);
|
||||
renderDo(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
|
||||
renderer.setRenderBounds(0.625, 0.25, 0.625, 0.75, 0.625, 1);
|
||||
renderDo(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.375, 0.375, 0.625, 0.625, 0.625, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -133,36 +130,36 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
case 2:
|
||||
renderer.setRenderBounds(0.25, 0.25, 0.625, 0.75, 0.375, 1);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.25, 0.25, 0.625, 0.375, 0.625, 1);
|
||||
renderer.setRenderBounds(0.25, 0.375, 0.625, 0.375, 0.625, 1);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625, 0.25, 0.625, 0.75, 0.625, 1);
|
||||
renderer.setRenderBounds(0.625, 0.375, 0.625, 0.75, 0.625, 1);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.375, 0.375, 0.625, 0.625, 0.625, 1);
|
||||
break;
|
||||
case 3:
|
||||
renderer.setRenderBounds(0.25, 0.25, 0, 0.75, 0.375, 0.375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.25, 0.25, 0, 0.375, 0.625, 0.375);
|
||||
renderer.setRenderBounds(0.25, 0.375, 0, 0.375, 0.625, 0.375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625, 0.25, 0, 0.75, 0.625, 0.375);
|
||||
renderer.setRenderBounds(0.625, 0.375, 0, 0.75, 0.625, 0.375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.375, 0.375, 0, 0.625, 0.625, 0.375);
|
||||
break;
|
||||
case 4:
|
||||
renderer.setRenderBounds(0.625, 0.25, 0.25, 1, 0.375, 0.75);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625, 0.25, 0.25, 1, 0.625, 0.375);
|
||||
renderer.setRenderBounds(0.625, 0.375, 0.25, 1, 0.625, 0.375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625, 0.25, 0.625, 1, 0.625, 0.75);
|
||||
renderer.setRenderBounds(0.625, 0.375, 0.625, 1, 0.625, 0.75);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625, 0.375, 0.375, 1, 0.625, 0.625);
|
||||
break;
|
||||
case 5:
|
||||
renderer.setRenderBounds(0, 0.25, 0.25, 0.375, 0.375, 0.75);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0, 0.25, 0.25, 0.375, 0.625, 0.375);
|
||||
renderer.setRenderBounds(0, 0.375, 0.25, 0.375, 0.625, 0.375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0, 0.25, 0.625, 0.375, 0.625, 0.75);
|
||||
renderer.setRenderBounds(0, 0.375, 0.625, 0.375, 0.625, 0.75);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0, 0.375, 0.375, 0.325, 0.625, 0.625);
|
||||
break;
|
||||
|
@ -52,7 +52,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
int posX = logic.centerPos.x - 1, posY = logic.centerPos.y, posZ = logic.centerPos.z - 1;
|
||||
//Melting
|
||||
for (int i = 0; i < 9; i++)
|
||||
for (int i = 0; i < 9*logic.layers; i++)
|
||||
{
|
||||
ItemStack input = logic.getStackInSlot(i);
|
||||
if (input != null && logic.getTempForSlot(i) > 20)
|
||||
|
@ -99,7 +99,7 @@ public class TProxyClient extends TProxyCommon
|
||||
RenderingRegistry.registerEntityRenderingHandler(Skyla.class, new SkylaRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(FancyEntityItem.class, new FancyItemRender());
|
||||
//RenderingRegistry.registerEntityRenderingHandler(net.minecraft.entity.player.EntityPlayer.class, new PlayerArmorRender()); // <-- Works, woo!
|
||||
|
||||
|
||||
addRenderMappings();
|
||||
}
|
||||
|
||||
@ -230,17 +230,17 @@ public class TProxyClient extends TProxyCommon
|
||||
LanguageRegistry.addName(TContent.obsidianStill, "Liquid Obsidian");
|
||||
LanguageRegistry.addName(TContent.steelFlowing, "Liquid Steel");
|
||||
LanguageRegistry.addName(TContent.steelStill, "Liquid Steel");*/
|
||||
|
||||
addToolButtons ();
|
||||
|
||||
addToolButtons();
|
||||
}
|
||||
|
||||
public static final String[] shardNames = new String[] { "Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard", "Slime Crystal Fragment", "Paper", "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk" };
|
||||
public static final String[] shardNames = new String[] { "Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard", "Slime Crystal Fragment", "Paper", "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk", "Alumite Chunk", "Steel Chunk" };
|
||||
|
||||
public static final String[] materialItemInternalNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot" };
|
||||
|
||||
public static final String[] materialItemNames = new String[] { "Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone", "Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum", "Bronze Ingot", "Aluminum Brass Ingot", "Alumite Ingot", "Steel Ingot" };
|
||||
|
||||
public static final String[] toolMaterialNames = new String[] { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
|
||||
public static final String[] toolMaterialNames = new String[] { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Alumite", "Steel" };
|
||||
|
||||
public static final String[] materialTypes = new String[] { "ToolRod", "PickaxeHead", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" };
|
||||
|
||||
@ -329,10 +329,15 @@ public class TProxyClient extends TProxyCommon
|
||||
//"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",
|
||||
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: Low\nDurability: High\n\nRequired parts:\n- Pan\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: Low\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" };
|
||||
|
||||
@ -348,7 +353,7 @@ public class TProxyClient extends TProxyCommon
|
||||
{
|
||||
TConstructRegistry.toolButtons.add(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body));
|
||||
}
|
||||
|
||||
|
||||
void addRenderMappings ()
|
||||
{
|
||||
String[] partTypes = { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn", "copper", "bronze", "alumite", "steel" };
|
||||
|
@ -26,17 +26,19 @@ public class SmelteryGui extends GuiContainer
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("crafters.Smeltery"), 60, 5, 0x404040);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
drawStats();
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("crafters.Smeltery"), 50, 5, 0x404040);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 50, (ySize - 96) + 2, 0x404040);
|
||||
//drawStats();
|
||||
}
|
||||
|
||||
void drawStats ()
|
||||
{
|
||||
fontRenderer.drawString("Temp: " + logic.getInternalTemperature(), xSize + 6, 6, 0xffffff);
|
||||
fontRenderer.drawString("Liquid: " + logic.getCapacity(), xSize + 6, 16, 0xffffff);
|
||||
fontRenderer.drawString("Temp: " + logic.getInternalTemperature(), xSize + 42, 6, 0xffffff);
|
||||
fontRenderer.drawString("Liquid: " + logic.getCapacity(), xSize + 42, 16, 0xffffff);
|
||||
for (int iter = 0; iter < 9; iter++)
|
||||
fontRenderer.drawString("Slot " + iter + " temp: " + logic.getTempForSlot(iter), xSize + 6, 26 + iter * 10, 0xffffff);
|
||||
{
|
||||
fontRenderer.drawString("Slot " + iter + " temp: " + logic.getTempForSlot(iter), xSize + 42, 26 + iter * 10, 0xffffff);
|
||||
}
|
||||
/*for (int iter = 0; iter < 9; iter++)
|
||||
fontRenderer.drawString("Slot "+iter+" mTemp: " + logic.meltingTemps[iter], xSize + 6, 100+iter*9, 0xffffff);*/
|
||||
}
|
||||
@ -48,7 +50,7 @@ public class SmelteryGui extends GuiContainer
|
||||
mc.renderEngine.bindTexture(texID);
|
||||
int cornerX = (width - xSize) / 2;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
drawTexturedModalRect(cornerX+46, cornerY, 0, 0, xSize, ySize);
|
||||
|
||||
//Fuel - Lava
|
||||
if (logic.fuelGague > 0)
|
||||
@ -63,7 +65,7 @@ public class SmelteryGui extends GuiContainer
|
||||
{
|
||||
int size = fuel >= 16 ? 16 : fuel;
|
||||
fuel -= size;
|
||||
drawTexturedModalRect(cornerX + 146, (cornerY + 67) - size - 16 * count, xTex, yTex + 16 - size, 9, size);
|
||||
drawTexturedModalRect(cornerX + 117, (cornerY + 68) - size - 16 * count, xTex, yTex + 16 - size, 12, size);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@ -95,22 +97,59 @@ public class SmelteryGui extends GuiContainer
|
||||
while (liquidSize > 0)
|
||||
{
|
||||
int size = liquidSize >= 16 ? 16 : liquidSize;
|
||||
drawTexturedModalRect(cornerX + 13, (cornerY + 68) - size - base, xTex, yTex + 16 - size, 16, size);
|
||||
drawTexturedModalRect(cornerX + 29, (cornerY + 68) - size - base, xTex, yTex + 16 - size, 16, size);
|
||||
drawTexturedModalRect(cornerX + 45, (cornerY + 68) - size - base, xTex, yTex + 16 - size, 2, size);
|
||||
int basePos = 54;
|
||||
drawTexturedModalRect(cornerX + basePos, (cornerY + 68) - size - base, xTex, yTex + 16 - size, 16, size);
|
||||
drawTexturedModalRect(cornerX + basePos+16, (cornerY + 68) - size - base, xTex, yTex + 16 - size, 16, size);
|
||||
drawTexturedModalRect(cornerX + basePos+32, (cornerY + 68) - size - base, xTex, yTex + 16 - size, 16, size);
|
||||
drawTexturedModalRect(cornerX + basePos+48, (cornerY + 68) - size - base, xTex, yTex + 16 - size, 4, size);
|
||||
liquidSize -= size;
|
||||
base += size;
|
||||
}
|
||||
}
|
||||
//base = liquid.amount / 10000 * 52;
|
||||
}
|
||||
|
||||
|
||||
//Liquid gague
|
||||
texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/smeltery.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.bindTexture(texID);
|
||||
drawTexturedModalRect(cornerX+54, cornerY+16, xSize, 76, 52, 52);
|
||||
//drawTexturedModalRect(cornerX+111, cornerY+16, xSize, 128, 52, 52);
|
||||
|
||||
//Side inventory
|
||||
texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/smelteryside.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.bindTexture(texID);
|
||||
drawTexturedModalRect(cornerX-46, cornerY, 0, 0, 98, ySize-8);
|
||||
drawTexturedModalRect(cornerX+32, cornerY+8, 98, 0, 12, 15);
|
||||
|
||||
//drawStats();
|
||||
|
||||
for (int iter = 0; iter < 9; iter++)
|
||||
{
|
||||
int slotTemp = logic.getTempForSlot(iter) - 20;
|
||||
int maxTemp = logic.getMeltingPointForSlot(iter) - 20;
|
||||
if (slotTemp > 0 && maxTemp > 0)
|
||||
{
|
||||
int size = 16 * slotTemp / maxTemp + 1;
|
||||
drawTexturedModalRect(cornerX-38+(iter%3*22), cornerY+8+(iter/3*18) + 16 - size, 98, 15 + 16 - size, 5, size);
|
||||
}
|
||||
}
|
||||
/*for (int iter = 0; iter < 9; iter++)
|
||||
{
|
||||
int slotTemp = logic.getTempForSlot(iter);
|
||||
fontRenderer.drawString("Slot " + iter + " temp: " + slotTemp, xSize + 222, 66 + iter * 10, 0xffffff);
|
||||
fontRenderer.drawString("Slot " + iter + " maxtemp: " + logic.meltingTemps[iter], xSize + 222, 156 + iter * 10, 0xffffff);
|
||||
}
|
||||
fontRenderer.drawString("Temp: " + logic.getInternalTemperature(), xSize + 222, 46, 0xffffff);
|
||||
fontRenderer.drawString("Liquid: " + logic.getCapacity(), xSize + 222, 56, 0xffffff);*/
|
||||
|
||||
// Draw description - don't use this
|
||||
texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/description.png");
|
||||
/*texID = this.mc.renderEngine.getTexture("/tinkertextures/gui/description.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.bindTexture(texID);
|
||||
cornerX = (this.width + this.xSize) / 2;
|
||||
cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);*/
|
||||
}
|
||||
}
|
||||
|
@ -16,25 +16,25 @@ public class SmelteryContainer extends Container
|
||||
public SmelteryLogic logic;
|
||||
public int fuel = 0;
|
||||
|
||||
public SmelteryContainer(InventoryPlayer inventoryplayer, SmelteryLogic frypan)
|
||||
public SmelteryContainer(InventoryPlayer inventoryplayer, SmelteryLogic smeltery)
|
||||
{
|
||||
logic = frypan;
|
||||
logic = smeltery;
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 3; x++)
|
||||
this.addSlotToContainer(new Slot(frypan, x + y*3, 62 + x*18, 15 + y*18));
|
||||
this.addSlotToContainer(new Slot(smeltery, x + y*3, -34 + x*22, 8 + y*18));
|
||||
|
||||
/* Player inventory */
|
||||
for (int column = 0; column < 3; column++)
|
||||
{
|
||||
for (int row = 0; row < 9; row++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 8 + row * 18, 84 + column * 18));
|
||||
this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 54 + row * 18, 84 + column * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int column = 0; column < 9; column++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryplayer, column, 8 + column * 18, 142));
|
||||
this.addSlotToContainer(new Slot(inventoryplayer, column, 54 + column * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,4 +120,94 @@ public class SmelteryContainer extends Container
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
protected boolean mergeItemStack(ItemStack par1ItemStack, int par2, int par3, boolean par4)
|
||||
{
|
||||
boolean var5 = false;
|
||||
int var6 = par2;
|
||||
|
||||
if (par4)
|
||||
{
|
||||
var6 = par3 - 1;
|
||||
}
|
||||
|
||||
Slot var7;
|
||||
ItemStack var8;
|
||||
|
||||
if (par1ItemStack.isStackable())
|
||||
{
|
||||
while (par1ItemStack.stackSize > 0 && (!par4 && var6 < par3 || par4 && var6 >= par2))
|
||||
{
|
||||
var7 = (Slot)this.inventorySlots.get(var6);
|
||||
var8 = var7.getStack();
|
||||
|
||||
if (var8 != null && var8.itemID == par1ItemStack.itemID && (!par1ItemStack.getHasSubtypes() || par1ItemStack.getItemDamage() == var8.getItemDamage()) && ItemStack.areItemStackTagsEqual(par1ItemStack, var8))
|
||||
{
|
||||
int var9 = var8.stackSize + par1ItemStack.stackSize;
|
||||
|
||||
if (var9 <= par1ItemStack.getMaxStackSize())
|
||||
{
|
||||
par1ItemStack.stackSize = 0;
|
||||
var8.stackSize = var9;
|
||||
var7.onSlotChanged();
|
||||
var5 = true;
|
||||
}
|
||||
else if (var8.stackSize < par1ItemStack.getMaxStackSize())
|
||||
{
|
||||
par1ItemStack.stackSize -= par1ItemStack.getMaxStackSize() - var8.stackSize;
|
||||
var8.stackSize = par1ItemStack.getMaxStackSize();
|
||||
var7.onSlotChanged();
|
||||
var5 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (par4)
|
||||
{
|
||||
--var6;
|
||||
}
|
||||
else
|
||||
{
|
||||
++var6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackSize > 0)
|
||||
{
|
||||
if (par4)
|
||||
{
|
||||
var6 = par3 - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var6 = par2;
|
||||
}
|
||||
|
||||
while (!par4 && var6 < par3 || par4 && var6 >= par2)
|
||||
{
|
||||
var7 = (Slot)this.inventorySlots.get(var6);
|
||||
var8 = var7.getStack();
|
||||
|
||||
if (var8 == null)
|
||||
{
|
||||
var7.putStack(par1ItemStack.copy());
|
||||
var7.onSlotChanged();
|
||||
par1ItemStack.stackSize = 0;
|
||||
var5 = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (par4)
|
||||
{
|
||||
--var6;
|
||||
}
|
||||
else
|
||||
{
|
||||
++var6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return var5;
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,6 @@ public class SearedTableItemBlock extends ItemBlock
|
||||
|
||||
public String getItemNameIS(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("SearedTable.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
return (new StringBuilder()).append("SearedBlock.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class ToolPart extends CraftingItem
|
||||
}
|
||||
|
||||
public static final String[] toolMaterialNames = new String[] {
|
||||
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
|
||||
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Alumite", "Steel" };
|
||||
|
||||
@Override
|
||||
public int getMaterialID (ItemStack stack)
|
||||
|
@ -49,7 +49,7 @@ public class CastingTableLogic extends InventoryLogic implements ILiquidTank
|
||||
{
|
||||
int ret = TConstruct.ingotLiquidValue;
|
||||
if (inventory[0] != null && inventory[0].getItem() instanceof IPattern)
|
||||
ret *= ((IPattern) inventory[0].getItem()).getPatternCost(inventory[0].getItemDamage());
|
||||
ret *= ((IPattern) inventory[0].getItem()).getPatternCost(inventory[0].getItemDamage()) * 0.5;
|
||||
if (materialRedux > 0)
|
||||
ret *= materialRedux;
|
||||
return ret;
|
||||
|
@ -48,21 +48,40 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
|
||||
public ArrayList<LiquidStack> moltenMetal = new ArrayList<LiquidStack>();
|
||||
int maxLiquid;
|
||||
public int layers;
|
||||
int slag;
|
||||
|
||||
int numBricks;
|
||||
|
||||
public SmelteryLogic()
|
||||
{
|
||||
super(9);
|
||||
maxLiquid = 0;
|
||||
activeTemps = new int[9];
|
||||
meltingTemps = new int[9];
|
||||
super(0);
|
||||
lavaTanks = new ArrayList<CoordTuple>();
|
||||
for (int i = 0; i < 9; i++)
|
||||
activeTemps = new int[0];
|
||||
meltingTemps = new int[0];
|
||||
}
|
||||
|
||||
void adjustLayers (int lay)
|
||||
{
|
||||
if (lay != layers)
|
||||
{
|
||||
activeTemps[i] = 20;
|
||||
meltingTemps[i] = 0;
|
||||
maxLiquid = 20000 * lay;
|
||||
int[] tempActive = activeTemps;
|
||||
activeTemps = new int[9*lay];
|
||||
System.arraycopy(tempActive, 0, activeTemps, 0, activeTemps.length);
|
||||
|
||||
int[] tempMelting = meltingTemps;
|
||||
meltingTemps = new int[9*lay];
|
||||
System.arraycopy(tempMelting, 0, meltingTemps, 0, meltingTemps.length);
|
||||
|
||||
if (activeTemps.length > tempActive.length)
|
||||
{
|
||||
for (int i = tempActive.length - 1; i < activeTemps.length; i++)
|
||||
{
|
||||
activeTemps[i] = 20;
|
||||
meltingTemps[i] = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,6 +161,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
return activeTemps[slot];
|
||||
}
|
||||
|
||||
public int getMeltingPointForSlot (int slot)
|
||||
{
|
||||
return meltingTemps[slot];
|
||||
}
|
||||
|
||||
/* Updating */
|
||||
public void updateEntity ()
|
||||
{
|
||||
@ -179,12 +203,12 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
|
||||
void heatItems ()
|
||||
{
|
||||
for (int i = 0; i < 9; i++)
|
||||
for (int i = 0; i < 9*layers; i++)
|
||||
{
|
||||
if (meltingTemps[i] > 20 && this.isStackInSlot(i))
|
||||
{
|
||||
if (activeTemps[i] < internalTemp && activeTemps[i] < meltingTemps[i])
|
||||
activeTemps[i] += 5;
|
||||
activeTemps[i] += 1;
|
||||
else if (meltingTemps[i] >= activeTemps[i])
|
||||
{
|
||||
LiquidStack result = getResultFor(inventory[i]);
|
||||
@ -344,16 +368,17 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
if (checkSameLevel(x, y, z))
|
||||
{
|
||||
capacity++;
|
||||
capacity += recurseStructureUp(x, y+1, z, 0);
|
||||
capacity += recurseStructureDown(x, y-1, z, 0);
|
||||
capacity += recurseStructureUp(x, y + 1, z, 0);
|
||||
capacity += recurseStructureDown(x, y - 1, z, 0);
|
||||
}
|
||||
|
||||
maxLiquid = capacity * 20000;
|
||||
//maxLiquid = capacity * 20000;
|
||||
|
||||
if (validStructure)
|
||||
{
|
||||
internalTemp = 800;
|
||||
activeLavaTank = lavaTanks.get(0);
|
||||
adjustLayers(capacity);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -420,7 +445,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
|
||||
public int recurseStructureUp (int x, int y, int z, int count)
|
||||
{
|
||||
numBricks = 0;
|
||||
numBricks = 0;
|
||||
//Check inside
|
||||
for (int xPos = x - 1; xPos <= x + 1; xPos++)
|
||||
{
|
||||
@ -430,7 +455,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Check outer layer
|
||||
for (int xPos = x - 1; xPos <= x + 1; xPos++)
|
||||
{
|
||||
@ -443,17 +468,17 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
checkBricks(x - 2, y, zPos);
|
||||
checkBricks(x + 2, y, zPos);
|
||||
}
|
||||
|
||||
|
||||
if (numBricks != 12)
|
||||
return count;
|
||||
|
||||
|
||||
count++;
|
||||
return recurseStructureUp(x, y+1, z, count);
|
||||
return recurseStructureUp(x, y + 1, z, count);
|
||||
}
|
||||
|
||||
|
||||
public int recurseStructureDown (int x, int y, int z, int count)
|
||||
{
|
||||
numBricks = 0;
|
||||
numBricks = 0;
|
||||
//Check inside
|
||||
for (int xPos = x - 1; xPos <= x + 1; xPos++)
|
||||
{
|
||||
@ -469,7 +494,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Check outer layer
|
||||
for (int xPos = x - 1; xPos <= x + 1; xPos++)
|
||||
{
|
||||
@ -482,15 +507,15 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
checkBricks(x - 2, y, zPos);
|
||||
checkBricks(x + 2, y, zPos);
|
||||
}
|
||||
|
||||
|
||||
if (numBricks != 12)
|
||||
return count;
|
||||
|
||||
|
||||
count++;
|
||||
return recurseStructureDown(x, y-1, z, count);
|
||||
return recurseStructureDown(x, y - 1, z, count);
|
||||
}
|
||||
|
||||
public int validateBottom(int x, int y, int z, int count)
|
||||
|
||||
public int validateBottom (int x, int y, int z, int count)
|
||||
{
|
||||
int bottomBricks = 0;
|
||||
for (int xPos = x - 1; xPos <= x + 1; xPos++)
|
||||
@ -501,11 +526,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
bottomBricks++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bottomBricks == 9)
|
||||
{
|
||||
validStructure = true;
|
||||
centerPos = new CoordTuple(x, y+1, z);
|
||||
centerPos = new CoordTuple(x, y + 1, z);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
@ -580,7 +605,6 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
return new LiquidStack(liquid.itemID, maxDrain, liquid.itemMeta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int fill (LiquidStack resource)
|
||||
{
|
||||
@ -597,6 +621,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
direction = tags.getByte("Direction");
|
||||
useTime = tags.getInteger("UseTime");
|
||||
maxLiquid = tags.getInteger("MaxLiquid");
|
||||
layers = tags.getInteger("Layers");
|
||||
meltingTemps = tags.getIntArray("MeltingTemps");
|
||||
activeTemps = tags.getIntArray("ActiveTemps");
|
||||
|
||||
@ -620,6 +645,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
tags.setByte("Direction", direction);
|
||||
tags.setInteger("UseTime", useTime);
|
||||
tags.setInteger("MaxLiquid", maxLiquid);
|
||||
tags.setInteger("Layers", layers);
|
||||
tags.setIntArray("MeltingTemps", meltingTemps);
|
||||
tags.setIntArray("ActiveTemps", activeTemps);
|
||||
|
||||
|