public Tag copy() {
   CompoundTag tag = new CompoundTag(getName());
   for (String key : tags.keySet()) {
     tag.put(key, tags.get(key).copy());
   }
   return tag;
 }
 public void putCompound(String name, CompoundTag value) {
   tags.put(name, value.setName(name));
 }