mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
Merge branch 'stable' of https://github.com/pmmp/pocketmine-mp into stable
This commit is contained in:
commit
a43b46a93c
@ -50,6 +50,14 @@ class Bucket extends Item implements MaybeConsumable{
|
|||||||
return 0;
|
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{
|
public function onActivate(Player $player, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector) : bool{
|
||||||
$resultBlock = BlockFactory::get($this->meta);
|
$resultBlock = BlockFactory::get($this->meta);
|
||||||
|
|
||||||
|
@ -655,6 +655,16 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
return 0;
|
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.
|
* Returns how many points of damage this item will deal to an entity when used as a weapon.
|
||||||
*/
|
*/
|
||||||
|
@ -152,8 +152,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->burnTime > 0 and $ev->isBurning()){
|
if($this->burnTime > 0 and $ev->isBurning()){
|
||||||
$fuel->pop();
|
$this->inventory->setFuel($fuel->getFuelResidue());
|
||||||
$this->inventory->setFuel($fuel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ curl -sSL https://github.com/php/pecl-file_formats-yaml/archive/2.2.0.tar.gz | t
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -march=x86-64"
|
CFLAGS="$CFLAGS -march=x86-64"
|
||||||
CXXFLAGS="CXXFLAGS -march=x86-64"
|
CXXFLAGS="$CXXFLAGS -march=x86-64"
|
||||||
|
|
||||||
./buildconf --force
|
./buildconf --force
|
||||||
./configure \
|
./configure \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user