mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added support for more NBT data, renaming inventories, fixed tags not being saved, added support for tags in /give
This commit is contained in:
@ -100,9 +100,15 @@ class CraftingDataPacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
private static function writeEnchant(){
|
||||
private static function writeEnchant($slot, $enchantmentId, $enchantmentLevel, $cost, $name, BinaryStream $stream){
|
||||
//TODO
|
||||
|
||||
$stream->putInt($slot);
|
||||
$stream->putInt($enchantmentId);
|
||||
$stream->putInt($enchantmentLevel);
|
||||
$stream->putInt($cost);
|
||||
$stream->putString($name);
|
||||
|
||||
return CraftingDataPacket::ENTRY_ENCHANT;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ interface Info{
|
||||
/**
|
||||
* Actual Minecraft: PE protocol version
|
||||
*/
|
||||
const CURRENT_PROTOCOL = 32;
|
||||
const CURRENT_PROTOCOL = 33;
|
||||
|
||||
const LOGIN_PACKET = 0x87;
|
||||
const PLAY_STATUS_PACKET = 0x88;
|
||||
|
@ -41,10 +41,10 @@ class TextPacket extends DataPacket{
|
||||
public function decode(){
|
||||
$this->type = $this->getByte();
|
||||
switch($this->type){
|
||||
case self::TYPE_POPUP:
|
||||
case self::TYPE_CHAT:
|
||||
$this->source = $this->getString();
|
||||
case self::TYPE_RAW:
|
||||
case self::TYPE_POPUP:
|
||||
case self::TYPE_TIP:
|
||||
$this->message = $this->getString();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user