aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/anthonyhilyard')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/mixin/TextColorMixin.java6
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java2
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/util/ItemColor.java1
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/util/Selectors.java1
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();