aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2023-07-05 19:58:39 -0400
committerGitHub <noreply@github.com>2023-07-06 09:58:39 +1000
commitc70115a608712e770265c8bc6762a082674e7a68 (patch)
tree7fa27e092119d093ed906be22c9de83c1df85ded /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
parent380cb0ccf3c582f5700a54f65db74c3bb69e7d6a (diff)
downloadnotenoughupdates-c70115a608712e770265c8bc6762a082674e7a68.tar.gz
notenoughupdates-c70115a608712e770265c8bc6762a082674e7a68.tar.bz2
notenoughupdates-c70115a608712e770265c8bc6762a082674e7a68.zip
Storage Overlay use /backpack (#740)
Co-authored-by: nopo <nopotheemail@gmail.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index e3d52fe7..54888935 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
+ * Copyright (C) 2022-2023 NotEnoughUpdates contributors
*
* This file is part of NotEnoughUpdates.
*
@@ -935,7 +935,11 @@ public class Utils {
}
public static ItemStack createItemStack(Item item, String displayName, int damage, String... lore) {
- ItemStack stack = new ItemStack(item, 1, damage);
+ return createItemStack(item, displayName, damage, 1, lore);
+ }
+
+ public static ItemStack createItemStack(Item item, String displayName, int damage, int amount, String... lore) {
+ ItemStack stack = new ItemStack(item, amount, damage);
NBTTagCompound tag = new NBTTagCompound();
addNameAndLore(tag, displayName, lore);
tag.setInteger("HideFlags", 254);
@@ -990,6 +994,7 @@ public class Utils {
return itemStack;
}
+
public static ItemStack createSkull(String displayName, String uuid, String value) {
return createSkull(displayName, uuid, value, null);
}
@@ -1522,6 +1527,7 @@ public class Utils {
Minecraft.getMinecraft().fontRendererObj
);
}
+
public static JsonObject getConstant(String constant, Gson gson) {
return getConstant(constant, gson, JsonObject.class);
}