geforkt von Mirrors/Paper
mob spawn settings
Dieser Commit ist enthalten in:
Ursprung
d9e895a6d4
Commit
2509faa08e
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
+++ b/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
@@ -75,8 +75,40 @@
|
||||
@@ -75,8 +_,40 @@
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
@ -36,9 +36,9 @@
|
||||
+ }
|
||||
+ // use toImmutableEnumMap collector
|
||||
private final Map<MobCategory, List<MobSpawnSettings.SpawnerData>> spawners = Stream.of(MobCategory.values())
|
||||
- .collect(ImmutableMap.toImmutableMap(mobCategory -> (MobCategory)mobCategory, mobCategory -> Lists.newArrayList()));
|
||||
- .collect(ImmutableMap.toImmutableMap(key -> (MobCategory)key, value -> Lists.newArrayList()));
|
||||
+ .collect(Maps.toImmutableEnumMap(mobCategory -> (MobCategory)mobCategory, mobCategory -> new MobList())); // Use MobList instead of ArrayList
|
||||
+ // Paper end - Perf: keep track of data in a pair set to give O(1) contains calls
|
||||
+ // Paper end - Perf: keep track of data in a pair set to give O(1) contains calls
|
||||
private final Map<EntityType<?>, MobSpawnSettings.MobSpawnCost> mobSpawnCosts = Maps.newLinkedHashMap();
|
||||
private float creatureGenerationProbability = 0.1F;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren