Remove From TagMap

This commit is contained in:
KAMKEEL committed 2023-03-22 19:47:13 -04:00
1 parent cc2e8805d8
commit abb2d13e6e
2 files changed
+12 -2

No files matched your search

@@ -149,6 +149,7 @@ public class ServerCloneController implements ICloneHandler {
if(!file.exists())
return false;
file.delete();
removeFromTagMap(name, tab);
return true;
}
@@ -175,6 +176,15 @@ public class ServerCloneController implements ICloneHandler {
return false;
}
public boolean removeFromTagMap(String name, int tab){
TagMap tagMap = ServerTagMapController.Instance.getTagMap(tab);
if(tagMap.removeClone(name)){
ServerTagMapController.Instance.saveTagMap(tagMap);
return true;
}
return false;
}
public void cleanTags(NBTTagCompound nbttagcompound){
if(nbttagcompound.hasKey("ItemGiverId"))
nbttagcompound.setInteger("ItemGiverId", 0);