fixed #36
This commit is contained in:
@@ -38,12 +38,18 @@ class LeafInfo(
|
|||||||
object LeafRegistry : BlockTextureInspector<LeafInfo>() {
|
object LeafRegistry : BlockTextureInspector<LeafInfo>() {
|
||||||
|
|
||||||
val particles: MutableMap<String, IconSet> = hashMapOf()
|
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 {
|
init {
|
||||||
matchClassAndModel(Config.blocks.leaves, "minecraft:block/leaves", listOf("all"))
|
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 {
|
override fun processTextures(textures: List<TextureAtlasSprite>, atlas: TextureMap): LeafInfo {
|
||||||
val texture = textures[0]
|
val texture = textures[0]
|
||||||
var leafType = typeMappings.getType(texture) ?: "default"
|
var leafType = typeMappings.getType(texture) ?: "default"
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// Vanilla
|
||||||
|
spruce=spruce
|
||||||
|
jungle=jungle
|
||||||
|
|
||||||
|
// Biomes O' Plenty
|
||||||
|
fir=spruce
|
||||||
Reference in New Issue
Block a user