use of pl.asie.charset.lib.block.TileBase in project Charset by CharsetMC.
the class BlockScaffold method neighborChanged.
@Override
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) {
if (!canStay(worldIn, pos)) {
ItemStack droppedStack = new ItemStack(this);
TileEntity tile = worldIn.getTileEntity(pos);
if (tile instanceof TileBase) {
droppedStack = ((TileBase) tile).getDroppedBlock(state);
}
ItemUtils.spawnItemEntity(worldIn, new Vec3d(pos).addVector(0.5, 0.5, 0.5), droppedStack, 0.1f, 0.1f, 0.1f, 1.0f);
worldIn.setBlockToAir(pos);
}
}
Aggregations