Fixed EM Contractor link packets
This commit is contained in:
parent
797f50f84a
commit
e189636464
1 changed files with 19 additions and 3 deletions
|
@ -72,7 +72,6 @@ public class TileEntityEMContractor extends TileEntityBase implements IPacketRec
|
||||||
{
|
{
|
||||||
this.setLink((TileEntityEMContractor) this.tempLinkVector.getTileEntity(this.worldObj), true);
|
this.setLink((TileEntityEMContractor) this.tempLinkVector.getTileEntity(this.worldObj), true);
|
||||||
System.out.println("TEST" + this.linked);
|
System.out.println("TEST" + this.linked);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tempLinkVector = null;
|
this.tempLinkVector = null;
|
||||||
|
@ -452,7 +451,12 @@ public class TileEntityEMContractor extends TileEntityBase implements IPacketRec
|
||||||
energyStored = input.readFloat();
|
energyStored = input.readFloat();
|
||||||
this.dyeID = input.readInt();
|
this.dyeID = input.readInt();
|
||||||
|
|
||||||
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
if (input.readBoolean())
|
||||||
|
{
|
||||||
|
this.tempLinkVector = new Vector3(input.readInt(), input.readInt(), input.readInt());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||||
updateBounds();
|
updateBounds();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -468,6 +472,18 @@ public class TileEntityEMContractor extends TileEntityBase implements IPacketRec
|
||||||
data.add(energyStored);
|
data.add(energyStored);
|
||||||
data.add(this.dyeID);
|
data.add(this.dyeID);
|
||||||
|
|
||||||
|
if (this.linked != null)
|
||||||
|
{
|
||||||
|
data.add(true);
|
||||||
|
data.add(this.linked.xCoord);
|
||||||
|
data.add(this.linked.yCoord);
|
||||||
|
data.add(this.linked.zCoord);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data.add(false);
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue