SPIGOT-6817: Revert back to old block state behaviour again
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -202,4 +226,15 @@
|
||||
@@ -202,4 +226,13 @@
|
||||
public void setBlockState(IBlockData iblockdata) {
|
||||
this.blockState = iblockdata;
|
||||
}
|
||||
@@ -57,9 +57,7 @@
|
||||
+ // CraftBukkit start - add method
|
||||
+ public InventoryHolder getOwner() {
|
||||
+ if (level == null) return null;
|
||||
+ org.bukkit.block.Block block = level.getWorld().getBlockAt(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ());
|
||||
+ if (block.getType() == org.bukkit.Material.AIR) return null;
|
||||
+ org.bukkit.block.BlockState state = block.getState();
|
||||
+ org.bukkit.block.BlockState state = level.getWorld().getBlockAt(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ()).getState();
|
||||
+ if (state instanceof InventoryHolder) return (InventoryHolder) state;
|
||||
+ return null;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user