Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
Attempted fix for BeehiveBlockMixin inject failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
MerchantPug committed Nov 13, 2023
1 parent 6f9b05b commit caa3ffa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
- Fixed priority on `modify_scale` Scale Modifiers being the same as a regular scale modifier.
- Fixed flickering with `modify_scale` powers.
- Fixed modify scale not stacking with a `delay` field higher than 0 and conditional. #61
- Fixed a crash relating to explosions. #62
- Fixed a crash relating to explosions. #62
- Fixed a crash relating to `prevent_bee_anger` and beehive blocks. #62 (part 2)
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
@Mixin(BeehiveBlock.class)
public class BeehiveBlockMixin {

@Inject(method = "angerNearbyBees", at = @At(value = "INVOKE", target = "Ljava/util/List;iterator()Ljava/util/Iterator;", shift = At.Shift.BEFORE), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true)
@Inject(method = "angerNearbyBees", at = @At(value = "INVOKE", target = "Ljava/util/List;isEmpty()Z", ordinal = 1), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true)
private void apugli$dontAngerBees(Level level, BlockPos pos, CallbackInfo ci, AABB aABB, List<Bee> list, List<Player> list2) {
if (list2.stream().anyMatch(player -> Services.POWER.hasPower(player, ApugliPowers.PREVENT_BEE_ANGER.get()))) {
if (!list2.isEmpty() && list2.stream().anyMatch(player -> Services.POWER.hasPower(player, ApugliPowers.PREVENT_BEE_ANGER.get()))) {
ci.cancel();
}
}
Expand Down

0 comments on commit caa3ffa

Please sign in to comment.