use of com.teamwizardry.librarianlib.features.saving.SaveMethodGetter in project Wizardry by TeamWizardry.
the class PacketWorktableUpdate method manualSaveSetter.
@SaveMethodGetter(saveName = "manual_saver")
private NBTTagCompound manualSaveSetter() {
NBTTagCompound compound = new NBTTagCompound();
if (components == null || links == null)
return compound;
NBTTagList list = new NBTTagList();
for (Map.Entry<SpellRing, UUID> entrySet : components.entrySet()) {
NBTTagCompound compound1 = new NBTTagCompound();
compound1.setTag("ring", entrySet.getKey().serializeNBT());
compound1.setString("uuid", entrySet.getValue().toString());
list.appendTag(compound1);
}
compound.setTag("components", list);
list = new NBTTagList();
for (Map.Entry<UUID, UUID> entrySet : links.entrySet()) {
NBTTagCompound compound1 = new NBTTagCompound();
compound1.setString("uuid1", entrySet.getKey().toString());
compound1.setString("uuid2", entrySet.getValue().toString());
list.appendTag(compound1);
}
compound.setTag("links", list);
return compound;
}
use of com.teamwizardry.librarianlib.features.saving.SaveMethodGetter in project Wizardry by TeamWizardry.
the class PacketRenderSpell method getter.
@SaveMethodGetter(saveName = "module_saver")
public NBTTagCompound getter() {
NBTTagCompound compound = new NBTTagCompound();
if (spellData == null || spellRing == null)
return compound;
compound.setTag("spell_data", spellData);
compound.setTag("spell_ring", spellRing.serializeNBT());
return compound;
}
Aggregations