From dbf1f3b9cb18675e21f16c64faef6f0038ef9787 Mon Sep 17 00:00:00 2001 From: sk89q Date: Mon, 31 Mar 2014 20:31:25 -0700 Subject: [PATCH] Fixed BlockQuirkExtent calling getBlockType(). --- .../com/sk89q/worldedit/extent/BlockQuirkExtent.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/extent/BlockQuirkExtent.java b/src/main/java/com/sk89q/worldedit/extent/BlockQuirkExtent.java index 5f9bd6465..9d52a8778 100644 --- a/src/main/java/com/sk89q/worldedit/extent/BlockQuirkExtent.java +++ b/src/main/java/com/sk89q/worldedit/extent/BlockQuirkExtent.java @@ -49,16 +49,17 @@ public class BlockQuirkExtent extends ExtentDelegate { } @Override - public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException { - final int existing = world.getBlockType(location); + public boolean setBlock(Vector position, BaseBlock block) throws WorldEditException { + BaseBlock lazyBlock = getExtent().getLazyBlock(position); + int existing = lazyBlock.getType(); if (BlockType.isContainerBlock(existing)) { - world.clearContainerBlockContents(location); // Clear the container block so that it doesn't drop items + world.clearContainerBlockContents(position); // Clear the container block so that it doesn't drop items } else if (existing == BlockID.ICE) { - world.setBlockType(location, BlockID.AIR); // Ice turns until water so this has to be done first + world.setBlock(position, new BaseBlock(BlockID.AIR)); // Ice turns until water so this has to be done first } - return super.setBlock(location, block); + return super.setBlock(position, block); } }