Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config option: disable energy overlay #1438

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public static void build() {
}

public static class Other {
public static ModConfigSpec.BooleanValue HIDE_ENERGY_OVERLAY;
public static ModConfigSpec.BooleanValue SOLID_XP_ALWAYS_ORBS;
public static ModConfigSpec.BooleanValue DO_UPDATE_CHECK;
public static ModConfigSpec.BooleanValue UPDATE_CHECK_VERSION_SPECIFIC;
Expand Down Expand Up @@ -116,6 +117,9 @@ public static void build() {

BUILDER.comment("Everything else").push("other");

HIDE_ENERGY_OVERLAY = BUILDER.comment("If true, when looking at blocks the Energy Overlay will be hidden.")
.define("hideEnergyOverlay", false);

SOLID_XP_ALWAYS_ORBS = BUILDER.comment("If true, Solidified Experience will always spawn orbs, even for regular players.")
.define("solidXPOrbs", false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void onGameOverlay(RenderGuiLayerEvent.Post event) {
}
}

if (tileHit instanceof IEnergyDisplay display) {
if (tileHit instanceof IEnergyDisplay display && !CommonConfig.Other.HIDE_ENERGY_OVERLAY.get()) {
if (!display.needsHoldShift() || player.isShiftKeyDown()) {
if (energyDisplay == null) {
energyDisplay = new EnergyDisplay(0, 0, null);
Expand Down