Refactoring

This commit is contained in:
WayofTime 2015-01-16 10:00:50 -05:00
parent fd330233dd
commit 56ccd3188d
76 changed files with 876 additions and 433 deletions

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.api.rituals;
import net.minecraft.nbt.NBTTagCompound;
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,
@ -9,13 +10,33 @@ import net.minecraft.nbt.NBTTagCompound;
*/
public class LocalRitualStorage
{
public void writeToNBT(NBTTagCompound tag)
{
public int xCoord;
public int yCoord;
public int zCoord;
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");
}
public void readFromNBT(NBTTagCompound tag)
public Int3 getLocation()
{
return new Int3(xCoord, yCoord, zCoord);
}
public void setLocation(Int3 location)
{
this.xCoord = location.xCoord;
this.yCoord = location.yCoord;
this.zCoord = location.zCoord;
}
}

View file

@ -57,7 +57,7 @@ public abstract class RitualEffect
public LocalRitualStorage getNewLocalStorage()
{
return null;
return new LocalRitualStorage();
}
public void addOffsetRunes(ArrayList<RitualComponent> ritualList, int off1, int off2, int y, int rune)