From a64f285a122663649fa8bfff4871ed6e22fc964c Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Thu, 23 May 2024 16:30:17 +0200 Subject: Add more customization to Etherwarp Display (#1177) --- .../notenoughupdates/miscfeatures/CustomItemEffects.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java index 24cc45a3..44169439 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java @@ -333,7 +333,7 @@ public class CustomItemEffects { } if (NotEnoughUpdates.INSTANCE.config.itemOverlays.enableEtherwarpHelperOverlay) { - if (denyTpReason != null) { + if (denyTpReason != null && !NotEnoughUpdates.INSTANCE.config.itemOverlays.hideEtherwarpFailText) { ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); Utils.drawStringCentered(EnumChatFormatting.RED + "Can't TP: " + denyTpReason, Minecraft.getMinecraft().fontRendererObj, @@ -869,18 +869,23 @@ public class CustomItemEffects { Minecraft.getMinecraft().theWorld, etherwarpRaycast.pos ); + String colour; + if (denyTpReason != null && NotEnoughUpdates.INSTANCE.config.itemOverlays.changeEtherwarpColourWhenFailed) { + colour = NotEnoughUpdates.INSTANCE.config.itemOverlays.etherwarpFailHighlightColour; + } else colour = NotEnoughUpdates.INSTANCE.config.itemOverlays.etherwarpHighlightColour; + AxisAlignedBB bb = box.expand(0.01D, 0.01D, 0.01D).offset(-d0, -d1, -d2); drawFilledBoundingBox( bb, 1f, - NotEnoughUpdates.INSTANCE.config.itemOverlays.etherwarpHighlightColour + colour ); GlStateManager.disableDepth(); drawOutlineBoundingBox( bb, 2f, - NotEnoughUpdates.INSTANCE.config.itemOverlays.etherwarpHighlightColour + colour ); GlStateManager.enableDepth(); -- cgit