Update ClientEvents.java

This commit is contained in:
Caffeine 2024-11-06 12:41:38 +01:00 committed by GitHub
parent 12527cd168
commit e21713e39a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,8 +60,6 @@ public class ClientEvents {
private static EnergyDisplay energyDisplay; private static EnergyDisplay energyDisplay;
boolean shouldHideEnergyOverlay = CommonConfig.Other.HIDE_ENERGY_OVERLAY.get();
// TODO: [port] the fuck? // TODO: [port] the fuck?
@SubscribeEvent @SubscribeEvent
public void onClientTick(ClientTickEvent.Post event) { public void onClientTick(ClientTickEvent.Post event) {
@ -266,7 +264,7 @@ public class ClientEvents {
} }
} }
if (tileHit instanceof IEnergyDisplay display && !shouldHideEnergyOverlay) { if (tileHit instanceof IEnergyDisplay display && !CommonConfig.Other.HIDE_ENERGY_OVERLAY.get()) {
if (!display.needsHoldShift() || player.isShiftKeyDown()) { if (!display.needsHoldShift() || player.isShiftKeyDown()) {
if (energyDisplay == null) { if (energyDisplay == null) {
energyDisplay = new EnergyDisplay(0, 0, null); energyDisplay = new EnergyDisplay(0, 0, null);