From 410d6c00453f2207ddb7a184590251b62b4769fa Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Sun, 27 Sep 2020 19:02:16 +0200 Subject: Fixing Mob spawner behaviour (#4930) * fixed mob spawner failure (whoopsie in the BlockEntity.GetChunkZ()) Style * fixed spawning behaviour * fixed saving entity type saving * checkstyle * removed debug log * removed short saving * Style Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang --- src/BlockEntities/BlockEntity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockEntities/BlockEntity.h') diff --git a/src/BlockEntities/BlockEntity.h b/src/BlockEntities/BlockEntity.h index 1933ed891..c133c186c 100644 --- a/src/BlockEntities/BlockEntity.h +++ b/src/BlockEntities/BlockEntity.h @@ -122,7 +122,7 @@ public: cWorld * GetWorld() const { return m_World; } int GetChunkX() const { return FAST_FLOOR_DIV(m_Pos.x, cChunkDef::Width); } - int GetChunkZ() const { return FAST_FLOOR_DIV(m_Pos.y, cChunkDef::Width); } + int GetChunkZ() const { return FAST_FLOOR_DIV(m_Pos.z, cChunkDef::Width); } int GetRelX() const { return m_RelX; } int GetRelZ() const { return m_RelZ; } -- cgit v1.2.3