change nbt format: fix method names
This commit is contained in:
parent
17aad1f023
commit
dda5ac3573
40 changed files with 99 additions and 99 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue