mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Renamed old getID() calls to getId()
This commit is contained in:
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
@ -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){
|
||||
|
@ -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;
|
||||
|
@ -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()){
|
||||
|
Reference in New Issue
Block a user