Add durability to food

Started by Elioth67 on

Topic category: Help with modding (Java Edition)

Last seen on 14:59, 25. Jun 2020
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add durability to food

I need help to make sure that when we eat an item, instead of deleting it it will lose durability (and that when there is no durability it is deleted)

Version of mcreator: Latest (when I posted this post)

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help to make sure…
Tue, 06/23/2020 - 15:38

I need help to make sure that when we eat an item, instead of deleting it it will lose durability (and that when there is no durability it is deleted)

This is probably possible in MCreator. Just give the player a different item onItemUse/onItemEaten.

- Full Item, Half Item.

If the player uses the Full Item, give them the Half Item.

If the player uses the Half item, just don't give them anything; alternatively, give them a Broken Item.

 

However, if you really want the durability effect, such as a sword. You are probably going to have to code.

Last seen on 14:59, 25. Jun 2020
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thx  
Wed, 06/24/2020 - 11:36

Thx