mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +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;
|
||||
}
|
||||
|
||||
if($this->fireTicks <= 0){
|
||||
$this->extinguish();
|
||||
}
|
||||
|
||||
$hasUpdate = true;
|
||||
}
|
||||
|
||||
@ -593,6 +598,11 @@ abstract class Entity extends Position implements Metadatable{
|
||||
if($ticks > $this->fireTicks){
|
||||
$this->fireTicks = $ticks;
|
||||
}
|
||||
|
||||
$this->sendMetadata($this->hasSpawned);
|
||||
if($this instanceof Player){
|
||||
$this->sendMetadata($this);
|
||||
}
|
||||
}
|
||||
|
||||
public function getDirection(){
|
||||
@ -615,6 +625,10 @@ abstract class Entity extends Position implements Metadatable{
|
||||
|
||||
public function extinguish(){
|
||||
$this->fireTicks = 0;
|
||||
$this->sendMetadata($this->hasSpawned);
|
||||
if($this instanceof Player){
|
||||
$this->sendMetadata($this);
|
||||
}
|
||||
}
|
||||
|
||||
public function canTriggerWalking(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user