mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
PMF & Multiworld [part 2]
This commit is contained in:
parent
9b212ae034
commit
5938747083
39 changed files with 239 additions and 301 deletions
|
|
@ -32,9 +32,9 @@ class BucketItem extends Item{
|
|||
$this->maxStackSize = 1;
|
||||
}
|
||||
|
||||
public function onActivate(BlockAPI $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($target->getID() === STILL_WATER or $target->getID() === STILL_LAVA){
|
||||
$level->setBlock($target, AIR, 0);
|
||||
$level->setBlock($target, new AirBlock());
|
||||
$player->removeItem($this->getID(), $this->getMetadata(), $this->count);
|
||||
$player->addItem(($target->getID() === STILL_LAVA ? LAVA_BUCKET:WATER_BUCKET), 0, 1);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue