BlockBreakInfo: fixed confusing error message

This commit is contained in:
Dylan K. Taylor 2025-02-23 20:02:27 +00:00
parent 3050af0bc0
commit 1fed9f6cb5
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -154,7 +154,7 @@ class BlockBreakInfo{
$efficiency = $item->getMiningEfficiency(($this->toolType & $item->getBlockToolType()) !== 0);
if($efficiency <= 0){
throw new \InvalidArgumentException(get_class($item) . " has invalid mining efficiency: expected >= 0, got $efficiency");
throw new \InvalidArgumentException(get_class($item) . " must have a positive mining efficiency, but got $efficiency");
}
$base /= $efficiency;