mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-23 03:49:22 +01:00
Fix the magnet ring using energy when not picking anything up
Closes #589
This commit is contained in:
parent
2d4c7db2aa
commit
1b27148792
1 changed files with 5 additions and 1 deletions
|
@ -52,10 +52,14 @@ public class ItemMagnetRing extends ItemEnergy{
|
|||
int energyForItem = 50*StackUtil.getStackSize(item.getEntityItem());
|
||||
|
||||
if(this.getEnergyStored(stack) >= energyForItem){
|
||||
ItemStack oldItem = StackUtil.validateCopy(item.getEntityItem());
|
||||
|
||||
item.onCollideWithPlayer(player);
|
||||
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
this.extractEnergyInternal(stack, energyForItem, false);
|
||||
if(item.isDead || !ItemStack.areItemStacksEqual(item.getEntityItem(), oldItem)){
|
||||
this.extractEnergyInternal(stack, energyForItem, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue