File tree Expand file tree Collapse file tree
java/generations/gg/generations/core/generationscore/common/mixin
data/generations_core/spawn_pool_world Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package generations .gg .generations .core .generationscore .common .mixin ;
2+
3+ import com .cobblemon .mod .common .api .spawning .SpawnBucket ;
4+ import com .cobblemon .mod .common .api .spawning .preset .BestSpawnerConfig ;
5+ import org .spongepowered .asm .mixin .Mixin ;
6+ import org .spongepowered .asm .mixin .injection .At ;
7+ import org .spongepowered .asm .mixin .injection .Inject ;
8+ import org .spongepowered .asm .mixin .injection .callback .CallbackInfoReturnable ;
9+
10+ @ Mixin (BestSpawnerConfig .Companion .class )
11+ public class BestSpawnConfigMixin {
12+ @ Inject (method = "load" , at = @ At ("RETURN" ))
13+ public void appendLoad (CallbackInfoReturnable <BestSpawnerConfig > cir ) {
14+ var buckets = cir .getReturnValue ().getBuckets ();
15+
16+ if (buckets .stream ().noneMatch (a -> a .name .equals ("collectibles" ))) {
17+ buckets .add (new SpawnBucket ("collectibles" , 0.2f ));
18+ }
19+ }
20+ }
Original file line number Diff line number Diff line change 77 " AbilityChangerMixin" ,
88 " AbstractCauldronBlockMixin" ,
99 " AbstractFurnaceBlockEntityMixin" ,
10+ " BestSpawnConfigMixin" ,
1011 " FishingHookMixin" ,
1112 " PokemonBattleMixin" ,
1213 " RecordItemMixin" ,
Original file line number Diff line number Diff line change 33 "neededInstalledMods" : [],
44 "neededUninstalledMods" : [],
55 "spawns" : [
6- {
7- "id" : " zygardecell-1" ,
8- "type" : " zygarde" ,
9- "context" : " grounded" ,
10- "bucket" : " rare" ,
11- "weight" : 3.5
12- },
136 {
147 "id" : " zygardecell-2" ,
158 "presets" : [
169 " natural"
1710 ],
1811 "type" : " zygarde" ,
1912 "context" : " grounded" ,
20- "bucket" : " common" ,
21- "weight" : 10.0 ,
22- "condition" : {
23- "biomes" : [
24- " #cobblemon:is_plains"
25- ]
26- }
13+ "bucket" : " collectibles" ,
14+ "weight" : 1.0
2715 }
2816 ]
2917}
You can’t perform that action at this time.
0 commit comments