diff --git a/gradle.properties b/gradle.properties index da074921..03c5f686 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false minecraft_version=1.19.2 forge_version=43.2.13 -mod_version=3.19.5 +mod_version=3.19.6 jei_mc_version=1.19.2-forge jei_version=11.6.0.1018 curios_version=1.19.2-5.1.4.3 diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeContainer.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeContainer.java index 4e46f24c..15768232 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeContainer.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeContainer.java @@ -13,6 +13,8 @@ import net.p3pp3rf1y.sophisticatedcore.common.gui.UpgradeContainerType; import net.p3pp3rf1y.sophisticatedcore.util.NBTHelper; +import javax.annotation.Nullable; + public class AnvilUpgradeContainer extends UpgradeContainerBase { private static final String DATA_SHIFT_CLICK_INTO_STORAGE = "shiftClickIntoStorage"; private final Slot resultSlot; @@ -77,6 +79,7 @@ public int getCost() { return anvilMenuDelegate.getCost(); } + @Nullable public String getItemName() { return anvilMenuDelegate.getItemName(); } @@ -95,6 +98,7 @@ public PersistableAnvilMenu(Inventory playerInventory, AnvilUpgradeWrapper wrapp initializing = false; } + @Nullable public String getItemName() { return itemName; } diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeTab.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeTab.java index 70c19b07..d23f8cc7 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeTab.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/anvil/AnvilUpgradeTab.java @@ -77,8 +77,9 @@ protected void renderBg(PoseStack poseStack, Minecraft minecraft, int mouseX, in private String getInitialNameValue() { ItemStack firstItem = getContainer().getSlots().get(0).getItem(); - if (!firstItem.isEmpty() && !getContainer().getItemName().isEmpty()) { - return getContainer().getItemName(); + String itemName = getContainer().getItemName(); + if (!firstItem.isEmpty() && itemName != null && !itemName.isEmpty()) { + return itemName; } return firstItem.isEmpty() ? "" : firstItem.getHoverName().getString(); }