Fix NPE for block breaking.

BlockCache.setAccess was missing (sloppy!).
This commit is contained in:
asofold 2012-12-05 01:13:12 +01:00
parent 9838cf4393
commit e776a8c524

View File

@ -872,6 +872,7 @@ public class BlockProperties {
public static boolean isOnGround(Player player, Location location) { public static boolean isOnGround(Player player, Location location) {
// return blockId != 0 && net.minecraft.server.Block.byId[blockId].//.c();// d(); // return blockId != 0 && net.minecraft.server.Block.byId[blockId].//.c();// d();
// Bit fat workaround, maybe put the object through from check listener ? // Bit fat workaround, maybe put the object through from check listener ?
blockCache.setAccess(location.getWorld());
pLoc.setBlockCache(blockCache); pLoc.setBlockCache(blockCache);
pLoc.set(location, player, 0.3); pLoc.set(location, player, 0.3);
if (pLoc.isIllegal()) { if (pLoc.isIllegal()) {