Exemplo n.º 1
0
 public void readFromNBT(NBTTagCompound tag) {
   NBTTagList li = tag.getTagList("locs", NBTTypes.COMPOUND.ID);
   for (Object o : li.tagList) {
     NBTTagCompound entry = (NBTTagCompound) o;
     WorldLocation src = WorldLocation.readFromNBT(entry);
     NBTTagList map = tag.getTagList("map", NBTTypes.COMPOUND.ID);
     for (Object o2 : li.tagList) {
       NBTTagCompound nbt = (NBTTagCompound) o2;
       WorldLocation tg = WorldLocation.readFromNBT(nbt);
       this.addLink(src, tg);
     }
   }
 }
 public void readFromNBT(NBTTagCompound NBT) {
   controls.readFromNBT(NBT);
   controller = WorldLocation.readFromNBT("control", NBT);
   maxX = NBT.getInteger("maxx");
   maxY = NBT.getInteger("maxy");
   maxZ = NBT.getInteger("maxz");
   minX = NBT.getInteger("minx");
   minY = NBT.getInteger("miny");
   minZ = NBT.getInteger("minz");
 }
Exemplo n.º 3
0
 public void readFromNBT(NBTTagCompound tag) {
   NBTTagList li = tag.getTagList("locs", NBTTypes.COMPOUND.ID);
   for (Object o : li.tagList) {
     NBTTagCompound data = (NBTTagCompound) o;
     WorldLocation loc = WorldLocation.readFromNBT(data);
     TileEntity te = loc.getTileEntity();
     try {
       V v = (V) te;
       this.data.put(loc, v);
     } catch (ClassCastException e) { // ugly, but no other way to test if te instanceof V
       ReikaJavaLibrary.pConsole("Tried to load a TileEntityCache from invalid NBT!");
     }
   }
 }