mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Fixed a bucket of lava disappearing when used in a furnace (#3973)
fixes #2385
This commit is contained in:
@ -50,6 +50,14 @@ class Bucket extends Item implements MaybeConsumable{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getFuelResidue() : Item{
|
||||
if($this->meta === Block::LAVA or $this->meta === Block::FLOWING_LAVA){
|
||||
return ItemFactory::get(Item::BUCKET);
|
||||
}
|
||||
|
||||
return parent::getFuelResidue();
|
||||
}
|
||||
|
||||
public function onActivate(Player $player, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector) : bool{
|
||||
$resultBlock = BlockFactory::get($this->meta);
|
||||
|
||||
|
@ -655,6 +655,16 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an item after burning fuel
|
||||
*/
|
||||
public function getFuelResidue() : Item{
|
||||
$item = clone $this;
|
||||
$item->pop();
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns how many points of damage this item will deal to an entity when used as a weapon.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user