This commit is contained in:
Kam committed 2025-03-13 15:36:30 -04:00
1 parent c81e848895
commit c7a74a3e0e
59 files changed
+506 -592

No files matched your search

+7 -7
View File
@@ -1,7 +1,5 @@
package net.minecraft.util.math;
import java.util.Objects;
public class IntHashMap<V> {
private transient IntHashMap.Entry<V>[] slots = new IntHashMap.Entry[16];
/**
@@ -44,7 +42,7 @@ public class IntHashMap<V> {
}
}
return null;
return (V) null;
}
/**
@@ -133,7 +131,7 @@ public class IntHashMap<V> {
*/
public V removeObject(int p_76049_1_) {
IntHashMap.Entry<V> entry = this.removeEntry(p_76049_1_);
return entry == null ? null : entry.valueEntry;
return (V) (entry == null ? null : entry.valueEntry);
}
final IntHashMap.Entry<V> removeEntry(int p_76036_1_) {
@@ -233,11 +231,13 @@ public class IntHashMap<V> {
Object object = Integer.valueOf(this.getHash());
Object object1 = Integer.valueOf(entry.getHash());
if (Objects.equals(object, object1)) {
if (object == object1 || object != null && object.equals(object1)) {
Object object2 = this.getValue();
Object object3 = entry.getValue();
return Objects.equals(object2, object3);
if (object2 == object3 || object2 != null && object2.equals(object3)) {
return true;
}
}
return false;
@@ -252,4 +252,4 @@ public class IntHashMap<V> {
return this.getHash() + "=" + this.getValue();
}
}
}
}