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

@ -109,7 +109,7 @@ public class RecipeCrafter {
* Call this on the tile tick * Call this on the tile tick
*/ */
public void updateEntity() { public void updateEntity() {
if (parentTile.getWorldObj().isRemote) { if (parentTile.getWorld().isRemote) {
return; return;
} }
ticksSinceLastChange++; ticksSinceLastChange++;
@ -262,9 +262,9 @@ public class RecipeCrafter {
if (data.hasKey("currentTickTime")) if (data.hasKey("currentTickTime"))
currentTickTime = data.getInteger("currentTickTime"); currentTickTime = data.getInteger("currentTickTime");
if (parentTile != null && parentTile.getWorldObj() != null && parentTile.getWorldObj().isRemote) { if (parentTile != null && parentTile.getWorld() != null && parentTile.getWorld().isRemote) {
parentTile.getWorldObj().markBlockForUpdate(parentTile.xCoord, parentTile.yCoord, parentTile.zCoord); parentTile.getWorld().markBlockForUpdate(parentTile.getPos());
parentTile.getWorldObj().markBlockRangeForRenderUpdate(parentTile.xCoord, parentTile.yCoord, parentTile.zCoord, parentTile.xCoord, parentTile.yCoord, parentTile.zCoord); parentTile.getWorld().markBlockRangeForRenderUpdate(parentTile.getPos().getX(), parentTile.getPos().getY(), parentTile.getPos().getZ(), parentTile.getPos().getX(), parentTile.getPos().getY(), parentTile.getPos().getZ());
} }
} }
@ -317,11 +317,11 @@ public class RecipeCrafter {
public void setIsActive() { public void setIsActive() {
if (isActive()) { if (isActive()) {
parentTile.getWorldObj().setBlockMetadataWithNotify(parentTile.xCoord, parentTile.yCoord, parentTile.zCoord, 1, 2); parentTile.getWorldObj().setBlockMetadataWithNotify(parentTile.getPos().getX(), parentTile.getPos().getY(), parentTile.getPos().getZ(), 1, 2);
} else { } else {
parentTile.getWorldObj().setBlockMetadataWithNotify(parentTile.xCoord, parentTile.yCoord, parentTile.zCoord, 0, 2); parentTile.getWorldObj().setBlockMetadataWithNotify(parentTile.getPos().getX(), parentTile.getPos().getY(), parentTile.getPos().getZ(), 0, 2);
} }
parentTile.getWorldObj().markBlockForUpdate(parentTile.xCoord, parentTile.yCoord, parentTile.zCoord); parentTile.getWorldObj().markBlockForUpdate(parentTile.getPos().getX(), parentTile.getPos().getY(), parentTile.getPos().getZ());
} }
public void setCurrentRecipe(IBaseRecipeType recipe) { public void setCurrentRecipe(IBaseRecipeType recipe) {

View file

@ -41,7 +41,7 @@ public class GuiBlastFurnace extends GuiContainer {
GuiButton button = new GuiButton(212, k + 4, l + 6, 20, 20, ""); GuiButton button = new GuiButton(212, k + 4, l + 6, 20, 20, "");
buttonList.add(button); buttonList.add(button);
super.initGui(); super.initGui();
ChunkCoordinates coordinates = new ChunkCoordinates(blastfurnace.xCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.yCoord - 1, blastfurnace.zCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetZ * 2)); ChunkCoordinates coordinates = new ChunkCoordinates(blastfurnace.getPos().getX() - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.getPos().getY() - 1, blastfurnace.getPos().getZ() - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetZ * 2));
if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor) && blastfurnace.getHeat() != 0){ if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor) && blastfurnace.getHeat() != 0){
ClientProxy.multiblockRenderEvent.setMultiblock(null); ClientProxy.multiblockRenderEvent.setMultiblock(null);
button.displayString = "B"; button.displayString = "B";
@ -133,8 +133,8 @@ public class GuiBlastFurnace extends GuiContainer {
MultiblockSet set = new MultiblockSet(multiblock); MultiblockSet set = new MultiblockSet(multiblock);
ClientProxy.multiblockRenderEvent.setMultiblock(set); ClientProxy.multiblockRenderEvent.setMultiblock(set);
ClientProxy.multiblockRenderEvent.partent = new Location(blastfurnace.xCoord, blastfurnace.yCoord, blastfurnace.zCoord, blastfurnace.getWorldObj()); ClientProxy.multiblockRenderEvent.partent = new Location(blastfurnace.getPos().getX(), blastfurnace.getPos().getY(), blastfurnace.getPos().getZ(), blastfurnace.getWorldObj());
ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(blastfurnace.xCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.yCoord - 1, blastfurnace.zCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetZ * 2)); ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(blastfurnace.getPos().getX() - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.getPos().getY() - 1, blastfurnace.getPos().getZ() - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetZ * 2));
} }
button.displayString = "A"; button.displayString = "A";
} else { } else {

View file

@ -51,7 +51,7 @@ public class GuiFusionReactor extends GuiContainer {
GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, ""); GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, "");
buttonList.add(button); buttonList.add(button);
super.initGui(); super.initGui();
ChunkCoordinates coordinates = new ChunkCoordinates(fusionController.xCoord - (EnumFacing.getOrientation(fusionController.getRotation()).offsetX * 2), fusionController.yCoord - 1, fusionController.zCoord - (EnumFacing.getOrientation(fusionController.getRotation()).offsetZ * 2)); ChunkCoordinates coordinates = new ChunkCoordinates(fusionController.getPos().getX() - (EnumFacing.getOrientation(fusionController.getRotation()).offsetX * 2), fusionController.getPos().getY() - 1, fusionController.getPos().getZ() - (EnumFacing.getOrientation(fusionController.getRotation()).offsetZ * 2));
if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){ if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){
ClientProxy.multiblockRenderEvent.setMultiblock(null); ClientProxy.multiblockRenderEvent.setMultiblock(null);
button.displayString = "B"; button.displayString = "B";
@ -88,8 +88,8 @@ public class GuiFusionReactor extends GuiContainer {
{//This code here makes a basic multiblock and then sets to the selected one. {//This code here makes a basic multiblock and then sets to the selected one.
MultiblockSet set = new MultiblockSet(ClientMultiBlocks.reactor); MultiblockSet set = new MultiblockSet(ClientMultiBlocks.reactor);
ClientProxy.multiblockRenderEvent.setMultiblock(set); ClientProxy.multiblockRenderEvent.setMultiblock(set);
ClientProxy.multiblockRenderEvent.partent = new Location(fusionController.xCoord, fusionController.yCoord, fusionController.zCoord, fusionController.getWorldObj()); ClientProxy.multiblockRenderEvent.partent = new Location(fusionController.getPos().getX(), fusionController.getPos().getY(), fusionController.getPos().getZ(), fusionController.getWorldObj());
ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(fusionController.xCoord , fusionController.yCoord -1 , fusionController.zCoord); ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(fusionController.getPos().getX() , fusionController.getPos().getY() -1 , fusionController.getPos().getZ());
} }
button.displayString = "A"; button.displayString = "A";
} else { } else {

View file

@ -38,7 +38,7 @@ public class GuiVacuumFreezer extends GuiContainer {
GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, ""); GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, "");
buttonList.add(button); buttonList.add(button);
super.initGui(); super.initGui();
ChunkCoordinates coordinates = new ChunkCoordinates(crafter.xCoord, crafter.yCoord - 5, crafter.zCoord); ChunkCoordinates coordinates = new ChunkCoordinates(crafter.getPos().getX(), crafter.getPos().getY() - 5, crafter.getPos().getZ());
if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){ if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){
ClientProxy.multiblockRenderEvent.setMultiblock(null); ClientProxy.multiblockRenderEvent.setMultiblock(null);
button.displayString = "B"; button.displayString = "B";
@ -86,8 +86,8 @@ public class GuiVacuumFreezer extends GuiContainer {
{//This code here makes a basic multiblock and then sets to the selected one. {//This code here makes a basic multiblock and then sets to the selected one.
MultiblockSet set = new MultiblockSet(ClientMultiBlocks.frezzer); MultiblockSet set = new MultiblockSet(ClientMultiBlocks.frezzer);
ClientProxy.multiblockRenderEvent.setMultiblock(set); ClientProxy.multiblockRenderEvent.setMultiblock(set);
ClientProxy.multiblockRenderEvent.partent = new Location(crafter.xCoord, crafter.yCoord, crafter.zCoord, crafter.getWorldObj()); ClientProxy.multiblockRenderEvent.partent = new Location(crafter.getPos().getX(), crafter.getPos().getY(), crafter.getPos().getZ(), crafter.getWorldObj());
ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(crafter.xCoord , crafter.yCoord -5 , crafter.zCoord); ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(crafter.getPos().getX() , crafter.getPos().getY() -5 , crafter.getPos().getZ());
} }
button.displayString = "A"; button.displayString = "A";
} else { } else {

View file

@ -40,9 +40,9 @@ public class RenderCablePart {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
IIcon texture = getIconFromType(part.type); IIcon texture = getIconFromType(part.type);
RenderBlocks renderblocks = RenderBlocks.getInstance(); RenderBlocks renderblocks = RenderBlocks.getInstance();
double xD = part.xCoord; double xD = part.getPos().getX();
double yD = part.yCoord; double yD = part.getPos().getY();
double zD = part.zCoord; double zD = part.getPos().getZ();
Block block = part.getBlockType(); Block block = part.getBlockType();
tessellator.setBrightness(block.getMixedBrightnessForBlock(part.getWorld(), part.getX(), part.getY(), part.getZ())); tessellator.setBrightness(block.getMixedBrightnessForBlock(part.getWorld(), part.getX(), part.getY(), part.getZ()));
renderBox(part.boundingBoxes[6], block, tessellator, renderblocks, texture, xD, yD, zD, 0F); renderBox(part.boundingBoxes[6], block, tessellator, renderblocks, texture, xD, yD, zD, 0F);

View file

@ -76,9 +76,9 @@ public abstract class ModPart extends TileEntity implements IModPart {
*/ */
public void setLocation(Location location) { public void setLocation(Location location) {
this.location = location; this.location = location;
this.xCoord = location.getX(); this.getPos().getX() = location.getX();
this.yCoord = location.getY(); this.getPos().getY() = location.getY();
this.zCoord = location.getZ(); this.getPos().getZ() = location.getZ();
} }
@Override @Override

View file

@ -77,11 +77,11 @@ public class PartPlacementRenderer {
GL11.glPushMatrix(); GL11.glPushMatrix();
{ {
Vec3 playerPos = player.getPosition(event.partialTicks); Vec3 playerPos = player.getPosition(event.partialTicks);
double x = location.getX() - playerPos.xCoord double x = location.getX() - playerPos.getPos().getX()
+ faceHit.offsetX; + faceHit.offsetX;
double y = location.getY() - playerPos.yCoord double y = location.getY() - playerPos.getPos().getY()
+ faceHit.offsetY; + faceHit.offsetY;
double z = location.getZ() - playerPos.zCoord double z = location.getZ() - playerPos.getPos().getZ()
+ faceHit.offsetZ; + faceHit.offsetZ;
GL11.glRotated(player.rotationPitch, 1, 0, 0); GL11.glRotated(player.rotationPitch, 1, 0, 0);
GL11.glRotated(player.rotationYaw - 180, 0, 1, 0); GL11.glRotated(player.rotationYaw - 180, 0, 1, 0);

View file

@ -409,15 +409,15 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
} else if (entity instanceof IEnergyTile) { } else if (entity instanceof IEnergyTile) {
return true; return true;
} else { } else {
if (ModPartUtils.hasPart(entity.getWorldObj(), entity.xCoord, entity.yCoord, entity.zCoord, this.getName())) { if (ModPartUtils.hasPart(entity.getWorldObj(), entity.getPos().getX(), entity.getPos().getY(), entity.getPos().getZ(), this.getName())) {
CablePart otherCable = (CablePart) ModPartUtils.getPartFromWorld(entity.getWorldObj(), new Location(entity.xCoord, entity.yCoord, entity.zCoord), this.getName()); CablePart otherCable = (CablePart) ModPartUtils.getPartFromWorld(entity.getWorldObj(), new Location(entity.getPos().getX(), entity.getPos().getY(), entity.getPos().getZ()), this.getName());
int thisDir = Functions.getIntDirFromDirection(dir); int thisDir = Functions.getIntDirFromDirection(dir);
int thereDir = Functions.getIntDirFromDirection(dir.getOpposite()); int thereDir = Functions.getIntDirFromDirection(dir.getOpposite());
boolean hasconnection = otherCable.connections[thereDir]; boolean hasconnection = otherCable.connections[thereDir];
otherCable.connections[thereDir] = false; otherCable.connections[thereDir] = false;
if (ModPartUtils.checkOcclusion(entity.getWorldObj(), entity.xCoord, entity.yCoord, entity.zCoord, boundingBoxes[thereDir])) { if (ModPartUtils.checkOcclusion(entity.getWorldObj(), entity.getPos().getX(), entity.getPos().getY(), entity.getPos().getZ(), boundingBoxes[thereDir])) {
otherCable.connections[thereDir] = true; otherCable.connections[thereDir] = true;
return true; return true;
} }
@ -444,7 +444,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
} }
} }
if (te != null) { if (te != null) {
te.getWorldObj().markBlockForUpdate(te.xCoord, te.yCoord, te.zCoord); te.getWorldObj().markBlockForUpdate(te.getPos().getX(), te.getPos().getY(), te.getPos().getZ());
} }
} }
checkConnections(world, getX(), getY(), getZ()); checkConnections(world, getX(), getY(), getZ());
@ -538,10 +538,10 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
public void onNetworkEvent(int i) { public void onNetworkEvent(int i) {
switch (i) { switch (i) {
case 0: case 0:
this.worldObj.playSoundEffect((double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 0.5F), (double) ((float) this.zCoord + 0.5F), "random.fizz", 0.5F, 2.6F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.8F); this.worldObj.playSoundEffect((double) ((float) this.getPos().getX() + 0.5F), (double) ((float) this.getPos().getY() + 0.5F), (double) ((float) this.getPos().getZ() + 0.5F), "random.fizz", 0.5F, 2.6F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.8F);
for (int l = 0; l < 8; ++l) { for (int l = 0; l < 8; ++l) {
this.worldObj.spawnParticle("largesmoke", (double) this.xCoord + Math.random(), (double) this.yCoord + 1.2D, (double) this.zCoord + Math.random(), 0.0D, 0.0D, 0.0D); this.worldObj.spawnParticle("largesmoke", (double) this.getPos().getX() + Math.random(), (double) this.getPos().getY() + 1.2D, (double) this.getPos().getZ() + Math.random(), 0.0D, 0.0D, 0.0D);
} }
return; return;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -52,7 +52,7 @@ public class TilePlayerDectector extends TilePowerAcceptor {
Iterator tIterator = super.worldObj.playerEntities.iterator(); Iterator tIterator = super.worldObj.playerEntities.iterator();
while (tIterator.hasNext()) { while (tIterator.hasNext()) {
EntityPlayer player = (EntityPlayer) tIterator.next(); 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 if(worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 0){//ALL
redstone = true; redstone = true;
} else if (blockMetadata == 1){//Others } else if (blockMetadata == 1){//Others

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -22,7 +22,7 @@ public class LesuNetwork {
private void rebuild() { private void rebuild() {
master = null; master = null;
for (TileLesuStorage lesuStorage : storages) { 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) { if (network == null) {
findAndJoinNetwork(worldObj, xCoord, yCoord, zCoord); findAndJoinNetwork(worldObj, xCoord, yCoord, zCoord);
} else { } 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; network.master = null;
} }
} }