port to MC 1.11

This commit is contained in:
octarine-noise
2016-12-10 21:30:55 +01:00
parent 1a1aa81c0f
commit ceb3e5b116
28 changed files with 77 additions and 74 deletions

View File

@@ -8,6 +8,7 @@ import mods.betterfoliage.client.texture.StandardGrassSupport
import mods.octarinecore.client.render.BlockContext
import mods.octarinecore.client.resource.TextureListModelProcessor
import mods.octarinecore.client.resource.get
import mods.octarinecore.client.resource.registerSprite
import mods.octarinecore.common.Int3
import mods.octarinecore.common.config.ConfigurableBlockMatcher
import mods.octarinecore.common.config.ModelTextureList
@@ -72,10 +73,10 @@ object StandardLogSupport : TextureListModelProcessor<IColumnTextureResolver>, I
override val modelTextures: List<ModelTextureList> get() = Config.blocks.logModels.list
override fun processStitch(state: IBlockState, key: List<String>, atlas: TextureMap): IColumnTextureResolver? {
val topTex = atlas[key[0]]
val bottomTex = atlas[key[1]]
val sideTex = atlas[key[2]]
return if (topTex != null && bottomTex != null && sideTex != null) StaticColumnInfo(topTex, bottomTex, sideTex) else null
val topTex = atlas.registerSprite(key[0])
val bottomTex = atlas.registerSprite(key[1])
val sideTex = atlas.registerSprite(key[2])
return StaticColumnInfo(topTex, bottomTex, sideTex)
}
override fun get(state: IBlockState) = stateToValue[state]