getTag() and hasTag() functions from ScriptItemStack no longer write the item stack NBT tag on call.

This commit is contained in:
luisc committed 2022-01-09 17:50:36 -06:00
1 parent d74a1f2bee
commit 7808e4a433
1 file changed
+5
@@ -112,6 +112,8 @@ public class ScriptItemStack implements IItemStack {
* @return Returns whether or not the key exists
*/
public boolean hasTag(String key){
if(item.stackTagCompound == null)
return false;
return getTag().hasKey(key);
}
@@ -120,6 +122,9 @@ public class ScriptItemStack implements IItemStack {
* @return Returns the value associated with the key. Returns null of it doesnt exist
*/
public Object getTag(String key){
if(item.stackTagCompound == null)
return null;
NBTBase tag = getTag().getTag(key);
if(tag == null)
return null;