From 1767597672c75756d8c7db21d48f53167418ec20 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 8 Jan 2011 11:30:05 -0800 Subject: [PATCH] Fixed WorldEdit not handling ice removal well. --- src/com/sk89q/worldedit/EditSession.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/sk89q/worldedit/EditSession.java b/src/com/sk89q/worldedit/EditSession.java index 39d9f143f..c081a1c6c 100755 --- a/src/com/sk89q/worldedit/EditSession.java +++ b/src/com/sk89q/worldedit/EditSession.java @@ -143,20 +143,24 @@ public class EditSession { */ private boolean rawSetBlock(Vector pt, BaseBlock block) { int y = pt.getBlockY(); + if (y < 0 || y > 127) { return false; } + + int existing = world.getBlockType(pt); // Clear the chest so that it doesn't drop items - if (world.getBlockType(pt) == 54 && blockBag == null) { + if (existing == 54 && blockBag == null) { world.clearChest(pt); + // Ice turns until water so this has to be done first + } else if (existing == BlockID.ICE) { + world.setBlockType(pt, 0); } int id = block.getID(); if (blockBag != null) { - int existing = world.getBlockType(pt); - if (id > 0) { try { blockBag.fetchPlacedBlock(id);