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
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.
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.