Mordenkainen / Technomancy

Magic and Science, what can go wrong
15 stars 8 forks source link

Small positioning issue with Order Lamps #161

Closed WhiteZ closed 8 years ago

WhiteZ commented 8 years ago

Order lamps sharing a plane (X, Y or Z) with the infusion matrix fail to detect it (getMatrix() returns null even if the matrix is in range).

This is most likely due to this check (TileFluxLamp.java:94):

if (xx != 0 && yy != 0 && zz != 0) {

I would guess something like if (xx != 0 || yy != 0 || zz != 0) was intended. I could submit a pull request, but it seems a tad overkill for just a simple one-line fix.

Mordenkainen commented 8 years ago

Actually I think a fix would be:

if (xx == 0 && yy == 0 && zz == 0) {
    continue;
}

TileEntity te = this.worldObj.getTileEntity(this.xCoord + xx, this.yCoord + yy, this.zCoord + zz);
if(te instanceof TileInfusionMatrix) {
    return te;
}

But, that said, the conditional only prevents a single getTileEntity from being run, so doesn't save all that much in time anyway. The check should probably just be removed.