Skip to content

Commit

Permalink
fix particles appearing even if nothing is held
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Jan 9, 2023
1 parent 963ffcd commit 87284fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_name = OverflowAnimations
mod_id = overflowanimations
mod_version = 2.0.1-beta5
mod_version = 2.0.1-beta6

essential.defaults.loom=0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ private void updateSwingProgress() {
mc.objectMouseOver != null &&
mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
if (OldAnimationsSettings.punchingParticles && isSwingInProgress) {
if (!OldAnimationsSettings.adventureParticles) {
mc.effectRenderer.addBlockHitEffects(mc.objectMouseOver.getBlockPos(), mc.objectMouseOver.sideHit);
} else if (player.capabilities.allowEdit) {
mc.effectRenderer.addBlockHitEffects(mc.objectMouseOver.getBlockPos(), mc.objectMouseOver.sideHit);
ItemStack heldItem = mc.thePlayer.getHeldItem();
if (heldItem != null && heldItem.getItemUseAction() != EnumAction.NONE) {
if (!OldAnimationsSettings.adventureParticles) {
mc.effectRenderer.addBlockHitEffects(mc.objectMouseOver.getBlockPos(), mc.objectMouseOver.sideHit);
} else if (player.capabilities.allowEdit) {
mc.effectRenderer.addBlockHitEffects(mc.objectMouseOver.getBlockPos(), mc.objectMouseOver.sideHit);
}
}
}
if (!this.isSwingInProgress || this.swingProgressInt >= max >> 1 || this.swingProgressInt < 0) {
Expand Down

0 comments on commit 87284fb

Please sign in to comment.