change nbt format: fix method names
This commit is contained in:
parent
17aad1f023
commit
dda5ac3573
40 changed files with 99 additions and 99 deletions
|
@ -331,11 +331,11 @@ public final class Server implements IThreadListener {
|
|||
return null;
|
||||
NBTTagDoubleList pos = tag.getDoubleList("Pos");
|
||||
NBTTagFloatList rot = tag.getFloatList("Rotation");
|
||||
double posX = pos.getDouble(0);
|
||||
double posY = pos.getDouble(1);
|
||||
double posZ = pos.getDouble(2);
|
||||
float rotYaw = rot.getFloat(0);
|
||||
float rotPitch = rot.getFloat(1);
|
||||
double posX = pos.get(0);
|
||||
double posY = pos.get(1);
|
||||
double posZ = pos.get(2);
|
||||
float rotYaw = rot.get(0);
|
||||
float rotPitch = rot.get(1);
|
||||
int dimension = tag.getInt("Dimension");
|
||||
return new Position(posX, posY, posZ, rotYaw, rotPitch, dimension);
|
||||
}
|
||||
|
|
|
@ -624,7 +624,7 @@ public class Player extends NetHandler implements ICrafting, Executor, IPlayer
|
|||
this.selected = tag.getInt("selected");
|
||||
NBTTagTagList list = tag.getTagList("characters");
|
||||
for(int z = 0; z < list.size(); z++) {
|
||||
this.characters.add(list.getTag(z));
|
||||
this.characters.add(list.get(z));
|
||||
}
|
||||
this.selected = Math.min(this.selected, this.characters.size() - 1);
|
||||
this.charEditor = this.selected < 0;
|
||||
|
@ -1656,7 +1656,7 @@ public class Player extends NetHandler implements ICrafting, Executor, IPlayer
|
|||
NBTTagDoubleList position = tag.getDoubleList("Pos");
|
||||
Dimension dimension = UniverseRegistry.getDimension(tag.getInt("Dimension"));
|
||||
String dim = dimension == null ? "???" : dimension.getFormattedName(false);
|
||||
BlockPos pos = new BlockPos(position.getDouble(0), position.getDouble(1), position.getDouble(2));
|
||||
BlockPos pos = new BlockPos(position.get(0), position.get(1), position.get(2));
|
||||
String type = EntityRegistry.getEntityName(tag.getString("id"));
|
||||
int level = tag.getInt("XpLevel");
|
||||
return new PlayerCharacter(name, info, align, dim, pos, type, level);
|
||||
|
|
|
@ -30,7 +30,7 @@ public class VillageCollection
|
|||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||
{
|
||||
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
|
||||
NBTTagCompound nbttagcompound = nbttaglist.get(i);
|
||||
Village village = new Village();
|
||||
village.readVillageDataFromNBT(nbttagcompound);
|
||||
this.villageList.add(village);
|
||||
|
|
|
@ -380,7 +380,7 @@ public class Region {
|
|||
boolean light = !world.dimension.hasNoLight();
|
||||
|
||||
for(int n = 0; n < sects.size(); ++n) {
|
||||
NBTTagCompound sect = sects.getTag(n);
|
||||
NBTTagCompound sect = sects.get(n);
|
||||
int y = sect.getInt("Y");
|
||||
BlockArray storage = new BlockArray(y << 4, light, null);
|
||||
byte[] blocks = sect.getByteArray("Blocks");
|
||||
|
@ -417,7 +417,7 @@ public class Region {
|
|||
|
||||
if(entities != null) {
|
||||
for(int n = 0; n < entities.size(); ++n) {
|
||||
NBTTagCompound ent = entities.getTag(n);
|
||||
NBTTagCompound ent = entities.get(n);
|
||||
Entity entity = EntityRegistry.createEntityFromNBT(ent, world);
|
||||
chunk.setHasEntities(true);
|
||||
|
||||
|
@ -443,7 +443,7 @@ public class Region {
|
|||
|
||||
if(tiles != null) {
|
||||
for(int n = 0; n < tiles.size(); ++n) {
|
||||
NBTTagCompound tile = tiles.getTag(n);
|
||||
NBTTagCompound tile = tiles.get(n);
|
||||
TileEntity tileentity = TileEntity.createAndLoadEntity(tile);
|
||||
|
||||
if(tileentity != null) {
|
||||
|
@ -458,7 +458,7 @@ public class Region {
|
|||
if(ticks != null) {
|
||||
int invalid = 0;
|
||||
for(int n = 0; n < ticks.size(); ++n) {
|
||||
NBTTagCompound tick = ticks.getTag(n);
|
||||
NBTTagCompound tick = ticks.get(n);
|
||||
Block block;
|
||||
|
||||
if(tick.hasString("i")) {
|
||||
|
|
|
@ -451,7 +451,7 @@ public final class WorldServer extends AWorldServer {
|
|||
if(tag != null && tag.hasTagList("Loaders")) {
|
||||
NBTTagTagList list = tag.getTagList("Loaders");
|
||||
for(int z = 0; z < list.size(); z++) {
|
||||
NBTTagCompound pos = list.getTag(z);
|
||||
NBTTagCompound pos = list.get(z);
|
||||
this.addLoader(new BlockPos(pos.getInt("X"), pos.getInt("Y"), pos.getInt("Z")));
|
||||
}
|
||||
this.loadersModified = false;
|
||||
|
@ -954,7 +954,7 @@ public final class WorldServer extends AWorldServer {
|
|||
if(tag != null && tag.hasTagList("Warps")) {
|
||||
NBTTagTagList list = tag.getTagList("Warps");
|
||||
for(int z = 0; z < list.size(); z++) {
|
||||
NBTTagCompound pos = list.getTag(z);
|
||||
NBTTagCompound pos = list.get(z);
|
||||
warps.put(pos.getString("Name"), new Position(pos.getDouble("X"), pos.getDouble("Y"), pos.getDouble("Z"),
|
||||
pos.getFloat("Yaw"), pos.getFloat("Pitch"), dim.getDimensionId()));
|
||||
}
|
||||
|
|
|
@ -728,7 +728,7 @@ public class StructureMineshaft
|
|||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||
{
|
||||
this.roomsLinkedToTheRoom.add(new StructureBoundingBox(nbttaglist.getIntArray(i)));
|
||||
this.roomsLinkedToTheRoom.add(new StructureBoundingBox(nbttaglist.get(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public abstract class StructureStart
|
|||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||
{
|
||||
this.components.add(MapGenStructureIO.getStructureComponent(nbttaglist.getTag(i), worldIn));
|
||||
this.components.add(MapGenStructureIO.getStructureComponent(nbttaglist.get(i), worldIn));
|
||||
}
|
||||
|
||||
this.readFromNBT(tagCompound);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue