mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 15:36:08 +00:00
Cleaned up fuel duration handling, fixed some fuel items not working in furnaces
This commit is contained in:
@@ -718,6 +718,14 @@ class Block extends Position implements BlockIds, Metadatable{
|
||||
return $this->getHardness() !== -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the time in ticks which the block will fuel a furnace for.
|
||||
* @return int
|
||||
*/
|
||||
public function getFuelTime() : int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Block on the side $side, works like Vector3::side()
|
||||
*
|
||||
|
@@ -52,4 +52,8 @@ class Bookshelf extends Solid{
|
||||
];
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
|
||||
}
|
@@ -174,4 +174,8 @@ class Chest extends Transparent{
|
||||
[$this->id, 0, 1],
|
||||
];
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
@@ -55,4 +55,8 @@ class Coal extends Solid{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 16000;
|
||||
}
|
||||
}
|
@@ -60,4 +60,8 @@ class CraftingTable extends Solid{
|
||||
[$this->id, 0, 1],
|
||||
];
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
@@ -38,4 +38,8 @@ class DaylightSensor extends Transparent{
|
||||
public function getHardness(){
|
||||
return 0.2;
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
@@ -88,4 +88,8 @@ class Fence extends Transparent{
|
||||
return ($block instanceof Fence or $block instanceof FenceGate) ? true : $block->isSolid() and !$block->isTransparent();
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -92,4 +92,8 @@ class FenceGate extends Transparent{
|
||||
$this->level->addSound(new DoorSound($this));
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
@@ -34,4 +34,8 @@ class NoteBlock extends Solid{
|
||||
public function getName(){
|
||||
return "Note Block";
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
@@ -59,4 +59,8 @@ class Planks extends Solid{
|
||||
return $names[$this->meta & 0x07] ?? "Unknown";
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -112,4 +112,8 @@ class Sapling extends Flowable{
|
||||
[$this->id, $this->meta & 0x07, 1],
|
||||
];
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 100;
|
||||
}
|
||||
}
|
@@ -75,4 +75,8 @@ class StoneSlab extends WoodenSlab{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 0;
|
||||
}
|
||||
}
|
@@ -156,4 +156,8 @@ class Trapdoor extends Transparent{
|
||||
public function getToolType(){
|
||||
return Tool::TYPE_AXE;
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
@@ -78,4 +78,8 @@ class Wood extends Solid{
|
||||
public function getToolType(){
|
||||
return Tool::TYPE_AXE;
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
@@ -34,4 +34,8 @@ class WoodenPressurePlate extends StonePressurePlate{
|
||||
public function getName(){
|
||||
return "Wooden Pressure Plate";
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
@@ -134,4 +134,8 @@ class WoodenSlab extends Transparent{
|
||||
[$this->id, $this->meta & 0x07, 1],
|
||||
];
|
||||
}
|
||||
|
||||
public function getFuelTime() : int{
|
||||
return 300;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user