update to latest recommended Forge
This commit is contained in:
@@ -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() }
|
||||
|
||||
|
||||
@@ -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 }
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user