Guard against meta > 15

This commit is contained in:
Jason Mitchell committed 2021-03-07 10:01:36 -08:00
1 parent 64776f0d32
commit ad1ad6da38
1 file changed
+2 -2
@@ -95,7 +95,7 @@ class BlockMicroMaterial(val block:Block, val meta:Int = 0) extends IMicroMateri
} catch {
case e:Exception =>
}
player.getBreakSpeed(block, false, meta, 0, -1, 0) / hardness
player.getBreakSpeed(block, false, meta%16, 0, -1, 0) / hardness
}
def isTransparent = !block.isOpaqueCube
@@ -135,4 +135,4 @@ object BlockMicroMaterial
def createAndRegister(block:Block, meta:Seq[Int], name:String, oldName:String):Unit =
meta.foreach(m => createAndRegister(block, m, name, oldName))
}
}