This commit is contained in:
gnembon committed 2020-11-06 00:06:53 -04:00
1 parent 79dc85274d
commit 2cdea92da7
55 files changed
+453 -287

No files matched your search

@@ -145,7 +145,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
Block block = blockState.getBlock();
if (block instanceof InventoryProvider) {
inventory = ((InventoryProvider)block).getInventory(blockState, world, blockPos);
} else if (block.hasBlockEntity()) {
} else if (blockState.method_31709()) { //hasBlockEntity()
BlockEntity blockEntity = BlockValue.getBlockEntity(world, blockPos);
if (blockEntity instanceof Inventory) {
inventory = (Inventory)blockEntity;
@@ -181,7 +181,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
if (v1 instanceof EntityValue)
{
Entity e = ((EntityValue) v1).getEntity();
if (e instanceof PlayerEntity) inv = ((PlayerEntity) e).inventory;
if (e instanceof PlayerEntity) inv = ((PlayerEntity) e).method_31548();
else if (e instanceof Inventory) inv = (Inventory) e;
else if (e instanceof VillagerEntity) inv = ((VillagerEntity) e).getInventory();
@@ -231,7 +231,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
return new InventoryLocator(
player,
player.getBlockPos(),
isEnder ? player.getEnderChestInventory() : player.inventory,
isEnder ? player.getEnderChestInventory() : player.method_31548(),
offset + 1,
isEnder
);