Update patches to handle vineflower decompiler (#10406)
* Update patches to handle vineflower decompiler * update patches again to handle inlined simple lambdas * update vf again and re-apply/rebuild patches * update patches after removal of verify-merges flag * fix compile issue * remove maven local * fix some issues * address more issues * fix collision patch * use paperweight release * more fixes * update fineflower and fix patches again * add missing comment descriptor --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
- private final Map<MobCategory, List<MobSpawnSettings.SpawnerData>> spawners = Stream.of(MobCategory.values()).collect(ImmutableMap.toImmutableMap((mobCategory) -> {
|
||||
+ // Paper start - Perf: keep track of data in a pair set to give O(1) contains calls - we have to hook removals incase plugins mess with it
|
||||
+ public static class MobList extends java.util.ArrayList<MobSpawnSettings.SpawnerData> {
|
||||
+ java.util.Set<MobSpawnSettings.SpawnerData> biomes = new java.util.HashSet<>();
|
||||
@@ -45,12 +44,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ }
|
||||
+ // use toImmutableEnumMap collector
|
||||
+ private final Map<MobCategory, List<MobSpawnSettings.SpawnerData>> spawners = (Map) Stream.of(MobCategory.values()).collect(Maps.toImmutableEnumMap((mobCategory) -> {
|
||||
return mobCategory;
|
||||
}, (mobCategory) -> {
|
||||
- return Lists.newArrayList();
|
||||
+ return new MobList(); // Use MobList instead of ArrayList
|
||||
}));
|
||||
private final Map<MobCategory, List<MobSpawnSettings.SpawnerData>> spawners = Stream.of(MobCategory.values())
|
||||
- .collect(ImmutableMap.toImmutableMap(mobCategory -> (MobCategory)mobCategory, mobCategory -> 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
|
||||
private final Map<EntityType<?>, MobSpawnSettings.MobSpawnCost> mobSpawnCosts = Maps.newLinkedHashMap();
|
||||
private float creatureGenerationProbability = 0.1F;
|
||||
|
||||
Reference in New Issue
Block a user