if (tag.hasKey("Flags")) {
final HashMap<String, Boolean> flags = new HashMap<String, Boolean>();
output.put("flags", flags);
final NBTTagCompound flagsNbt = tag.getCompoundTag("Flags");
for (Object flag : flagsNbt.func_150296_c()) {
final String key = (String) flag;
flags.put(key, flagsNbt.getBoolean(key));
}
}
}