|
34 | 34 | import org.spongepowered.api.block.entity.Banner; |
35 | 35 | import org.spongepowered.api.block.entity.BlockEntity; |
36 | 36 | import org.spongepowered.api.block.entity.CommandBlock; |
| 37 | +import org.spongepowered.api.block.entity.CreakingHeart; |
37 | 38 | import org.spongepowered.api.block.entity.EndGateway; |
38 | 39 | import org.spongepowered.api.block.entity.Jukebox; |
39 | 40 | import org.spongepowered.api.block.entity.Lectern; |
|
163 | 164 | import org.spongepowered.api.entity.living.golem.IronGolem; |
164 | 165 | import org.spongepowered.api.entity.living.golem.Shulker; |
165 | 166 | import org.spongepowered.api.entity.living.monster.Blaze; |
| 167 | +import org.spongepowered.api.entity.living.monster.Creaking; |
166 | 168 | import org.spongepowered.api.entity.living.monster.Creeper; |
167 | 169 | import org.spongepowered.api.entity.living.monster.Enderman; |
168 | 170 | import org.spongepowered.api.entity.living.monster.Endermite; |
|
208 | 210 | import org.spongepowered.api.entity.vehicle.minecart.Minecart; |
209 | 211 | import org.spongepowered.api.entity.vehicle.minecart.MinecartLike; |
210 | 212 | import org.spongepowered.api.entity.weather.LightningBolt; |
| 213 | +import org.spongepowered.api.event.cause.entity.damage.source.DamageSource; |
211 | 214 | import org.spongepowered.api.event.cause.entity.damage.source.DamageSources; |
212 | 215 | import org.spongepowered.api.fluid.FluidStackSnapshot; |
213 | 216 | import org.spongepowered.api.fluid.FluidTypes; |
@@ -763,6 +766,22 @@ public final class Keys { |
763 | 766 | */ |
764 | 767 | public static final Key<Value<Double>> COORDINATE_MULTIPLIER = Keys.key(ResourceKey.sponge("coordinate_multiplier"), Double.class); |
765 | 768 |
|
| 769 | + /** |
| 770 | + * The coordinates of where a {@link Creaking} has |
| 771 | + * it's bonded {@link CreakingHeart home} set to. Can be |
| 772 | + * overridden. |
| 773 | + * |
| 774 | + * When a {@link Creaking} is spawned, it can |
| 775 | + * be considered linked to a heart or not. |
| 776 | + */ |
| 777 | + public static final Key<Value<Vector3i>> CREAKING_HOME_POSITION = Keys.key(ResourceKey.sponge("creaking_home_position"), Vector3i.class); |
| 778 | + |
| 779 | + /** |
| 780 | + * Marks whether a {@link Creaking} is considered transient. When transient, it may be |
| 781 | + * invulnerable to most all {@link DamageSource}s. Note that this is not mutable. |
| 782 | + */ |
| 783 | + public static final Key<Value<Boolean>> CREAKING_IS_LINKED = Keys.key(ResourceKey.sponge("creaking_transient"), Boolean.class); |
| 784 | + |
766 | 785 | /** |
767 | 786 | * Overrides whether a {@link WorldType} allows the {@link EnderDragon dragon} fight mechanic to spawn. |
768 | 787 | * <p>By default, the dragon only spawns in the {@link DefaultWorldKeys#THE_END} world with {@link WorldTypes#THE_END} world type.</p> |
|
0 commit comments