From cd1b50774512e09736b78df025163ab9b26bd528 Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Fri, 2 Oct 2020 23:57:17 +0300 Subject: Fix instant mining of blocks not being recognised, tweak anti-cheat (#4938) * Tried to fix a small issue... Ended up rewriting a bunch of god awful, opaque code with no source and no sense. Who names a function GetPlayerRelativeBlockHardness??? It's gone now. We're safe again. * Testing anti-cheat. * Tidy up debug logging. * Remove empty member declaration. * Rewrite GetDigSpeed slightly for better readability. * GetMiningProgressPerTick now returns 1 when instantly mined. Fixed hasily written typo. * Comment style and typo fixes. --- src/BlockInfo.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/BlockInfo.cpp') diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp index 5078997a8..9279f93a1 100644 --- a/src/BlockInfo.cpp +++ b/src/BlockInfo.cpp @@ -1466,22 +1466,22 @@ cBlockInfo::cBlockInfoArray::cBlockInfoArray() Info[E_BLOCK_END_BRICKS ].m_Hardness = 0.8f; Info[E_BLOCK_STRUCTURE_VOID ].m_Hardness = 0.0f; Info[E_BLOCK_OBSERVER ].m_Hardness = 3.5f; - Info[E_BLOCK_WHITE_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_ORANGE_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_MAGENTA_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_LIGHT_BLUE_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_YELLOW_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_LIME_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_PINK_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_GRAY_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_LIGHT_GRAY_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_CYAN_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_PURPLE_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_BLUE_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_BROWN_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_GREEN_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_RED_SHULKER_BOX ].m_Hardness = 0.2f; - Info[E_BLOCK_BLACK_SHULKER_BOX ].m_Hardness = 0.2f; + Info[E_BLOCK_WHITE_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_ORANGE_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_MAGENTA_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_LIGHT_BLUE_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_YELLOW_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_LIME_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_PINK_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_GRAY_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_LIGHT_GRAY_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_CYAN_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_PURPLE_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_BLUE_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_BROWN_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_GREEN_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_RED_SHULKER_BOX ].m_Hardness = 2.0f; + Info[E_BLOCK_BLACK_SHULKER_BOX ].m_Hardness = 2.0f; Info[E_BLOCK_WHITE_GLAZED_TERRACOTTA ].m_Hardness = 1.4f; Info[E_BLOCK_ORANGE_GLAZED_TERRACOTTA ].m_Hardness = 1.4f; Info[E_BLOCK_MAGENTA_GLAZED_TERRACOTTA ].m_Hardness = 1.4f; -- cgit v1.2.3