aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
index 7c3414fa..be36d0b4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
@@ -96,7 +96,7 @@ public abstract class MixinGuiContainer extends GuiScreen {
if (tag.hasKey("SkullOwner") && tag.getCompoundTag("SkullOwner").hasKey("Name")) {
String tagName = tag.getCompoundTag("SkullOwner").getString("Name");
String displayName = Utils.cleanColour(cc.inventorySlots.get(22).getStack().getDisplayName());
- if (tagName.equals(displayName.substring(displayName.length() - tagName.length()))) {
+ if (displayName.length() - tagName.length() > 0 && tagName.equals(displayName.substring(displayName.length() - tagName.length()))) {
ci.cancel();
this.zLevel = 100.0F;