3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Fixed issue with chests failing to save to a schematic due to a NullPointerException.

Dieser Commit ist enthalten in:
sk89q 2010-12-31 01:20:00 -08:00
Ursprung 59afcce512
Commit 24434e3e6f

Datei anzeigen

@ -105,6 +105,7 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock {
List<Tag> itemsList = new ArrayList<Tag>();
for (int i = 0; i < items.length; i++) {
BaseItemStack item = items[i];
if (item != null) {
Map<String,Tag> data = new HashMap<String,Tag>();
CompoundTag itemTag = new CompoundTag("Items", data);
data.put("id", new ShortTag("id", item.getID()));
@ -113,6 +114,7 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock {
data.put("Slot", new ByteTag("Slot", (byte)i));
itemsList.add(itemTag);
}
}
Map<String,Tag> values = new HashMap<String,Tag>();
values.put("Items", new ListTag("Items", CompoundTag.class, itemsList));
return values;