mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 17:07:55 -04:00
fixes (hud: vehicle health), improvements
This commit is contained in:
parent
5aafc44d70
commit
c148102a7a
@ -51,7 +51,7 @@ class Horse(connection: PlayConnection, entityType: EntityType, position: Vec3d,
|
||||
1 -> LEGACY_IRON_ARMOR
|
||||
2 -> LEGACY_GOLD_ARMOR
|
||||
3 -> LEGACY_DIAMOND_ARMOR
|
||||
else -> error("Invalid armor set")
|
||||
else -> null
|
||||
}]
|
||||
}
|
||||
|
||||
|
@ -253,6 +253,10 @@ class BaseComponent : ChatComponent {
|
||||
}
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return parts.hashCode()
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other === this) {
|
||||
return true
|
||||
|
@ -211,6 +211,11 @@ open class TextComponent(
|
||||
)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return message.hashCode()
|
||||
}
|
||||
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other === this) {
|
||||
return true
|
||||
|
@ -66,9 +66,9 @@ class HotbarCoreElement(hudRenderer: HUDRenderer) : Element(hudRenderer) {
|
||||
topLeft += protection
|
||||
topLeft += health
|
||||
|
||||
topRight += vehicleHealth // ToDo: Also show in creative
|
||||
topRight += air
|
||||
topRight += hunger
|
||||
topRight += vehicleHealth // non notchain, but better imho
|
||||
|
||||
|
||||
base.parent = this
|
||||
|
@ -428,7 +428,6 @@ object KUtil {
|
||||
return this.toString().replace("-", "")
|
||||
}
|
||||
|
||||
|
||||
fun <T : ResourceLocationAble> List<T>.asResourceLocationMap(): Map<ResourceLocation, T> {
|
||||
val ret: MutableMap<ResourceLocation, T> = mutableMapOf()
|
||||
|
||||
@ -450,7 +449,6 @@ object KUtil {
|
||||
return Base64.getEncoder().encodeToString(this)
|
||||
}
|
||||
|
||||
|
||||
fun String?.nullCompare(other: String?): Int? {
|
||||
(this ?: "").compareTo(other ?: "").let {
|
||||
if (it != 0) {
|
||||
|
@ -19,13 +19,6 @@ import kotlin.math.floor
|
||||
|
||||
object MMath {
|
||||
|
||||
fun minClamp(value: Int, min: Int): Int {
|
||||
if (value < min) {
|
||||
return min
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
fun clamp(value: Vec2i, min: Vec2i, max: Vec2i): Vec2i {
|
||||
value.x = clamp(value.x, min.x, max.x)
|
||||
value.y = clamp(value.y, min.y, max.y)
|
||||
|
@ -478,14 +478,14 @@
|
||||
"end": [61, 18]
|
||||
}
|
||||
},
|
||||
"minecraft:vehicle_heart": {
|
||||
"minecraft:vehicle_half_heart": {
|
||||
"0": {
|
||||
"texture": "minecraft:textures/gui/icons.png",
|
||||
"start": [97, 9],
|
||||
"end": [106, 18]
|
||||
}
|
||||
},
|
||||
"minecraft:vehicle_half_heart": {
|
||||
"minecraft:vehicle_heart": {
|
||||
"0": {
|
||||
"texture": "minecraft:textures/gui/icons.png",
|
||||
"start": [88, 9],
|
||||
|
Loading…
x
Reference in New Issue
Block a user