mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Fixed spawn eggs & buckets on creative ,pde
This commit is contained in:
@@ -37,19 +37,25 @@ class BucketItem extends Item{
|
||||
if($this->meta === AIR){
|
||||
if($target instanceof LiquidBlock){
|
||||
$level->setBlock($target, new AirBlock());
|
||||
$this->meta = ($target instanceof WaterBlock) ? WATER:LAVA;
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$this->meta = ($target instanceof WaterBlock) ? WATER:LAVA;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}elseif($this->meta === WATER){
|
||||
if($block->getID() === AIR){
|
||||
$level->setBlock($block, new StillWaterBLock());
|
||||
$this->meta = 0;
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$this->meta = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}elseif($this->meta === LAVA){
|
||||
if($block->getID() === AIR){
|
||||
$level->setBlock($block, new StillLavaBlock());
|
||||
$this->meta = 0;
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$this->meta = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -45,7 +45,9 @@ class SpawnEggItem extends Item{
|
||||
);
|
||||
$e = ServerAPI::request()->api->entity->add($block->level, ENTITY_MOB, $this->meta, $data);
|
||||
ServerAPI::request()->api->entity->spawnToAll($e);
|
||||
--$this->count;
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
--$this->count;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user