This commit is contained in:
Modmuss50 2015-11-23 14:47:50 +00:00
parent 011ebaba1d
commit fa9cd98b5a
21 changed files with 76 additions and 76 deletions

View file

@ -170,8 +170,8 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -118,8 +118,8 @@ public class TileDieselGenerator extends TilePowerAcceptor implements IWrenchabl
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -95,8 +95,8 @@ public class TileDigitalChest extends TileMachineBase implements IInventory,
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -132,8 +132,8 @@ public class TileGasTurbine extends TilePowerAcceptor implements IWrenchable,
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -21,8 +21,8 @@ public class TileMachineBase extends TileEntity {
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -52,7 +52,7 @@ public class TilePlayerDectector extends TilePowerAcceptor {
Iterator tIterator = super.worldObj.playerEntities.iterator();
while (tIterator.hasNext()) {
EntityPlayer player = (EntityPlayer) tIterator.next();
if (player.getDistanceSq((double) super.xCoord + 0.5D, (double) super.yCoord + 0.5D, (double) super.zCoord + 0.5D) <= 256.0D) {
if (player.getDistanceSq((double) super.getPos().getX() + 0.5D, (double) super.getPos().getY() + 0.5D, (double) super.getPos().getZ() + 0.5D) <= 256.0D) {
if(worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 0){//ALL
redstone = true;
} else if (blockMetadata == 1){//Others

View file

@ -95,8 +95,8 @@ public class TileQuantumChest extends TileMachineBase implements IInventory,
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -52,8 +52,8 @@ public class TileQuantumTank extends TileMachineBase implements IFluidHandler,
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -138,8 +138,8 @@ public class TileSemifluidGenerator extends TilePowerAcceptor implements IWrench
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -121,8 +121,8 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
public Packet getDescriptionPacket() {
NBTTagCompound nbtTag = new NBTTagCompound();
writeToNBT(nbtTag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
this.zCoord, 1, nbtTag);
return new S35PacketUpdateTileEntity(this.getPos().getX(), this.getPos().getY(),
this.getPos().getZ(), 1, nbtTag);
}
@Override

View file

@ -164,30 +164,30 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
public boolean checkCoils() {
if ((isCoil(this.xCoord + 3, this.yCoord, this.zCoord + 1)) &&
(isCoil(this.xCoord + 3, this.yCoord, this.zCoord)) &&
(isCoil(this.xCoord + 3, this.yCoord, this.zCoord - 1)) &&
(isCoil(this.xCoord - 3, this.yCoord, this.zCoord + 1)) &&
(isCoil(this.xCoord - 3, this.yCoord, this.zCoord)) &&
(isCoil(this.xCoord - 3, this.yCoord, this.zCoord - 1)) &&
(isCoil(this.xCoord + 2, this.yCoord, this.zCoord + 2)) &&
(isCoil(this.xCoord + 2, this.yCoord, this.zCoord + 1)) &&
(isCoil(this.xCoord + 2, this.yCoord, this.zCoord - 1)) &&
(isCoil(this.xCoord + 2, this.yCoord, this.zCoord - 2)) &&
(isCoil(this.xCoord - 2, this.yCoord, this.zCoord + 2)) &&
(isCoil(this.xCoord - 2, this.yCoord, this.zCoord + 1)) &&
(isCoil(this.xCoord - 2, this.yCoord, this.zCoord - 1)) &&
(isCoil(this.xCoord - 2, this.yCoord, this.zCoord - 2)) &&
(isCoil(this.xCoord + 1, this.yCoord, this.zCoord + 3)) &&
(isCoil(this.xCoord + 1, this.yCoord, this.zCoord + 2)) &&
(isCoil(this.xCoord + 1, this.yCoord, this.zCoord - 2)) &&
(isCoil(this.xCoord + 1, this.yCoord, this.zCoord - 3)) &&
(isCoil(this.xCoord - 1, this.yCoord, this.zCoord + 3)) &&
(isCoil(this.xCoord - 1, this.yCoord, this.zCoord + 2)) &&
(isCoil(this.xCoord - 1, this.yCoord, this.zCoord - 2)) &&
(isCoil(this.xCoord - 1, this.yCoord, this.zCoord - 3)) &&
(isCoil(this.xCoord, this.yCoord, this.zCoord + 3)) &&
(isCoil(this.xCoord, this.yCoord, this.zCoord - 3))) {
if ((isCoil(this.getPos().getX() + 3, this.getPos().getY(), this.getPos().getZ() + 1)) &&
(isCoil(this.getPos().getX() + 3, this.getPos().getY(), this.getPos().getZ())) &&
(isCoil(this.getPos().getX() + 3, this.getPos().getY(), this.getPos().getZ() - 1)) &&
(isCoil(this.getPos().getX() - 3, this.getPos().getY(), this.getPos().getZ() + 1)) &&
(isCoil(this.getPos().getX() - 3, this.getPos().getY(), this.getPos().getZ())) &&
(isCoil(this.getPos().getX() - 3, this.getPos().getY(), this.getPos().getZ() - 1)) &&
(isCoil(this.getPos().getX() + 2, this.getPos().getY(), this.getPos().getZ() + 2)) &&
(isCoil(this.getPos().getX() + 2, this.getPos().getY(), this.getPos().getZ() + 1)) &&
(isCoil(this.getPos().getX() + 2, this.getPos().getY(), this.getPos().getZ() - 1)) &&
(isCoil(this.getPos().getX() + 2, this.getPos().getY(), this.getPos().getZ() - 2)) &&
(isCoil(this.getPos().getX() - 2, this.getPos().getY(), this.getPos().getZ() + 2)) &&
(isCoil(this.getPos().getX() - 2, this.getPos().getY(), this.getPos().getZ() + 1)) &&
(isCoil(this.getPos().getX() - 2, this.getPos().getY(), this.getPos().getZ() - 1)) &&
(isCoil(this.getPos().getX() - 2, this.getPos().getY(), this.getPos().getZ() - 2)) &&
(isCoil(this.getPos().getX() + 1, this.getPos().getY(), this.getPos().getZ() + 3)) &&
(isCoil(this.getPos().getX() + 1, this.getPos().getY(), this.getPos().getZ() + 2)) &&
(isCoil(this.getPos().getX() + 1, this.getPos().getY(), this.getPos().getZ() - 2)) &&
(isCoil(this.getPos().getX() + 1, this.getPos().getY(), this.getPos().getZ() - 3)) &&
(isCoil(this.getPos().getX() - 1, this.getPos().getY(), this.getPos().getZ() + 3)) &&
(isCoil(this.getPos().getX() - 1, this.getPos().getY(), this.getPos().getZ() + 2)) &&
(isCoil(this.getPos().getX() - 1, this.getPos().getY(), this.getPos().getZ() - 2)) &&
(isCoil(this.getPos().getX() - 1, this.getPos().getY(), this.getPos().getZ() - 3)) &&
(isCoil(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ() + 3)) &&
(isCoil(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ() - 3))) {
coilStatus = 1;
return true;
}

View file

@ -22,7 +22,7 @@ public class LesuNetwork {
private void rebuild() {
master = null;
for (TileLesuStorage lesuStorage : storages) {
lesuStorage.findAndJoinNetwork(lesuStorage.getWorldObj(), lesuStorage.xCoord, lesuStorage.yCoord, lesuStorage.zCoord);
lesuStorage.findAndJoinNetwork(lesuStorage.getWorldObj(), lesuStorage.getPos().getX(), lesuStorage.getPos().getY(), lesuStorage.getPos().getZ());
}
}

View file

@ -14,7 +14,7 @@ public class TileLesuStorage extends TileMachineBase {
if (network == null) {
findAndJoinNetwork(worldObj, xCoord, yCoord, zCoord);
} else {
if (network.master != null && network.master.getWorldObj().getTileEntity(network.master.xCoord, network.master.yCoord, network.master.zCoord) != network.master) {
if (network.master != null && network.master.getWorldObj().getTileEntity(network.master.getPos().getX(), network.master.getPos().getY(), network.master.getPos().getZ()) != network.master) {
network.master = null;
}
}