summaryrefslogtreecommitdiffstats
path: root/src/Map.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-20 15:50:52 +0200
committerGitHub <noreply@github.com>2020-09-20 15:50:52 +0200
commit68cced73afe546328cf94ed07c57deee47bfadec (patch)
tree88be88e3fd4a208b9849e526f1877caa44058ab5 /src/Map.cpp
parentAdded armor and shulker box cleaning (#4875) (diff)
downloadcuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar
cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.gz
cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.bz2
cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.lz
cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.xz
cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.zst
cuberite-68cced73afe546328cf94ed07c57deee47bfadec.zip
Diffstat (limited to '')
-rw-r--r--src/Map.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Map.cpp b/src/Map.cpp
index 30d761154..c02cd80f8 100644
--- a/src/Map.cpp
+++ b/src/Map.cpp
@@ -3,14 +3,14 @@
#include "Globals.h"
-#include "Map.h"
#include "BlockInfo.h"
-#include "World.h"
+#include "Blocks/BlockHandler.h"
#include "Chunk.h"
+#include "ClientHandle.h"
#include "Entities/Player.h"
#include "FastRandom.h"
-#include "Blocks/BlockHandler.h"
-#include "ClientHandle.h"
+#include "Map.h"
+#include "World.h"
@@ -139,7 +139,7 @@ bool cMap::UpdatePixel(unsigned int a_X, unsigned int a_Z)
auto Height = a_Chunk.GetHeight(RelX, RelZ);
auto ChunkHeight = cChunkDef::Height;
a_Chunk.GetBlockTypeMeta(RelX, Height, RelZ, TargetBlock, TargetMeta);
- auto ColourID = BlockHandler(TargetBlock)->GetMapBaseColourID(TargetMeta);
+ auto ColourID = cBlockHandler::For(TargetBlock).GetMapBaseColourID(TargetMeta);
if (IsBlockWater(TargetBlock))
{
@@ -151,7 +151,7 @@ bool cMap::UpdatePixel(unsigned int a_X, unsigned int a_Z)
}
else if (ColourID == 0)
{
- while (((--Height) != -1) && ((ColourID = BlockHandler(a_Chunk.GetBlock(RelX, Height, RelZ))->GetMapBaseColourID(a_Chunk.GetMeta(RelX, Height, RelZ))) == 0))
+ while (((--Height) != -1) && ((ColourID = cBlockHandler::For(a_Chunk.GetBlock(RelX, Height, RelZ)).GetMapBaseColourID(a_Chunk.GetMeta(RelX, Height, RelZ))) == 0))
{
continue;
}