public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); this.o(nbttagcompound.getBoolean("EatingHaystack")); this.k(nbttagcompound.getBoolean("Bred")); this.setHasChest(nbttagcompound.getBoolean("ChestedHorse")); this.m(nbttagcompound.getBoolean("HasReproduced")); this.setType(nbttagcompound.getInt("Type")); this.setVariant(nbttagcompound.getInt("Variant")); this.setTemper(nbttagcompound.getInt("Temper")); this.setTame(nbttagcompound.getBoolean("Tame")); if (nbttagcompound.hasKeyOfType("OwnerUUID", 8)) { this.setOwnerUUID(nbttagcompound.getString("OwnerUUID")); } // CraftBukkit start if (nbttagcompound.hasKey("Bukkit.MaxDomestication")) { this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication"); } // CraftBukkit end AttributeInstance attributeinstance = this.bb().a("Speed"); if (attributeinstance != null) { this.getAttributeInstance(GenericAttributes.d).setValue(attributeinstance.b() * 0.25D); } if (this.hasChest()) { NBTTagList nbttaglist = nbttagcompound.getList("Items", 10); this.loadChest(); for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.get(i); int j = nbttagcompound1.getByte("Slot") & 255; if (j >= 2 && j < this.inventoryChest.getSize()) { this.inventoryChest.setItem(j, ItemStack.createStack(nbttagcompound1)); } } } ItemStack itemstack; if (nbttagcompound.hasKeyOfType("ArmorItem", 10)) { itemstack = ItemStack.createStack(nbttagcompound.getCompound("ArmorItem")); if (itemstack != null && a(itemstack.getItem())) { this.inventoryChest.setItem(1, itemstack); } } if (nbttagcompound.hasKeyOfType("SaddleItem", 10)) { itemstack = ItemStack.createStack(nbttagcompound.getCompound("SaddleItem")); if (itemstack != null && itemstack.getItem() == Items.SADDLE) { this.inventoryChest.setItem(0, itemstack); } } else if (nbttagcompound.getBoolean("Saddle")) { this.inventoryChest.setItem(0, new ItemStack(Items.SADDLE)); } this.cO(); }
public void a(NBTTagList nbttaglist) { int i; for (i = 0; i < this.getSize(); ++i) { this.setItem(i, (ItemStack) null); } for (i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.get(i); int j = nbttagcompound.getByte("Slot") & 255; if (j >= 0 && j < this.getSize()) { this.setItem(j, ItemStack.createStack(nbttagcompound)); } } }
public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); NBTTagList nbttaglist = nbttagcompound.getList("Items", 10); this.items = new ItemStack[this.getSize()]; if (nbttagcompound.hasKeyOfType("CustomName", 8)) { this.p = nbttagcompound.getString("CustomName"); } for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.get(i); int j = nbttagcompound1.getByte("Slot") & 255; if (j >= 0 && j < this.items.length) { this.items[j] = ItemStack.createStack(nbttagcompound1); } } }
public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); NBTTagList nbttaglist = nbttagcompound.getList("Items", 10); this.a = new ItemStack[this.getSize()]; if (nbttagcompound.hasKeyOfType("CustomName", 8)) { this.i = nbttagcompound.getString("CustomName"); } this.j = nbttagcompound.getInt("TransferCooldown"); for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.get(i); byte b0 = nbttagcompound1.getByte("Slot"); if (b0 >= 0 && b0 < this.a.length) { this.a[b0] = ItemStack.createStack(nbttagcompound1); } } }