Fixes #275 again

This commit is contained in:
Modmuss50 2015-11-17 13:31:34 +00:00
parent 5e079afd05
commit 96492bd87e
2 changed files with 5 additions and 10 deletions

View file

@ -21,9 +21,6 @@ public class WailaProviderMachines implements IWailaDataProvider {
@Override
public List<String> getWailaBody(ItemStack item, List<String> tip,
IWailaDataAccessor accessor, IWailaConfigHandler config) {
TileMachineBase machine = (TileMachineBase) accessor.getTileEntity();
if (accessor.getTileEntity() instanceof IListInfoProvider) {
((IListInfoProvider) accessor.getTileEntity()).addInfo(info, true);
}

View file

@ -231,12 +231,10 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements
@Override
public double useEnergy(double extract, boolean simulate) {
double energyExtracted = Math.min(getMaxPower() - energy, Math.min(getMaxPower(), extract));
if (!simulate) {
setEnergy(energy - energyExtracted);
setEnergy(energy - extract);
}
return energyExtracted;
return extract;
}
@Override
@ -284,9 +282,9 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements
if (getMaxOutput() != 0) {
info.add(ChatFormatting.LIGHT_PURPLE + "Max Output " + ChatFormatting.GREEN + getEUString(getMaxOutput()));
}
if(CompatManager.isClassicEnet && isRealTile){
info.add(ChatFormatting.LIGHT_PURPLE + "Stored energy " + ChatFormatting.GREEN + getEUString(energy));
}
// if(isRealTile){ //TODO sync to client
// info.add(ChatFormatting.LIGHT_PURPLE + "Stored energy " + ChatFormatting.GREEN + getEUString(energy));
// }
}
private String getEUString(double euValue) {