Skip to content

Commit

Permalink
Adjust injection point for Benevolent Goddess Charm check
Browse files Browse the repository at this point in the history
(fixes #4757)
  • Loading branch information
TheRealWormbo committed Nov 2, 2024
1 parent 547c563 commit 405f5c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public abstract class ExplosionFabricMixin {
@Shadow
public abstract void clearToBlow();

@Inject(method = "finalizeExplosion", at = @At("HEAD"))
private void onAffectWorld(boolean particles, CallbackInfo ci) {
@Inject(method = "explode", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;getEntities(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/AABB;)Ljava/util/List;"))
private void onAffectWorld(CallbackInfo ci) {
if (BenevolentGoddessCharmItem.shouldProtectExplosion(level, new Vec3(x, y, z))) {
clearToBlow();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private void registerEvents() {
}
});
// FabricMixinExplosion
bus.addListener((ExplosionEvent e) -> {
bus.addListener((ExplosionEvent.Detonate e) -> {
if (BenevolentGoddessCharmItem.shouldProtectExplosion(e.getLevel(), e.getExplosion().getPosition())) {
e.getExplosion().clearToBlow();
}
Expand Down

0 comments on commit 405f5c5

Please sign in to comment.