Weapon damage doesn't work and durabillity

Started by ntofab on

Topic category: Help with MCreator software

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Weapon damage doesn't work and durabillity

As in topic i set damage vs mob animal and durabillity to 1 (one use) and ingame weapon doesn't have any damage and does have infinity use

There's also one thing i wanna know, could u help me to set action on hit (mobs/etc) to weapon dissapear (because there's a lot of mods where u can make item unbreakable, so this could be op, i want to delete item after 1 use, how can i do that?) thanks in advance!

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm pretty sure the…
Tue, 01/17/2023 - 19:39

I'm pretty sure the durability system doesn't guarantee something will break; items have random chances of decreasing in durability. You'll probably want to make sure you're using the 'Tool' element instead of a regular item, unless you want to manually change the item rendering. (Otherwise your sword will be the size of a regular item, rather than a sword.) 

You'll probably want to use a trigger either when your custom item is swung, or when a player attacks an entity with your custom item. (There should be triggers for both of these.) Keep in mind that these triggers will have a 'Target Entity,' (usually the mob being hit), and a 'Source Entity,' (usually the mob or player attacking.) In addition to whatever special effect you want the item to have, just 'shrink' the item in the main hand of the source entity, and play the 'item break' noise.

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for help! Yes it is…
Wed, 01/18/2023 - 02:03

Thanks for help! Yes it is as tool, im working on fabric plugin btw.