Skip to content

Commit

Permalink
Remove Effigy waypoints updating every frame
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthegreat1 committed Jun 29, 2023
1 parent 9401018 commit 25ff18e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ public static class Slayer {
public static class VampireSlayer {
public boolean enableEffigyWaypoints = true;
public boolean compactEffigyWaypoints;
@ConfigEntry.BoundedDiscrete(min = 1, max = 10)
@ConfigEntry.Gui.Tooltip()
public int effigyUpdateFrequency = 5;
public boolean enableHolyIceIndicator = true;
public int holyIceIndicatorTickDelay = 10;
@ConfigEntry.BoundedDiscrete(min = 1, max = 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ public static void updateEffigies() {
}

public static void render(WorldRenderContext context) {
if (SkyblockerConfig.get().slayer.vampireSlayer.enableEffigyWaypoints && (Utils.getLocation().contains("Stillgore Château"))) {
updateEffigies();
if (SkyblockerConfig.get().slayer.vampireSlayer.enableEffigyWaypoints && Utils.getLocation().contains("Stillgore Château")) {
for (BlockPos effigy : unBrokenEffigies) {
float[] colorComponents = DyeColor.RED.getColorComponents();
if (SkyblockerConfig.get().slayer.vampireSlayer.compactEffigyWaypoints) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class TheRift {
public static void init() {
WorldRenderEvents.AFTER_TRANSLUCENT.register(MirrorverseWaypoints::render);
WorldRenderEvents.AFTER_TRANSLUCENT.register(EffigyWaypoints::render);
SkyblockerMod.getInstance().scheduler.scheduleCyclic(StakeIndicator::updateStake, SkyblockerConfig.get().slayer.vampireSlayer.steakStakeUpdateFrequency);
SkyblockerMod.getInstance().scheduler.scheduleCyclic(EffigyWaypoints::updateEffigies, SkyblockerConfig.get().slayer.vampireSlayer.effigyUpdateFrequency);
SkyblockerMod.getInstance().scheduler.scheduleCyclic(TwinClawsIndicator::updateIce, SkyblockerConfig.get().slayer.vampireSlayer.holyIceUpdateFrequency);
SkyblockerMod.getInstance().scheduler.scheduleCyclic(StakeIndicator::updateStake, SkyblockerConfig.get().slayer.vampireSlayer.steakStakeUpdateFrequency);
}
}
2 changes: 2 additions & 0 deletions src/main/resources/assets/skyblocker/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@
"text.autoconfig.skyblocker.option.slayer.vampireSlayer": "Vampire Slayer",
"text.autoconfig.skyblocker.option.slayer.vampireSlayer.enableEffigyWaypoints": "Enable Effigy Waypoints",
"text.autoconfig.skyblocker.option.slayer.vampireSlayer.compactEffigyWaypoints": "Compact Effigy Waypoints",
"text.autoconfig.skyblocker.option.slayer.vampireSlayer.effigyUpdateFrequency": "Holy Ice Indicator Update Frequency (Ticks)",
"text.autoconfig.skyblocker.option.slayer.vampireSlayer.effigyUpdateFrequency.@Tooltip": "The lower the value, the more frequent the updates, which may cause lag.",
"text.autoconfig.skyblocker.option.slayer.vampireSlayer.enableHolyIceIndicator": "Enable Holy Ice Indicator",
"text.autoconfig.skyblocker.option.slayer.vampireSlayer.holyIceIndicatorTickDelay": "Holy Ice Indicator Delay (Ticks)",
"text.autoconfig.skyblocker.option.slayer.vampireSlayer.holyIceUpdateFrequency": "Holy Ice Indicator Update Frequency (Ticks)",
Expand Down

0 comments on commit 25ff18e

Please sign in to comment.