Tech Reborn

Tech Reborn

30M Downloads

Multiple batteries recharge each other (batteries recharge everything in the inventory)

DenisNovac opened this issue · 1 comments

commented

Describe the bug
When you have empty battery in your inventory while using non-empty battery, the empty one will get half of it's charge.

Steps to Reproduce
Steps to reproduce the behavior:

  • Get one empty battery and one non-empty
  • Try to activate non-empty one
  • Half of it's charge gone to your tool and half to empty battery

Environment (please complete the following information with the version):

  • Minecraft: 1.16.4
  • fabric-api-0.26.3+1.16
  • RebornCore-1.16-4.6.1+build.97
  • TechReborn-1.16-3.7.1+build.162

Screenshots

One empty battery and one non-empty:
изображение

Activating the non-empty one:
изображение

Half of the charge is in empty battery now (64 E is successfully transfered to the drill):
изображение

Maybe the active batteries should recharge only equipped items?

commented

I guess it still may be a problem. For example, if you have chainsaw and drill and you only want to recharge drill - you'll need to drop the chainsaw out from your inventory. Perhaps it should check if the item on the belt?