Fixed WorldEdit.getBlock() not supporting custom blocks when they are returned by ServerInterface.resolveItem().

This commit is contained in:
sk89q 2012-04-05 00:01:46 -07:00
parent dfefd479b6
commit 6e24d981f6

View File

@ -315,8 +315,9 @@ public class WorldEdit {
blockType = BlockType.lookup(testID);
if (blockType == null) {
int t = server.resolveItem(testID);
if (t > 0 && t < 256) {
blockType = BlockType.fromID(t);
if (t > 0) {
blockType = BlockType.fromID(t); // Could be null
blockId = t;
}
}
}