Search in sources :

Example 11 with SpellRing

use of com.teamwizardry.wizardry.api.spell.SpellRing in project Wizardry by TeamWizardry.

the class TileMagiciansWorktable method writeCustomNBT.

@Override
public void writeCustomNBT(@Nonnull NBTTagCompound compound, boolean sync) {
    super.writeCustomNBT(compound, sync);
    NBTTagList list = new NBTTagList();
    for (Map.Entry<SpellRing, UUID> entrySet : paperComponents.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 : componentLinks.entrySet()) {
        NBTTagCompound compound1 = new NBTTagCompound();
        compound1.setString("uuid1", entrySet.getKey().toString());
        compound1.setString("uuid2", entrySet.getValue().toString());
        list.appendTag(compound1);
    }
    compound.setTag("links", list);
}
Also used : NBTTagList(net.minecraft.nbt.NBTTagList) SpellRing(com.teamwizardry.wizardry.api.spell.SpellRing) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) UUID(java.util.UUID) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

SpellRing (com.teamwizardry.wizardry.api.spell.SpellRing)11 Entity (net.minecraft.entity.Entity)4 NBTTagList (net.minecraft.nbt.NBTTagList)4 IBlockState (net.minecraft.block.state.IBlockState)3 AxisAlignedBB (net.minecraft.util.math.AxisAlignedBB)3 BlockPos (net.minecraft.util.math.BlockPos)3 Vec3d (net.minecraft.util.math.Vec3d)3 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)3 ParticleBuilder (com.teamwizardry.librarianlib.features.particle.ParticleBuilder)2 InterpColorHSV (com.teamwizardry.librarianlib.features.particle.functions.InterpColorHSV)2 InterpFadeInOut (com.teamwizardry.librarianlib.features.particle.functions.InterpFadeInOut)2 SpellData (com.teamwizardry.wizardry.api.spell.SpellData)2 InterpScale (com.teamwizardry.wizardry.api.util.interp.InterpScale)2 Nonnull (javax.annotation.Nonnull)2 Block (net.minecraft.block.Block)2 EntityLivingBase (net.minecraft.entity.EntityLivingBase)2 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)2 ItemStack (net.minecraft.item.ItemStack)2 TileEntity (net.minecraft.tileentity.TileEntity)2