Converted Firemaking to Java from Ruby