From 06819595b0a5366711bb4aa156a2198650e5c0ff Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 23 Apr 2014 15:25:10 -0700 Subject: Fixed references to renamed files. --- src/WorldStorage/NBTChunkSerializer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 415693ae2..b6c14db9c 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -39,7 +39,7 @@ #include "../Mobs/Creeper.h" #include "../Mobs/Enderman.h" #include "../Mobs/Horse.h" -#include "../Mobs/Magmacube.h" +#include "../Mobs/MagmaCube.h" #include "../Mobs/Sheep.h" #include "../Mobs/Slime.h" #include "../Mobs/Skeleton.h" -- cgit v1.2.3 From 62e5234535d1825b152c882fdaea9d2257194e6d Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 24 Apr 2014 20:25:03 -0700 Subject: Small changes; warning fixing. --- src/WorldStorage/NBTChunkSerializer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index b6c14db9c..27631eded 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -621,10 +621,10 @@ void cNBTChunkSerializer::AddHangingEntity(cHangingEntity * a_Hanging) m_Writer.AddInt("TileZ", a_Hanging->GetTileZ()); switch (a_Hanging->GetDirection()) { - case 0: m_Writer.AddByte("Dir", (unsigned char)2); break; - case 1: m_Writer.AddByte("Dir", (unsigned char)1); break; - case 2: m_Writer.AddByte("Dir", (unsigned char)0); break; - case 3: m_Writer.AddByte("Dir", (unsigned char)3); break; + case BLOCK_FACE_YM: m_Writer.AddByte("Dir", (unsigned char)2); break; + case BLOCK_FACE_YP: m_Writer.AddByte("Dir", (unsigned char)1); break; + case BLOCK_FACE_ZM: m_Writer.AddByte("Dir", (unsigned char)0); break; + case BLOCK_FACE_ZP: m_Writer.AddByte("Dir", (unsigned char)3); break; } } -- cgit v1.2.3 From 49f6819829b437f776ea08f50c92cc506ee9ddcb Mon Sep 17 00:00:00 2001 From: Howaner Date: Sat, 26 Apr 2014 16:44:15 +0200 Subject: Fixes --- src/WorldStorage/NBTChunkSerializer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index b6c14db9c..46c6b8e92 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -516,7 +516,7 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster) } case cMonster::mtWither: { - m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetNumInvulnerableTicks()); + m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetWitherInvulnerableTicks()); break; } case cMonster::mtWolf: -- cgit v1.2.3 From d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sat, 26 Apr 2014 17:47:25 +0200 Subject: Changed the old invulnerable methods from the wither to the new. --- src/WorldStorage/NBTChunkSerializer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 46c6b8e92..0c4a1a430 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -516,7 +516,14 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster) } case cMonster::mtWither: { - m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetWitherInvulnerableTicks()); + if (((const cWither *)a_Monster)->IsSpawnInvulnerable()) + { + m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetInvulnerableTicks()); + } + else + { + m_Writer.AddInt("Invul", 0); + } break; } case cMonster::mtWolf: -- cgit v1.2.3 From aef2c8ec628aa2522364da1333bc5158e55ac6a2 Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 26 Apr 2014 09:21:49 -0700 Subject: Further refactored, Reverted Minecart change Other small changes. --- src/WorldStorage/NBTChunkSerializer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 27631eded..773954f73 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -621,10 +621,10 @@ void cNBTChunkSerializer::AddHangingEntity(cHangingEntity * a_Hanging) m_Writer.AddInt("TileZ", a_Hanging->GetTileZ()); switch (a_Hanging->GetDirection()) { - case BLOCK_FACE_YM: m_Writer.AddByte("Dir", (unsigned char)2); break; - case BLOCK_FACE_YP: m_Writer.AddByte("Dir", (unsigned char)1); break; - case BLOCK_FACE_ZM: m_Writer.AddByte("Dir", (unsigned char)0); break; - case BLOCK_FACE_ZP: m_Writer.AddByte("Dir", (unsigned char)3); break; + case BLOCK_FACE_YM: m_Writer.AddByte("Dir", (unsigned char)2); break; + case BLOCK_FACE_YP: m_Writer.AddByte("Dir", (unsigned char)1); break; + case BLOCK_FACE_ZM: m_Writer.AddByte("Dir", (unsigned char)0); break; + case BLOCK_FACE_ZP: m_Writer.AddByte("Dir", (unsigned char)3); break; } } -- cgit v1.2.3 From 477b3e7861ca03aec5c46b4c192f5cc1b5f07c4d Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 26 Apr 2014 16:45:39 -0700 Subject: Moved cArrowEntity out of ProjectileEntity.h --- src/WorldStorage/NBTChunkSerializer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 773954f73..02ced7038 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -28,7 +28,7 @@ #include "../Entities/Boat.h" #include "../Entities/Minecart.h" #include "../Entities/Pickup.h" -#include "../Entities/ProjectileEntity.h" +#include "../Entities/ProjectileArrow.h" #include "../Entities/TNTEntity.h" #include "../Entities/ExpOrb.h" #include "../Entities/HangingEntity.h" -- cgit v1.2.3 From 9b0cb3fd97701370915a9a5b3d5b237fa7f90e06 Mon Sep 17 00:00:00 2001 From: archshift Date: Sun, 27 Apr 2014 17:03:06 -0700 Subject: Fixed projectile source filenames, indentations --- src/WorldStorage/NBTChunkSerializer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 02ced7038..41e0d89fd 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -28,7 +28,7 @@ #include "../Entities/Boat.h" #include "../Entities/Minecart.h" #include "../Entities/Pickup.h" -#include "../Entities/ProjectileArrow.h" +#include "../Entities/ArrowEntity.h" #include "../Entities/TNTEntity.h" #include "../Entities/ExpOrb.h" #include "../Entities/HangingEntity.h" -- cgit v1.2.3 From 26e935cb2028e041623424d474ccf1b127d55e97 Mon Sep 17 00:00:00 2001 From: Howaner Date: Mon, 28 Apr 2014 13:51:22 +0200 Subject: Revert "Changed the old invulnerable methods from the wither to the new." This reverts commit d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34. --- src/WorldStorage/NBTChunkSerializer.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/WorldStorage/NBTChunkSerializer.cpp') diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 0c4a1a430..46c6b8e92 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -516,14 +516,7 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster) } case cMonster::mtWither: { - if (((const cWither *)a_Monster)->IsSpawnInvulnerable()) - { - m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetInvulnerableTicks()); - } - else - { - m_Writer.AddInt("Invul", 0); - } + m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetWitherInvulnerableTicks()); break; } case cMonster::mtWolf: -- cgit v1.2.3