diff --git a/src/main/java/net/minecraft/server/BlockMonsterEggs.java b/src/main/java/net/minecraft/server/BlockMonsterEggs.java index 7ef625e74..1af5e016a 100644 --- a/src/main/java/net/minecraft/server/BlockMonsterEggs.java +++ b/src/main/java/net/minecraft/server/BlockMonsterEggs.java @@ -9,7 +9,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit public class BlockMonsterEggs extends Block { private final Block a; - private static final Map b = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); + private static final Map b = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); public BlockMonsterEggs(Block block, Block.Info block_info) { super(block_info); diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java index 4c3d7af23..61471bf9f 100644 --- a/src/main/java/net/minecraft/server/CommandDispatcher.java +++ b/src/main/java/net/minecraft/server/CommandDispatcher.java @@ -246,7 +246,7 @@ public class CommandDispatcher { if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot // CraftBukkit start // Register Vanilla commands into builtRoot as before - Map, CommandNode> map = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newMutableMap(); // Use identity to prevent aliasing issues // Akarin - koloboke + Map, CommandNode> map = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newMutableMap(); // Use identity to prevent aliasing issues // Akarin - koloboke RootCommandNode vanillaRoot = new RootCommandNode(); RootCommandNode vanilla = entityplayer.server.vanillaCommandDispatcher.a().getRoot(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 59739b8da..d6a66dc51 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -101,7 +101,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati private int F; private int G; public final long[] d = new long[100]; - protected final Map e = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke + protected final Map e = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke private KeyPair H; private String I; private String J; diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java index 1008e7523..ea1e5fe6b 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -21,14 +21,15 @@ public class RegistryBlockID implements Registry { public RegistryBlockID(int i) { this.c = Lists.newArrayListWithExpectedSize(i); - this.b = com.koloboke.collect.map.hash.HashObjIntMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap((int) (i * com.koloboke.collect.hash.HashConfig.getDefault().getTargetLoad())); // Akarin - koloboke + this.b = com.koloboke.collect.map.hash.HashObjIntMaps.getDefaultFactory().withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newMutableMap(i); // Akarin - koloboke } public void a(T t0, int i) { // Akarin start + if (t0 == null) return; com.koloboke.collect.map.hash.HashObjIntMap toImmutable = com.koloboke.collect.map.hash.HashObjIntMaps.newMutableMap(this.b); toImmutable.put(t0, i); - this.b = com.koloboke.collect.map.hash.HashObjIntMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newImmutableMap(toImmutable, toImmutable.size()); + this.b = com.koloboke.collect.map.hash.HashObjIntMaps.getDefaultFactory().withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newImmutableMap(toImmutable); //this.b.put(t0, i); // Akarin end diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index c383c1f43..c7c65205e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1384,7 +1384,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { // Paper start - Use alternate implementation with faster contains - java.util.Set toRemove = com.koloboke.collect.set.hash.HashObjSets.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withEquivalence(com.koloboke.collect.Equivalence.identity()).newImmutableSet(tileEntityListUnload); // Akarin - koloboke + java.util.Set toRemove = com.koloboke.collect.set.hash.HashObjSets.getDefaultFactory().withNullKeyAllowed(true).withEquivalence(com.koloboke.collect.Equivalence.identity()).newImmutableSet(tileEntityListUnload); // Akarin - koloboke //toRemove.addAll(tileEntityListUnload); // Akarin - koloboke this.tileEntityListTick.removeAll(toRemove); // Paper end diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java index 9f38dcfe4..64513a193 100644 --- a/src/main/java/net/minecraft/server/WorldData.java +++ b/src/main/java/net/minecraft/server/WorldData.java @@ -81,7 +81,7 @@ public class WorldData { this.Q = 15; this.R = Sets.newHashSet(); this.S = Sets.newLinkedHashSet(); - this.T = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke + this.T = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke this.V = new GameRules(); this.p = null; this.q = 1631; @@ -98,7 +98,7 @@ public class WorldData { this.Q = 15; this.R = Sets.newHashSet(); this.S = Sets.newLinkedHashSet(); - this.T = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke + this.T = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke this.V = new GameRules(); this.p = datafixer; NBTTagCompound nbttagcompound2; @@ -270,7 +270,7 @@ public class WorldData { this.Q = 15; this.R = Sets.newHashSet(); this.S = Sets.newLinkedHashSet(); - this.T = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke + this.T = com.koloboke.collect.map.hash.HashObjObjMaps.getDefaultFactory().withNullKeyAllowed(true).withKeyEquivalence(com.koloboke.collect.Equivalence.identity()).newUpdatableMap(); // Akarin - koloboke this.V = new GameRules(); this.p = null; this.q = 1631;