Skip to content

Commit

Permalink
Use non-static EntitySpawnHandler from Zeta 27
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazkii committed Jan 8, 2024
1 parent fcbbc46 commit fee9b5b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dependencies.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
forge=47.1.3
zeta=1.0-beta-1.25
zeta=1.0-beta-1.27
jei=4712868
terrablender=1.20.1-3.0.0.169
flan=4819286
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public final void register(ZRegister event) {
.build("crab");
Quark.ZETA.registry.register(crabType, "crab", Registries.ENTITY_TYPE);

EntitySpawnHandler.registerSpawn(crabType, MobCategory.CREATURE, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Crab::spawnPredicate, spawnConfig);
EntitySpawnHandler.addEgg(this, crabType, 0x893c22, 0x916548, spawnConfig);
Quark.ZETA.entitySpawn.registerSpawn(crabType, MobCategory.CREATURE, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Crab::spawnPredicate, spawnConfig);
Quark.ZETA.entitySpawn.addEgg(this, crabType, 0x893c22, 0x916548, spawnConfig);

event.getAdvancementModifierRegistry().addModifier(new FuriousCocktailModifier(this, () -> enableBrewing, ImmutableSet.of(resilience))
.setCondition(() -> resilienceRequiredForAllEffects));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public final void register(ZRegister event) {
.build("forgotten");

Quark.ZETA.registry.register(forgottenType, "forgotten", Registries.ENTITY_TYPE);
EntitySpawnHandler.addEgg(forgottenType, 0x969487, 0x3a3330, this, BooleanSuppliers.TRUE);
Quark.ZETA.entitySpawn.addEgg(forgottenType, 0x969487, 0x3a3330, this, BooleanSuppliers.TRUE);

event.getAdvancementModifierRegistry().addModifier(new MonsterHunterModifier(this, ImmutableSet.of(forgottenType)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ public final void register(ZRegister event) {
.build("foxhound");
Quark.ZETA.registry.register(foxhoundType, "foxhound", Registries.ENTITY_TYPE);

EntitySpawnHandler.registerSpawn(foxhoundType, MobCategory.MONSTER, Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Foxhound::spawnPredicate, spawnConfig);
EntitySpawnHandler.track(foxhoundType, MobCategory.MONSTER, lesserSpawnConfig, true);
Quark.ZETA.entitySpawn.registerSpawn(foxhoundType, MobCategory.MONSTER, Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Foxhound::spawnPredicate, spawnConfig);
Quark.ZETA.entitySpawn.track(foxhoundType, MobCategory.MONSTER, lesserSpawnConfig, true);

EntitySpawnHandler.addEgg(this, foxhoundType, 0x890d0d, 0xf2af4b, spawnConfig);
Quark.ZETA.entitySpawn.addEgg(this, foxhoundType, 0x890d0d, 0xf2af4b, spawnConfig);

event.getAdvancementModifierRegistry().addModifier(new MonsterHunterModifier(this, ImmutableSet.of(foxhoundType)));
event.getAdvancementModifierRegistry().addModifier(new TwoByTwoModifier(this, ImmutableSet.of(foxhoundType)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public final void register(ZRegister event) {
.build("shiba");
Quark.ZETA.registry.register(shibaType, "shiba", Registries.ENTITY_TYPE);

EntitySpawnHandler.registerSpawn(shibaType, MobCategory.CREATURE, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Animal::checkAnimalSpawnRules, spawnConfig);
EntitySpawnHandler.addEgg(this, shibaType, 0xa86741, 0xe8d5b6, spawnConfig);
Quark.ZETA.entitySpawn.registerSpawn(shibaType, MobCategory.CREATURE, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Animal::checkAnimalSpawnRules, spawnConfig);
Quark.ZETA.entitySpawn.addEgg(this, shibaType, 0xa86741, 0xe8d5b6, spawnConfig);

event.getAdvancementModifierRegistry().addModifier(new TwoByTwoModifier(this, ImmutableSet.of(shibaType)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ public final void register(ZRegister event) {

makeStonelingTrigger = event.getAdvancementModifierRegistry().registerManualTrigger("make_stoneling");

EntitySpawnHandler.registerSpawn(stonelingType, MobCategory.MONSTER, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Stoneling::spawnPredicate, spawnConfig);
Quark.ZETA.entitySpawn.registerSpawn(stonelingType, MobCategory.MONSTER, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Stoneling::spawnPredicate, spawnConfig);
// Hardcoded AF yay
if(spawnConfig.isEnabled()) {
var GWConfig = new EntitySpawnConfig(200, 1, 4, CompoundBiomeConfig.fromBiomeReslocs(false, GlimmeringWealdModule.BIOME_NAME.toString()));
EntitySpawnHandler.track(stonelingType, MobCategory.MONSTER, GWConfig, false);
Quark.ZETA.entitySpawn.track(stonelingType, MobCategory.MONSTER, GWConfig, false);
}
EntitySpawnHandler.addEgg(this, stonelingType, 0xA1A1A1, 0x505050, spawnConfig);
Quark.ZETA.entitySpawn.addEgg(this, stonelingType, 0xA1A1A1, 0x505050, spawnConfig);
}

@LoadEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public final void register(ZRegister event) {

Quark.ZETA.registry.register(toretoiseType, "toretoise", Registries.ENTITY_TYPE);

EntitySpawnHandler.registerSpawn(toretoiseType, MobCategory.MONSTER, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Toretoise::spawnPredicate, spawnConfig);
EntitySpawnHandler.addEgg(this, toretoiseType, 0x55413b, 0x383237, spawnConfig);
Quark.ZETA.entitySpawn.registerSpawn(toretoiseType, MobCategory.MONSTER, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Toretoise::spawnPredicate, spawnConfig);
Quark.ZETA.entitySpawn.addEgg(this, toretoiseType, 0x55413b, 0x383237, spawnConfig);

mineToretoiseTrigger = event.getAdvancementModifierRegistry().registerManualTrigger("mine_toretoise");
mineFedToretoiseTrigger = event.getAdvancementModifierRegistry().registerManualTrigger("mine_fed_toretoise");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public final void register(ZRegister event) {
.build("soul_bead");
event.getRegistry().register(soulBeadType, "soul_bead", Registries.ENTITY_TYPE);

EntitySpawnHandler.registerSpawn(wraithType, MobCategory.MONSTER, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Monster::checkMonsterSpawnRules, spawnConfig);
EntitySpawnHandler.addEgg(this, wraithType, 0xececec, 0xbdbdbd, spawnConfig);
Quark.ZETA.entitySpawn.registerSpawn(wraithType, MobCategory.MONSTER, Type.ON_GROUND, Types.MOTION_BLOCKING_NO_LEAVES, Monster::checkMonsterSpawnRules, spawnConfig);
Quark.ZETA.entitySpawn.addEgg(this, wraithType, 0xececec, 0xbdbdbd, spawnConfig);

event.getAdvancementModifierRegistry().addModifier(new MonsterHunterModifier(this, ImmutableSet.of(wraithType)));
}
Expand Down

0 comments on commit fee9b5b

Please sign in to comment.