Skip to content

Commit

Permalink
Don't clear bell entity list if its shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
aromaa committed Oct 31, 2023
1 parent f1e5a61 commit 1a62ba2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
@Mixin(BellBlockEntity.class)
public abstract class BellBLockEntityMixin extends BlockEntityMixin implements BellBlockEntityBridge {

// @formatter:off
@Shadow private List<LivingEntity> nearbyEntities;
@Shadow private long lastRingTimestamp;
@Shadow private boolean shaking;
// @formatter:on

@Override
public void bridge$clearNearbyEntities() {
if (this.nearbyEntities != null && this.level.getGameTime() > this.lastRingTimestamp + 60L) {
if (!this.shaking && this.nearbyEntities != null && this.level.getGameTime() > this.lastRingTimestamp + 60L) {
this.nearbyEntities = null;
}
}
Expand Down

0 comments on commit 1a62ba2

Please sign in to comment.