chraft / c-raft

Project has been retired! -- C#raft the open source c# minecraft server
http://www.c-raft.com
GNU Affero General Public License v3.0
102 stars 43 forks source link

1.0 Update: Slot DataType Change for Enchanted Items #99

Open ementalo opened 13 years ago

ementalo commented 13 years ago

Four packets changed: 0x0F player block placement 0x66 window click 0x67 set slot 0x68 window items 0x6B Create Inventory

This change affects the "slot" datatype. This type consists of at least a short (item_id). If this id isn't -1, a byte (count) and a short (uses) follow.

From 1.9pre2 onward, additional data is sent but only for https://gist.github.com/1268479 This means the protocol is no longer context free.

The additional data is at least a short. If this short isn't -1, a byte[] array follows, containing gzipped NBT data

The format of the NBT is as follows COMPOUND LIST: 'ench' SHORT: 'id' SHORT: 'lvl' END END

Smjert commented 12 years ago

Partially fixed in commit https://github.com/chraft/c-raft/commit/3b5f1e664bf63fb4257f52d46960ecdcbecae8c4 Referred also into issue #146.