Program: 80067
Project: 80067
Buggy source:
private void init(InputStream in,Compression compression) throws Exception {
  clear();
  NBTInputStream nbtIn=null;
  try {
    nbtIn=new NBTInputStream(in,compression);
    Tag tag=nbtIn.readTag();
    if (tag instanceof CompoundTag) {
      CompoundTag root=(CompoundTag)tag;
      CompoundTag level=NbtUtil.getChild(root,"String_Node_Str",CompoundTag.class);
      if (level != null) {
        blockX=blockY=blockZ=0;
        IntTag xPosTag=NbtUtil.getChild(level,"String_Node_Str",IntTag.class);
        if (xPosTag != null)         blockX=xPosTag.getValue().intValue();
        IntTag zPosTag=NbtUtil.getChild(level,"String_Node_Str",IntTag.class);
        if (zPosTag != null)         blockZ=zPosTag.getValue().intValue();
        ListTag sections=NbtUtil.getChild(level,"String_Node_Str",ListTag.class);
        if (sections != null) {
          parseAnvilData(level);
        }
 else {
          parseMcRegionData(level);
        }
        ListTag entitiesTag=NbtUtil.getChild(level,"String_Node_Str",ListTag.class);
        if (entitiesTag != null) {
          for (          Tag t : entitiesTag.getValue()) {
            if (t instanceof CompoundTag) {
              CompoundTag entity=(CompoundTag)t;
              StringTag idTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
              if (idTag.getValue().endsWith("String_Node_Str")) {
                StringTag motiveTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
                IntTag xTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag yTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag zTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                ByteTag dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                boolean is18=false;
                if (dir == null) {
                  dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  is18=true;
                }
                int x=xTag.getValue();
                final int y=yTag.getValue();
                int z=zTag.getValue();
                if (is18 && dir.getValue() == 0) {
                  z=zTag.getValue() - 1;
                }
 else                 if (is18 && dir.getValue() == 1) {
                  x=xTag.getValue() + 1;
                }
 else                 if (is18 && dir.getValue() == 2) {
                  z=zTag.getValue() + 1;
                }
 else                 if (is18 && dir.getValue() == 3) {
                  x=xTag.getValue() - 1;
                }
                final int localX=x - (blockX * WIDTH);
                final int localY=y - (blockY * HEIGHT);
                final int localZ=z - (blockZ * DEPTH);
                paintings.add(new TileEntity(-1,0,x,y,z,localX,localY,localZ,motiveTag.getValue(),dir.getValue()));
              }
 else               if (idTag.getValue().equals("String_Node_Str")) {
                IntTag xTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag yTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag zTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                ByteTag dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                boolean is18=false;
                if (dir == null) {
                  dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  is18=true;
                }
                String item="String_Node_Str";
                Map<String,Tag> map=entity.getValue();
                CompoundTag itemTag=(CompoundTag)map.get("String_Node_Str");
                if (itemTag != null) {
                  ShortTag itemIdTag=NbtUtil.getChild(itemTag,"String_Node_Str",ShortTag.class);
                  if (itemIdTag == null) {
                    StringTag stringItemIdTag=NbtUtil.getChild(itemTag,"String_Node_Str",StringTag.class);
                    item=stringItemIdTag.getValue();
                  }
 else {
                    if (itemIdTag.getValue() == 358)                     item="String_Node_Str";
                  }
                }
                int x=xTag.getValue();
                final int y=yTag.getValue();
                int z=zTag.getValue();
                if (is18 && dir.getValue() == 0) {
                  z=zTag.getValue() - 1;
                }
 else                 if (is18 && dir.getValue() == 1) {
                  x=xTag.getValue() + 1;
                }
 else                 if (is18 && dir.getValue() == 2) {
                  z=zTag.getValue() + 1;
                }
 else                 if (is18 && dir.getValue() == 3) {
                  x=xTag.getValue() - 1;
                }
                final int localX=x - (blockX * WIDTH);
                final int localY=y - (blockY * HEIGHT);
                final int localZ=z - (blockZ * DEPTH);
                itemFrames.add(new TileEntity(-2,0,x,y,z,localX,localY,localZ,item,dir.getValue()));
              }
            }
          }
        }
        ListTag tileEntitiesTag=NbtUtil.getChild(level,"String_Node_Str",ListTag.class);
        if (tileEntitiesTag != null) {
          for (          Tag t : tileEntitiesTag.getValue()) {
            if (t instanceof CompoundTag) {
              CompoundTag entity=(CompoundTag)t;
              StringTag idTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
              IntTag xTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
              IntTag yTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
              IntTag zTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
              if (idTag != null && xTag != null && yTag != null && zTag != null) {
                String id=idTag.getValue();
                if (id.equals("String_Node_Str")) {
                  String text1=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  String text2=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  String text3=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  String text4=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  if (!text1.isEmpty() && FileUtils.isJSONValid(text1)) {
                    text1=text1.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                    text2=text2.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                    text3=text3.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                    text4=text4.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                  }
                  text1=text1.replaceAll("String_Node_Str","String_Node_Str");
                  if (text1 == null || text1.equals("String_Node_Str"))                   text1="String_Node_Str";
                  text2=text2.replaceAll("String_Node_Str","String_Node_Str");
                  if (text2 == null || text2.equals("String_Node_Str"))                   text2="String_Node_Str";
                  text3=text3.replaceAll("String_Node_Str","String_Node_Str");
                  if (text3 == null || text3.equals("String_Node_Str"))                   text3="String_Node_Str";
                  text4=text4.replaceAll("String_Node_Str","String_Node_Str");
                  if (text4 == null || text4.equals("String_Node_Str"))                   text4="String_Node_Str";
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  final int blockId=getBlockId(localX,localY,localZ);
                  final int data=getBlockData(localX,localY,localZ);
                  signs.add(new RawSign(blockId,data,x,y,z,localX,localY,localZ,text1,text2,text3,text4));
                }
 else                 if (id.equals("String_Node_Str")) {
                  IntTag dataTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  IntTag itemTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  final int item;
                  if (itemTag == null) {
                    StringTag stringIdTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
                    if (stringIdTag.getValue().equals("String_Node_Str"))                     item=6;
 else                     if (stringIdTag.getValue().equals("String_Node_Str"))                     item=38;
 else                     item=0;
                  }
 else {
                    item=itemTag.getValue();
                  }
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  final int blockData=getBlockData(localX,localY,localZ);
                  final int itemData=dataTag.getValue();
                  flowerPots.add(new TileEntity(0,blockData,x,y,z,localX,localY,localZ,itemData,item));
                }
 else                 if (id.equals("String_Node_Str")) {
                  ByteTag skullType=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  ByteTag rot=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  StringTag nameTag=null;
                  StringTag playerId=null;
                  String name="String_Node_Str";
                  String UUID="String_Node_Str";
                  String textureURL="String_Node_Str";
                  StringTag extraType=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
                  CompoundTag owner=NbtUtil.getChild(entity,"String_Node_Str",CompoundTag.class);
                  if (owner != null) {
                    nameTag=NbtUtil.getChild(owner,"String_Node_Str",StringTag.class);
                    name=nameTag.getValue();
                    playerId=NbtUtil.getChild(owner,"String_Node_Str",StringTag.class);
                    UUID=playerId.getValue().replace("String_Node_Str","String_Node_Str");
                    CompoundTag properties=NbtUtil.getChild(owner,"String_Node_Str",CompoundTag.class);
                    ListTag textures=NbtUtil.getChild(properties,"String_Node_Str",ListTag.class);
                    CompoundTag tex=NbtUtil.getChild(textures,0,CompoundTag.class);
                    StringTag value=NbtUtil.getChild(tex,"String_Node_Str",StringTag.class);
                    byte[] decoded=DatatypeConverter.parseBase64Binary(value.getValue());
                    JSONObject obj=new JSONObject(new String(decoded,"String_Node_Str"));
                    textureURL=obj.getJSONObject("String_Node_Str").getJSONObject("String_Node_Str").getString("String_Node_Str");
                  }
 else                   if (extraType != null && !(extraType.getValue().equals("String_Node_Str"))) {
                    name=UUID=extraType.getValue();
                    textureURL="String_Node_Str" + extraType.getValue() + "String_Node_Str";
                  }
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  skulls.add(new TileEntity(skullType.getValue(),rot.getValue(),x,y,z,localX,localY,localZ,name,UUID,textureURL,null));
                }
 else                 if (id.equals("String_Node_Str")) {
                  IntTag levels=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  beacons.add(new TileEntity(0,levels.getValue(),x,y,z,localX,localY,localZ,0,0));
                }
 else                 if (id.equals("String_Node_Str")) {
                  IntTag base=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  ListTag patternList=NbtUtil.getChild(entity,"String_Node_Str",ListTag.class);
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  String patterns="String_Node_Str";
                  final int numPatterns=patternList.getValue().size();
                  if (numPatterns > 0) {
                    patterns+="String_Node_Str";
                    for (int i=0; i < numPatterns; i++) {
                      CompoundTag p=NbtUtil.getChild(patternList,i,CompoundTag.class);
                      StringTag pattern=NbtUtil.getChild(p,"String_Node_Str",StringTag.class);
                      IntTag color=NbtUtil.getChild(p,"String_Node_Str",IntTag.class);
                      patterns+="String_Node_Str" + pattern.getValue() + "String_Node_Str"+ "String_Node_Str"+ color.getValue().toString();
                      if (i < numPatterns - 1)                       patterns+="String_Node_Str";
                    }
                    patterns+="String_Node_Str";
                  }
                  banners.add(new TileEntity(0,base.getValue(),x,y,z,localX,localY,localZ,patterns,0));
                }
              }
            }
          }
        }
      }
    }
  }
  finally {
    if (nbtIn != null)     nbtIn.close();
    if (in != null)     in.close();
  }
}

