Initial stab at 1.11

About halfway.
This commit is contained in:
Nicholas Ignoffo 2016-12-12 19:56:36 -08:00
parent ce52aea512
commit 00d6f8eb46
157 changed files with 1036 additions and 1554 deletions

View file

@ -114,17 +114,17 @@ public class RitualFelling extends Ritual
private void placeInInventory(IBlockState blockState, World world, BlockPos blockPos, BlockPos tileEntityPos)
{
TileEntity tile = world.getTileEntity(tileEntityPos);
if (tile != null && blockState.getBlock().getDrops(world, blockPos, world.getBlockState(blockPos), 0) != null)
if (tile != null)
{
if (tile instanceof IInventory)
{
for (ItemStack stack : blockState.getBlock().getDrops(world, blockPos, world.getBlockState(blockPos), 0))
{
ItemStack copyStack = stack.copy();
Utils.insertStackIntoInventory(copyStack, (IInventory) tile, EnumFacing.DOWN);
if (copyStack.stackSize > 0)
Utils.insertStackIntoTile(copyStack, tile, EnumFacing.DOWN);
if (!copyStack.isEmpty())
{
world.spawnEntityInWorld(new EntityItem(world, blockPos.getX() + 0.4, blockPos.getY() + 2, blockPos.getZ() + 0.4, copyStack));
world.spawnEntity(new EntityItem(world, blockPos.getX() + 0.4, blockPos.getY() + 2, blockPos.getZ() + 0.4, copyStack));
}
}
}