use of mcjty.lib.varia.Coordinate in project RFTools by McJty.
the class MachineInformationScreenModule method setupFromNBT.
@Override
public void setupFromNBT(NBTTagCompound tagCompound, int dim, int x, int y, int z) {
if (tagCompound != null) {
coordinate = Coordinate.INVALID;
tag = tagCompound.getInteger("monitorTag");
if (tagCompound.hasKey("monitorx")) {
this.dim = tagCompound.getInteger("dim");
if (dim == this.dim) {
Coordinate c = new Coordinate(tagCompound.getInteger("monitorx"), tagCompound.getInteger("monitory"), tagCompound.getInteger("monitorz"));
int dx = Math.abs(c.getX() - x);
int dy = Math.abs(c.getY() - y);
int dz = Math.abs(c.getZ() - z);
if (dx <= 64 && dy <= 64 && dz <= 64) {
coordinate = c;
}
}
}
}
}
use of mcjty.lib.varia.Coordinate in project RFTools by McJty.
the class EnergyPlusBarScreenModule method setupFromNBT.
@Override
public void setupFromNBT(NBTTagCompound tagCompound, int dim, int x, int y, int z) {
if (tagCompound != null) {
helper.setShowdiff(tagCompound.getBoolean("showdiff"));
coordinate = Coordinate.INVALID;
if (tagCompound.hasKey("monitorx")) {
this.dim = tagCompound.getInteger("dim");
coordinate = new Coordinate(tagCompound.getInteger("monitorx"), tagCompound.getInteger("monitory"), tagCompound.getInteger("monitorz"));
}
}
}
use of mcjty.lib.varia.Coordinate in project RFTools by McJty.
the class FluidPlusBarScreenModule method setupFromNBT.
@Override
public void setupFromNBT(NBTTagCompound tagCompound, int dim, int x, int y, int z) {
if (tagCompound != null) {
helper.setShowdiff(tagCompound.getBoolean("showdiff"));
coordinate = Coordinate.INVALID;
if (tagCompound.hasKey("monitorx")) {
this.dim = tagCompound.getInteger("dim");
coordinate = new Coordinate(tagCompound.getInteger("monitorx"), tagCompound.getInteger("monitory"), tagCompound.getInteger("monitorz"));
}
}
}
use of mcjty.lib.varia.Coordinate in project RFTools by McJty.
the class ItemStackScreenModule method setupCoordinateFromNBT.
protected void setupCoordinateFromNBT(NBTTagCompound tagCompound, int dim, int x, int y, int z) {
coordinate = Coordinate.INVALID;
if (tagCompound.hasKey("monitorx")) {
this.dim = tagCompound.getInteger("dim");
if (dim == this.dim) {
Coordinate c = new Coordinate(tagCompound.getInteger("monitorx"), tagCompound.getInteger("monitory"), tagCompound.getInteger("monitorz"));
int dx = Math.abs(c.getX() - x);
int dy = Math.abs(c.getY() - y);
int dz = Math.abs(c.getZ() - z);
if (dx <= 64 && dy <= 64 && dz <= 64) {
coordinate = c;
}
}
}
}
use of mcjty.lib.varia.Coordinate in project RFTools by McJty.
the class ScreenControllerTileEntity method readFromNBT.
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
int[] xes = tagCompound.getIntArray("screensx");
int[] yes = tagCompound.getIntArray("screensy");
int[] zes = tagCompound.getIntArray("screensz");
connectedScreens.clear();
for (int i = 0; i < xes.length; i++) {
connectedScreens.add(new Coordinate(xes[i], yes[i], zes[i]));
}
}
Aggregations