added config option for rendering Round Logs with unknown axis
added Tangle Logs to the default whitelist
This commit is contained in:
@@ -26,6 +26,7 @@ open class ColumnTextures(val matcher: BlockMatcher) : BlockTextureInspector<Col
|
||||
init {
|
||||
matchClassAndModel(matcher, "block/column_side", listOf("end", "end", "side"))
|
||||
matchClassAndModel(matcher, "block/cube_column", listOf("end", "end", "side"))
|
||||
matchClassAndModel(matcher, "block/cube_all", listOf("all", "all", "all"))
|
||||
}
|
||||
override fun processTextures(state: IBlockState, textures: List<TextureAtlasSprite>, atlas: TextureMap) =
|
||||
ColumnInfo(textures[0], textures[1], textures[2])
|
||||
@@ -131,7 +132,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
||||
modelRenderer.updateShading(Int3.zero, allFaces)
|
||||
|
||||
// check log neighborhood
|
||||
val logAxis = ctx.blockAxis ?: return renderWorldBlockBase(ctx, dispatcher, renderer, layer)
|
||||
val logAxis = ctx.blockAxis ?: return renderWorldBlockBase(ctx, dispatcher, renderer, null)
|
||||
val baseRotation = rotationFromUp[(logAxis to AxisDirection.POSITIVE).face.ordinal]
|
||||
|
||||
val upType = ctx.blockType(baseRotation, logAxis, Int3(0, 1, 0))
|
||||
@@ -325,7 +326,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
||||
return if (!blockPredicate(state)) {
|
||||
if (state.block.isOpaqueCube) SOLID else NONSOLID
|
||||
} else {
|
||||
if (axisFunc(state) == axis) PARALLEL else PERPENDICULAR
|
||||
axisFunc(state)?.let { if (it == axis) PARALLEL else PERPENDICULAR } ?: SOLID
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package mods.betterfoliage.client.render
|
||||
|
||||
import com.google.common.collect.ImmutableMap
|
||||
import mods.betterfoliage.BetterFoliageMod
|
||||
import mods.betterfoliage.client.config.Config
|
||||
import mods.betterfoliage.client.integration.OptifineCTM
|
||||
@@ -11,6 +12,7 @@ import mods.octarinecore.common.Int3
|
||||
import mods.octarinecore.common.rotate
|
||||
import mods.octarinecore.tryDefault
|
||||
import net.minecraft.block.BlockLog
|
||||
import net.minecraft.block.properties.IProperty
|
||||
import net.minecraft.block.state.IBlockState
|
||||
import net.minecraft.util.EnumFacing.*
|
||||
|
||||
@@ -29,7 +31,7 @@ class RenderLog : AbstractRenderColumn(BetterFoliageMod.MOD_ID) {
|
||||
"x" -> Axis.X
|
||||
"y" -> Axis.Y
|
||||
"z" -> Axis.Z
|
||||
else -> null
|
||||
else -> if (Config.roundLogs.defaultY) Axis.Y else null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user