mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
cs fix
This commit is contained in:
parent
26cafcab00
commit
1e85a65764
52 changed files with 2400 additions and 2406 deletions
|
|
@ -1,42 +1,42 @@
|
|||
<?php
|
||||
|
||||
class PlaceBlockPacket extends RakNetDataPacket{
|
||||
public $eid;
|
||||
public $x;
|
||||
public $z;
|
||||
public $y;
|
||||
public $block;
|
||||
public $meta;
|
||||
public $face;
|
||||
public $eid;
|
||||
public $x;
|
||||
public $z;
|
||||
public $y;
|
||||
public $block;
|
||||
public $meta;
|
||||
public $face;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::PLACE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL) {
|
||||
return ProtocolInfo12::PLACE_BLOCK_PACKET;
|
||||
}
|
||||
return ProtocolInfo::PLACE_BLOCK_PACKET;
|
||||
}
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::PLACE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL) {
|
||||
return ProtocolInfo12::PLACE_BLOCK_PACKET;
|
||||
}
|
||||
return ProtocolInfo::PLACE_BLOCK_PACKET;
|
||||
}
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getInt();
|
||||
$this->x = $this->getInt();
|
||||
$this->z = $this->getInt();
|
||||
$this->y = $this->getByte();
|
||||
$this->block = $this->getByte();
|
||||
$this->meta = $this->getByte();
|
||||
$this->face = $this->getByte();
|
||||
}
|
||||
public function decode(){
|
||||
$this->eid = $this->getInt();
|
||||
$this->x = $this->getInt();
|
||||
$this->z = $this->getInt();
|
||||
$this->y = $this->getByte();
|
||||
$this->block = $this->getByte();
|
||||
$this->meta = $this->getByte();
|
||||
$this->face = $this->getByte();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->eid);
|
||||
$this->putInt($this->x);
|
||||
$this->putInt($this->z);
|
||||
$this->putByte($this->y);
|
||||
$this->putByte(BlockAPI::convertHighItemIdsToOldItemIds($this->PROTOCOL, $this->block));
|
||||
$this->putByte($this->meta);
|
||||
$this->putByte($this->face);
|
||||
}
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->eid);
|
||||
$this->putInt($this->x);
|
||||
$this->putInt($this->z);
|
||||
$this->putByte($this->y);
|
||||
$this->putByte(BlockAPI::convertHighItemIdsToOldItemIds($this->PROTOCOL, $this->block));
|
||||
$this->putByte($this->meta);
|
||||
$this->putByte($this->face);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue