summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockBed.cpp1
-rw-r--r--src/Blocks/BlockEnchantingTable.h5
-rw-r--r--src/Blocks/BlockNoteBlock.h5
3 files changed, 3 insertions, 8 deletions
diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp
index 68f45b518..ef4359416 100644
--- a/src/Blocks/BlockBed.cpp
+++ b/src/Blocks/BlockBed.cpp
@@ -163,6 +163,7 @@ void cBlockBedHandler::OnPlacedByPlayer(cChunkInterface & a_ChunkInterface, cWor
a_Player.GetWorld()->DoWithBlockEntityAt(a_BlockChange.GetAbsolutePos(), [&a_Player](cBlockEntity & a_BlockEntity)
{
ASSERT(a_BlockEntity.GetBlockType() == E_BLOCK_BED);
+
static_cast<cBedEntity &>(a_BlockEntity).SetColor(a_Player.GetEquippedItem().m_ItemDamage);
return false;
});
diff --git a/src/Blocks/BlockEnchantingTable.h b/src/Blocks/BlockEnchantingTable.h
index 188f9c9b3..ba3932e5c 100644
--- a/src/Blocks/BlockEnchantingTable.h
+++ b/src/Blocks/BlockEnchantingTable.h
@@ -34,10 +34,7 @@ private:
AString WindowName = "Enchant";
a_WorldInterface.DoWithBlockEntityAt(a_BlockPos, [&WindowName](cBlockEntity & a_Entity)
{
- if (a_Entity.GetBlockType() != E_BLOCK_ENCHANTMENT_TABLE)
- {
- return false;
- }
+ ASSERT(a_Entity.GetBlockType() == E_BLOCK_ENCHANTMENT_TABLE);
const auto & EnchantingTable = static_cast<cEnchantingTableEntity &>(a_Entity);
const auto & CustomName = EnchantingTable.GetCustomName();
diff --git a/src/Blocks/BlockNoteBlock.h b/src/Blocks/BlockNoteBlock.h
index 566b9bef5..f5ada0d2d 100644
--- a/src/Blocks/BlockNoteBlock.h
+++ b/src/Blocks/BlockNoteBlock.h
@@ -28,10 +28,7 @@ private:
{
a_WorldInterface.DoWithBlockEntityAt(a_BlockPos, [](cBlockEntity & a_BlockEntity)
{
- if (a_BlockEntity.GetBlockType() != E_BLOCK_NOTE_BLOCK)
- {
- return false;
- }
+ ASSERT(a_BlockEntity.GetBlockType() == E_BLOCK_NOTE_BLOCK);
static_cast<cNoteEntity &>(a_BlockEntity).MakeSound();
return false;