Merge remote-tracking branch 'origin/1.12' into 1.12
This commit is contained in:
commit
fc2c4cce0c
2 changed files with 3 additions and 3 deletions
|
@ -74,11 +74,11 @@ public class TileCable extends TileEntity implements ITickable, IEnergyStorage,
|
||||||
return super.hasCapability(capability, facing);
|
return super.hasCapability(capability, facing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
|
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
|
||||||
if (capability == CapabilityEnergy.ENERGY) {
|
if (capability == CapabilityEnergy.ENERGY) {
|
||||||
return (T) this;
|
return CapabilityEnergy.ENERGY.cast(this);
|
||||||
}
|
}
|
||||||
return super.getCapability(capability, facing);
|
return super.getCapability(capability, facing);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class TileEnergyStorage extends TilePowerAcceptor
|
||||||
if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){
|
if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){
|
||||||
IEnergyStorage energyStorage = stack.getCapability(CapabilityEnergy.ENERGY, null);
|
IEnergyStorage energyStorage = stack.getCapability(CapabilityEnergy.ENERGY, null);
|
||||||
int max = Math.min(maxOutput, (int) getEnergy()) * RebornCoreConfig.euPerFU;
|
int max = Math.min(maxOutput, (int) getEnergy()) * RebornCoreConfig.euPerFU;
|
||||||
useEnergy(energyStorage.receiveEnergy(max, false) * RebornCoreConfig.euPerFU);
|
useEnergy(energyStorage.receiveEnergy(max, false) / RebornCoreConfig.euPerFU);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!inventory.getStackInSlot(1).isEmpty()) {
|
if (!inventory.getStackInSlot(1).isEmpty()) {
|
||||||
|
|
Loading…
Reference in a new issue