Custom shield mod element

Status
Fixed
Issue description

How create a Shield, in minecraft, the same shield as the new versions of minecraft, if i can't, how i can create it via codes?

Issue comments

We have shields in the plan for later versions. For code, you could ask on forums or google a bit, I believe there are examples on how to do this.

wow, in the next update will have shields? Perfect! i can't wait.. oh, and it would be perfect if we could make 3d armors and we could create our processing machines, like a better furnace for only specific metals

One issue with shields is you can't really control any parameter of it so you could just retexture it, not add any other actual logic to it, except for procedures maybe.

I have done a lot of work to get shields to work but the issue is that shield item is just a placeholder. Later in player logic, there is a check for shield item and all shield actions happen here. The custom shield is not detected by this logic, so we currently can't add custom shields. If I find a way around this, I will reopen this ticket and add shield support.

Some parameters for custom shields 

  • Sound event when attack is blocked for custom hit sounds
  • Maximum damage/durability for shield
  • Disable delay for when shield is blocked in ticks, with 5 seconds default
  • Item texture (similar to block)
  • Model texture
  • Special information about item

 

Procedure triggers:

  • When projectile (custom ranged item, trident, arrow etc) hits shield
  • When shield is blocked by axe.
  • When shield in main and off hand ticks.
  • When melee attack is blocked with shield.