mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
Fix an energy dupe bug with batteries
This commit is contained in:
parent
3ed5e9cc8a
commit
9b2628e9aa
2 changed files with 3 additions and 3 deletions
|
@ -59,12 +59,12 @@ public class ItemBattery extends ItemEnergy{
|
||||||
|
|
||||||
Item item = slot.getItem();
|
Item item = slot.getItem();
|
||||||
if(item instanceof IEnergyContainerItem){
|
if(item instanceof IEnergyContainerItem){
|
||||||
received = ((IEnergyContainerItem)item).receiveEnergy(slot, this.getEnergyStored(stack), false);
|
received = ((IEnergyContainerItem)item).receiveEnergy(slot, this.extractEnergy(stack, Integer.MAX_VALUE, true), false);
|
||||||
}
|
}
|
||||||
else if(ActuallyAdditions.teslaLoaded && slot.hasCapability(TeslaUtil.teslaConsumer, null)){
|
else if(ActuallyAdditions.teslaLoaded && slot.hasCapability(TeslaUtil.teslaConsumer, null)){
|
||||||
ITeslaConsumer cap = slot.getCapability(TeslaUtil.teslaConsumer, null);
|
ITeslaConsumer cap = slot.getCapability(TeslaUtil.teslaConsumer, null);
|
||||||
if(cap != null){
|
if(cap != null){
|
||||||
received = (int)cap.givePower(this.getEnergyStored(stack), false);
|
received = (int)cap.givePower(this.extractEnergy(stack, Integer.MAX_VALUE, true), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void extractEnergy(int amount){
|
public void extractEnergy(int amount){
|
||||||
this.storage.extractEnergyInternal(amount, false);
|
this.storage.extractEnergy(amount, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue