mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Show fire to other clients
This commit is contained in:
parent
e9a2f88847
commit
c4a0c759dc
@ -493,6 +493,11 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
}
|
}
|
||||||
--$this->fireTicks;
|
--$this->fireTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->fireTicks <= 0){
|
||||||
|
$this->extinguish();
|
||||||
|
}
|
||||||
|
|
||||||
$hasUpdate = true;
|
$hasUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,6 +598,11 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
if($ticks > $this->fireTicks){
|
if($ticks > $this->fireTicks){
|
||||||
$this->fireTicks = $ticks;
|
$this->fireTicks = $ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->sendMetadata($this->hasSpawned);
|
||||||
|
if($this instanceof Player){
|
||||||
|
$this->sendMetadata($this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDirection(){
|
public function getDirection(){
|
||||||
@ -615,6 +625,10 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
|
|
||||||
public function extinguish(){
|
public function extinguish(){
|
||||||
$this->fireTicks = 0;
|
$this->fireTicks = 0;
|
||||||
|
$this->sendMetadata($this->hasSpawned);
|
||||||
|
if($this instanceof Player){
|
||||||
|
$this->sendMetadata($this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canTriggerWalking(){
|
public function canTriggerWalking(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user