mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
small changes
This commit is contained in:
parent
551ae19d7f
commit
fa41b2ed65
1 changed files with 12 additions and 6 deletions
|
|
@ -585,17 +585,23 @@ class Entity extends Position{
|
||||||
5 -> array(Short, Byte, Short)
|
5 -> array(Short, Byte, Short)
|
||||||
6 -> arry(Integer, Integer, Integer)
|
6 -> arry(Integer, Integer, Integer)
|
||||||
******************
|
******************
|
||||||
0 => array("type" => 0, "value" => $flags) --> Unknown
|
0 => array("type" => 0, "value" => $flags) --> DATA_FLAGS
|
||||||
1 => array("type" => 1, "value" => $this->air) --> Entity Air
|
1 => array("type" => 1, "value" => $this->air) --> Entity Air
|
||||||
14 => array("type" => 0, "value" => 1) --> IsBaby, value: 0 => false, 1 => true
|
14 => array("type" => 0, "value" => 1) --> IsBaby, value: 0 => false, 1 => true
|
||||||
16 => array("type" => 0, "value" => 0) --> Unknown
|
16 => array("type" => 0, "value" => 0) --> Fuse(TNT), Saddled(Pig)
|
||||||
17 => array("type" => 6, "value" => array(0, 0, 0)) --> Unknown
|
17 => array("type" => 6, "value" => array(0, 0, 0)) --> Bed Position <?>
|
||||||
|
|
||||||
|
|
||||||
|
DATA FLAGS IDS
|
||||||
|
0 - fire
|
||||||
|
1 - crouching
|
||||||
|
4 - inAction(ex.: using a bow)
|
||||||
*/
|
*/
|
||||||
public function getMetadata(){
|
public function getMetadata(){
|
||||||
$flags = 0;
|
$flags = 0;
|
||||||
$flags |= $this->fire > 0 ? 1:0;
|
$flags |= $this->fire > 0 ? 0b1 : 0;
|
||||||
$flags |= ($this->crouched === true ? 0b10:0) << 1;
|
$flags |= ($this->crouched ? 0b1 : 0) << 1;
|
||||||
$flags |= ($this->inAction === true ? 0b10000:0);
|
$flags |= ($this->inAction ? 0b1:0) << 4;
|
||||||
$d = array(
|
$d = array(
|
||||||
0 => array("type" => 0, "value" => $flags),
|
0 => array("type" => 0, "value" => $flags),
|
||||||
1 => array("type" => 1, "value" => $this->air),
|
1 => array("type" => 1, "value" => $this->air),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue