How to make a chargeable battery

Started by BlockyPenguin on

Topic category: Help with modding (Java Edition)

Last seen on 23:44, 7. Jan 2020
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a chargeable battery

Hi!

Does anyone know how i would make a battery (item, not block) chargeable, and for use in a laser gun, which doesn't fire the battery, but completely discharges it?

Thanks,

~Blocky

Last seen on 23:44, 7. Jan 2020
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Anyone?
Sat, 09/15/2018 - 14:34

Anyone?

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can try to make it with…
Sat, 09/15/2018 - 15:36

You can try to make it with Local Variables

 

Last seen on 22:23, 15. Nov 2023
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, I've tried many forms to…
Sat, 05/20/2023 - 12:51

Hi, I've tried many forms to make that. At first I used NBT tags, but it didn't work, because it was like it wasn't the same for the two procedures. Now this days I had some ideas to make it work. So I tried with the durability system, but it didn't work again. Finally today I'll try to make lots of battery items but with different values, so when I extract energy from the Generator the battey will change to another battery but with a different value.

Other ideas I don't have, and if you try to make one, you need to have in mind that items don't store energy, so one way is with NBT tags, but you can't use them in Blocks procedures.

I hope someone has a vetter idea.