WailaWorldWrapper should not be passed to waila body handlers

This commit is contained in:
tterrag1098 committed 2015-02-28 18:48:41 -05:00
1 parent 4a4077a50b
commit 9e6aaf2ac3
1 file changed
+4 -3
@@ -77,10 +77,11 @@ public class WailaCompat implements IWailaDataProvider {
@Override
public TileEntity getTileEntity(int x, int y, int z) {
int meta = getBlockMetadata(x, y, z);
if(!getBlock(x, y, z).hasTileEntity(meta)) {
Block block = getBlock(x, y, z);
if(block == null || !block.hasTileEntity(meta)) {
return null;
}
TileEntity te = getBlock(x, y, z).createTileEntity(this, meta);
TileEntity te = block.createTileEntity(this, meta);
if(te == null) {
return null;
}
@@ -161,7 +162,7 @@ public class WailaCompat implements IWailaDataProvider {
EntityPlayer player = accessor.getPlayer();
MovingObjectPosition pos = accessor.getPosition();
int x = pos.blockX, y = pos.blockY, z = pos.blockZ;
World world = new WailaWorldWrapper(player.worldObj);
World world = accessor.getWorld();
Block block = world.getBlock(x, y, z);
TileEntity te = world.getTileEntity(x, y, z);
Item item = Item.getItemFromBlock(block);