Skip to content

Commit

Permalink
Fix the felling options stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hammertater committed Aug 6, 2023
1 parent 475948a commit 28f8ab3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ht.treechop.client.gui.screen;

import ht.treechop.client.settings.ClientChopSettings;
import net.minecraft.client.gui.GuiGraphics;
import ht.treechop.TreeChop;
import ht.treechop.client.Client;
Expand Down Expand Up @@ -208,7 +209,11 @@ private LinkedList<NestedGui> makePageTwo() {
boolean newValue = !ConfigHandler.CLIENT.showFellingOptions.get();
ConfigHandler.CLIENT.showFellingOptions.set(newValue);
if (!newValue) {
ConfigHandler.CLIENT.fellingEnabled.set(true);
ClientChopSettings settings = Client.getChopSettings();
settings.setFellingEnabled(true);
if (settings.getSneakBehavior() == SneakBehavior.INVERT_FELLING) {
settings.setSneakBehavior(SneakBehavior.INVERT_CHOPPING);
}
}
},
() -> ToggleWidget.State.of(
Expand Down

0 comments on commit 28f8ab3

Please sign in to comment.