Merge pull request #1 from D-Cysteine/patch-1

Fix passing out of bounds value to Block.getHarvestLevel()
This commit is contained in:
D-Cysteine authored and GitHub committed 2021-07-27 08:29:25 -06:00
commit af74caddfb
1 file changed
+2 -1
@@ -104,7 +104,8 @@ class BlockMicroMaterial(val block:Block, val meta:Int = 0) extends IMicroMateri
def toolClasses = Seq("axe", "pickaxe", "shovel")
def getCutterStrength = block.getHarvestLevel(meta)
// meta > 15 will throw ArrayIndexOutOfBoundsException
def getCutterStrength = block.getHarvestLevel(meta % 16)
def getSound = block.stepSound