Renamed old getID() calls to getId()

This commit is contained in:
Shoghi Cervantes
2014-12-07 15:21:32 +01:00
parent f0d6128282
commit a98da3bab1
64 changed files with 228 additions and 228 deletions

View File

@ -41,7 +41,7 @@ class Bucket extends Item{
if($targetBlock instanceof Air){
if($target instanceof Liquid and $target->getDamage() === 0){
$result = clone $this;
$result->setDamage($target->getID());
$result->setDamage($target->getId());
$player->getServer()->getPluginManager()->callEvent($ev = new PlayerBucketFillEvent($player, $block, $face, $this, $result));
if(!$ev->isCancelled()){
$player->getLevel()->setBlock($target, new Air(), true, true);

View File

@ -38,7 +38,7 @@ class FlintSteel extends Tool{
$player->getInventory()->setItemInHand(new Item(Item::AIR, 0, 0));
}
if($block->getID() === self::AIR and ($target instanceof Solid)){
if($block->getId() === self::AIR and ($target instanceof Solid)){
$level->setBlock($block, new Fire(), true);
return true;

View File

@ -519,7 +519,7 @@ class Item{
if(defined(Item::class . "::" . strtoupper($b[0]))){
$item = self::get(constant(Item::class . "::" . strtoupper($b[0])), $meta);
if($item->getID() === self::AIR and strtoupper($b[0]) !== "AIR"){
if($item->getId() === self::AIR and strtoupper($b[0]) !== "AIR"){
$item = self::get(((int) $b[0]) & 0xFFFF, $meta);
}
}else{
@ -656,7 +656,7 @@ class Item{
}
public final function equals(Item $item, $checkDamage = false){
return $this->id === $item->getID() and ($checkDamage === false or $this->getDamage() === $item->getDamage());
return $this->id === $item->getId() and ($checkDamage === false or $this->getDamage() === $item->getDamage());
}
}

View File

@ -29,7 +29,7 @@ use pocketmine\block\Block;
class ItemBlock extends Item{
public function __construct(Block $block, $meta = 0, $count = 1){
$this->block = clone $block;
parent::__construct($block->getID(), $block->getDamage(), $count, $block->getName());
parent::__construct($block->getId(), $block->getDamage(), $count, $block->getName());
}
public function setDamage($meta){

View File

@ -82,7 +82,7 @@ class Painting extends Item{
//$e = $server->api->entity->add($level, ENTITY_OBJECT, OBJECT_PAINTING, $data);
//$e->spawnToAll();
/*if(($player->gamemode & 0x01) === 0x00){
$player->removeItem(Item::get($this->getID(), $this->getDamage(), 1));
$player->removeItem(Item::get($this->getId(), $this->getDamage(), 1));
}*/
return true;

View File

@ -46,7 +46,7 @@ abstract class Tool extends Item{
*/
public function useOn($object){
if($this->isHoe()){
if(($object instanceof Block) and ($object->getID() === self::GRASS or $object->getID() === self::DIRT)){
if(($object instanceof Block) and ($object->getId() === self::GRASS or $object->getId() === self::DIRT)){
$this->meta++;
}
}elseif(($object instanceof Entity) and !$this->isSword()){