Skip to content

Commit

Permalink
Cocoa Left/Right Macro:
Browse files Browse the repository at this point in the history
 = Fixed switching lane and ease back rotations
  • Loading branch information
May2Beez committed May 4, 2024
1 parent 8b01097 commit 661cffa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.6.20
version=2.6.21
shouldRelease=true
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.jelly.farmhelperv2.config.FarmHelperConfig;
import com.jelly.farmhelperv2.pathfinder.FlyPathFinderExecutor;
import com.jelly.farmhelperv2.util.LogUtils;
import com.jelly.farmhelperv2.util.PlayerUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.util.Vec3;
Expand Down Expand Up @@ -63,6 +64,7 @@ public void stoppath() {

@SubCommand(aliases = {"up"})
public void update() {
PlayerUtils.closeScreen();
FarmHelperConfig.checkForUpdate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public void onEnable() {
new RotationConfiguration(
new Rotation(getYaw(), getPitch()),
FarmHelperConfig.getRandomRotationTime(), null
).easeOutBack(!MacroHandler.getInstance().isResume())
).easeOutBack(!MacroHandler.getInstance().isResume() && FarmHelperConfig.getMacro() == FarmHelperConfig.MacroEnum.S_COCOA_BEANS_LEFT_RIGHT)
);
}

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/jelly/farmhelperv2/util/PlayerUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ public static boolean shouldPushBack() {

public static boolean shouldWalkForwards() {
if (FailsafeManager.getInstance().triggeredFailsafe.isPresent()) return false;
if (MacroHandler.getInstance().getCrop() == FarmHelperConfig.CropEnum.CACTUS || (FarmHelperConfig.getMacro() != FarmHelperConfig.MacroEnum.S_PUMPKIN_MELON_MELONGKINGDE && (MacroHandler.getInstance().getCrop() == FarmHelperConfig.CropEnum.PUMPKIN || MacroHandler.getInstance().getCrop() == FarmHelperConfig.CropEnum.MELON)))
if (MacroHandler.getInstance().getCrop() == FarmHelperConfig.CropEnum.CACTUS ||
(FarmHelperConfig.getMacro() != FarmHelperConfig.MacroEnum.S_PUMPKIN_MELON_MELONGKINGDE && (MacroHandler.getInstance().getCrop() == FarmHelperConfig.CropEnum.PUMPKIN || MacroHandler.getInstance().getCrop() == FarmHelperConfig.CropEnum.MELON)) ||
(MacroHandler.getInstance().getCrop() == FarmHelperConfig.CropEnum.COCOA_BEANS && FarmHelperConfig.getMacro() == FarmHelperConfig.MacroEnum.S_COCOA_BEANS_LEFT_RIGHT))
return false;

float angle = AngleUtils.getClosest();
Expand Down

0 comments on commit 661cffa

Please sign in to comment.