curl get requests support custom headers now, event to get content of thread output, shutdown function which saves world if server stopped with error

This commit is contained in:
GameHerobrine 2022-08-12 20:02:00 +03:00
parent 0088f2d86d
commit 4bd682b08e
5 changed files with 43 additions and 16 deletions

View file

@ -541,13 +541,14 @@ class Entity extends Position{
DATA FLAGS IDS
0 - fire
1 - crouching
2 - riding <?> - no idea why doesnt it work
4 - inAction(ex.: using a bow)
*/
public function getMetadata(){
$flags = 0;
$flags |= $this->fire > 0 ? 0b1 : 0;
$flags |= ($this->crouched ? 0b1 : 0) << 1;
$flags |= ($this->inAction ? 0b1:0) << 4;
$flags ^= $this->fire > 0 ? 0b1 : 0;
$flags ^= ($this->crouched ? 0b1 : 0) << 1;
$flags ^= ($this->inAction ? 0b1 : 0) << 4;
$d = array(
0 => array("type" => 0, "value" => $flags),
1 => array("type" => 1, "value" => $this->air),