From 73bd06891b0871fcb3870a1a17259744d3c4f950 Mon Sep 17 00:00:00 2001 From: Prototik Date: Wed, 13 May 2015 17:33:49 +0700 Subject: [PATCH] 1403 --- build.gradle | 2 +- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index f0b09ad..3d105b6 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ ext.mcVersion = "1.7.10" ext.cauldronVersion = "2" ext.forgeVersion = "1403" ext.bukkitVersion = "1" -version = "${mcVersion}-${cauldronVersion}.${forgeVersion}.${bukkitVersion}.47" +version = "${mcVersion}-${cauldronVersion}.${forgeVersion}.${bukkitVersion}.49" jenkins { job = 'Cauldron' diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index b1f2dbe..e7903ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -85,7 +85,8 @@ public class CraftWorld implements World { } public Block getBlockAt(int x, int y, int z) { - return getChunkAt(x >> 4, z >> 4).getBlock(x & 0xF, y & 0xFF, z & 0xF); + Chunk chunk = getChunkAt(x >> 4, z >> 4); + return chunk == null ? null : chunk.getBlock(x & 0xF, y & 0xFF, z & 0xF); } public int getBlockTypeIdAt(int x, int y, int z) { @@ -121,7 +122,8 @@ public class CraftWorld implements World { } public Chunk getChunkAt(int x, int z) { - return this.world.theChunkProviderServer.loadChunk(x, z).bukkitChunk; + net.minecraft.world.chunk.Chunk chunk = this.world.theChunkProviderServer.loadChunk(x, z); + return chunk == null ? null : chunk.bukkitChunk; } public Chunk getChunkAt(Block block) {