fixes #85 , Fixes issues with RF output

This commit is contained in:
modmuss50 2015-07-23 10:13:37 +01:00
parent 62e5ccddd0
commit 984b502ded
4 changed files with 11 additions and 9 deletions

View file

@ -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(),

View file

@ -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