Anvil: Fixed loading block entities with invalid Y coord.
This commit is contained in:
parent
e9dda864ea
commit
254c8c9154
@ -589,7 +589,7 @@ void cWSSAnvil::LoadBlockEntitiesFromNBT(cBlockEntityList & a_BlockEntities, con
|
|||||||
|
|
||||||
// Get the BlockEntity's position
|
// Get the BlockEntity's position
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
if (!GetBlockEntityNBTPos(a_NBT, Child, x, y, z))
|
if (!GetBlockEntityNBTPos(a_NBT, Child, x, y, z) || (y < 0) || (y >= cChunkDef::Height))
|
||||||
{
|
{
|
||||||
LOGWARNING("Bad block entity, missing the coords. Will be ignored.");
|
LOGWARNING("Bad block entity, missing the coords. Will be ignored.");
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user