actually fix #36
This commit is contained in:
@@ -2,7 +2,7 @@ apply plugin: "net.minecraftforge.gradle.forge"
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
group = 'com.github.octarine-noise'
|
||||
version = "2.0"
|
||||
version = "2.0.2"
|
||||
archivesBaseName = rootProject.name + '-MC1.8'
|
||||
|
||||
buildscript {
|
||||
|
||||
@@ -3,6 +3,7 @@ package mods.betterfoliage.client.texture
|
||||
import mods.octarinecore.client.resource.resourceManager
|
||||
import mods.octarinecore.client.resource.get
|
||||
import mods.octarinecore.client.resource.getLines
|
||||
import mods.octarinecore.stripStart
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite
|
||||
import net.minecraft.util.ResourceLocation
|
||||
|
||||
@@ -11,7 +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.contains(path)
|
||||
return (domain == null || domain == iconLocation.resourceDomain) &&
|
||||
iconLocation.resourcePath.stripStart("blocks/").contains(path)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +29,7 @@ class TextureMatcher() {
|
||||
if (line2.size == 2) {
|
||||
val mapping = line2[0].trim().split(':')
|
||||
if (mapping.size == 1) mappings.add(Mapping(null, mapping[0].trim(), line2[1].trim()))
|
||||
else if (mapping.size == 2) mappings.add(Mapping(mapping[1].trim(), mapping[0].trim(), line2[1].trim()))
|
||||
else if (mapping.size == 2) mappings.add(Mapping(mapping[0].trim(), mapping[1].trim(), line2[1].trim()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user