ItemComponent - Damage Reduction Rule (Section) — SkBee

Addon: SkBee · Category: Section · Since: 3.23.0

Syntax

apply damage reduction

Description

Apply a rule for how much and what kinds of damage should be blocked in a given attack. See [**Blocks Attacks Component**](https://minecraft.wiki/w/Data_component_format#blocks_attacks) on McWiki for more info.

**Entries**: - `type` = Damage types to block [optional DamageType/String/TagKey, defaults to all damage types]. - `base` = The constant amount of damage to be blocked (required number). - `factor` = The fraction of the dealt damage to be blocked (required number). - `horizontal_blocking_angle` = The maximum angle between the users facing direction and the direction of the incoming attack to be blocked [optional positive number, defaults to 90].

Examples

apply blocks attacks to {_i}:
	block_delay_seconds: 0.25 seconds
	disable_cooldown_scale: 1.5
	item_damage_threshold: 1.0
	item_damage_base: 1.0
	item_damage_factor: 3.0
	block_sound: "minecraft:item.shield.block"
	disabled_sound: "minecraft:item.shield.break"
	bypassed_by: "minecraft:bypasses_shield"
	damage_reductions:
		apply damage reduction:
			type: mob attack, campfire
			base: 1.0
			factor: 2.5
			horizontal_blocking_angle: 25

View source