diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-10-08 23:21:55 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-10-08 23:21:55 +0200 |
commit | 7401fc000dca2a3ff3ce61776f84e5c2d8eb1868 (patch) | |
tree | 4ba096c6fa039b527139b06b97615906a023e048 /source | |
parent | Initial Metadata Commit [SEE DESC] (diff) | |
download | cuberite-7401fc000dca2a3ff3ce61776f84e5c2d8eb1868.tar cuberite-7401fc000dca2a3ff3ce61776f84e5c2d8eb1868.tar.gz cuberite-7401fc000dca2a3ff3ce61776f84e5c2d8eb1868.tar.bz2 cuberite-7401fc000dca2a3ff3ce61776f84e5c2d8eb1868.tar.lz cuberite-7401fc000dca2a3ff3ce61776f84e5c2d8eb1868.tar.xz cuberite-7401fc000dca2a3ff3ce61776f84e5c2d8eb1868.tar.zst cuberite-7401fc000dca2a3ff3ce61776f84e5c2d8eb1868.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Entities/Entity.h | 44 | ||||
-rw-r--r-- | source/Mobs/Horse.cpp | 2 | ||||
-rw-r--r-- | source/Mobs/Horse.h | 6 | ||||
-rw-r--r-- | source/Protocol/Protocol125.cpp | 8 |
4 files changed, 35 insertions, 25 deletions
diff --git a/source/Entities/Entity.h b/source/Entities/Entity.h index 764c5a64b..fdc047cf9 100644 --- a/source/Entities/Entity.h +++ b/source/Entities/Entity.h @@ -343,7 +343,7 @@ public: virtual bool IsInvisible(void) const {return false; } // Ageables + Tameables - virtual bool IsBabby (void) const {return false; } + virtual bool IsBaby (void) const {return false; } virtual bool IsSitting (void) const {return false; } virtual bool IsTame (void) const {return false; } @@ -356,46 +356,56 @@ public: virtual bool IsFueled (void) const {return false; } // Bat - virtual bool IsHanging (void) const {return false; } + virtual bool IsHanging (void) const {return false; } // Pig - virtual bool IsSaddled (void) const {return false; } + virtual bool IsSaddled (void) const {return false; } // TESTIFICATE - virtual int GetVilType(void) const {return 0; } + virtual int GetVilType (void) const {return 0; } // Zombie - virtual bool IsVillager(void) const {return false; } - virtual bool IsConvert (void) const {return false; } + virtual bool IsVillZomb (void) const {return false; } + virtual bool IsConvert (void) const {return false; } // Ghast - virtual bool IsCharging(void) const {return false; } + virtual bool IsCharging (void) const {return false; } // Arrow - virtual bool IsCritical(void) const {return false; } + virtual bool IsCritical (void) const {return false; } // Wolf - virtual bool IsAngry (void) const {return false; } - virtual bool IsBegging (void) const {return false; } - virtual int GetCollar (void) const {return 0; } + virtual bool IsAngry (void) const {return false; } + virtual bool IsBegging (void) const {return false; } + virtual int GetCollar (void) const {return 0; } // Sheep - virtual int GetFurColor(void) const {return 0; } - virtual bool IsSheared (void) const {return false; } + virtual int GetFurColor (void) const {return 0; } + virtual bool IsSheared (void) const {return false; } // Enderman virtual BLOCKTYPE CarriedBlock (void) const {return E_BLOCK_AIR; } virtual NIBBLETYPE CarriedMeta (void) const {return 0; } - virtual bool IsScream (void) const {return false; } + virtual bool IsScream (void) const {return false; } // Skeleton || Wither Skeleton - virtual bool IsWither (void) const {return false; } + virtual bool IsWither (void) const {return false; } // Witch - virtual bool IsNosey (void) const {return false; } + virtual bool IsNosey (void) const {return false; } // Slimes and Magma cubes - virtual int GetSize (void) const {return 1; } + virtual int GetSize (void) const {return 1; } + + // Horsheys + virtual bool IsChested (void) const {return false; } + virtual bool IsEating (void) const {return false; } + virtual bool IsRearing (void) const {return false; } + virtual bool IsMthOpen (void) const {return false; } + virtual int GetHType (void) const {return 0; } + virtual int GetHColor (void) const {return 0; } + virtual int GetHStyle (void) const {return 0; } + virtual int GetHArmour (void) const {return 0; } // tolua_end diff --git a/source/Mobs/Horse.cpp b/source/Mobs/Horse.cpp index 50eab33cc..ec6154d26 100644 --- a/source/Mobs/Horse.cpp +++ b/source/Mobs/Horse.cpp @@ -11,7 +11,7 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) : super("Horse", 100, "mob.horse.hit", "mob.horse.death", 1.4, 1.6), - m_bIsChested(false), + m_bHasChest(false), m_bIsEating(false), m_bIsRearing(false), m_bIsMouthOpen(false), diff --git a/source/Mobs/Horse.h b/source/Mobs/Horse.h index d950ff1bf..bca2e5327 100644 --- a/source/Mobs/Horse.h +++ b/source/Mobs/Horse.h @@ -1,7 +1,7 @@ #pragma once -#include "AggressiveMonster.h" +#include "PassiveMonster.h" @@ -20,7 +20,7 @@ public: virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override; virtual void Tick(float a_Dt, cChunk & a_Chunk) override; virtual void OnRightClicked(cPlayer & a_Player) override; - bool IsChested (void) const {return m_bIsChested; } + bool IsChested (void) const {return m_bHasChest; } bool IsEating (void) const {return m_bIsEating; } bool IsRearing (void) const {return m_bIsRearing; } bool IsMthOpen (void) const {return m_bIsMouthOpen; } @@ -32,7 +32,7 @@ public: private: - bool m_bIsChested, m_bIsEating, m_bIsRearing, m_bIsMouthOpen, m_bIsTame; + bool m_bHasChest, m_bIsEating, m_bIsRearing, m_bIsMouthOpen, m_bIsTame; int m_Type, m_Color, m_Style, m_Armour, m_TimesToTame, m_TameAttemptTimes; } ; diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 89b2c15ec..e2309c295 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -1638,11 +1638,11 @@ void cProtocol125::WriteMetadata(const cEntity & a_Entity) } if (a_Entity.IsRclking()) { - CommonMetadata |= 0x16; + CommonMetadata |= 0x10; } if (a_Entity.IsInvisible()) { - CommonMetadata |= 0x32; + CommonMetadata |= 0x20; } WriteByte(0x0); @@ -1691,7 +1691,7 @@ void cProtocol125::WriteMetadata(const cEntity & a_Entity) else if (a_Entity.IsA("cZombie")) { WriteByte(0xC); - WriteByte(a_Entity.IsBabby() ? 1 : 0); // Babby zombie? + WriteByte(a_Entity.IsBaby() ? 1 : 0); // Babby zombie? WriteByte(0xD); WriteByte(a_Entity.IsVillZomb() ? 1 : 0); // Converted zombie? WriteByte(0xE); @@ -1784,7 +1784,7 @@ void cProtocol125::WriteMetadata(const cEntity & a_Entity) { Flags |= 0x8; } - if (a_Entity.IsBabby()) + if (a_Entity.IsBaby()) { Flags |= 0x10; // IsBred flag, according to wiki.vg - don't think it does anything in multiplayer } |