Fix Teleposer and Soul Forge dropping items on break

This commit is contained in:
Nick 2016-01-08 18:30:49 -08:00
parent c5dec61351
commit 70f9b9f101
2 changed files with 11 additions and 12 deletions

View file

@ -1,5 +1,6 @@
package WayofTime.bloodmagic.block;
import WayofTime.bloodmagic.tile.TileAltar;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
@ -64,14 +65,13 @@ public class BlockSoulForge extends BlockContainer
}
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
public void breakBlock(World world, BlockPos blockPos, IBlockState blockState)
{
if (worldIn.getTileEntity(pos) != null && worldIn.getTileEntity(pos) instanceof TileTeleposer)
{
InventoryHelper.dropInventoryItems(worldIn, pos, (TileTeleposer) worldIn.getTileEntity(pos));
}
TileSoulForge tileSoulForge = (TileSoulForge) world.getTileEntity(blockPos);
if (tileSoulForge != null)
tileSoulForge.dropItems();
super.breakBlock(worldIn, pos, state);
super.breakBlock(world, blockPos, blockState);
}
@Override

View file

@ -52,14 +52,13 @@ public class BlockTeleposer extends BlockContainer
}
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
public void breakBlock(World world, BlockPos blockPos, IBlockState blockState)
{
if (worldIn.getTileEntity(pos) != null && worldIn.getTileEntity(pos) instanceof TileTeleposer)
{
InventoryHelper.dropInventoryItems(worldIn, pos, (TileTeleposer) worldIn.getTileEntity(pos));
}
TileTeleposer tileTeleposer = (TileTeleposer) world.getTileEntity(blockPos);
if (tileTeleposer != null)
tileTeleposer.dropItems();
super.breakBlock(worldIn, pos, state);
super.breakBlock(world, blockPos, blockState);
}
@Override