mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
sendChat will use different queue to send messages to client, chat messages are now ordered
This commit is contained in:
parent
992b6143cd
commit
75a6b66d29
3 changed files with 60 additions and 16 deletions
|
|
@ -146,7 +146,6 @@ class Entity extends Position
|
|||
$this->name = "";
|
||||
$this->gravity = 0.08;
|
||||
$this->state = $this->data["State"] = $this->data["State"] ?? 0;
|
||||
$this->tickCounter = 0;
|
||||
$this->x = isset($this->data["x"]) ? (float) $this->data["x"] : 0;
|
||||
$this->y = isset($this->data["y"]) ? (float) $this->data["y"] : 0;
|
||||
$this->z = isset($this->data["z"]) ? (float) $this->data["z"] : 0;
|
||||
|
|
|
|||
|
|
@ -41,14 +41,14 @@ class Painting extends Entity{
|
|||
}
|
||||
}
|
||||
|
||||
public $counter = 0;
|
||||
public $scounter = 0;
|
||||
public function update($now){
|
||||
if($this->closed === true){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(++$this->counter >= 100){
|
||||
$this->counter = 0;
|
||||
if(++$this->scounter >= 100){
|
||||
$this->scounter = 0;
|
||||
if(!$this->survives() && !$this->dead){ //maybe dont check entity collision?
|
||||
$this->makeDead("nosurvive");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue