|
89 | 89 | import org.spongepowered.api.data.type.RailDirection; |
90 | 90 | import org.spongepowered.api.data.type.SalmonSize; |
91 | 91 | import org.spongepowered.api.data.type.SculkSensorState; |
| 92 | +import org.spongepowered.api.data.type.ShieldDamageReduction; |
| 93 | +import org.spongepowered.api.data.type.ShieldItemDamageFunction; |
92 | 94 | import org.spongepowered.api.data.type.SkinPart; |
93 | 95 | import org.spongepowered.api.data.type.SlabPortion; |
94 | 96 | import org.spongepowered.api.data.type.SpellType; |
|
223 | 225 | import org.spongepowered.api.entity.vehicle.minecart.Minecart; |
224 | 226 | import org.spongepowered.api.entity.vehicle.minecart.MinecartLike; |
225 | 227 | import org.spongepowered.api.entity.weather.LightningBolt; |
| 228 | +import org.spongepowered.api.event.cause.entity.damage.DamageType; |
226 | 229 | import org.spongepowered.api.event.cause.entity.damage.source.DamageSource; |
227 | 230 | import org.spongepowered.api.event.cause.entity.damage.source.DamageSources; |
228 | 231 | import org.spongepowered.api.fluid.FluidStackSnapshot; |
@@ -3655,6 +3658,43 @@ public final class Keys { |
3655 | 3658 | */ |
3656 | 3659 | public static final Key<Value<Ticks>> DISABLE_BLOCKING_TICKS = Keys.key(ResourceKey.sponge("disable_blocking_ticks"), Ticks.class); |
3657 | 3660 |
|
| 3661 | + /** |
| 3662 | + * The amount of {@link Ticks} player must use this {@link ItemStack} for to block attacks successfully. |
| 3663 | + */ |
| 3664 | + public static final Key<Value<Ticks>> BLOCK_DELAY_TICKS = Keys.key(ResourceKey.sponge("block_delay_ticks"), Ticks.class); |
| 3665 | + |
| 3666 | + /** |
| 3667 | + * Multiplier applied to the cooldown during which blocking using this item is disabled. |
| 3668 | + * |
| 3669 | + * @see <a href="https://minecraft.wiki/w/Data_component_format#blocks_attacks">blocks_attacks</a> |
| 3670 | + */ |
| 3671 | + public static final Key<Value<Float>> DISABLED_BLOCKING_COOLDOWN_SCALE = Keys.key(ResourceKey.sponge("disabled_blocking_cooldown_scale"), Float.class); |
| 3672 | + |
| 3673 | + /** |
| 3674 | + * The amount of attack damage a shield-like {@link ItemStack} reduces for certain {@link DamageType}s |
| 3675 | + */ |
| 3676 | + public static final Key<ListValue<ShieldDamageReduction>> SHIELD_DAMAGE_REDUCTIONS = Keys.listKey(ResourceKey.sponge("shield_damage_reductions"), ShieldDamageReduction.class); |
| 3677 | + |
| 3678 | + /** |
| 3679 | + * Function for the amount of {@link Keys#ITEM_DURABILITY} damage a shield-like {@link ItemStack} takes when blocking an attack. |
| 3680 | + */ |
| 3681 | + public static final Key<Value<ShieldItemDamageFunction>> SHIELD_ITEM_DAMAGE_FUNCTION = Keys.key(ResourceKey.sponge("shield_item_damage_function"), ShieldItemDamageFunction.class); |
| 3682 | + |
| 3683 | + /** |
| 3684 | + * The {@link DamageType} tag that bypasses a shield-like {@link ItemStack}. |
| 3685 | + */ |
| 3686 | + public static final Key<Value<Tag<DamageType>>> BYPASS_DAMAGE_TAG = Keys.key(ResourceKey.sponge("bypass_damage_tag"), new TypeToken<>() {}); |
| 3687 | + |
| 3688 | + /** |
| 3689 | + * The sound played when blocking an attack with a shield-like {@link ItemStack}. |
| 3690 | + */ |
| 3691 | + public static final Key<Value<SoundType>> SHIELD_BLOCK_SOUND = Keys.key(ResourceKey.sponge("shield_block_sound"), SoundType.class); |
| 3692 | + |
| 3693 | + /** |
| 3694 | + * The sound played when a shield-like {@link ItemStack} is disabled. |
| 3695 | + */ |
| 3696 | + public static final Key<Value<SoundType>> SHIELD_DISABLE_SOUND = Keys.key(ResourceKey.sponge("shield_disable_sound"), SoundType.class); |
| 3697 | + |
3658 | 3698 | // SORTFIELDS:OFF |
3659 | 3699 |
|
3660 | 3700 | // @formatter:on |
|
0 commit comments