Merge branch 'kotlin-1.8' into kotlin-1.9

This commit is contained in:
octarine-noise
2016-05-16 12:16:48 +02:00
4 changed files with 7 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: 'kotlin'
group = 'com.github.octarine-noise'
version = "2.0.10"
version = "2.0.11"
archivesBaseName = rootProject.name + '-MC1.9'
buildscript {

View File

@@ -47,6 +47,7 @@ object LeafRegistry : BlockTextureInspector<TextureAtlasSprite>() {
init {
matchClassAndModel(Config.blocks.leaves, "minecraft:block/leaves", listOf("all"))
matchClassAndModel(Config.blocks.leaves, "minecraft:block/cube_all", listOf("all"))
}
operator fun get(state: IBlockState, world: IBlockAccess, pos: BlockPos, face: EnumFacing): LeafInfo? {

View File

@@ -65,6 +65,8 @@ object Refs {
val model_WPW = FieldRef(WeightedPartWrapper, "model", IModel)
val WeightedRandomModel = ClassRef("net.minecraftforge.client.model.ModelLoader\$WeightedRandomModel")
val models_WRM = FieldRef(WeightedRandomModel, "models", List)
val MultiModel = ClassRef("net.minecraftforge.client.model.MultiModel")
val base_MM = FieldRef(MultiModel, "base", IModel)
// Better Foliage
val BetterFoliageHooks = ClassRef("mods.betterfoliage.client.Hooks")

View File

@@ -110,6 +110,9 @@ val IModel.modelBlockAndLoc: Pair<ModelBlock, ResourceLocation>? get() {
it.modelBlockAndLoc.let { if (it != null) return it }
}
}
else if (Refs.MultiModel.isInstance(this)) Refs.base_MM.get(this)?.let {
return (it as IModel).modelBlockAndLoc
}
return null
}