From 5db6213f34318031ece7e2a6765f69564b671891 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 8 Oct 2013 19:20:49 +0100 Subject: Initial Metadata Commit [SEE DESC] + Pigs, Minecarts, Sheep, Skeletons, Slimes, Villagers, Wolves, and Horses have metadata + Base code on taming wolves, shearing sheep, and taming horses + Sheep and horses have different colours when spawned --- source/Protocol/Protocol125.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source/Protocol/Protocol125.h') diff --git a/source/Protocol/Protocol125.h b/source/Protocol/Protocol125.h index c5c8cd1a0..7b493881b 100644 --- a/source/Protocol/Protocol125.h +++ b/source/Protocol/Protocol125.h @@ -142,11 +142,8 @@ protected: /// Parses one item, "slot" as the protocol wiki calls it, from m_ReceivedData; returns the usual ParsePacket() codes virtual int ParseItem(cItem & a_Item); - /// Returns the entity metadata representation - AString GetEntityMetaData(const cEntity & a_Entity); - - /// Returns the entity common metadata, index 0 (generic flags) - char GetEntityMetadataFlags(const cEntity & a_Entity); + /// Writes the entity metadata + void WriteMetadata(const cEntity & a_Entity); } ; -- cgit v1.2.3 From d7b2c534fd2e272c328b176432c922fd11a7cd85 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 11 Oct 2013 00:41:54 +0100 Subject: Third round of fixes * Split WriteMetadata into three functions for common, entity, and mob * Edited a few mob sizes to Vanilla values --- source/Protocol/Protocol125.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/Protocol/Protocol125.h') diff --git a/source/Protocol/Protocol125.h b/source/Protocol/Protocol125.h index 7b493881b..ae198780c 100644 --- a/source/Protocol/Protocol125.h +++ b/source/Protocol/Protocol125.h @@ -142,8 +142,14 @@ protected: /// Parses one item, "slot" as the protocol wiki calls it, from m_ReceivedData; returns the usual ParsePacket() codes virtual int ParseItem(cItem & a_Item); - /// Writes the entity metadata - void WriteMetadata(const cEntity & a_Entity); + /// Writes the COMMON entity metadata + void WriteCommonMetadata(const cEntity & a_Entity); + + /// Writes normal entity metadata + void WriteEntityMetadata(const cEntity & a_Entity); + + /// Writes mobile entity metadata + void WriteMobMetadata(const cMonster & a_Mob); } ; -- cgit v1.2.3