update to latest recommended Forge

This commit is contained in:
octarine-noise
2018-10-25 14:14:30 +02:00
parent c593ff9bcb
commit 5b1b35a891
11 changed files with 21 additions and 21 deletions

View File

@@ -22,7 +22,7 @@ fun biomeList(defaults: (Biome) -> Boolean) = intList {
}.apply { guiClass = BiomeListConfigEntry::class.java }
// Biome filter methods
private fun Biome.filterTemp(min: Float?, max: Float?) = (min == null || min <= temperature) && (max == null || max >= temperature)
private fun Biome.filterTemp(min: Float?, max: Float?) = (min == null || min <= defaultTemperature) && (max == null || max >= defaultTemperature)
private fun Biome.filterRain(min: Float?, max: Float?) = (min == null || min <= rainfall) && (max == null || max >= rainfall)
private fun Biome.filterClass(vararg name: String) = name.any { it in this.javaClass.name.toLowerCase() }

View File

@@ -21,7 +21,7 @@ class LeafGenerator(domain: String) : TextureGenerator(domain) {
val leafType = params["type"] ?: "default"
val handDrawnLoc = target.second.stripStart("textures/").stripStart("blocks/").let {
ResourceLocation(BetterFoliageMod.DOMAIN, "${it.resourceDomain}/textures/blocks/${it.resourcePath}")
ResourceLocation(BetterFoliageMod.DOMAIN, "${it.namespace}/textures/blocks/${it.path}")
}
resourceManager[handDrawnLoc]?.loadImage()?.let { return it }

View File

@@ -12,8 +12,8 @@ class TextureMatcher() {
data class Mapping(val domain: String?, val path: String, val type: String) {
fun matches(icon: TextureAtlasSprite): Boolean {
val iconLocation = ResourceLocation(icon.iconName)
return (domain == null || domain == iconLocation.resourceDomain) &&
iconLocation.resourcePath.stripStart("blocks/").contains(path, ignoreCase = true)
return (domain == null || domain == iconLocation.namespace) &&
iconLocation.path.stripStart("blocks/").contains(path, ignoreCase = true)
}
}