From 400476e537c1fdfd9ef6395eb969e073f0b9f537 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Sat, 18 Oct 2025 14:29:58 +0200 Subject: refactor(config): already existing gamerule for locator bar --- src/main/java/world/anhgelus/lifesteal/LifeSteal.java | 8 -------- src/main/java/world/anhgelus/lifesteal/LifeStealer.java | 3 --- 2 files changed, 11 deletions(-) (limited to 'src') 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 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() { -- cgit v1.2.3