mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-30 02:38:34 +01:00
made the magnet ring not use energy when not picking something up
This commit is contained in:
parent
723da24eb7
commit
770e02c65a
1 changed files with 5 additions and 1 deletions
|
@ -43,9 +43,12 @@ public class ItemMagnetRing extends ItemEnergy{
|
|||
int energyForItem = 350*StackUtil.getStackSize(item.getEntityItem());
|
||||
|
||||
if(this.getEnergyStored(stack) >= energyForItem){
|
||||
ItemStack oldItem = StackUtil.validateCopy(item.getEntityItem());
|
||||
|
||||
item.onCollideWithPlayer(player);
|
||||
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
if(item.isDead || !ItemStack.areItemStacksEqual(item.getEntityItem(), oldItem)){
|
||||
this.extractEnergy(stack, energyForItem, false);
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +58,7 @@ public class ItemMagnetRing extends ItemEnergy{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue