change nbt format: fix method names

This commit is contained in:
Sen 2025-05-27 21:34:46 +02:00
parent 17aad1f023
commit dda5ac3573
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
40 changed files with 99 additions and 99 deletions

View file

@ -218,7 +218,7 @@ public class EntityFirework
for (int i = 0; i < this.fireworkExplosions.size(); ++i)
{
NBTTagCompound nbttagcompound = this.fireworkExplosions.getTag(i);
NBTTagCompound nbttagcompound = this.fireworkExplosions.get(i);
if (nbttagcompound.getBool("Flicker"))
{
@ -250,7 +250,7 @@ public class EntityFirework
{
for (int i = 0; i < this.fireworkExplosions.size(); ++i)
{
NBTTagCompound nbttagcompound = this.fireworkExplosions.getTag(i);
NBTTagCompound nbttagcompound = this.fireworkExplosions.get(i);
if (nbttagcompound.getByte("Type") == 1)
{
@ -268,7 +268,7 @@ public class EntityFirework
if (this.fireworkAge % 2 == 0 && this.fireworkExplosions != null && this.fireworkAge / 2 < this.fireworkExplosions.size())
{
int k = this.fireworkAge / 2;
NBTTagCompound nbttagcompound1 = this.fireworkExplosions.getTag(k);
NBTTagCompound nbttagcompound1 = this.fireworkExplosions.get(k);
int l = nbttagcompound1.getByte("Type");
boolean flag4 = nbttagcompound1.getBool("Trail");
boolean flag2 = nbttagcompound1.getBool("Flicker");

View file

@ -98,7 +98,7 @@ public class Attributes
{
for (int i = 0; i < list.size(); ++i)
{
NBTTagCompound nbttagcompound = list.getTag(i);
NBTTagCompound nbttagcompound = list.get(i);
AttributeInstance iattributeinstance = map.getAttributeInstanceByName(nbttagcompound.getString("Name"));
if (iattributeinstance != null)
@ -122,7 +122,7 @@ public class Attributes
for (int i = 0; i < nbttaglist.size(); ++i)
{
AttributeModifier attributemodifier = readAttributeModifierFromNBT(nbttaglist.getTag(i));
AttributeModifier attributemodifier = readAttributeModifierFromNBT(nbttaglist.get(i));
if (attributemodifier != null)
{

View file

@ -924,7 +924,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
NBTTagStringList list = tag.getStringList("Layers");
this.layers = new State[list.size()];
for(int z = 0; z < this.layers.length; z++) {
this.layers[z] = BlockRegistry.getFromIdName(list.getString(z), Blocks.stone.getState());
this.layers[z] = BlockRegistry.getFromIdName(list.get(z), Blocks.stone.getState());
}
}
else {
@ -938,7 +938,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
else {
this.addBiomes = new Biome[list.size()];
for(int z = 0; z < this.addBiomes.length; z++) {
this.addBiomes[z] = Biome.findByName(list.getString(z));
this.addBiomes[z] = Biome.findByName(list.get(z));
}
}
}
@ -953,7 +953,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
else {
this.frostBiomes = new Biome[list.size()];
for(int z = 0; z < this.frostBiomes.length; z++) {
this.frostBiomes[z] = Biome.findByName(list.getString(z));
this.frostBiomes[z] = Biome.findByName(list.get(z));
}
}
}
@ -968,7 +968,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
else {
this.coldBiomes = new Biome[list.size()];
for(int z = 0; z < this.coldBiomes.length; z++) {
this.coldBiomes[z] = Biome.findByName(list.getString(z));
this.coldBiomes[z] = Biome.findByName(list.get(z));
}
}
}
@ -983,7 +983,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
else {
this.mediumBiomes = new Biome[list.size()];
for(int z = 0; z < this.mediumBiomes.length; z++) {
this.mediumBiomes[z] = Biome.findByName(list.getString(z));
this.mediumBiomes[z] = Biome.findByName(list.get(z));
}
}
}
@ -998,7 +998,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
else {
this.hotBiomes = new Biome[list.size()];
for(int z = 0; z < this.hotBiomes.length; z++) {
this.hotBiomes[z] = Biome.findByName(list.getString(z));
this.hotBiomes[z] = Biome.findByName(list.get(z));
}
}
}
@ -1009,7 +1009,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
if(tag.hasTagList("Ores")) {
NBTTagTagList list = tag.getTagList("Ores");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound gen = list.getTag(z);
NBTTagCompound gen = list.get(z);
this.ores.add(new Ore(BlockRegistry.getFromIdName(gen.getString("Block"), Blocks.iron_ore.getState()),
gen.getInt("Count"), gen.getInt("Add"), gen.getInt("Size"),
gen.getInt("MinC"), gen.getInt("MaxS"), gen.getBool("Distrib")));
@ -1019,7 +1019,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
if(tag.hasTagList("Lakes")) {
NBTTagTagList list = tag.getTagList("Lakes");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound gen = list.getTag(z);
NBTTagCompound gen = list.get(z);
this.lakes.add(new Lake(
BlockRegistry.getFromIdName(gen.getString("Block"), Blocks.iron_ore.getState()),
gen.hasString("Filler") ? BlockRegistry.getFromIdName(gen.getString("Filler"), null) : null,
@ -1031,7 +1031,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
if(tag.hasTagList("Liquids")) {
NBTTagTagList list = tag.getTagList("Liquids");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound gen = list.getTag(z);
NBTTagCompound gen = list.get(z);
this.liquids.add(new Liquid(
BlockRegistry.getFromIdName(gen.getString("Block"), Blocks.iron_ore.getState()),
gen.getInt("Chance"), gen.getInt("Min"), gen.getInt("Max"), gen.getBool("Lower")));

View file

@ -55,8 +55,8 @@ public class EnchantmentHelper
{
for (int i = 0; i < nbttaglist.size(); ++i)
{
int j = nbttaglist.getTag(i).getShort("id");
int k = nbttaglist.getTag(i).getShort("lvl");
int j = nbttaglist.get(i).getShort("id");
int k = nbttaglist.get(i).getShort("lvl");
if (j == enchID)
{
@ -78,8 +78,8 @@ public class EnchantmentHelper
{
for (int i = 0; i < nbttaglist.size(); ++i)
{
int j = nbttaglist.getTag(i).getShort("id");
int k = nbttaglist.getTag(i).getShort("lvl");
int j = nbttaglist.get(i).getShort("id");
int k = nbttaglist.get(i).getShort("lvl");
map.put(j, k);
}
}
@ -167,8 +167,8 @@ public class EnchantmentHelper
{
for (int i = 0; i < nbttaglist.size(); ++i)
{
int j = nbttaglist.getTag(i).getShort("id");
int k = nbttaglist.getTag(i).getShort("lvl");
int j = nbttaglist.get(i).getShort("id");
int k = nbttaglist.get(i).getShort("lvl");
if (Enchantment.getEnchantmentById(j) != null)
{

View file

@ -1546,9 +1546,9 @@ public abstract class Entity
NBTTagDoubleList nbttaglist = tagCompund.getDoubleList("Pos");
NBTTagDoubleList nbttaglist1 = tagCompund.getDoubleList("Motion");
NBTTagFloatList nbttaglist2 = tagCompund.getFloatList("Rotation");
this.motionX = nbttaglist1.getDouble(0);
this.motionY = nbttaglist1.getDouble(1);
this.motionZ = nbttaglist1.getDouble(2);
this.motionX = nbttaglist1.get(0);
this.motionY = nbttaglist1.get(1);
this.motionZ = nbttaglist1.get(2);
if (Math.abs(this.motionX) > 10.0D)
{
@ -1565,11 +1565,11 @@ public abstract class Entity
this.motionZ = 0.0D;
}
this.prevX = this.lastTickPosX = this.posX = nbttaglist.getDouble(0);
this.prevY = this.lastTickPosY = this.posY = nbttaglist.getDouble(1);
this.prevZ = this.lastTickPosZ = this.posZ = nbttaglist.getDouble(2);
this.prevYaw = this.rotYaw = nbttaglist2.getFloat(0);
this.prevPitch = this.rotPitch = nbttaglist2.getFloat(1);
this.prevX = this.lastTickPosX = this.posX = nbttaglist.get(0);
this.prevY = this.lastTickPosY = this.posY = nbttaglist.get(1);
this.prevZ = this.lastTickPosZ = this.posZ = nbttaglist.get(2);
this.prevYaw = this.rotYaw = nbttaglist2.get(0);
this.prevPitch = this.rotPitch = nbttaglist2.get(1);
this.setRotationYawHead(this.rotYaw);
this.setRenderYawOffset(this.rotYaw);
this.fallDistance = tagCompund.getFloat("FallDistance");

View file

@ -1471,7 +1471,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot") & 255;
if (j >= 2 && j < this.horseChest.getSizeInventory())

View file

@ -217,7 +217,7 @@ public abstract class EntityCartContainer extends EntityCart implements ILockabl
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot") & 255;
if (j >= 0 && j < this.minecartContainerItems.length)

View file

@ -3393,7 +3393,7 @@ public abstract class EntityNPC extends EntityLiving
NBTTagTagList nbttaglist = tagCompund.getTagList("Equipment");
for(int i = 0; i < this.equipment.length; ++i) {
this.equipment[i] = ItemStack.loadItemStackFromNBT(nbttaglist.getTag(i));
this.equipment[i] = ItemStack.loadItemStackFromNBT(nbttaglist.get(i));
}
}
// this.setSpecies(tagCompund.getString("Species"));
@ -3427,7 +3427,7 @@ public abstract class EntityNPC extends EntityLiving
for (int i = 0; i < nbttaglist.size(); ++i)
{
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttaglist.getTag(i));
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttaglist.get(i));
if (itemstack != null)
{

View file

@ -289,9 +289,9 @@ public abstract class EntityProjectile extends Entity
if (tagCompund.hasDoubleList("direction"))
{
NBTTagDoubleList nbttaglist = tagCompund.getDoubleList("direction");
this.motionX = nbttaglist.getDouble(0);
this.motionY = nbttaglist.getDouble(1);
this.motionZ = nbttaglist.getDouble(2);
this.motionX = nbttaglist.get(0);
this.motionY = nbttaglist.get(1);
this.motionZ = nbttaglist.get(2);
}
else
{

View file

@ -624,7 +624,7 @@ public abstract class EntityLiving extends Entity
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
PotionEffect potioneffect = PotionEffect.fromNbt(nbttagcompound);
if (potioneffect != null && !potioneffect.getPotion().isInstant())

View file

@ -95,14 +95,14 @@ public abstract class UniverseRegistry {
public static void loadNbt(NBTTagCompound tag) {
NBTTagTagList list = tag.getTagList("Dimensions");
for(int z = 0; z < list.size(); z++) {
Dimension dim = Dimension.getByNbt(list.getTag(z));
Dimension dim = Dimension.getByNbt(list.get(z));
if(!REGISTRY.containsKey(dim.getDimensionId()) && !ALIASES.containsKey(dim.getDimensionName()))
register(dim);
}
list = tag.getTagList("Names");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound data = list.getTag(z);
NBTTagCompound data = list.get(z);
String id = data.getString("ID");
// if(BASE_ALIASES.containsKey(id)) {
Dimension dim = ALIASES.get(id);
@ -113,7 +113,7 @@ public abstract class UniverseRegistry {
list = tag.getTagList("Sectors");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound data = list.getTag(z);
NBTTagCompound data = list.get(z);
String id = data.getString("ID");
Sector sector = SECTORS.get(id);
if(sector == null)
@ -123,7 +123,7 @@ public abstract class UniverseRegistry {
list = tag.getTagList("Galaxies");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound data = list.getTag(z);
NBTTagCompound data = list.get(z);
String id = data.getString("ID");
Galaxy galaxy = GALAXIES.get(id);
if(galaxy == null)
@ -133,7 +133,7 @@ public abstract class UniverseRegistry {
list = tag.getTagList("Domains");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound data = list.getTag(z);
NBTTagCompound data = list.get(z);
String id = data.getString("ID");
Domain domain = DOMAINS.get(id);
if(domain == null)
@ -143,7 +143,7 @@ public abstract class UniverseRegistry {
list = tag.getTagList("Barycenters");
for(int z = 0; z < list.size(); z++) {
NBTTagCompound link = list.getTag(z);
NBTTagCompound link = list.get(z);
if(!assign(link.getString("Celestial"), link.getString("Center")))
Log.TICK.warn("Konnte '" + link.getString("Celestial") + "' nicht zu '" + link.getString("Center") + "' zuweisen");
}

View file

@ -489,7 +489,7 @@ public class InventoryPlayer implements IInventory
for (int i = 0; i < nbtTagListIn.size(); ++i)
{
NBTTagCompound nbttagcompound = nbtTagListIn.getTag(i);
NBTTagCompound nbttagcompound = nbtTagListIn.get(i);
int j = nbttagcompound.getByte("Slot") & 255;
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound);

View file

@ -30,7 +30,7 @@ public class InventoryWarpChest extends InventoryBasic
for (int k = 0; k < p_70486_1_.size(); ++k)
{
NBTTagCompound nbttagcompound = p_70486_1_.getTag(k);
NBTTagCompound nbttagcompound = p_70486_1_.get(k);
int j = nbttagcompound.getByte("Slot") & 255;
if (j >= 0 && j < this.getSizeInventory())

View file

@ -104,7 +104,7 @@ public class ItemBanner extends ItemBlock
for (int i = 0; i < nbttaglist.size() && i < 6; ++i)
{
NBTTagCompound nbttagcompound1 = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound1 = nbttaglist.get(i);
DyeColor enumdyecolor = DyeColor.byDyeDamage(nbttagcompound1.getInt("Color"));
TileEntityBanner.EnumBannerPattern pattern = TileEntityBanner.EnumBannerPattern.getPatternByID(nbttagcompound1.getString("Pattern"));

View file

@ -66,8 +66,8 @@ public class ItemEnchantedBook extends Item
{
for (int i = 0; i < nbttaglist.size(); ++i)
{
int j = nbttaglist.getTag(i).getShort("id");
int k = nbttaglist.getTag(i).getShort("lvl");
int j = nbttaglist.get(i).getShort("id");
int k = nbttaglist.get(i).getShort("lvl");
if (Enchantment.getEnchantmentById(j) != null)
{
@ -87,7 +87,7 @@ public class ItemEnchantedBook extends Item
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
if (nbttagcompound.getShort("id") == enchantment.enchantmentobj.effectId)
{

View file

@ -58,7 +58,7 @@ public class ItemFirework extends Item
{
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound1 = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound1 = nbttaglist.get(i);
List<String> list = Lists.<String>newArrayList();
ItemFireworkCharge.addExplosionInfo(nbttagcompound1, list);

View file

@ -848,8 +848,8 @@ public final class ItemStack
{
for (int j = 0; j < nbttaglist.size(); ++j)
{
int k = nbttaglist.getTag(j).getShort("id");
int l = nbttaglist.getTag(j).getShort("lvl");
int k = nbttaglist.get(j).getShort("id");
int l = nbttaglist.get(j).getShort("lvl");
if (Enchantment.getEnchantmentById(k) != null)
{
@ -1063,7 +1063,7 @@ public final class ItemStack
boolean changed = false;
NBTTagCompound tag;
for(int z = 0; z < oldEnch.size(); z++) {
tag = oldEnch.getTag(z);
tag = oldEnch.get(z);
if(tag.getShort("id") != ench.effectId) {
newEnch.add(tag);
}

View file

@ -440,7 +440,7 @@ public class NBTParser
throw new NBTException("Type cannot be put in a list: " + jsontonbt$any.json);
}
}
nbttaglist.add(tag);
nbttaglist.addElem(tag);
}
return nbttaglist;

View file

@ -17,11 +17,11 @@ public class NBTTagDoubleList extends NBTTagList<NBTTagDouble> {
return new NBTTagDouble(0.0);
}
public double getDouble(int index) {
return this.get(index).getDouble();
public double get(int index) {
return this.getElem(index).getDouble();
}
public void add(double value) {
this.add(new NBTTagDouble(value));
this.addElem(new NBTTagDouble(value));
}
}

View file

@ -17,11 +17,11 @@ public class NBTTagFloatList extends NBTTagList<NBTTagFloat> {
return new NBTTagFloat(0.0f);
}
public float getFloat(int index) {
return this.get(index).getFloat();
public float get(int index) {
return this.getElem(index).getFloat();
}
public void add(float value) {
this.add(new NBTTagFloat(value));
this.addElem(new NBTTagFloat(value));
}
}

View file

@ -17,11 +17,11 @@ public class NBTTagIntArrayList extends NBTTagList<NBTTagIntArray> {
return new NBTTagIntArray(new int[0]);
}
public int[] getIntArray(int index) {
return this.get(index).getIntArray();
public int[] get(int index) {
return this.getElem(index).getIntArray();
}
public void add(int[] value) {
this.add(new NBTTagIntArray(value));
this.addElem(new NBTTagIntArray(value));
}
}

View file

@ -48,11 +48,11 @@ abstract class NBTTagList<K extends NBTBase> extends NBTBase {
return sb.append(']').toString();
}
protected void add(K tag) {
protected void addElem(K tag) {
this.list.add(tag);
}
public void set(int index, K tag) {
protected void set(int index, K tag) {
if(index < 0 || index >= this.list.size()) {
Log.IO.error("Index außerhalb des Bereiches um Tag in Tag-Liste zu setzen");
return;
@ -60,15 +60,15 @@ abstract class NBTTagList<K extends NBTBase> extends NBTBase {
this.list.set(index, tag);
}
public K remove(int index) {
return this.list.remove(index);
public void remove(int index) {
this.list.remove(index);
}
public boolean isEmpty() {
return this.list.isEmpty();
}
protected K get(int index) {
protected K getElem(int index) {
return index >= 0 && index < this.list.size() ? this.list.get(index) : this.getDefault();
}

View file

@ -17,11 +17,11 @@ public class NBTTagStringList extends NBTTagList<NBTTagString> {
return new NBTTagString("");
}
public String getString(int index) {
return this.get(index).getString();
public String get(int index) {
return this.getElem(index).getString();
}
public void add(String value) {
this.add(new NBTTagString(value));
this.addElem(new NBTTagString(value));
}
}

View file

@ -17,11 +17,11 @@ public class NBTTagTagList extends NBTTagList<NBTTagCompound> {
return new NBTTagCompound();
}
public NBTTagCompound getTag(int index) {
return this.get(index);
public NBTTagCompound get(int index) {
return this.getElem(index);
}
public void add(NBTTagCompound value) {
super.add(value);
this.addElem(value);
}
}

View file

@ -164,7 +164,7 @@ public class TileEntityBanner extends TileEntity
{
for (int i = 0; i < this.patterns.size(); ++i)
{
NBTTagCompound nbttagcompound = this.patterns.getTag(i);
NBTTagCompound nbttagcompound = this.patterns.get(i);
TileEntityBanner.EnumBannerPattern tileentitybanner$enumbannerpattern = TileEntityBanner.EnumBannerPattern.getPatternByID(nbttagcompound.getString("Pattern"));
if (tileentitybanner$enumbannerpattern != null)

View file

@ -235,7 +235,7 @@ public class TileEntityBrewingStand extends TileEntityLockable implements ITicka
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot");
if (j >= 0 && j < this.brewingItemStacks.length)

View file

@ -174,7 +174,7 @@ public class TileEntityChest extends TileEntityLockable implements ITickable, II
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot") & 255;
if (j >= 0 && j < this.chestContents.length)

View file

@ -160,7 +160,7 @@ public class TileEntityDispenser extends TileEntityLockable implements IInventor
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot") & 255;
if (j >= 0 && j < this.stacks.length)

View file

@ -164,7 +164,7 @@ public class TileEntityFurnace extends TileEntityLockable implements ITickable,
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot");
if (j >= 0 && j < this.furnaceItemStacks.length)

View file

@ -45,7 +45,7 @@ public class TileEntityHopper extends TileEntityLockable implements IHopper, ITi
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot");
if (j >= 0 && j < this.inventory.length)

View file

@ -85,7 +85,7 @@ public abstract class TileEntityMachine extends TileEntityLockable implements IH
NBTTagTagList nbttaglist = compound.getTagList("Items");
this.clear();
for(int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
int j = nbttagcompound.getByte("Slot");
if(j >= 0 && j < this.inventory.length) {
@ -98,7 +98,7 @@ public abstract class TileEntityMachine extends TileEntityLockable implements IH
res.reset();
}
for(int i = 0; i < nbttaglist.size() && i < this.inventory.length; ++i) {
this.resources[i].readFromNbt(nbttaglist.getTag(i));
this.resources[i].readFromNbt(nbttaglist.get(i));
}
// this.isCreative = compound.getBoolean("Creative");

View file

@ -57,7 +57,7 @@ public class MerchantRecipeList extends ArrayList<MerchantRecipe> {
public void fromNbt(NBTTagTagList list) {
this.clear();
for(int z = 0; z < list.size(); z++) {
this.add(new MerchantRecipe(list.getTag(z)));
this.add(new MerchantRecipe(list.get(z)));
}
}

View file

@ -222,7 +222,7 @@ public class Village
for (int i = 0; i < nbttaglist.size(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getTag(i);
NBTTagCompound nbttagcompound = nbttaglist.get(i);
VillageDoorInfo villagedoorinfo = new VillageDoorInfo(new BlockPos(nbttagcompound.getInt("X"), nbttagcompound.getInt("Y"), nbttagcompound.getInt("Z")), nbttagcompound.getInt("IDX"), nbttagcompound.getInt("IDZ"), nbttagcompound.getInt("TS"));
this.doors.add(villagedoorinfo);
}

View file

@ -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);
}

View file

@ -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);

View file

@ -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);

View file

@ -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")) {

View file

@ -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()));
}

View file

@ -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)));
}
}
}

View file

@ -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);