Update upstream B/CB/S

This commit is contained in:
Zach Brown
2018-01-10 23:31:19 -06:00
parent 5513c9377d
commit c93e1ee068
230 changed files with 474 additions and 516 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Optimise BlockStateEnum hashCode and equals
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
index 288c52c55..66c459d83 100644
index 21ac1e06..a241d7d8 100644
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
@@ -0,0 +0,0 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
@@ -46,15 +46,23 @@ index 288c52c55..66c459d83 100644
+ return this == object;
}
+ @Override // Paper - override hashCode as BlockStateEnum is a singleton
- // Spigot start
- private int hashCode;
+ @Override // Paper - override equals as BlockStateEnum is a singleton
public int hashCode() {
- int i = super.hashCode();
- int hash = hashCode;
- if (hash == 0) {
- int i = super.hashCode();
-
- i = 31 * i + this.a.hashCode();
- i = 31 * i + this.b.hashCode();
- return i;
- i = 31 * i + this.a.hashCode();
- i = 31 * i + this.b.hashCode();
- hashCode = hash = i;
- }
- return hash;
+ return hashCode;
}
- // Spigot end
public static <T extends Enum<T> & INamable> BlockStateEnum<T> of(String s, Class<T> oclass) {
return a(s, oclass, Predicates.alwaysTrue());
--