From b78d43d95ca786233994d92ef094f6eab5b5e5e7 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 29 Jan 2011 09:49:17 -0800 Subject: [PATCH] Added in a valid block ID check in EditSession.rawSetBlock(). --- src/com/sk89q/worldedit/EditSession.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/sk89q/worldedit/EditSession.java b/src/com/sk89q/worldedit/EditSession.java index 227865c58..945431f50 100755 --- a/src/com/sk89q/worldedit/EditSession.java +++ b/src/com/sk89q/worldedit/EditSession.java @@ -143,11 +143,17 @@ public class EditSession { */ protected boolean rawSetBlock(Vector pt, BaseBlock block) { int y = pt.getBlockY(); + int type = block.getType(); if (y < 0 || y > 127) { return false; } + // No invalid blocks + if ((type > 25 && type < 35) || type == 36 || type > 92) { + return false; + } + int existing = world.getBlockType(pt); // Clear the container block so that it doesn't drop items