diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-08-06 17:07:20 -0700 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-08-06 17:07:20 -0700 |
commit | 7a93277b92f834c5a27f627cd0f873417cdbe95e (patch) | |
tree | a10731ff737ec997df21bf2eb249a97a212e422d /src/main | |
parent | 2e8fbe2faa63ffba2066901135eb9799572614ae (diff) | |
download | Iceberg-7a93277b92f834c5a27f627cd0f873417cdbe95e.tar.gz Iceberg-7a93277b92f834c5a27f627cd0f873417cdbe95e.tar.bz2 Iceberg-7a93277b92f834c5a27f627cd0f873417cdbe95e.zip |
Ported changes through 1.0.46.
Diffstat (limited to 'src/main')
4 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/mixin/TextColorMixin.java b/src/main/java/com/anthonyhilyard/iceberg/mixin/TextColorMixin.java index 02bca31..ace26f8 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/mixin/TextColorMixin.java +++ b/src/main/java/com/anthonyhilyard/iceberg/mixin/TextColorMixin.java @@ -14,23 +14,21 @@ public class TextColorMixin * Fix an issue in TextColor parsing that makes it so only alpha values up to 0x7F are supported. */ @Inject(method = "parseColor", at = @At("HEAD"), cancellable = true) - private static boolean parseColor(String colorString, CallbackInfoReturnable<TextColor> info) + private static void parseColor(String colorString, CallbackInfoReturnable<TextColor> info) { if (!colorString.startsWith("#")) { - return false; + return; } try { int i = Integer.parseUnsignedInt(colorString.substring(1), 16); info.setReturnValue(TextColor.fromRgb(i)); - return true; } catch (NumberFormatException numberformatexception) { info.setReturnValue(null); - return true; } } }
\ No newline at end of file diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java b/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java index 9e0f60c..d3530fe 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java @@ -1,7 +1,9 @@ package com.anthonyhilyard.iceberg.util; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.renderer.GameRenderer; + import com.mojang.blaze3d.vertex.Tesselator; import com.mojang.blaze3d.vertex.BufferBuilder; import com.mojang.blaze3d.vertex.BufferUploader; diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/ItemColor.java b/src/main/java/com/anthonyhilyard/iceberg/util/ItemColor.java index 8d31054..8831bad 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/ItemColor.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/ItemColor.java @@ -12,6 +12,7 @@ import java.util.List; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; +@Deprecated(forRemoval = true) public class ItemColor { private static class ColorCollector implements FormattedCharSink diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java b/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java index 87b4d92..6a7b90d 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java @@ -144,6 +144,7 @@ public class Selectors * @param selector A selector string to check against. * @return True if the item matches, false otherwise. */ + @SuppressWarnings({"removal"}) public static boolean itemMatches(ItemStack item, String selector) { String itemResourceLocation = Registry.ITEM.getKey(item.getItem()).toString(); |