diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-18 14:29:58 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-18 14:29:58 +0200 |
| commit | 400476e537c1fdfd9ef6395eb969e073f0b9f537 (patch) | |
| tree | 432a17decc6cfd994ca3228f97ea2abfddc94b72 /src/main/java/world | |
| parent | 6df240fe9902cd2777cb9447ed51c3dcb4246223 (diff) | |
refactor(config): already existing gamerule for locator bar
Diffstat (limited to 'src/main/java/world')
| -rw-r--r-- | src/main/java/world/anhgelus/lifesteal/LifeSteal.java | 8 | ||||
| -rw-r--r-- | src/main/java/world/anhgelus/lifesteal/LifeStealer.java | 3 |
2 files changed, 0 insertions, 11 deletions
diff --git a/src/main/java/world/anhgelus/lifesteal/LifeSteal.java b/src/main/java/world/anhgelus/lifesteal/LifeSteal.java index 0d5af5e..3cd9247 100644 --- a/src/main/java/world/anhgelus/lifesteal/LifeSteal.java +++ b/src/main/java/world/anhgelus/lifesteal/LifeSteal.java @@ -63,14 +63,6 @@ public class LifeSteal implements ModInitializer { CAN_STORE_HEARTS_IN_EC = rule.get(); }) ); - public static boolean ENABLE_WAYPOINT = false; - public static final GameRules.Key<GameRules.BooleanRule> RULE_ENABLE_WAYPOINT = GameRuleRegistry.register( - MOD_ID + ":enableWaypoint", - GameRules.Category.MISC, - GameRuleFactory.createBooleanRule(ENABLE_WAYPOINT, (server, rule) -> { - ENABLE_WAYPOINT = rule.get(); - }) - ); @Override public void onInitialize() { diff --git a/src/main/java/world/anhgelus/lifesteal/LifeStealer.java b/src/main/java/world/anhgelus/lifesteal/LifeStealer.java index 409e3d6..cb0ecab 100644 --- a/src/main/java/world/anhgelus/lifesteal/LifeStealer.java +++ b/src/main/java/world/anhgelus/lifesteal/LifeStealer.java @@ -77,9 +77,6 @@ public class LifeStealer { if (!newPlayer.getUuid().equals(uuid)) throw new IllegalArgumentException("Player does not have the same UUID"); this.player = newPlayer; updateHealth(); - if (LifeSteal.ENABLE_WAYPOINT) return; - updateModifier(EntityAttributes.WAYPOINT_RECEIVE_RANGE, WAYPOINT_MODIFIER.withSuffixedPath("/receive"), -60_000_000, EntityAttributeModifier.Operation.ADD_VALUE); - updateModifier(EntityAttributes.WAYPOINT_TRANSMIT_RANGE, WAYPOINT_MODIFIER.withSuffixedPath("/transmit"), -60_000_000, EntityAttributeModifier.Operation.ADD_VALUE); } public boolean kill() { |
