Changed how itemStack work for pipes
This commit is contained in:
parent
2af16208aa
commit
be92930d40
2 changed files with 8 additions and 4 deletions
|
@ -31,11 +31,13 @@ public class FMRecipeLoader extends RecipeLoader
|
|||
public static Block blockOilLiquid;
|
||||
public static Block blockFuelLiquid;
|
||||
|
||||
|
||||
@Override
|
||||
public void loadRecipes()
|
||||
{
|
||||
|
||||
for (PipeData data : PipeData.values())
|
||||
{
|
||||
data.itemStack = new ItemStack(blockPipe.blockID, 1, data.ordinal());
|
||||
}
|
||||
this.registerPipes();
|
||||
this.registerTanks();
|
||||
|
||||
|
|
|
@ -97,8 +97,9 @@ public class BlockPipe extends BlockFM
|
|||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int par5, int par6)
|
||||
{
|
||||
super.breakBlock(world, x, y, z, par5, par6);
|
||||
TileEntity entity = world.getBlockTileEntity(x, y, z);
|
||||
super.breakBlock(world, x, y, z, par5, par6);
|
||||
|
||||
if (entity instanceof TileEntityPipe)
|
||||
{
|
||||
IFluidTank tank = ((TileEntityPipe) entity).getTank(0);
|
||||
|
@ -160,7 +161,8 @@ public class BlockPipe extends BlockFM
|
|||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
if (tile instanceof TileEntityPipe)
|
||||
{
|
||||
meta = ((TileEntityPipe) tile).pipeData.ordinal();
|
||||
this.dropBlockAsItem_do(par1World, par2, par3, par4, ((TileEntityPipe) tile).pipeData.itemStack);
|
||||
return;
|
||||
}
|
||||
this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(this.blockID, 1, meta));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue