glowing sign text

This commit is contained in:
Moritz Zwerger 2023-11-01 18:51:24 +01:00
parent ca6c8d46b8
commit bcea0cab2d
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -40,7 +40,6 @@ import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer
import de.bixilon.minosoft.gui.rendering.gui.mesh.GUIVertexConsumer
import de.bixilon.minosoft.gui.rendering.gui.mesh.GUIVertexOptions
import de.bixilon.minosoft.gui.rendering.models.block.element.ModelElement.Companion.BLOCK_SIZE
import de.bixilon.minosoft.gui.rendering.models.block.state.baked.cull.side.SideProperties
import de.bixilon.minosoft.gui.rendering.models.block.state.render.BlockRender
import de.bixilon.minosoft.gui.rendering.util.vec.vec3.Vec3Util.rotateAssign
import de.bixilon.minosoft.gui.rendering.util.vec.vec3.Vec3Util.toVec3
@ -59,7 +58,8 @@ class SignBlockEntityRenderer(
override fun render(position: BlockPosition, offset: FloatArray, mesh: ChunkMeshes, random: Random?, state: BlockState, neighbours: Array<BlockState?>, light: ByteArray, tints: IntArray?, entity: BlockEntity?): Boolean {
state.model?.render(position, offset, mesh, random, state, neighbours, light, tints, entity) // render wood part
if (entity !is SignBlockEntity) return true
renderText(state, entity, offset, mesh, light[SELF_LIGHT_INDEX].toInt())
val light = if (entity.front.glowing) 0xFF else light[SELF_LIGHT_INDEX].toInt()
renderText(state, entity, offset, mesh, light)
return true
}