From 9cdc10f9af637f4a86ca5475808f8aef841ef0b5 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Tue, 12 Apr 2016 23:26:45 +0200 Subject: [PATCH] fix recipes, fix player_list, fix tile_entity_data (pocketmine is wrong about the player_list, see https://confluence.yawk.at/display/PEPROTOCOL/Game+Packets ) --- data/protocol.json | 129 +++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 69 deletions(-) diff --git a/data/protocol.json b/data/protocol.json index e2c0153..5998ef7 100644 --- a/data/protocol.json +++ b/data/protocol.json @@ -163,65 +163,6 @@ ] } ], - "recipes": [ - "container", - [ - { - "name": "entryType", - "type": "i32" - }, - { - "name": "recipe", - "type": [ - "array", - { - "countType": "i32", - "type": [ - "switch", - { - "compareTo": "entryType", - "fields": { - "0": "shapeless_recipe", - "1": "shaped_recipe", - "2": "furnace_recipe", - "3": "furnace_recipe_data", - "4": "enchant_list" - } - } - ] - } - ] - }, - { - "name": "cleanRecipes", - "type": "i8" - } - ] - ], - "metadataints": [ - "switch", - { - "compareTo": "window_id", - "fields": { - "0": [ - "array", - { - "countType":"i16", - "type": [ - "container", - [ - { - "name": "slot", - "type": "i32" - } - ] - ] - } - ] - }, - "default": "i16" - } - ], "entityMetadataItem": [ "switch", { @@ -351,7 +292,7 @@ }, { "name": "nbtData", - "type": "nbt" + "type": ["buffer",{"countType":"li16"}] } ] ] @@ -1699,7 +1640,30 @@ }, { "name": "hotbar_data", - "type": "metadataints" + "type": [ + "switch", + { + "compareTo": "window_id", + "fields": { + "0": [ + "array", + { + "countType":"i16", + "type": [ + "container", + [ + { + "name": "slot", + "type": "i32" + } + ] + ] + } + ] + }, + "default": "i16" + } + ] } ] ], @@ -1708,7 +1672,38 @@ [ { "name": "recipes", - "type": "recipes" + "type": [ + "container", + [ + { + "name": "entryType", + "type": "i32" + }, + { + "name": "recipe", + "type": [ + "array", + { + "countType": "i32", + "type": [ + "switch", + { + "compareTo": "entryType", + "fields": { + "0": "shapeless_recipe", + "1": "shaped_recipe", + "2": "furnace_recipe", + "3": "furnace_recipe_data", + "4": "enchant_list" + }, + "default":"void" + } + ] + } + ] + } + ] + ] }, { "name": "cleanRecipes", @@ -1767,7 +1762,7 @@ }, { "name": "namedtag", - "type": "nbt" + "type": "restBuffer" } ] ], @@ -1831,12 +1826,8 @@ "type": "string" }, { - "name": "skinType", - "type": "string" - }, - { - "name": "textures", - "type": "string" + "name": "skin", + "type": "skin" } ] ],