diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-05-23 16:30:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 16:30:17 +0200 |
commit | a64f285a122663649fa8bfff4871ed6e22fc964c (patch) | |
tree | e641e98eac4aba550d88c94f7cc5e2a5be6a1d8e | |
parent | 1481b8150cc4ec81562342eac4bee9490e9aac42 (diff) | |
download | NotEnoughUpdates-a64f285a122663649fa8bfff4871ed6e22fc964c.tar.gz NotEnoughUpdates-a64f285a122663649fa8bfff4871ed6e22fc964c.tar.bz2 NotEnoughUpdates-a64f285a122663649fa8bfff4871ed6e22fc964c.zip |
Add more customization to Etherwarp Display (#1177)
2 files changed, 35 insertions, 3 deletions
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(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ItemOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ItemOverlays.java index 84a63022..9b339fc4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ItemOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ItemOverlays.java @@ -243,6 +243,24 @@ public class ItemOverlays { @Expose @ConfigOption( + name = "Hide fail text", + desc = "Dont display the text saying you can't TP to the block" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 4) + public boolean hideEtherwarpFailText = false; + + @Expose + @ConfigOption( + name = "Change colour when fail", + desc = "Show a different colour when you can't TP to the block" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 4) + public boolean changeEtherwarpColourWhenFailed = false; + + @Expose + @ConfigOption( name = "Highlight Colour", desc = "Change the colour of the etherwarp target block outline" ) @@ -250,6 +268,15 @@ public class ItemOverlays { @ConfigAccordionId(id = 4) public String etherwarpHighlightColour = "00:70:156:8:96"; + @Expose + @ConfigOption( + name = "Fail Highlight Colour", + desc = "Change the colour of the etherwarp target block outline when you can't TP to that block" + ) + @ConfigEditorColour + @ConfigAccordionId(id = 4) + public String etherwarpFailHighlightColour = "00:70:220:40:40"; + @ConfigOption( name = "Bonemerang Overlay", desc = "" |