Fixed version (ground truth):
private void init(InputStream in,Compression compression) throws Exception {
  clear();
  NBTInputStream nbtIn=null;
  try {
    nbtIn=new NBTInputStream(in,compression);
    Tag tag=nbtIn.readTag();
    if (tag instanceof CompoundTag) {
      CompoundTag root=(CompoundTag)tag;
      CompoundTag level=NbtUtil.getChild(root,"String_Node_Str",CompoundTag.class);
      if (level != null) {
        blockX=blockY=blockZ=0;
        IntTag xPosTag=NbtUtil.getChild(level,"String_Node_Str",IntTag.class);
        if (xPosTag != null)         blockX=xPosTag.getValue().intValue();
        IntTag zPosTag=NbtUtil.getChild(level,"String_Node_Str",IntTag.class);
        if (zPosTag != null)         blockZ=zPosTag.getValue().intValue();
        ListTag sections=NbtUtil.getChild(level,"String_Node_Str",ListTag.class);
        if (sections != null) {
          parseAnvilData(level);
        }
 else {
          parseMcRegionData(level);
        }
        ListTag entitiesTag=NbtUtil.getChild(level,"String_Node_Str",ListTag.class);
        if (entitiesTag != null) {
          for (          Tag t : entitiesTag.getValue()) {
            if (t instanceof CompoundTag) {
              CompoundTag entity=(CompoundTag)t;
              StringTag idTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
              if (idTag.getValue().endsWith("String_Node_Str")) {
                StringTag motiveTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
                IntTag xTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag yTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag zTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                ByteTag oldDir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                ByteTag dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                if (oldDir != null && dir == null) {
                  dir=oldDir;
                }
                boolean is18=false;
                if (dir == null) {
                  dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  is18=true;
                }
                int direction=dir.getValue();
                if (oldDir != null && direction == 0) {
                  direction=2;
                }
 else                 if (oldDir != null && direction == 2) {
                  direction=0;
                }
                int x=xTag.getValue();
                final int y=yTag.getValue();
                int z=zTag.getValue();
                if (is18 && direction == 0) {
                  z=zTag.getValue() - 1;
                }
 else                 if (is18 && direction == 1) {
                  x=xTag.getValue() + 1;
                }
 else                 if (is18 && direction == 2) {
                  z=zTag.getValue() + 1;
                }
 else                 if (is18 && direction == 3) {
                  x=xTag.getValue() - 1;
                }
                final int localX=x - (blockX * WIDTH);
                final int localY=y - (blockY * HEIGHT);
                final int localZ=z - (blockZ * DEPTH);
                paintings.add(new TileEntity(-1,0,x,y,z,localX,localY,localZ,motiveTag.getValue(),direction));
              }
 else               if (idTag.getValue().equals("String_Node_Str")) {
                IntTag xTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag yTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                IntTag zTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                ByteTag dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                boolean is18=false;
                if (dir == null) {
                  dir=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  is18=true;
                }
                String item="String_Node_Str";
                Map<String,Tag> map=entity.getValue();
                CompoundTag itemTag=(CompoundTag)map.get("String_Node_Str");
                if (itemTag != null) {
                  ShortTag itemIdTag=NbtUtil.getChild(itemTag,"String_Node_Str",ShortTag.class);
                  if (itemIdTag == null) {
                    StringTag stringItemIdTag=NbtUtil.getChild(itemTag,"String_Node_Str",StringTag.class);
                    item=stringItemIdTag.getValue();
                  }
 else {
                    if (itemIdTag.getValue() == 358)                     item="String_Node_Str";
                  }
                }
                int x=xTag.getValue();
                final int y=yTag.getValue();
                int z=zTag.getValue();
                if (is18 && dir.getValue() == 0) {
                  z=zTag.getValue() - 1;
                }
 else                 if (is18 && dir.getValue() == 1) {
                  x=xTag.getValue() + 1;
                }
 else                 if (is18 && dir.getValue() == 2) {
                  z=zTag.getValue() + 1;
                }
 else                 if (is18 && dir.getValue() == 3) {
                  x=xTag.getValue() - 1;
                }
                final int localX=x - (blockX * WIDTH);
                final int localY=y - (blockY * HEIGHT);
                final int localZ=z - (blockZ * DEPTH);
                itemFrames.add(new TileEntity(-2,0,x,y,z,localX,localY,localZ,item,dir.getValue()));
              }
            }
          }
        }
        ListTag tileEntitiesTag=NbtUtil.getChild(level,"String_Node_Str",ListTag.class);
        if (tileEntitiesTag != null) {
          for (          Tag t : tileEntitiesTag.getValue()) {
            if (t instanceof CompoundTag) {
              CompoundTag entity=(CompoundTag)t;
              StringTag idTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
              IntTag xTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
              IntTag yTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
              IntTag zTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
              if (idTag != null && xTag != null && yTag != null && zTag != null) {
                String id=idTag.getValue();
                if (id.equals("String_Node_Str")) {
                  String text1=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  String text2=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  String text3=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  String text4=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class).getValue();
                  if (!text1.isEmpty() && FileUtils.isJSONValid(text1)) {
                    text1=text1.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                    text2=text2.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                    text3=text3.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                    text4=text4.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str",2)[1];
                  }
                  text1=text1.replaceAll("String_Node_Str","String_Node_Str");
                  if (text1 == null || text1.equals("String_Node_Str"))                   text1="String_Node_Str";
                  text2=text2.replaceAll("String_Node_Str","String_Node_Str");
                  if (text2 == null || text2.equals("String_Node_Str"))                   text2="String_Node_Str";
                  text3=text3.replaceAll("String_Node_Str","String_Node_Str");
                  if (text3 == null || text3.equals("String_Node_Str"))                   text3="String_Node_Str";
                  text4=text4.replaceAll("String_Node_Str","String_Node_Str");
                  if (text4 == null || text4.equals("String_Node_Str"))                   text4="String_Node_Str";
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  final int blockId=getBlockId(localX,localY,localZ);
                  final int data=getBlockData(localX,localY,localZ);
                  signs.add(new RawSign(blockId,data,x,y,z,localX,localY,localZ,text1,text2,text3,text4));
                }
 else                 if (id.equals("String_Node_Str")) {
                  IntTag dataTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  IntTag itemTag=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  final int item;
                  if (itemTag == null) {
                    StringTag stringIdTag=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
                    if (stringIdTag.getValue().equals("String_Node_Str"))                     item=6;
 else                     if (stringIdTag.getValue().equals("String_Node_Str"))                     item=38;
 else                     item=0;
                  }
 else {
                    item=itemTag.getValue();
                  }
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  final int blockData=getBlockData(localX,localY,localZ);
                  final int itemData=dataTag.getValue();
                  flowerPots.add(new TileEntity(0,blockData,x,y,z,localX,localY,localZ,itemData,item));
                }
 else                 if (id.equals("String_Node_Str")) {
                  ByteTag skullType=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  ByteTag rot=NbtUtil.getChild(entity,"String_Node_Str",ByteTag.class);
                  StringTag nameTag=null;
                  StringTag playerId=null;
                  String name="String_Node_Str";
                  String UUID="String_Node_Str";
                  String textureURL="String_Node_Str";
                  StringTag extraType=NbtUtil.getChild(entity,"String_Node_Str",StringTag.class);
                  CompoundTag owner=NbtUtil.getChild(entity,"String_Node_Str",CompoundTag.class);
                  if (owner != null) {
                    nameTag=NbtUtil.getChild(owner,"String_Node_Str",StringTag.class);
                    name=nameTag.getValue();
                    playerId=NbtUtil.getChild(owner,"String_Node_Str",StringTag.class);
                    UUID=playerId.getValue().replace("String_Node_Str","String_Node_Str");
                    CompoundTag properties=NbtUtil.getChild(owner,"String_Node_Str",CompoundTag.class);
                    ListTag textures=NbtUtil.getChild(properties,"String_Node_Str",ListTag.class);
                    CompoundTag tex=NbtUtil.getChild(textures,0,CompoundTag.class);
                    StringTag value=NbtUtil.getChild(tex,"String_Node_Str",StringTag.class);
                    byte[] decoded=DatatypeConverter.parseBase64Binary(value.getValue());
                    JSONObject obj=new JSONObject(new String(decoded,"String_Node_Str"));
                    textureURL=obj.getJSONObject("String_Node_Str").getJSONObject("String_Node_Str").getString("String_Node_Str");
                  }
 else                   if (extraType != null && !(extraType.getValue().equals("String_Node_Str"))) {
                    name=UUID=extraType.getValue();
                    textureURL="String_Node_Str" + extraType.getValue() + "String_Node_Str";
                  }
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  skulls.add(new TileEntity(skullType.getValue(),rot.getValue(),x,y,z,localX,localY,localZ,name,UUID,textureURL,null));
                }
 else                 if (id.equals("String_Node_Str")) {
                  IntTag levels=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  beacons.add(new TileEntity(0,levels.getValue(),x,y,z,localX,localY,localZ,0,0));
                }
 else                 if (id.equals("String_Node_Str")) {
                  IntTag base=NbtUtil.getChild(entity,"String_Node_Str",IntTag.class);
                  ListTag patternList=NbtUtil.getChild(entity,"String_Node_Str",ListTag.class);
                  final int x=xTag.getValue();
                  final int y=yTag.getValue();
                  final int z=zTag.getValue();
                  final int localX=x - (blockX * WIDTH);
                  final int localY=y - (blockY * HEIGHT);
                  final int localZ=z - (blockZ * DEPTH);
                  String patterns="String_Node_Str";
                  final int numPatterns=patternList.getValue().size();
                  if (numPatterns > 0) {
                    patterns+="String_Node_Str";
                    for (int i=0; i < numPatterns; i++) {
                      CompoundTag p=NbtUtil.getChild(patternList,i,CompoundTag.class);
                      StringTag pattern=NbtUtil.getChild(p,"String_Node_Str",StringTag.class);
                      IntTag color=NbtUtil.getChild(p,"String_Node_Str",IntTag.class);
                      patterns+="String_Node_Str" + pattern.getValue() + "String_Node_Str"+ "String_Node_Str"+ color.getValue().toString();
                      if (i < numPatterns - 1)                       patterns+="String_Node_Str";
                    }
                    patterns+="String_Node_Str";
                  }
                  banners.add(new TileEntity(0,base.getValue(),x,y,z,localX,localY,localZ,patterns,0));
                }
              }
            }
          }
        }
      }
    }
  }
  finally {
    if (nbtIn != null)     nbtIn.close();
    if (in != null)     in.close();
  }
}