mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
baby entities can spawn from eggs, minecarts
This commit is contained in:
parent
f5160df26f
commit
ea3ed14f8e
8 changed files with 146 additions and 6 deletions
|
|
@ -78,7 +78,7 @@ abstract class ProtocolInfo{
|
|||
const HURT_ARMOR_PACKET = 0xa6;
|
||||
const SET_ENTITY_DATA_PACKET = 0xa7;
|
||||
const SET_ENTITY_MOTION_PACKET = 0xa8;
|
||||
//const SET_ENTITY_LINK_PACKET = 0xa9;
|
||||
const SET_ENTITY_LINK_PACKET = 0xa9;
|
||||
const SET_HEALTH_PACKET = 0xaa;
|
||||
const SET_SPAWN_POSITION_PACKET = 0xab;
|
||||
const ANIMATE_PACKET = 0xac;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
class InteractPacket extends RakNetDataPacket{
|
||||
const ACTION_HOLD = 1; //HOLD CLICK ON ENTITY
|
||||
const ACTION_ATTACK = 2; //SIMPLE CLICK(ATTACK)
|
||||
|
||||
const ACTION_VEHICLE_EXIT = 3; //EXIT FROM ENTITY(MINECART)
|
||||
public $action;
|
||||
public $eid;
|
||||
public $target;
|
||||
|
|
|
|||
29
src/network/protocol/packet/SetEntityLinkPacket.php
Normal file
29
src/network/protocol/packet/SetEntityLinkPacket.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/*
|
||||
Lets hope it will work
|
||||
*/
|
||||
class SetEntityLinkPacket extends RakNetDataPacket{
|
||||
|
||||
const TYPE_REMOVE = 0;
|
||||
const TYPE_RIDE = 1;
|
||||
const TYPE_PASSENGER = 2;
|
||||
|
||||
public $rider;
|
||||
public $riding;
|
||||
public $type;
|
||||
public function decode() {
|
||||
|
||||
}
|
||||
public function encode() {
|
||||
$this->reset();
|
||||
$this->putLong($this->rider);
|
||||
$this->putLong($this->riding);
|
||||
$this->putByte($this->type);
|
||||
}
|
||||
|
||||
|
||||
public function pid(){
|
||||
return ProtocolInfo::SET_ENTITY_LINK_PACKET;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -346,6 +346,8 @@ class RakNetParser{
|
|||
case ProtocolInfo::ENTITY_DATA_PACKET:
|
||||
$data = new EntityDataPacket;
|
||||
break;
|
||||
case ProtocolInfo::SET_ENTITY_LINK_PACKET:
|
||||
$data = new SetEntityLinkPacket;
|
||||
default:
|
||||
$data = new UnknownPacket();
|
||||
$data->packetID = $pid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue