summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemChest.h
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/Items/ItemChest.h
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 'src/Items/ItemChest.h')
-rw-r--r--src/Items/ItemChest.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Items/ItemChest.h b/src/Items/ItemChest.h
index ecd957a59..8548f8d25 100644
--- a/src/Items/ItemChest.h
+++ b/src/Items/ItemChest.h
@@ -50,9 +50,8 @@ public:
NIBBLETYPE ClickedBlockMeta;
a_World.GetBlockTypeMeta(a_ClickedBlockPos, ClickedBlockType, ClickedBlockMeta);
cChunkInterface ChunkInterface(a_World.GetChunkMap());
- auto blockHandler = BlockHandler(ClickedBlockType);
Vector3i PlacePos;
- if (blockHandler->DoesIgnoreBuildCollision(ChunkInterface, a_ClickedBlockPos, a_Player, ClickedBlockMeta))
+ if (cBlockHandler::For(ClickedBlockType).DoesIgnoreBuildCollision(ChunkInterface, a_ClickedBlockPos, a_Player, ClickedBlockMeta))
{
PlacePos = a_ClickedBlockPos;
}
@@ -69,8 +68,7 @@ public:
BLOCKTYPE PlaceBlock;
NIBBLETYPE PlaceMeta;
a_World.GetBlockTypeMeta(PlacePos, PlaceBlock, PlaceMeta);
- blockHandler = BlockHandler(PlaceBlock);
- if (!blockHandler->DoesIgnoreBuildCollision(ChunkInterface, PlacePos, a_Player, PlaceMeta))
+ if (!cBlockHandler::For(PlaceBlock).DoesIgnoreBuildCollision(ChunkInterface, PlacePos, a_Player, PlaceMeta))
{
return false;
}