Merge branch 'kotlin-1.8' into kotlin-1.8.8
This commit is contained in:
@@ -84,6 +84,7 @@ object Config : DelegatingConfig(BetterFoliageMod.MOD_ID, BetterFoliageMod.DOMAI
|
|||||||
val lenientConnect by boolean(true)
|
val lenientConnect by boolean(true)
|
||||||
val connectPerpendicular by boolean(true)
|
val connectPerpendicular by boolean(true)
|
||||||
val connectGrass by boolean(true)
|
val connectGrass by boolean(true)
|
||||||
|
val defaultY by boolean(false)
|
||||||
val zProtection by double(min = 0.9, default = 0.99)
|
val zProtection by double(min = 0.9, default = 0.99)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ open class ColumnTextures(val matcher: BlockMatcher) : BlockTextureInspector<Col
|
|||||||
init {
|
init {
|
||||||
matchClassAndModel(matcher, "block/column_side", listOf("end", "end", "side"))
|
matchClassAndModel(matcher, "block/column_side", listOf("end", "end", "side"))
|
||||||
matchClassAndModel(matcher, "block/cube_column", 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) =
|
override fun processTextures(state: IBlockState, textures: List<TextureAtlasSprite>, atlas: TextureMap) =
|
||||||
ColumnInfo(textures[0], textures[1], textures[2])
|
ColumnInfo(textures[0], textures[1], textures[2])
|
||||||
@@ -131,7 +132,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
|||||||
modelRenderer.updateShading(Int3.zero, allFaces)
|
modelRenderer.updateShading(Int3.zero, allFaces)
|
||||||
|
|
||||||
// check log neighborhood
|
// 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 baseRotation = rotationFromUp[(logAxis to AxisDirection.POSITIVE).face.ordinal]
|
||||||
|
|
||||||
val upType = ctx.blockType(baseRotation, logAxis, Int3(0, 1, 0))
|
val upType = ctx.blockType(baseRotation, logAxis, Int3(0, 1, 0))
|
||||||
@@ -325,7 +326,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
|||||||
return if (!blockPredicate(state)) {
|
return if (!blockPredicate(state)) {
|
||||||
if (state.block.isOpaqueCube) SOLID else NONSOLID
|
if (state.block.isOpaqueCube) SOLID else NONSOLID
|
||||||
} else {
|
} else {
|
||||||
if (axisFunc(state) == axis) PARALLEL else PERPENDICULAR
|
axisFunc(state)?.let { if (it == axis) PARALLEL else PERPENDICULAR } ?: SOLID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ class RenderLog : AbstractRenderColumn(BetterFoliageMod.MOD_ID) {
|
|||||||
"x" -> Axis.X
|
"x" -> Axis.X
|
||||||
"y" -> Axis.Y
|
"y" -> Axis.Y
|
||||||
"z" -> Axis.Z
|
"z" -> Axis.Z
|
||||||
else -> null
|
else -> if (Config.roundLogs.defaultY) Axis.Y else null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,10 +42,7 @@ abstract class ModelDataInspector {
|
|||||||
onAfterModelLoad()
|
onAfterModelLoad()
|
||||||
|
|
||||||
stateMappings.forEach { mapping ->
|
stateMappings.forEach { mapping ->
|
||||||
val model = stateModels[mapping.value]
|
stateModels[mapping.value]?.let { processModelDefinition(mapping.key, mapping.value, it) }
|
||||||
if (model != null) {
|
|
||||||
val result = processModelDefinition(mapping.key, mapping.value, model)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,3 +21,6 @@ forestry.arboriculture.gadgets.BlockLog
|
|||||||
// TerraFirmaCraft
|
// TerraFirmaCraft
|
||||||
com.bioxx.tfc.Blocks.Flora.BlockLogVert
|
com.bioxx.tfc.Blocks.Flora.BlockLogVert
|
||||||
com.bioxx.tfc.Blocks.Flora.BlockLogNatural
|
com.bioxx.tfc.Blocks.Flora.BlockLogNatural
|
||||||
|
|
||||||
|
// The Agricultural Revolution a.k.a. Cooking Plus
|
||||||
|
CookingPlus.blocks.CookingPlusTangleLog
|
||||||
@@ -210,3 +210,5 @@ betterfoliage.roundLogs.dimming=Dimming
|
|||||||
betterfoliage.roundLogs.dimming.tooltip=Amount to darken obscured log faces
|
betterfoliage.roundLogs.dimming.tooltip=Amount to darken obscured log faces
|
||||||
betterfoliage.roundLogs.zProtection=Z-Protection
|
betterfoliage.roundLogs.zProtection=Z-Protection
|
||||||
betterfoliage.roundLogs.zProtection.tooltip=Amount to scale parallel log connection bits to stop Z-fighting (flickering). Try to set it as high as possible without having glitches.
|
betterfoliage.roundLogs.zProtection.tooltip=Amount to scale parallel log connection bits to stop Z-fighting (flickering). Try to set it as high as possible without having glitches.
|
||||||
|
betterfoliage.roundLogs.defaultY=Default to vertical
|
||||||
|
betterfoliage.roundLogs.defaultY.tooltip=If true, log blocks where the orientation cannot be determined will be rendered as vertical. Otherwise, they will be rendered as cube blocks.
|
||||||
|
|||||||
Reference in New Issue
Block a user