Merge pull request #1 from D-Cysteine/master

Prevent calling Block.getHarvestLevel() with parameter > 15
This commit is contained in:
Martin Robertz authored and GitHub committed 2021-07-28 17:23:02 +02:00
commit f55c0e27a4
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -2,4 +2,4 @@ mc_version=1.7.10
forge_version=10.13.4.1614-1.7.10
ccl_version=1.1.3.127
nei_version=1.0.3.+
mod_version=1.2.1
mod_version=1.2.2
@@ -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