Updated method names: getMetadata() & setMetadata() to getDamage() & setDamage() on Block and Item classes

This commit is contained in:
Shoghi Cervantes
2014-05-22 18:37:28 +02:00
parent c1546aac9c
commit 0be679c9d5
29 changed files with 101 additions and 81 deletions

View File

@ -84,7 +84,7 @@ class Human extends Creature implements ProjectileSource, InventorySource{
if($item->getID() !== 0 and $item->getCount() > 0){
$this->namedtag->Inventory[$slot] = new Compound(false, array(
new Byte("Count", $item->getCount()),
new Short("Damage", $item->getMetadata()),
new Short("Damage", $item->getDamage()),
new Byte("Slot", $slot),
new Byte("TrueSlot", $this->hotbar[$slot]),
new Short("id", $item->getID()),
@ -108,7 +108,7 @@ class Human extends Creature implements ProjectileSource, InventorySource{
$item = $this->getSlot($slot - 9);
$this->namedtag->Inventory[$slot] = new Compound(false, array(
new Byte("Count", $item->getCount()),
new Short("Damage", $item->getMetadata()),
new Short("Damage", $item->getDamage()),
new Byte("Slot", $slot),
new Short("id", $item->getID()),
));
@ -120,7 +120,7 @@ class Human extends Creature implements ProjectileSource, InventorySource{
if($item instanceof Item){
$this->namedtag->Inventory[$slot] = new Compound(false, array(
new Byte("Count", $item->getCount()),
new Short("Damage", $item->getMetadata()),
new Short("Damage", $item->getDamage()),
new Byte("Slot", $slot),
new Short("id", $item->getID()),
));
@ -209,7 +209,7 @@ class Human extends Creature implements ProjectileSource, InventorySource{
$pk = new PlayerEquipmentPacket;
$pk->eid = $this->id;
$pk->item = $this->getSlot($this->slot)->getID();
$pk->meta = $this->getSlot($this->slot)->getMetadata();
$pk->meta = $this->getSlot($this->slot)->getDamage();
$pk->slot = 0;
$player->dataPacket($pk);
}