diff --git a/src/main/java/net/frozenblock/wilderwild/misc/mod_compat/FrozenLibIntegration.java b/src/main/java/net/frozenblock/wilderwild/misc/mod_compat/FrozenLibIntegration.java index 96d279e3c8..5942f42a5f 100644 --- a/src/main/java/net/frozenblock/wilderwild/misc/mod_compat/FrozenLibIntegration.java +++ b/src/main/java/net/frozenblock/wilderwild/misc/mod_compat/FrozenLibIntegration.java @@ -100,8 +100,8 @@ public FrozenLibIntegration() { } @Override - public void init() { - WilderSharedConstants.log("FrozenLib mod integration ran!", WilderSharedConstants.UNSTABLE_LOGGING); + public void initPreFreeze() { + WilderSharedConstants.log("FrozenLib pre-freeze mod integration ran!", WilderSharedConstants.UNSTABLE_LOGGING); SpottingIconPredicate.register(WilderSharedConstants.id("stella"), entity -> entity.hasCustomName() && entity.getCustomName().getString().equalsIgnoreCase("stella")); SoundPredicate.register(WilderSharedConstants.id("instrument"), new SoundPredicate.LoopPredicate() { @@ -113,7 +113,7 @@ public Boolean firstTickTest(LivingEntity entity) { } @Override - public boolean test(LivingEntity entity) { + public boolean test(LivingEntity entity) { if (firstCheck) { firstCheck = false; InteractionHand hand = !entity.getItemInHand(InteractionHand.MAIN_HAND).isEmpty() ? InteractionHand.MAIN_HAND : !entity.getItemInHand(InteractionHand.OFF_HAND).isEmpty() ? InteractionHand.OFF_HAND : null; @@ -124,9 +124,9 @@ public boolean test(LivingEntity entity) { } return entity.getUseItem().getItem() instanceof InstrumentItem; } - }); + }); SoundPredicate.register(WilderSharedConstants.id("nectar"), (SoundPredicate.LoopPredicate) entity -> - !entity.isSilent() && entity.hasCustomName() && Objects.requireNonNull(entity.getCustomName()).getString().toLowerCase().contains("nectar") + !entity.isSilent() && entity.hasCustomName() && Objects.requireNonNull(entity.getCustomName()).getString().toLowerCase().contains("nectar") ); SoundPredicate.register(WilderSharedConstants.id("enderman_anger"), (SoundPredicate.LoopPredicate) entity -> { if (entity.isSilent() || entity.isRemoved() || entity.isDeadOrDying()) { @@ -134,6 +134,11 @@ public boolean test(LivingEntity entity) { } return entity.isCreepy() || entity.hasBeenStaredAt(); }); + } + + @Override + public void init() { + WilderSharedConstants.log("FrozenLib mod integration ran!", WilderSharedConstants.UNSTABLE_LOGGING); ServerWorldEvents.LOAD.register((server, level) -> PlayerDamageSourceSounds.addDamageSound(level.damageSources().cactus(), RegisterSounds.PLAYER_HURT_CACTUS, WilderSharedConstants.id("cactus")));