diff options
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemEnchantingTable.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Items/ItemEnchantingTable.h b/src/Items/ItemEnchantingTable.h index c8eb42cac..12835cb4a 100644 --- a/src/Items/ItemEnchantingTable.h +++ b/src/Items/ItemEnchantingTable.h @@ -46,16 +46,12 @@ private: } const auto PlacePos = AddFaceDirection(a_ClickedBlockPos, a_ClickedBlockFace); - a_World.DoWithBlockEntityAt(PlacePos.x, PlacePos.y, PlacePos.z, [&a_EquippedItem](cBlockEntity & a_Entity) + a_World.DoWithBlockEntityAt(PlacePos, [&a_EquippedItem](cBlockEntity & a_Entity) { - if (a_Entity.GetBlockType() != E_BLOCK_ENCHANTMENT_TABLE) - { - return true; - } + ASSERT(a_Entity.GetBlockType() == E_BLOCK_ENCHANTMENT_TABLE); - auto & EnchantingTable = static_cast<cEnchantingTableEntity &>(a_Entity); - EnchantingTable.SetCustomName(a_EquippedItem.m_CustomName); - return true; + static_cast<cEnchantingTableEntity &>(a_Entity).SetCustomName(a_EquippedItem.m_CustomName); + return false; }); return true; |