Shield
Makes items act like shields.
Parameters
The number of ticks that right-click must be held before successfully blocking attacks.
A multiplier that is applied to the number of ticks that the item will be on cooldown for when attacked by a disabling attack.
A list of DamageReductions of how much damage should be blocked on attack.
Specifies how much damage is applied to the item when it blocks an attack.
A damage type tag containing the damage types that bypass the shield. Can be null
if no damage types bypass the shield.
The sound that is played when the shield successfully blocks an attack. Can be null
if no sound should be played.
The sound that is played when the shield is disabled by a disabling attack. Can be null
if no sound should be played.
Properties
The base data components that every item with this ItemBehavior has.
The number of ticks that right-click must be held before successfully blocking attacks.
The sound that is played when the shield successfully blocks an attack.
The key of the sound that is played when the shield successfully blocks an attack.
A damage type tag containing the damage types that bypass the shield.
A list of DamageReductions of how much damage should be blocked on attack.
The NamespacedCompound that every new ItemStack of an item with this ItemBehavior has by default.
A multiplier that is applied to the number of ticks that the item will be on cooldown for when attacked by a disabling attack.
The sound that is played when the shield is disabled by a disabling attack.
The key of the sound that is played when the shield is disabled by a disabling attack.
Specifies how much damage is applied to the item when it blocks an attack.
The vanilla material properties that an item with this ItemBehavior requires.
Functions
Called when a BlockBreakActionEvent is fired where player breaks a block with an itemStack with this behavior.
Called when a aPlayerItemBreakEvent is fired where an itemStack with this behavior runs out of durability and breaks.
Called when a PlayerItemDamageEvent is fired where an itemStack with this behavior takes damage.
Called when a PlayerInteractAtEntityEvent is fired for an itemStack with this behavior.
Called when a PlayerInteractEvent is fired for an itemStack with this behavior.
Called when a ServerboundPlayerActionPacketEvent is fired where the server receives a player action packet regarding an itemStack with this behavior. Note that this is a packet event, and as such this function is called a netty thread, not the server thread.
Updates the client-side item stack that is to be viewed by player in place of the server-side item stack.
Creates a string representation of this ItemBehavior and its data in itemStack.