Improved DungeonHelper
I was able to infer that HashMap schematic should have generic parameters <String, Tag> and changed the declaration accordingly. All generic collections in DungeonHelper are now parameterized properly.
This commit is contained in:
@@ -395,7 +395,8 @@ public class DungeonHelper
|
|||||||
this.nbtdata.setByteArray("Data", blockData);
|
this.nbtdata.setByteArray("Data", blockData);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HashMap schematic = new HashMap();
|
HashMap<String, Tag> schematic = new HashMap<String, Tag>();
|
||||||
|
|
||||||
schematic.put("Blocks", new ByteArrayTag("Blocks", blocks));
|
schematic.put("Blocks", new ByteArrayTag("Blocks", blocks));
|
||||||
schematic.put("Data", new ByteArrayTag("Data", blockData));
|
schematic.put("Data", new ByteArrayTag("Data", blockData));
|
||||||
|
|
||||||
@@ -403,15 +404,15 @@ public class DungeonHelper
|
|||||||
schematic.put("Length", new ShortTag("Length", (short) length));
|
schematic.put("Length", new ShortTag("Length", (short) length));
|
||||||
schematic.put("Height", new ShortTag("Height", (short) height));
|
schematic.put("Height", new ShortTag("Height", (short) height));
|
||||||
schematic.put("TileEntites", new ListTag("TileEntities", CompoundTag.class,tileEntites));
|
schematic.put("TileEntites", new ListTag("TileEntities", CompoundTag.class,tileEntites));
|
||||||
if (addBlocks != null) {
|
|
||||||
|
if (addBlocks != null)
|
||||||
|
{
|
||||||
schematic.put("AddBlocks", new ByteArrayTag("AddBlocks", addBlocks));
|
schematic.put("AddBlocks", new ByteArrayTag("AddBlocks", addBlocks));
|
||||||
}
|
}
|
||||||
|
|
||||||
CompoundTag schematicTag = new CompoundTag("Schematic", schematic);
|
CompoundTag schematicTag = new CompoundTag("Schematic", schematic);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
NBTOutputStream stream = new NBTOutputStream(new FileOutputStream(file));
|
NBTOutputStream stream = new NBTOutputStream(new FileOutputStream(file));
|
||||||
stream.writeTag(schematicTag);
|
stream.writeTag(schematicTag);
|
||||||
stream.close();
|
stream.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user