9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-28 11:29:12 +00:00

feat: hopper counter unlimited speed(#625) (#639)

* feat: hopper counter unlimited speed

* fix: fix checkout err

* fix: fix comment

* chore: format
This commit is contained in:
MC_XiaoHei
2025-08-01 13:41:00 +08:00
committed by GitHub
parent 04dac366f8
commit e5aba7eb5c
7 changed files with 67 additions and 19 deletions

View File

@@ -620,8 +620,17 @@ public final class LeavesConfig {
@GlobalConfig("bow-infinity-fix")
public boolean bowInfinityFix = false;
@GlobalConfig("hopper-counter")
public boolean hopperCounter = false;
public HopperCounterConfig hopperCounter = new HopperCounterConfig();
@GlobalConfigCategory("hopper-counter")
public static class HopperCounterConfig {
@RemovedConfig(name = "hopper-counter", category = "modify", transform = true)
@GlobalConfig("enabled")
public boolean enabled = false;
@GlobalConfig("unlimited-speed")
public boolean unlimitedSpeed = false;
}
@GlobalConfig(value = "spider-jockeys-drop-gapples", validator = JockeysDropGAppleValidator.class)
public double spiderJockeysDropGapples = -1.0;

View File

@@ -101,6 +101,6 @@ public class CounterCommand implements LeavesSubcommand {
@Override
public boolean isEnabled() {
return LeavesConfig.modify.hopperCounter;
return LeavesConfig.modify.hopperCounter.enabled;
}
}

View File

@@ -339,6 +339,6 @@ public class HopperCounter {
}
public static boolean isEnabled() {
return LeavesConfig.modify.hopperCounter && enabled;
return LeavesConfig.modify.hopperCounter.enabled && enabled;
}
}