More patches for 1.14
This commit is contained in:
@@ -6,15 +6,15 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning
|
||||
Uses an EnumMap as well as a Set paired List for O(1) contains calls.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
index c399bdecc3..3496d4236d 100644
|
||||
index 9a839d654..72eb669c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
@@ -0,0 +0,0 @@ public abstract class BiomeBase {
|
||||
protected final Map<WorldGenStage.Decoration, List<WorldGenFeatureComposite<?, ?>>> aW = Maps.newHashMap();
|
||||
protected final List<WorldGenFeatureCompositeFlower<?>> aX = Lists.newArrayList();
|
||||
protected final Map<StructureGenerator<?>, WorldGenFeatureConfiguration> aY = Maps.newHashMap();
|
||||
- private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> aZ = Maps.newHashMap();
|
||||
+ private final java.util.EnumMap<EnumCreatureType, List<BiomeBase.BiomeMeta>> aZ = Maps.newEnumMap(EnumCreatureType.class); // Paper
|
||||
protected final Map<WorldGenStage.Decoration, List<WorldGenFeatureConfigured<?>>> r = Maps.newHashMap();
|
||||
protected final List<WorldGenFeatureConfigured<?>> s = Lists.newArrayList();
|
||||
protected final Map<StructureGenerator<?>, WorldGenFeatureConfiguration> t = Maps.newHashMap();
|
||||
- private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> u = Maps.newHashMap();
|
||||
+ private final java.util.EnumMap<EnumCreatureType, List<BiomeBase.BiomeMeta>> u = Maps.newEnumMap(EnumCreatureType.class); // Paper
|
||||
|
||||
@Nullable
|
||||
public static BiomeBase a(BiomeBase biomebase) {
|
||||
@@ -22,13 +22,13 @@ index c399bdecc3..3496d4236d 100644
|
||||
for (j = 0; j < i; ++j) {
|
||||
EnumCreatureType enumcreaturetype = aenumcreaturetype[j];
|
||||
|
||||
- this.aZ.put(enumcreaturetype, Lists.newArrayList());
|
||||
+ this.aZ.put(enumcreaturetype, new MobList()); // Paper
|
||||
- this.u.put(enumcreaturetype, Lists.newArrayList());
|
||||
+ this.u.put(enumcreaturetype, new MobList()); // Paper
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -0,0 +0,0 @@ public abstract class BiomeBase {
|
||||
|
||||
return this.m;
|
||||
}
|
||||
|
||||
+ // Paper start - keep track of data in a pair set to give O(1) contains calls - we have to hook removals incase plugins mess with it
|
||||
|
||||
Reference in New Issue
Block a user