diff options
Diffstat (limited to '')
-rw-r--r-- | src/UI/SlotArea.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 4085dc816..ef5f7382e 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -1065,9 +1065,12 @@ void cSlotAreaAnvil::OnTakeResult(cPlayer & a_Player) BLOCKTYPE Block; NIBBLETYPE BlockMeta; - a_Player.GetWorld()->GetBlockTypeMeta(BlockPos, Block, BlockMeta); - if (!a_Player.IsGameModeCreative() && (Block == E_BLOCK_ANVIL) && GetRandomProvider().RandBool(0.12)) + if ( + a_Player.GetWorld()->GetBlockTypeMeta(BlockPos, Block, BlockMeta) && + !a_Player.IsGameModeCreative() && (Block == E_BLOCK_ANVIL) && + GetRandomProvider().RandBool(0.12) + ) { NIBBLETYPE Orientation = BlockMeta & 0x3; NIBBLETYPE AnvilDamage = BlockMeta >> 2; |