mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-19 15:09:15 +00:00
优化key equals
This commit is contained in:
@@ -39,9 +39,7 @@ public record Key(String namespace, String value) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int result = this.namespace.hashCode();
|
return 31 * this.namespace.hashCode() + this.value.hashCode();
|
||||||
result = 31 * result + this.value.hashCode();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -54,7 +52,7 @@ public record Key(String namespace, String value) {
|
|||||||
}
|
}
|
||||||
if (!(obj instanceof Key key)) return false;
|
if (!(obj instanceof Key key)) return false;
|
||||||
// 先比value命中率高
|
// 先比value命中率高
|
||||||
return this.value.equals(key.value()) && this.namespace.equals(key.namespace());
|
return this.value.equals(key.value) && this.namespace.equals(key.namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
# Project settings
|
# Project settings
|
||||||
project_version=0.0.65.12.2
|
project_version=0.0.65.13
|
||||||
config_version=58
|
config_version=58
|
||||||
lang_version=40
|
lang_version=40
|
||||||
project_group=net.momirealms
|
project_group=net.momirealms
|
||||||
@@ -38,7 +38,7 @@ zstd_version=1.5.7-6
|
|||||||
commons_io_version=2.21.0
|
commons_io_version=2.21.0
|
||||||
commons_lang3_version=3.20.0
|
commons_lang3_version=3.20.0
|
||||||
sparrow_nbt_version=0.10.6
|
sparrow_nbt_version=0.10.6
|
||||||
sparrow_util_version=0.65
|
sparrow_util_version=0.66
|
||||||
fastutil_version=8.5.18
|
fastutil_version=8.5.18
|
||||||
netty_version=4.1.128.Final
|
netty_version=4.1.128.Final
|
||||||
joml_version=1.10.8
|
joml_version=1.10.8
|
||||||
|
|||||||
Reference in New Issue
Block a user