fixes #85 , Fixes issues with RF output
This commit is contained in:
parent
62e5ccddd0
commit
984b502ded
4 changed files with 11 additions and 9 deletions
|
@ -19,7 +19,10 @@ public abstract class RFProviderTile extends TileMachineBase implements IEnergyR
|
|||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
//sendPower();
|
||||
if(worldObj.isRemote){
|
||||
return;
|
||||
}
|
||||
sendPower();
|
||||
}
|
||||
|
||||
public void sendPower() {//TODO fix this
|
||||
|
@ -31,9 +34,8 @@ public abstract class RFProviderTile extends TileMachineBase implements IEnergyR
|
|||
|
||||
TileEntity tile = worldObj.getTileEntity(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ);
|
||||
if (isPoweredTile(tile, direction)) {
|
||||
System.out.println(canProvideEnergy(direction));
|
||||
if(canProvideEnergy(direction)){
|
||||
if (tile instanceof IEnergyHandler) {
|
||||
if(canProvideEnergy(direction)){
|
||||
if (tile instanceof IEnergyHandler) {
|
||||
IEnergyHandler handler = (IEnergyHandler) tile;
|
||||
int neededRF = handler.receiveEnergy(
|
||||
direction.getOpposite(),
|
||||
|
|
|
@ -87,12 +87,12 @@ public class TileLesu extends TilePowerAcceptor {//TODO wrench
|
|||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
return direction.ordinal() != blockMetadata;
|
||||
return Functions.getIntDirFromDirection(direction) != worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
return Functions.getIntDirFromDirection(direction) == blockMetadata;
|
||||
return Functions.getIntDirFromDirection(direction) == worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue