BloodMagic/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java

43 lines
1 KiB
Java
Raw Normal View History

package WayofTime.alchemicalWizardry.api.rituals;
import net.minecraft.nbt.NBTTagCompound;
2015-01-16 10:00:50 -05:00
import WayofTime.alchemicalWizardry.common.Int3;
/**
* This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This is basically used as auxillarary storage,
* for when simply storing to NBT becomes... difficult.
*
*/
public class LocalRitualStorage
{
2015-01-16 10:00:50 -05:00
public int xCoord;
public int yCoord;
public int zCoord;
2015-01-16 10:00:50 -05:00
public void writeToNBT(NBTTagCompound tag)
{
tag.setInteger("xCoord", xCoord);
tag.setInteger("yCoord", yCoord);
tag.setInteger("zCoord", zCoord);
}
public void readFromNBT(NBTTagCompound tag)
{
this.xCoord = tag.getInteger("xCoord");
this.yCoord = tag.getInteger("yCoord");
this.zCoord = tag.getInteger("zCoord");
}
2015-01-16 10:00:50 -05:00
public Int3 getLocation()
{
2015-01-16 10:00:50 -05:00
return new Int3(xCoord, yCoord, zCoord);
}
public void setLocation(Int3 location)
{
this.xCoord = location.xCoord;
this.yCoord = location.yCoord;
this.zCoord = location.zCoord;
}
}