mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Merge branch 'master' into pr
This commit is contained in:
commit
c3a8ecaeb0
359 changed files with 3109 additions and 3222 deletions
|
|
@ -3,16 +3,16 @@
|
|||
class EntityEventPacket extends RakNetDataPacket{
|
||||
public $eid;
|
||||
public $event;
|
||||
|
||||
|
||||
const ENTITY_DAMAGE = 2;
|
||||
const ENTITY_DEAD = 3;
|
||||
const ENTITY_ANIM_10 = 10;
|
||||
|
||||
|
||||
public function __construct($eid = null, $event = null){
|
||||
$this->eid = $eid;
|
||||
$this->event = $event;
|
||||
}
|
||||
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ENTITY_EVENT_PACKET;
|
||||
|
|
@ -25,12 +25,12 @@ class EntityEventPacket extends RakNetDataPacket{
|
|||
}
|
||||
return ProtocolInfo::ENTITY_EVENT_PACKET;
|
||||
}
|
||||
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getInt();
|
||||
$this->event = $this->getByte();
|
||||
}
|
||||
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->eid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue