From 84e430abfdd1700f63a95a259104ce1ad3614b9f Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Sat, 15 Jun 2013 08:13:50 -0400 Subject: [PATCH] Improved DungeonHelper I was able to infer that HashMap schematic should have generic parameters and changed the declaration accordingly. All generic collections in DungeonHelper are now parameterized properly. --- .../mod_pocketDim/helpers/DungeonHelper.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java index edbdc83..f2c4c2b 100644 --- a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java +++ b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java @@ -395,23 +395,24 @@ public class DungeonHelper this.nbtdata.setByteArray("Data", blockData); */ - HashMap schematic = new HashMap(); + HashMap schematic = new HashMap(); + schematic.put("Blocks", new ByteArrayTag("Blocks", blocks)); schematic.put("Data", new ByteArrayTag("Data", blockData)); - + schematic.put("Width", new ShortTag("Width", (short) width)); schematic.put("Length", new ShortTag("Length", (short) length)); schematic.put("Height", new ShortTag("Height", (short) height)); - schematic.put("TileEntites", new ListTag("TileEntities",CompoundTag.class,tileEntites)); - if (addBlocks != null) { + schematic.put("TileEntites", new ListTag("TileEntities", CompoundTag.class,tileEntites)); + + if (addBlocks != null) + { schematic.put("AddBlocks", new ByteArrayTag("AddBlocks", addBlocks)); } CompoundTag schematicTag = new CompoundTag("Schematic", schematic); try { - - NBTOutputStream stream = new NBTOutputStream(new FileOutputStream(file)); stream.writeTag(schematicTag); stream.close();