mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 03:44:54 -04:00
replace some todos with broken
This commit is contained in:
parent
e2cbcaadb2
commit
00c1f1d1d0
@ -28,6 +28,7 @@ import de.bixilon.minosoft.data.text.ChatColors
|
||||
import de.bixilon.minosoft.data.world.ChunkSection
|
||||
import de.bixilon.minosoft.gui.rendering.util.vec.vec3.Vec3Util.get
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolDefinition
|
||||
import de.bixilon.minosoft.util.Broken
|
||||
import kotlin.math.abs
|
||||
|
||||
enum class Directions(
|
||||
@ -82,7 +83,7 @@ enum class Directions(
|
||||
SOUTH -> WEST
|
||||
WEST -> NORTH
|
||||
EAST -> SOUTH
|
||||
else -> TODO()
|
||||
else -> Broken("Rotation: $this")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import de.bixilon.minosoft.gui.rendering.util.VecUtil
|
||||
import de.bixilon.minosoft.gui.rendering.util.VecUtil.getWorldOffset
|
||||
import de.bixilon.minosoft.gui.rendering.util.vec.vec3.Vec3iUtil.toVec3
|
||||
import de.bixilon.minosoft.gui.rendering.world.mesh.WorldMesh
|
||||
import de.bixilon.minosoft.gui.rendering.world.preparer.cull.SolidCullSectionPreparer
|
||||
import java.util.*
|
||||
|
||||
class BakedBlockStateModel(
|
||||
@ -58,7 +59,7 @@ class BakedBlockStateModel(
|
||||
continue
|
||||
}
|
||||
tint = tints?.getOrNull(face.tintIndex) ?: -1
|
||||
currentLight = (face.cullFace?.let { light[it.ordinal] } ?: light[6]).toInt()
|
||||
currentLight = (face.cullFace?.let { light[it.ordinal] } ?: light[SolidCullSectionPreparer.SELF_LIGHT_INDEX]).toInt()
|
||||
face.singleRender(positionArray, mesh, currentLight, ambientLight, tint)
|
||||
if (!rendered) {
|
||||
rendered = true
|
||||
|
16
src/main/java/de/bixilon/minosoft/util/Broken.kt
Normal file
16
src/main/java/de/bixilon/minosoft/util/Broken.kt
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.util
|
||||
|
||||
fun Broken(reason: String = ""): Nothing = throw IllegalStateException("Something is broken: $reason")
|
Loading…
x
Reference in New Issue
Block a user