mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +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,9 +52,12 @@ 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){
|
||||
if(item.isDead || !ItemStack.areItemStacksEqual(item.getEntityItem(), oldItem)){
|
||||
this.extractEnergyInternal(stack, energyForItem, false);
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +67,7 @@ public class ItemMagnetRing extends ItemEnergy{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer player, EnumHand hand){
|
||||
|
|
Loading…
Reference in a new issue