mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
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:
parent
0088f2d86d
commit
4bd682b08e
5 changed files with 43 additions and 16 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue