mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-04 23:07:44 +01:00
Fix snow breaking time with wrong tool and efficiency.
This commit is contained in:
parent
1cbc4ed16c
commit
d83d07c42a
@ -662,6 +662,7 @@ public class BlockProperties {
|
|||||||
if (!isValidTool && efficiency > 0){
|
if (!isValidTool && efficiency > 0){
|
||||||
// Efficiency makes the tool.
|
// Efficiency makes the tool.
|
||||||
// (wood, sand, gravel, ice)
|
// (wood, sand, gravel, ice)
|
||||||
|
if (blockId == Material.SNOW.getId()) return toolProps.toolType == ToolType.SPADE;
|
||||||
if (blockId == Material.WOOL.getId()) return true;
|
if (blockId == Material.WOOL.getId()) return true;
|
||||||
if (blockProps.hardness <= 2
|
if (blockProps.hardness <= 2
|
||||||
&& (blockProps.tool.toolType == ToolType.AXE
|
&& (blockProps.tool.toolType == ToolType.AXE
|
||||||
@ -669,7 +670,7 @@ public class BlockProperties {
|
|||||||
|| (blockProps.hardness < 0.8 && (blockId != Material.NETHERRACK.getId() && blockId != Material.SNOW.getId() && blockId != Material.SNOW_BLOCK.getId() && blockId != Material.STONE_PLATE.getId())))){
|
|| (blockProps.hardness < 0.8 && (blockId != Material.NETHERRACK.getId() && blockId != Material.SNOW.getId() && blockId != Material.SNOW_BLOCK.getId() && blockId != Material.STONE_PLATE.getId())))){
|
||||||
// Also roughly.
|
// Also roughly.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isValidTool;
|
return isValidTool;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user