geforkt von Mirrors/FastAsyncWorldEdit
Fixed issue with chests failing to save to a schematic due to a NullPointerException.
Dieser Commit ist enthalten in:
Ursprung
59afcce512
Commit
24434e3e6f
@ -105,13 +105,15 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock {
|
|||||||
List<Tag> itemsList = new ArrayList<Tag>();
|
List<Tag> itemsList = new ArrayList<Tag>();
|
||||||
for (int i = 0; i < items.length; i++) {
|
for (int i = 0; i < items.length; i++) {
|
||||||
BaseItemStack item = items[i];
|
BaseItemStack item = items[i];
|
||||||
Map<String,Tag> data = new HashMap<String,Tag>();
|
if (item != null) {
|
||||||
CompoundTag itemTag = new CompoundTag("Items", data);
|
Map<String,Tag> data = new HashMap<String,Tag>();
|
||||||
data.put("id", new ShortTag("id", item.getID()));
|
CompoundTag itemTag = new CompoundTag("Items", data);
|
||||||
data.put("Damage", new ShortTag("Damage", item.getDamage()));
|
data.put("id", new ShortTag("id", item.getID()));
|
||||||
data.put("Count", new ByteTag("Count", (byte)item.getAmount()));
|
data.put("Damage", new ShortTag("Damage", item.getDamage()));
|
||||||
data.put("Slot", new ByteTag("Slot", (byte)i));
|
data.put("Count", new ByteTag("Count", (byte)item.getAmount()));
|
||||||
itemsList.add(itemTag);
|
data.put("Slot", new ByteTag("Slot", (byte)i));
|
||||||
|
itemsList.add(itemTag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Map<String,Tag> values = new HashMap<String,Tag>();
|
Map<String,Tag> values = new HashMap<String,Tag>();
|
||||||
values.put("Items", new ListTag("Items", CompoundTag.class, itemsList));
|
values.put("Items", new ListTag("Items", CompoundTag.class, itemsList));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren