13
0
geforkt von Mirrors/Paper

net.minecraft.world.level.block.state.properties

Dieser Commit ist enthalten in:
Jake Potrebic 2024-12-13 16:05:23 -08:00
Ursprung fe1744dfd1
Commit f98d879f07
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: ECE0B3C133C016C5
6 geänderte Dateien mit 35 neuen und 35 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,12 @@
--- a/net/minecraft/world/level/block/state/properties/EnumProperty.java
+++ b/net/minecraft/world/level/block/state/properties/EnumProperty.java
@@ -59,8 +_,7 @@
return this.ordinalToIndex[value.ordinal()];
}
- @Override
- public boolean equals(Object other) {
+ public boolean equals_unused(Object other) { // Paper - Perf: Optimize hashCode/equals
return this == other || other instanceof EnumProperty<?> enumProperty && super.equals(other) && this.values.equals(enumProperty.values);
}

Datei anzeigen

@ -0,0 +1,12 @@
--- a/net/minecraft/world/level/block/state/properties/IntegerProperty.java
+++ b/net/minecraft/world/level/block/state/properties/IntegerProperty.java
@@ -28,8 +_,7 @@
return this.values;
}
- @Override
- public boolean equals(Object other) {
+ public boolean equals_unused(Object other) { // Paper - Perf: Optimize hashCode/equals
return this == other || other instanceof IntegerProperty integerProperty && super.equals(other) && this.values.equals(integerProperty.values);
}

Datei anzeigen

@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/block/state/properties/Property.java
+++ b/net/minecraft/world/level/block/state/properties/Property.java
@@ -72,7 +_,7 @@
@Override
public boolean equals(Object other) {
- return this == other || other instanceof Property<?> property && this.clazz.equals(property.clazz) && this.name.equals(property.name);
+ return this == other; // Paper - Perf: Optimize hashCode/equals
}
@Override

Datei anzeigen

@ -1,12 +0,0 @@
--- a/net/minecraft/world/level/block/state/properties/EnumProperty.java
+++ b/net/minecraft/world/level/block/state/properties/EnumProperty.java
@@ -59,8 +59,7 @@
return this.ordinalToIndex[enum_.ordinal()];
}
- @Override
- public boolean equals(Object object) {
+ public boolean equals_unused(Object object) { // Paper - Perf: Optimize hashCode/equals
if (this == object) {
return true;
} else {

Datei anzeigen

@ -1,12 +0,0 @@
--- a/net/minecraft/world/level/block/state/properties/IntegerProperty.java
+++ b/net/minecraft/world/level/block/state/properties/IntegerProperty.java
@@ -28,8 +28,7 @@
return this.values;
}
- @Override
- public boolean equals(Object object) {
+ public boolean equals_unused(Object object) { // Paper - Perf: Optimize hashCode/equals
if (this == object) {
return true;
} else {

Datei anzeigen

@ -1,11 +0,0 @@
--- a/net/minecraft/world/level/block/state/properties/Property.java
+++ b/net/minecraft/world/level/block/state/properties/Property.java
@@ -72,7 +72,7 @@
@Override
public boolean equals(Object object) {
- return this == object || object instanceof Property<?> property && this.clazz.equals(property.clazz) && this.name.equals(property.name);
+ return this == object; // Paper - Perf: Optimize hashCode/equals
}
@Override