Book tests and Movage of Int3

This commit is contained in:
WayofTime 2015-01-24 08:18:58 -05:00
parent fffef9a274
commit 389910f716
27 changed files with 96 additions and 63 deletions

View file

@ -0,0 +1,38 @@
package WayofTime.alchemicalWizardry.api;
import net.minecraft.nbt.NBTTagCompound;
public class Int3
{
public int xCoord;
public int yCoord;
public int zCoord;
public Int3(int xCoord, int yCoord, int zCoord)
{
this.xCoord = xCoord;
this.yCoord = yCoord;
this.zCoord = zCoord;
}
public static Int3 readFromNBT(NBTTagCompound tag)
{
return new Int3(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord"));
}
public NBTTagCompound writeToNBT(NBTTagCompound tag)
{
tag.setInteger("xCoord", xCoord);
tag.setInteger("yCoord", yCoord);
tag.setInteger("zCoord", zCoord);
return tag;
}
@Override
public boolean equals(Object o)
{
return o instanceof Int3 ? ((Int3) o).xCoord == this.xCoord && ((Int3) o).yCoord == this.yCoord && ((Int3) o).zCoord == this.zCoord : false;
}
}

View file

@ -1,7 +1,6 @@
package WayofTime.alchemicalWizardry.api;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.common.Int3;
public class RoutingFocusPosAndFacing
{

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.api.rituals;
import net.minecraft.nbt.NBTTagCompound;
import WayofTime.alchemicalWizardry.common.Int3;
import WayofTime.alchemicalWizardry.api.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,