From 05dc0454b42ff82e6651fc851cbf0283b403d16f Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 3 Jun 2026 08:30:29 +0700 Subject: [PATCH 1/5] Provide update IClientMobEffectExtensions methods, mark old methods as deprecated for removal --- .../net/minecraft/client/gui/Gui.java.patch | 2 +- .../inventory/EffectsInInventory.java.patch | 4 +- .../common/IClientMobEffectExtensions.java | 58 +++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/patches/net/minecraft/client/gui/Gui.java.patch b/patches/net/minecraft/client/gui/Gui.java.patch index 35244230158..e31c381c5df 100644 --- a/patches/net/minecraft/client/gui/Gui.java.patch +++ b/patches/net/minecraft/client/gui/Gui.java.patch @@ -158,7 +158,7 @@ } } -+ if (renderer.renderGuiIcon(instance, this, graphics, x, y, 0, alpha)) continue; ++ if (renderer.extractGuiIcon(instance, this, graphics, x + 3, y + 3, 18, 18, ARGB.white(alpha))) continue; graphics.blitSprite(RenderPipelines.GUI_TEXTURED, getMobEffectSprite(effect), x + 3, y + 3, 18, 18, ARGB.white(alpha)); } } diff --git a/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch b/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch index 983550d018d..a4e3de0e0c0 100644 --- a/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch +++ b/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch @@ -27,9 +27,9 @@ Component duration = MobEffectUtil.formatDuration(effect, 1.0F, this.minecraft.level.tickRateManager().tickrate()); int textureWidth = this.extractBackground(graphics, font, effectText, duration, x0, y0, isAmbient, maxWidth); - this.extractText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY); -+ if (!renderer.renderInventoryText(effect, screen, graphics, x0, y0, 0)) ++ if (!renderer.extractInventoryText(effect, screen, graphics, x0 + 32, y0 + 7, textureWidth - 32 - 7, -1)) + this.renderText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY, effect); -+ if (!renderer.renderInventoryIcon(effect, screen, graphics, x0 + 7, y0, 0)) ++ if (!renderer.extractInventoryIcon(effect, screen, graphics, x0 + 7, y0 + 7, 18, 18, -1)) graphics.blitSprite(RenderPipelines.GUI_TEXTURED, Gui.getMobEffectSprite(effect.getEffect()), x0 + 7, y0 + 7, 18, 18); y0 += yStep; } diff --git a/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java b/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java index 529e4dad2e1..f89948ba81b 100644 --- a/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java +++ b/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java @@ -8,6 +8,7 @@ import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiGraphicsExtractor; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.util.ARGB; import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectInstance; import net.neoforged.fml.LogicalSide; @@ -57,11 +58,30 @@ default boolean isVisibleInGui(MobEffectInstance instance) { * @param y The y coordinate * @param blitOffset The blit offset * @return true to prevent default rendering, false otherwise + * @deprecated Use {@link IClientMobEffectExtensions#extractInventoryIcon} */ + @Deprecated(forRemoval = true, since = "26.1.2") default boolean renderInventoryIcon(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor guiGraphics, int x, int y, int blitOffset) { return false; } + /** + * Renders the icon of the specified effect in the player's inventory. + * + * @param instance The effect instance + * @param screen The effect-rendering screen + * @param graphics The gui graphics + * @param x The x coordinate to render at + * @param y The y coordinate to render at + * @param width Available width of canvas to render in + * @param height Available height of canvas to render in + * @param color Color multiplicator of the icon + * @return true to prevent default rendering, false otherwise + */ + default boolean extractInventoryIcon(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color) { + return renderInventoryIcon(instance, screen, graphics, x, y - 7, 0); // -7 for renderInventoryIcon() to receive improperly aligned argument to not break existing mods + } + /** * Renders the text of the specified effect in the player's inventory. * @@ -72,11 +92,29 @@ default boolean renderInventoryIcon(MobEffectInstance instance, AbstractContaine * @param y The y coordinate * @param blitOffset The blit offset * @return true to prevent default rendering, false otherwise + * @deprecated Use {@link IClientMobEffectExtensions#extractInventoryText} */ + @Deprecated(forRemoval = true, since = "26.1.2") default boolean renderInventoryText(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor guiGraphics, int x, int y, int blitOffset) { return false; } + /** + * Renders the text of the specified effect in the player's inventory. + * + * @param instance The effect instance + * @param screen The effect-rendering screen + * @param graphics The gui graphics + * @param x The x coordinate + * @param y The y coordinate + * @param canvasWidth Available pixels, rendering anything wider than this amount of pixels may overlap with other GUI elements or go out of bounds + * @param color Desired color of text, serving as a hint of best color to use for it to be distinct from background + * @return true to prevent default rendering, false otherwise + */ + default boolean extractInventoryText(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor graphics, int x, int y, int canvasWidth, int color) { + return renderInventoryText(instance, screen, graphics, x - 32, y - 7, 0); // -32 and -7 for renderInventoryText() to receive improperly aligned arguments to not break existing mods + } + /** * Renders the icon of the specified effect on the player's HUD. * This can be used to render icons from your own texture sheet. @@ -89,8 +127,28 @@ default boolean renderInventoryText(MobEffectInstance instance, AbstractContaine * @param z The z depth * @param alpha The alpha value. Blinks when the effect is about to run out * @return true to prevent default rendering, false otherwise + * @deprecated Use {@link IClientMobEffectExtensions#extractGuiIcon} */ + @Deprecated(forRemoval = true, since = "26.1.2") default boolean renderGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphicsExtractor guiGraphics, int x, int y, float z, float alpha) { return false; } + + /** + * Renders the icon of the specified effect on the player's HUD. + * This can be used to render icons from your own texture sheet. + * + * @param instance The effect instance + * @param gui The gui + * @param guiGraphics The gui graphics + * @param x The x coordinate + * @param y The y coordinate + * @param width Available width of canvas to render in + * @param height Available height of canvas to render in + * @param color Color multiplicator of the icon + * @return true to prevent default rendering, false otherwise + */ + default boolean extractGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height, int color) { + return renderGuiIcon(instance, gui, guiGraphics, x - 3, y - 3, 0f, ARGB.alpha(color) / 255f); // -3 for renderGuiIcon() to receive improperly aligned arguments to not break existing mods + } } From 7d2726dd1149d48b0cb2deef49fd4e1ea3413ff0 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 3 Jun 2026 09:03:19 +0700 Subject: [PATCH 2/5] Update docs spacings --- .../common/IClientMobEffectExtensions.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java b/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java index f89948ba81b..dd0ca73a1b3 100644 --- a/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java +++ b/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java @@ -68,14 +68,14 @@ default boolean renderInventoryIcon(MobEffectInstance instance, AbstractContaine /** * Renders the icon of the specified effect in the player's inventory. * - * @param instance The effect instance - * @param screen The effect-rendering screen - * @param graphics The gui graphics - * @param x The x coordinate to render at - * @param y The y coordinate to render at - * @param width Available width of canvas to render in - * @param height Available height of canvas to render in - * @param color Color multiplicator of the icon + * @param instance The effect instance + * @param screen The effect-rendering screen + * @param graphics The gui graphics + * @param x The x coordinate to render at + * @param y The y coordinate to render at + * @param width Available width of canvas to render in + * @param height Available height of canvas to render in + * @param color Color multiplicator of the icon * @return true to prevent default rendering, false otherwise */ default boolean extractInventoryIcon(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color) { @@ -138,17 +138,17 @@ default boolean renderGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphicsEx * Renders the icon of the specified effect on the player's HUD. * This can be used to render icons from your own texture sheet. * - * @param instance The effect instance - * @param gui The gui - * @param guiGraphics The gui graphics - * @param x The x coordinate - * @param y The y coordinate - * @param width Available width of canvas to render in - * @param height Available height of canvas to render in - * @param color Color multiplicator of the icon + * @param instance The effect instance + * @param gui The gui + * @param graphics The gui graphics + * @param x The x coordinate + * @param y The y coordinate + * @param width Available width of canvas to render in + * @param height Available height of canvas to render in + * @param color Color multiplicator of the icon * @return true to prevent default rendering, false otherwise */ - default boolean extractGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height, int color) { - return renderGuiIcon(instance, gui, guiGraphics, x - 3, y - 3, 0f, ARGB.alpha(color) / 255f); // -3 for renderGuiIcon() to receive improperly aligned arguments to not break existing mods + default boolean extractGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color) { + return renderGuiIcon(instance, gui, graphics, x - 3, y - 3, 0f, ARGB.alpha(color) / 255f); // -3 for renderGuiIcon() to receive improperly aligned arguments to not break existing mods } } From 24f35f3dceb94573a6f563e52567f19276e4b4dc Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 8 Aug 2026 19:14:01 +0700 Subject: [PATCH 3/5] Specify color as static constant instead of magical value --- .../gui/screens/inventory/EffectsInInventory.java.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch b/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch index a4e3de0e0c0..c990f33665c 100644 --- a/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch +++ b/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch @@ -27,9 +27,9 @@ Component duration = MobEffectUtil.formatDuration(effect, 1.0F, this.minecraft.level.tickRateManager().tickrate()); int textureWidth = this.extractBackground(graphics, font, effectText, duration, x0, y0, isAmbient, maxWidth); - this.extractText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY); -+ if (!renderer.extractInventoryText(effect, screen, graphics, x0 + 32, y0 + 7, textureWidth - 32 - 7, -1)) ++ if (!renderer.extractInventoryText(effect, screen, graphics, x0 + 32, y0 + 7, textureWidth - 32 - 7, net.minecraft.util.CommonColors.WHITE)) + this.renderText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY, effect); -+ if (!renderer.extractInventoryIcon(effect, screen, graphics, x0 + 7, y0 + 7, 18, 18, -1)) ++ if (!renderer.extractInventoryIcon(effect, screen, graphics, x0 + 7, y0 + 7, 18, 18, net.minecraft.util.CommonColors.WHITE)) graphics.blitSprite(RenderPipelines.GUI_TEXTURED, Gui.getMobEffectSprite(effect.getEffect()), x0 + 7, y0 + 7, 18, 18); y0 += yStep; } From 1b0fc21953b40d26d0b3d4eece4d59c590a31799 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 8 Aug 2026 19:15:12 +0700 Subject: [PATCH 4/5] Rename renderText to extractText in patched in function name --- .../gui/screens/inventory/EffectsInInventory.java.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch b/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch index c990f33665c..4305513ce28 100644 --- a/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch +++ b/patches/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java.patch @@ -28,7 +28,7 @@ int textureWidth = this.extractBackground(graphics, font, effectText, duration, x0, y0, isAmbient, maxWidth); - this.extractText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY); + if (!renderer.extractInventoryText(effect, screen, graphics, x0 + 32, y0 + 7, textureWidth - 32 - 7, net.minecraft.util.CommonColors.WHITE)) -+ this.renderText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY, effect); ++ this.extractText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY, effect); + if (!renderer.extractInventoryIcon(effect, screen, graphics, x0 + 7, y0 + 7, 18, 18, net.minecraft.util.CommonColors.WHITE)) graphics.blitSprite(RenderPipelines.GUI_TEXTURED, Gui.getMobEffectSprite(effect.getEffect()), x0 + 7, y0 + 7, 18, 18); y0 += yStep; @@ -41,9 +41,9 @@ private void extractText( GuiGraphicsExtractor graphics, Component effectText, Component duration, Font font, int x0, int y0, int textureWidth, int yStep, int mouseX, int mouseY ) { -+ renderText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY, null); ++ extractText(graphics, effectText, duration, font, x0, y0, textureWidth, yStep, mouseX, mouseY, null); + } -+ private void renderText( ++ private void extractText( + GuiGraphicsExtractor graphics, Component effectText, Component duration, Font font, int x0, int y0, int textureWidth, int yStep, int mouseX, int mouseY, @org.jspecify.annotations.Nullable MobEffectInstance effectInstance + ) { int textX = x0 + 32; From f2f693fe412325005ecc20998071d431cc2c4119 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 31 Aug 2026 11:04:12 +0700 Subject: [PATCH 5/5] Update docs to Markdown --- .../common/IClientMobEffectExtensions.java | 166 ++++++++---------- 1 file changed, 73 insertions(+), 93 deletions(-) diff --git a/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java b/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java index dd0ca73a1b3..c5e68918dba 100644 --- a/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java +++ b/src/client/java/net/neoforged/neoforge/client/extensions/common/IClientMobEffectExtensions.java @@ -13,11 +13,9 @@ import net.minecraft.world.effect.MobEffectInstance; import net.neoforged.fml.LogicalSide; -/** - * {@linkplain LogicalSide#CLIENT Client-only} extensions to {@link MobEffect}. - * - * @see RegisterClientExtensionsEvent - */ +/// [Client-only][LogicalSide#CLIENT] extensions to [MobEffect]. +/// +/// @see RegisterClientExtensionsEvent public interface IClientMobEffectExtensions { IClientMobEffectExtensions DEFAULT = new IClientMobEffectExtensions() {}; @@ -29,125 +27,107 @@ static IClientMobEffectExtensions of(MobEffect effect) { return ClientExtensionsManager.MOB_EFFECT_EXTENSIONS.getOrDefault(effect, DEFAULT); } - /** - * Queries whether the given effect should be shown in the player's inventory. - *

- * By default, this returns {@code true}. - */ + /// @return Whether the given effect should be shown in the player's inventory + /// @implNote By default, this returns `true`. default boolean isVisibleInInventory(MobEffectInstance instance) { return true; } - /** - * Queries whether the given effect should be shown in the HUD. - *

- * By default, this returns {@code true}. - */ + /// @return Whether the given effect should be shown in the HUD + /// @implNote By default, this returns `true`. default boolean isVisibleInGui(MobEffectInstance instance) { return true; } - /** - * Renders the icon of the specified effect in the player's inventory. - * This can be used to render icons from your own texture sheet. - * - * @param instance The effect instance - * @param screen The effect-rendering screen - * @param guiGraphics The gui graphics - * @param x The x coordinate - * @param y The y coordinate - * @param blitOffset The blit offset - * @return true to prevent default rendering, false otherwise - * @deprecated Use {@link IClientMobEffectExtensions#extractInventoryIcon} - */ + /// Renders the icon of the specified effect in the player's inventory. + /// This can be used to render icons from your own texture sheet. + /// + /// @param instance The effect instance + /// @param screen The effect-rendering screen + /// @param guiGraphics The gui graphics + /// @param x The x coordinate + /// @param y The y coordinate + /// @param blitOffset The blit offset + /// @return `true` to prevent default rendering, `false` otherwise + /// @deprecated Use [IClientMobEffectExtensions#extractInventoryIcon] @Deprecated(forRemoval = true, since = "26.1.2") default boolean renderInventoryIcon(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor guiGraphics, int x, int y, int blitOffset) { return false; } - /** - * Renders the icon of the specified effect in the player's inventory. - * - * @param instance The effect instance - * @param screen The effect-rendering screen - * @param graphics The gui graphics - * @param x The x coordinate to render at - * @param y The y coordinate to render at - * @param width Available width of canvas to render in - * @param height Available height of canvas to render in - * @param color Color multiplicator of the icon - * @return true to prevent default rendering, false otherwise - */ + /// Extracts the icon of the specified effect in the player's inventory. + /// + /// @param instance The effect instance + /// @param screen The effect-rendering screen + /// @param graphics The gui graphics + /// @param x The x coordinate to render at + /// @param y The y coordinate to render at + /// @param width Available width of canvas to render in + /// @param height Available height of canvas to render in + /// @param color Color multiplicator of the icon + /// @return `true` to prevent default rendering, `false` otherwise default boolean extractInventoryIcon(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color) { return renderInventoryIcon(instance, screen, graphics, x, y - 7, 0); // -7 for renderInventoryIcon() to receive improperly aligned argument to not break existing mods } - /** - * Renders the text of the specified effect in the player's inventory. - * - * @param instance The effect instance - * @param screen The effect-rendering screen - * @param guiGraphics The gui graphics - * @param x The x coordinate - * @param y The y coordinate - * @param blitOffset The blit offset - * @return true to prevent default rendering, false otherwise - * @deprecated Use {@link IClientMobEffectExtensions#extractInventoryText} - */ + /// Renders the text of the specified effect in the player's inventory. + /// + /// @param instance The effect instance + /// @param screen The effect-rendering screen + /// @param guiGraphics The gui graphics + /// @param x The x coordinate + /// @param y The y coordinate + /// @param blitOffset The blit offset + /// @return `true` to prevent default rendering, `false` otherwise + /// @deprecated Use [IClientMobEffectExtensions#extractInventoryText] @Deprecated(forRemoval = true, since = "26.1.2") default boolean renderInventoryText(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor guiGraphics, int x, int y, int blitOffset) { return false; } - /** - * Renders the text of the specified effect in the player's inventory. - * - * @param instance The effect instance - * @param screen The effect-rendering screen - * @param graphics The gui graphics - * @param x The x coordinate - * @param y The y coordinate - * @param canvasWidth Available pixels, rendering anything wider than this amount of pixels may overlap with other GUI elements or go out of bounds - * @param color Desired color of text, serving as a hint of best color to use for it to be distinct from background - * @return true to prevent default rendering, false otherwise - */ + /// Extracts the text of the specified effect in the player's inventory. + /// + /// @param instance The effect instance + /// @param screen The effect-rendering screen + /// @param graphics The gui graphics + /// @param x The x coordinate + /// @param y The y coordinate + /// @param canvasWidth Available pixels, rendering anything wider than this amount of pixels may overlap with other GUI elements or go out of bounds + /// @param color Desired color of text, serving as a hint of best color to use for it to be distinct from background + /// @return `true` to prevent default rendering, `false` otherwise default boolean extractInventoryText(MobEffectInstance instance, AbstractContainerScreen screen, GuiGraphicsExtractor graphics, int x, int y, int canvasWidth, int color) { return renderInventoryText(instance, screen, graphics, x - 32, y - 7, 0); // -32 and -7 for renderInventoryText() to receive improperly aligned arguments to not break existing mods } - /** - * Renders the icon of the specified effect on the player's HUD. - * This can be used to render icons from your own texture sheet. - * - * @param instance The effect instance - * @param gui The gui - * @param guiGraphics The gui graphics - * @param x The x coordinate - * @param y The y coordinate - * @param z The z depth - * @param alpha The alpha value. Blinks when the effect is about to run out - * @return true to prevent default rendering, false otherwise - * @deprecated Use {@link IClientMobEffectExtensions#extractGuiIcon} - */ + /// Renders the icon of the specified effect on the player's HUD. + /// This can be used to render icons from your own texture sheet. + /// + /// @param instance The effect instance + /// @param gui The gui + /// @param guiGraphics The gui graphics + /// @param x The x coordinate + /// @param y The y coordinate + /// @param z The z depth + /// @param alpha The alpha value. Blinks when the effect is about to run out + /// @return `true` to prevent default rendering, `false` otherwise + /// @deprecated Use [IClientMobEffectExtensions#extractGuiIcon] @Deprecated(forRemoval = true, since = "26.1.2") default boolean renderGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphicsExtractor guiGraphics, int x, int y, float z, float alpha) { return false; } - /** - * Renders the icon of the specified effect on the player's HUD. - * This can be used to render icons from your own texture sheet. - * - * @param instance The effect instance - * @param gui The gui - * @param graphics The gui graphics - * @param x The x coordinate - * @param y The y coordinate - * @param width Available width of canvas to render in - * @param height Available height of canvas to render in - * @param color Color multiplicator of the icon - * @return true to prevent default rendering, false otherwise - */ + /// Extracts the icon of the specified effect on the player's HUD. + /// This can be used to render icons from your own texture sheet. + /// + /// @param instance The effect instance + /// @param gui The gui + /// @param graphics The gui graphics + /// @param x The x coordinate + /// @param y The y coordinate + /// @param width Available width of canvas to render in + /// @param height Available height of canvas to render in + /// @param color Color multiplicator of the icon + /// @return `true` to prevent default rendering, `false` otherwise default boolean extractGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color) { return renderGuiIcon(instance, gui, graphics, x - 3, y - 3, 0f, ARGB.alpha(color) / 255f); // -3 for renderGuiIcon() to receive improperly aligned arguments to not break existing mods }