mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-19 04:15:14 -04:00
fix crash when sprinting above fluids, fix wrong outline/collision boxes for some blocks (stairs, hoppers, etc)
This commit is contained in:
parent
78e6b0017f
commit
277d23fff4
@ -28,8 +28,10 @@ class FluidRenderer(
|
|||||||
) : BlockLikeRenderer {
|
) : BlockLikeRenderer {
|
||||||
override val faceBorderSizes: Array<Array<FaceSize>?> = arrayOfNulls(Directions.VALUES.size)
|
override val faceBorderSizes: Array<Array<FaceSize>?> = arrayOfNulls(Directions.VALUES.size)
|
||||||
override val transparentFaces: BooleanArray = BooleanArray(Directions.VALUES.size)
|
override val transparentFaces: BooleanArray = BooleanArray(Directions.VALUES.size)
|
||||||
private lateinit var stillTexture: Texture
|
lateinit var stillTexture: Texture
|
||||||
private lateinit var flowingTexture: Texture
|
private set
|
||||||
|
lateinit var flowingTexture: Texture
|
||||||
|
private set
|
||||||
|
|
||||||
override fun render(context: BlockLikeRenderContext) {
|
override fun render(context: BlockLikeRenderContext) {
|
||||||
if (!RenderConstants.RENDER_FLUIDS) {
|
if (!RenderConstants.RENDER_FLUIDS) {
|
||||||
|
@ -43,7 +43,7 @@ class BlockDustParticle(connection: PlayConnection, position: Vec3d, velocity: V
|
|||||||
|
|
||||||
texture = when (renderer) {
|
texture = when (renderer) {
|
||||||
is BlockRenderer -> renderer.textureMapping.iterator().next().value
|
is BlockRenderer -> renderer.textureMapping.iterator().next().value
|
||||||
is FluidRenderer -> TODO()
|
is FluidRenderer -> renderer.stillTexture // ToDo
|
||||||
else -> TODO()
|
else -> TODO()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ package de.bixilon.minosoft.gui.rendering.util
|
|||||||
import com.google.gson.JsonArray
|
import com.google.gson.JsonArray
|
||||||
import com.google.gson.JsonElement
|
import com.google.gson.JsonElement
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
|
import com.google.gson.JsonPrimitive
|
||||||
import de.bixilon.minosoft.Minosoft
|
import de.bixilon.minosoft.Minosoft
|
||||||
import de.bixilon.minosoft.data.Axes
|
import de.bixilon.minosoft.data.Axes
|
||||||
import de.bixilon.minosoft.data.Directions
|
import de.bixilon.minosoft.data.Directions
|
||||||
@ -68,6 +69,7 @@ object VecUtil {
|
|||||||
return when (this) {
|
return when (this) {
|
||||||
is JsonArray -> Vec3(this[0].asFloat, this[1].asFloat, this[2].asFloat)
|
is JsonArray -> Vec3(this[0].asFloat, this[1].asFloat, this[2].asFloat)
|
||||||
is JsonObject -> Vec3(this["x"]?.asFloat ?: 0, this["y"]?.asFloat ?: 0, this["z"]?.asFloat ?: 0)
|
is JsonObject -> Vec3(this["x"]?.asFloat ?: 0, this["y"]?.asFloat ?: 0, this["z"]?.asFloat ?: 0)
|
||||||
|
is JsonPrimitive -> Vec3(this.asFloat)
|
||||||
else -> throw IllegalArgumentException("Not a Vec3!")
|
else -> throw IllegalArgumentException("Not a Vec3!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user