diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftBlockChangeDelegate.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftBlockChangeDelegate.java b/src/main/java/org/bukkit/craftbukkit/CraftBlockChangeDelegate.java index 470828a2..5946e7d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftBlockChangeDelegate.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftBlockChangeDelegate.java @@ -1,6 +1,7 @@ package org.bukkit.craftbukkit; import net.minecraft.server.Block; +import net.minecraft.server.World; import org.bukkit.BlockChangeDelegate; @@ -19,8 +20,13 @@ public class CraftBlockChangeDelegate { return Block.e(this.delegate.getTypeId(x, y, z)); } - public void setTypeAndData(int x, int y, int z, Block block, int data, int light) { - delegate.setRawTypeIdAndData(x, y, z, Block.b(block), data); + public void setTypeAndData(int x, int y, int z, Block block, int data, int updateFlag) { + // Layering violation :( + if (delegate instanceof World) { + ((World) delegate).setTypeAndData(x, y, z, block, data, 2); + } else { + delegate.setRawTypeIdAndData(x, y, z, Block.b(block), data); + } } public boolean isEmpty(int x, int y, int z) { |