Update decimal singletons to make neoforge component checker happy
This commit is contained in:
parent
da0f5d544b
commit
85e477f386
@ -701,6 +701,14 @@ sealed class Decimal : Number(), Comparable<Decimal> {
|
||||
override val isFinite: Boolean
|
||||
get() = false
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return this === other
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun compareTo(other: Decimal): Int {
|
||||
return if (other === this) 0 else 1
|
||||
}
|
||||
@ -942,6 +950,14 @@ sealed class Decimal : Number(), Comparable<Decimal> {
|
||||
override val isFinite: Boolean
|
||||
get() = false
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return this === other
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun compareTo(other: Decimal): Int {
|
||||
return if (other === this) 0 else -1
|
||||
}
|
||||
@ -1177,6 +1193,14 @@ sealed class Decimal : Number(), Comparable<Decimal> {
|
||||
override val isFinite: Boolean
|
||||
get() = true
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return this === other || other is Decimal && other.isZero
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun compareTo(other: Decimal): Int {
|
||||
return -other.signum()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user