1
0

first changes for enchanting (not finished)

- added enchanting table block handler and added it to the blockhandler
- added enchanting window
- drop item in the slot 0 when the player close the window
- added enchanting packet (1.7 only)
- some more...
This commit is contained in:
daniel0916
2014-01-20 18:22:08 +01:00
parent 2407a67906
commit 0c2b307eab
8 changed files with 198 additions and 0 deletions

View File

@@ -1143,6 +1143,7 @@ bool cProtocol172::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
case 0x0e: HandlePacketWindowClick (a_ByteBuffer); return true;
case 0x0f: // Confirm transaction - not used in MCS
case 0x10: HandlePacketCreativeInventoryAction(a_ByteBuffer); return true;
case 0x11: HandlePacketEnchanting (a_ByteBuffer); return true;
case 0x12: HandlePacketUpdateSign (a_ByteBuffer); return true;
case 0x13: HandlePacketPlayerAbilities (a_ByteBuffer); return true;
case 0x14: HandlePacketTabComplete (a_ByteBuffer); return true;
@@ -1545,6 +1546,22 @@ void cProtocol172::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
void cProtocol172::HandlePacketEnchanting(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadByte, Byte, WindowID);
HANDLE_READ(a_ByteBuffer, ReadByte, Byte, Enchantment);
//TODO: EnchantItem (getWindow, getItem, Enchant)
LOG("Enchantment Paket empfangen!");
}
void cProtocol172::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadChar, char, WindowID);