Added Y-wise asserts to signs.
This should help detect #1313's second case.
This commit is contained in:
parent
868723ce50
commit
0a651b9fd8
@ -15,6 +15,7 @@
|
||||
cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, int a_X, int a_Y, int a_Z, cWorld * a_World) :
|
||||
super(a_BlockType, a_X, a_Y, a_Z, a_World)
|
||||
{
|
||||
ASSERT((a_Y >= 0) && (a_Y < cChunkDef::Height));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1355,6 +1355,7 @@ void cProtocol172::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
|
||||
void cProtocol172::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
|
||||
{
|
||||
ASSERT(m_State == 3); // In game mode?
|
||||
ASSERT((a_BlockY >= 0) && (a_BlockY < cChunkDef::Height));
|
||||
|
||||
cPacketizer Pkt(*this, 0x33);
|
||||
Pkt.WriteInt(a_BlockX);
|
||||
|
@ -623,6 +623,8 @@ void cWSSAnvil::LoadBlockEntitiesFromNBT(cBlockEntityList & a_BlockEntities, con
|
||||
|
||||
cBlockEntity * cWSSAnvil::LoadBlockEntityFromNBT(const cParsedNBT & a_NBT, int a_Tag, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
|
||||
{
|
||||
ASSERT((a_BlockY >= 0) && (a_BlockY < cChunkDef::Height));
|
||||
|
||||
// Load the specific BlockEntity type:
|
||||
switch (a_BlockType)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user