mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-27 02:31:43 +01:00
mob spawn settings
This commit is contained in:
parent
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;
|
||||
|
Loading…
Reference in New Issue
Block a user