Skip to content

Commit

Permalink
fix reach boost staying active after chestplate removed
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Apr 18, 2024
1 parent 2c6597a commit 853f934
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,16 @@ public void onToggle(ICommonArmorHandler commonArmorHandler, boolean newState) {
if (!newState) {
AttributeInstance attr = commonArmorHandler.getPlayer().getAttribute(ForgeMod.REACH_DISTANCE.get());
if (attr != null) {
attr.removeModifier(ReachDistanceHandler.REACH_DIST_BOOST);
attr.removeModifier(REACH_DIST_BOOST);
}
}
}

@Override
public void onShutdown(ICommonArmorHandler commonArmorHandler) {
AttributeInstance attr = commonArmorHandler.getPlayer().getAttribute(ForgeMod.BLOCK_REACH.get());
if (attr != null) {
attr.removeModifier(REACH_DIST_BOOST);
}
}
}

0 comments on commit 853f934

Please sign in to comment.