Fixes #275 again
This commit is contained in:
parent
5e079afd05
commit
96492bd87e
2 changed files with 5 additions and 10 deletions
|
@ -21,9 +21,6 @@ public class WailaProviderMachines implements IWailaDataProvider {
|
||||||
@Override
|
@Override
|
||||||
public List<String> getWailaBody(ItemStack item, List<String> tip,
|
public List<String> getWailaBody(ItemStack item, List<String> tip,
|
||||||
IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||||
|
|
||||||
TileMachineBase machine = (TileMachineBase) accessor.getTileEntity();
|
|
||||||
|
|
||||||
if (accessor.getTileEntity() instanceof IListInfoProvider) {
|
if (accessor.getTileEntity() instanceof IListInfoProvider) {
|
||||||
((IListInfoProvider) accessor.getTileEntity()).addInfo(info, true);
|
((IListInfoProvider) accessor.getTileEntity()).addInfo(info, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,12 +231,10 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double useEnergy(double extract, boolean simulate) {
|
public double useEnergy(double extract, boolean simulate) {
|
||||||
double energyExtracted = Math.min(getMaxPower() - energy, Math.min(getMaxPower(), extract));
|
|
||||||
|
|
||||||
if (!simulate) {
|
if (!simulate) {
|
||||||
setEnergy(energy - energyExtracted);
|
setEnergy(energy - extract);
|
||||||
}
|
}
|
||||||
return energyExtracted;
|
return extract;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -284,9 +282,9 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements
|
||||||
if (getMaxOutput() != 0) {
|
if (getMaxOutput() != 0) {
|
||||||
info.add(ChatFormatting.LIGHT_PURPLE + "Max Output " + ChatFormatting.GREEN + getEUString(getMaxOutput()));
|
info.add(ChatFormatting.LIGHT_PURPLE + "Max Output " + ChatFormatting.GREEN + getEUString(getMaxOutput()));
|
||||||
}
|
}
|
||||||
if(CompatManager.isClassicEnet && isRealTile){
|
// if(isRealTile){ //TODO sync to client
|
||||||
info.add(ChatFormatting.LIGHT_PURPLE + "Stored energy " + ChatFormatting.GREEN + getEUString(energy));
|
// info.add(ChatFormatting.LIGHT_PURPLE + "Stored energy " + ChatFormatting.GREEN + getEUString(energy));
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getEUString(double euValue) {
|
private String getEUString(double euValue) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue