|
61 | 61 | import org.spongepowered.api.data.type.CatType; |
62 | 62 | import org.spongepowered.api.data.type.ChestAttachmentType; |
63 | 63 | import org.spongepowered.api.data.type.ComparatorMode; |
| 64 | +import org.spongepowered.api.data.type.CopperOxidation; |
64 | 65 | import org.spongepowered.api.data.type.DoorHinge; |
65 | 66 | import org.spongepowered.api.data.type.DripstoneSegment; |
66 | 67 | import org.spongepowered.api.data.type.DyeColor; |
|
90 | 91 | import org.spongepowered.api.data.type.RailDirection; |
91 | 92 | import org.spongepowered.api.data.type.SalmonSize; |
92 | 93 | import org.spongepowered.api.data.type.SculkSensorState; |
| 94 | +import org.spongepowered.api.data.type.ShieldDamageReduction; |
| 95 | +import org.spongepowered.api.data.type.ShieldItemDamageFunction; |
93 | 96 | import org.spongepowered.api.data.type.SkinPart; |
94 | 97 | import org.spongepowered.api.data.type.SlabPortion; |
95 | 98 | import org.spongepowered.api.data.type.SpellType; |
|
174 | 177 | import org.spongepowered.api.entity.living.aquatic.fish.Pufferfish; |
175 | 178 | import org.spongepowered.api.entity.living.aquatic.fish.school.Salmon; |
176 | 179 | import org.spongepowered.api.entity.living.aquatic.fish.school.TropicalFish; |
| 180 | +import org.spongepowered.api.entity.living.golem.CopperGolem; |
177 | 181 | import org.spongepowered.api.entity.living.golem.IronGolem; |
178 | 182 | import org.spongepowered.api.entity.living.golem.Shulker; |
179 | 183 | import org.spongepowered.api.entity.living.monster.Blaze; |
|
224 | 228 | import org.spongepowered.api.entity.vehicle.minecart.Minecart; |
225 | 229 | import org.spongepowered.api.entity.vehicle.minecart.MinecartLike; |
226 | 230 | import org.spongepowered.api.entity.weather.LightningBolt; |
| 231 | +import org.spongepowered.api.event.cause.entity.damage.DamageType; |
227 | 232 | import org.spongepowered.api.event.cause.entity.damage.source.DamageSource; |
228 | 233 | import org.spongepowered.api.event.cause.entity.damage.source.DamageSources; |
229 | 234 | import org.spongepowered.api.fluid.FluidStackSnapshot; |
|
257 | 262 | import org.spongepowered.api.raid.RaidWave; |
258 | 263 | import org.spongepowered.api.registry.DefaultedRegistryType; |
259 | 264 | import org.spongepowered.api.statistic.Statistic; |
| 265 | +import org.spongepowered.api.tag.BlockTypeTags; |
260 | 266 | import org.spongepowered.api.tag.Tag; |
261 | 267 | import org.spongepowered.api.util.Axis; |
262 | 268 | import org.spongepowered.api.util.Color; |
@@ -639,6 +645,11 @@ public final class Keys { |
639 | 645 | */ |
640 | 646 | public static final Key<Value<Integer>> BURN_TIME = Keys.key(ResourceKey.sponge("burn_time"), Integer.class); |
641 | 647 |
|
| 648 | + /** |
| 649 | + * The {@link DamageType} tag that bypasses a shield-like {@link ItemStack}. |
| 650 | + */ |
| 651 | + public static final Key<Value<Tag<DamageType>>> BYPASS_DAMAGE_TAG = Keys.key(ResourceKey.sponge("bypass_damage_tag"), new TypeToken<>() {}); |
| 652 | + |
642 | 653 | /** |
643 | 654 | * Whether an {@link ItemStack} can always be eaten. |
644 | 655 | */ |
@@ -794,6 +805,13 @@ public final class Keys { |
794 | 805 | */ |
795 | 806 | public static final Key<Value<ItemType>> CONTAINER_ITEM = Keys.key(ResourceKey.sponge("container_item"), ItemType.class); |
796 | 807 |
|
| 808 | + /** |
| 809 | + * The {@link CopperOxidation} state of a {@link BlockState block} |
| 810 | + * (given that it applies to the {@link BlockTypeTags#COPPER} tag) or |
| 811 | + * a {@link CopperGolem} |
| 812 | + */ |
| 813 | + public static final Key<Value<CopperOxidation>> COPPER_OXIDATION = Keys.key(ResourceKey.sponge("copper_oxidation"), CopperOxidation.class); |
| 814 | + |
797 | 815 | /** |
798 | 816 | * The {@link ItemStack} a food {@link ItemStack} converts to when eaten. |
799 | 817 | */ |
@@ -976,6 +994,17 @@ public final class Keys { |
976 | 994 | */ |
977 | 995 | public static final Key<Value<Direction>> DIRECTION = Keys.key(ResourceKey.sponge("direction"), Direction.class); |
978 | 996 |
|
| 997 | + /** |
| 998 | + * The amount of {@link Ticks} this {@link ItemStack} disables blocking with a shield-like {@link ItemStack} on a successful attack. |
| 999 | + */ |
| 1000 | + public static final Key<Value<Ticks>> DISABLE_SHIELD_TICKS = Keys.key(ResourceKey.sponge("disable_shield_ticks"), Ticks.class); |
| 1001 | + |
| 1002 | + /** |
| 1003 | + * The multiplier applied to the cooldown time during which blocking using this shield-like {@link ItemStack} is disabled. |
| 1004 | + * If set to 0, this item can never be disabled by attacks. |
| 1005 | + */ |
| 1006 | + public static final Key<Value<Double>> DISABLE_SHIELD_TICKS_SCALE = Keys.key(ResourceKey.sponge("disable_shield_ticks_scale"), Double.class); |
| 1007 | + |
979 | 1008 | /** |
980 | 1009 | * The display name of an {@link Entity}, {@link ItemStack} or {@link BlockEntity}. |
981 | 1010 | * |
@@ -3046,6 +3075,31 @@ public final class Keys { |
3046 | 3075 | */ |
3047 | 3076 | public static final Key<Value<Double>> SHADOW_STRENGTH = Keys.key(ResourceKey.sponge("shadow_strength"), Double.class); |
3048 | 3077 |
|
| 3078 | + /** |
| 3079 | + * The sound played when blocking an attack with a shield-like {@link ItemStack}. |
| 3080 | + */ |
| 3081 | + public static final Key<Value<SoundType>> SHIELD_BLOCK_SOUND = Keys.key(ResourceKey.sponge("shield_block_sound"), SoundType.class); |
| 3082 | + |
| 3083 | + /** |
| 3084 | + * The amount of attack damage a shield-like {@link ItemStack} reduces for certain {@link DamageType}s |
| 3085 | + */ |
| 3086 | + public static final Key<ListValue<ShieldDamageReduction<?>>> SHIELD_DAMAGE_REDUCTIONS = Keys.listKey(ResourceKey.sponge("shield_damage_reductions"), new TypeToken<>() {}); |
| 3087 | + |
| 3088 | + /** |
| 3089 | + * The amount of {@link Ticks} player must use this shield-like {@link ItemStack} for to block attacks successfully. |
| 3090 | + */ |
| 3091 | + public static final Key<Value<Ticks>> SHIELD_DEPLOY_TICKS = Keys.key(ResourceKey.sponge("shield_deploy_ticks"), Ticks.class); |
| 3092 | + |
| 3093 | + /** |
| 3094 | + * The sound played when a shield-like {@link ItemStack} is disabled. |
| 3095 | + */ |
| 3096 | + public static final Key<Value<SoundType>> SHIELD_DISABLE_SOUND = Keys.key(ResourceKey.sponge("shield_disable_sound"), SoundType.class); |
| 3097 | + |
| 3098 | + /** |
| 3099 | + * Function for the amount of {@link Keys#ITEM_DURABILITY} damage a shield-like {@link ItemStack} takes when blocking an attack. |
| 3100 | + */ |
| 3101 | + public static final Key<Value<ShieldItemDamageFunction<?>>> SHIELD_ITEM_DAMAGE_FUNCTION = Keys.key(ResourceKey.sponge("shield_item_damage_function"), new TypeToken<>() {}); |
| 3102 | + |
3049 | 3103 | /** |
3050 | 3104 | * The shooter of a {@link Projectile}. |
3051 | 3105 | */ |
@@ -3534,6 +3588,17 @@ public final class Keys { |
3534 | 3588 | */ |
3535 | 3589 | public static final Key<Value<Color>> WATER_FOG_COLOR = Keys.key(ResourceKey.sponge("water_fog_color"), Color.class); |
3536 | 3590 |
|
| 3591 | + /** |
| 3592 | + * The state of whether a {@link BlockState} that is a copper block is waxed, or if a {@link CopperGolem} |
| 3593 | + * is waxed. |
| 3594 | + */ |
| 3595 | + public static final Key<Value<Boolean>> WAXED = Keys.key(ResourceKey.sponge("waxed"), Boolean.class); |
| 3596 | + |
| 3597 | + /** |
| 3598 | + * The {@link #ITEM_DURABILITY} damage an {@link ItemStack} takes per attack. |
| 3599 | + */ |
| 3600 | + public static final Key<Value<Integer>> WEAPON_DAMAGE_PER_ATTACK = Keys.key(ResourceKey.sponge("weapon_damage_per_attack"), Integer.class); |
| 3601 | + |
3537 | 3602 | /** |
3538 | 3603 | * The weather of a {@link ServerWorldProperties}. |
3539 | 3604 | */ |
|
0 commit comments