This commit is contained in:
octarine-noise
2016-01-13 22:55:07 +01:00
parent 601679f070
commit 81abad82e9
2 changed files with 13 additions and 1 deletions

View File

@@ -38,12 +38,18 @@ class LeafInfo(
object LeafRegistry : BlockTextureInspector<LeafInfo>() {
val particles: MutableMap<String, IconSet> = hashMapOf()
val typeMappings = TextureMatcher().apply { loadMappings(ResourceLocation("betterfoliage", "leafTypeMappings.cfg")) }
val typeMappings = TextureMatcher().apply { loadMappings(ResourceLocation("betterfoliage", "leafTextureMappings.cfg")) }
init {
matchClassAndModel(Config.blocks.leaves, "minecraft:block/leaves", listOf("all"))
}
override fun onAfterModelLoad() {
super.onAfterModelLoad()
Client.log(INFO, "Inspecting leaf textures")
particles.clear()
}
override fun processTextures(textures: List<TextureAtlasSprite>, atlas: TextureMap): LeafInfo {
val texture = textures[0]
var leafType = typeMappings.getType(texture) ?: "default"

View File

@@ -0,0 +1,6 @@
// Vanilla
spruce=spruce
jungle=jungle
// Biomes O' Plenty
fir=spruce