org.spongepowered.api.data.Keys Maven / Gradle / Ivy
Show all versions of spongeapi Show documentation
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data;
import io.leangen.geantyref.TypeToken;
import net.kyori.adventure.bossbar.BossBar;
import net.kyori.adventure.text.Component;
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.block.BlockState;
import org.spongepowered.api.block.BlockType;
import org.spongepowered.api.block.BlockTypes;
import org.spongepowered.api.block.entity.Banner;
import org.spongepowered.api.block.entity.BlockEntity;
import org.spongepowered.api.block.entity.CommandBlock;
import org.spongepowered.api.block.entity.EndGateway;
import org.spongepowered.api.block.entity.Jukebox;
import org.spongepowered.api.block.entity.Lectern;
import org.spongepowered.api.block.entity.MobSpawner;
import org.spongepowered.api.block.entity.Piston;
import org.spongepowered.api.block.entity.Sign;
import org.spongepowered.api.block.entity.StructureBlock;
import org.spongepowered.api.block.entity.carrier.Beacon;
import org.spongepowered.api.block.entity.carrier.BrewingStand;
import org.spongepowered.api.block.entity.carrier.CarrierBlockEntity;
import org.spongepowered.api.block.entity.carrier.Hopper;
import org.spongepowered.api.block.entity.carrier.furnace.FurnaceBlockEntity;
import org.spongepowered.api.data.meta.BannerPatternLayer;
import org.spongepowered.api.data.type.ArmorMaterial;
import org.spongepowered.api.data.type.ArtType;
import org.spongepowered.api.data.type.AttachmentSurface;
import org.spongepowered.api.data.type.BoatType;
import org.spongepowered.api.data.type.BodyPart;
import org.spongepowered.api.data.type.BodyParts;
import org.spongepowered.api.data.type.CatType;
import org.spongepowered.api.data.type.ChestAttachmentType;
import org.spongepowered.api.data.type.ComparatorMode;
import org.spongepowered.api.data.type.DoorHinge;
import org.spongepowered.api.data.type.DripstoneSegment;
import org.spongepowered.api.data.type.DyeColor;
import org.spongepowered.api.data.type.FoxType;
import org.spongepowered.api.data.type.HandPreference;
import org.spongepowered.api.data.type.HorseColor;
import org.spongepowered.api.data.type.HorseStyle;
import org.spongepowered.api.data.type.InstrumentType;
import org.spongepowered.api.data.type.ItemTier;
import org.spongepowered.api.data.type.LlamaType;
import org.spongepowered.api.data.type.MatterType;
import org.spongepowered.api.data.type.MooshroomType;
import org.spongepowered.api.data.type.NotePitch;
import org.spongepowered.api.data.type.PandaGene;
import org.spongepowered.api.data.type.PandaGenes;
import org.spongepowered.api.data.type.ParrotType;
import org.spongepowered.api.data.type.PhantomPhase;
import org.spongepowered.api.data.type.PickupRule;
import org.spongepowered.api.data.type.PistonType;
import org.spongepowered.api.data.type.PortionType;
import org.spongepowered.api.data.type.ProfessionType;
import org.spongepowered.api.data.type.RabbitType;
import org.spongepowered.api.data.type.RailDirection;
import org.spongepowered.api.data.type.SculkSensorState;
import org.spongepowered.api.data.type.SkinPart;
import org.spongepowered.api.data.type.SlabPortion;
import org.spongepowered.api.data.type.SpellType;
import org.spongepowered.api.data.type.SpellTypes;
import org.spongepowered.api.data.type.StairShape;
import org.spongepowered.api.data.type.StructureMode;
import org.spongepowered.api.data.type.Tilt;
import org.spongepowered.api.data.type.TropicalFishShape;
import org.spongepowered.api.data.type.VillagerType;
import org.spongepowered.api.data.type.WireAttachmentType;
import org.spongepowered.api.data.value.ListValue;
import org.spongepowered.api.data.value.MapValue;
import org.spongepowered.api.data.value.SetValue;
import org.spongepowered.api.data.value.Value;
import org.spongepowered.api.data.value.WeightedCollectionValue;
import org.spongepowered.api.effect.VanishState;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleOption;
import org.spongepowered.api.effect.particle.ParticleType;
import org.spongepowered.api.effect.potion.PotionEffect;
import org.spongepowered.api.effect.potion.PotionEffectType;
import org.spongepowered.api.effect.potion.PotionEffectTypes;
import org.spongepowered.api.effect.sound.music.MusicDisc;
import org.spongepowered.api.entity.AreaEffectCloud;
import org.spongepowered.api.entity.Entity;
import org.spongepowered.api.entity.EntityArchetype;
import org.spongepowered.api.entity.EntityType;
import org.spongepowered.api.entity.ExperienceOrb;
import org.spongepowered.api.entity.FallingBlock;
import org.spongepowered.api.entity.Item;
import org.spongepowered.api.entity.ai.goal.GoalExecutorTypes;
import org.spongepowered.api.entity.explosive.EndCrystal;
import org.spongepowered.api.entity.explosive.Explosive;
import org.spongepowered.api.entity.explosive.fused.FusedExplosive;
import org.spongepowered.api.entity.explosive.fused.PrimedTNT;
import org.spongepowered.api.entity.hanging.Hanging;
import org.spongepowered.api.entity.hanging.ItemFrame;
import org.spongepowered.api.entity.hanging.LeashKnot;
import org.spongepowered.api.entity.hanging.Painting;
import org.spongepowered.api.entity.living.Ageable;
import org.spongepowered.api.entity.living.Agent;
import org.spongepowered.api.entity.living.ArmorStand;
import org.spongepowered.api.entity.living.Bat;
import org.spongepowered.api.entity.living.Humanoid;
import org.spongepowered.api.entity.living.Living;
import org.spongepowered.api.entity.living.animal.Animal;
import org.spongepowered.api.entity.living.animal.Cat;
import org.spongepowered.api.entity.living.animal.Chicken;
import org.spongepowered.api.entity.living.animal.Fox;
import org.spongepowered.api.entity.living.animal.Ocelot;
import org.spongepowered.api.entity.living.animal.Panda;
import org.spongepowered.api.entity.living.animal.Parrot;
import org.spongepowered.api.entity.living.animal.Pig;
import org.spongepowered.api.entity.living.animal.PolarBear;
import org.spongepowered.api.entity.living.animal.Rabbit;
import org.spongepowered.api.entity.living.animal.Sheep;
import org.spongepowered.api.entity.living.animal.TameableAnimal;
import org.spongepowered.api.entity.living.animal.Turtle;
import org.spongepowered.api.entity.living.animal.Wolf;
import org.spongepowered.api.entity.living.animal.cow.Mooshroom;
import org.spongepowered.api.entity.living.animal.horse.Horse;
import org.spongepowered.api.entity.living.animal.horse.HorseLike;
import org.spongepowered.api.entity.living.animal.horse.PackHorse;
import org.spongepowered.api.entity.living.animal.horse.llama.Llama;
import org.spongepowered.api.entity.living.animal.horse.llama.TraderLlama;
import org.spongepowered.api.entity.living.aquatic.Dolphin;
import org.spongepowered.api.entity.living.aquatic.fish.school.TropicalFish;
import org.spongepowered.api.entity.living.golem.IronGolem;
import org.spongepowered.api.entity.living.golem.Shulker;
import org.spongepowered.api.entity.living.monster.Blaze;
import org.spongepowered.api.entity.living.monster.Creeper;
import org.spongepowered.api.entity.living.monster.Enderman;
import org.spongepowered.api.entity.living.monster.Endermite;
import org.spongepowered.api.entity.living.monster.Patroller;
import org.spongepowered.api.entity.living.monster.Phantom;
import org.spongepowered.api.entity.living.monster.Vex;
import org.spongepowered.api.entity.living.monster.boss.Boss;
import org.spongepowered.api.entity.living.monster.boss.Wither;
import org.spongepowered.api.entity.living.monster.boss.dragon.EnderDragon;
import org.spongepowered.api.entity.living.monster.guardian.Guardian;
import org.spongepowered.api.entity.living.monster.raider.Raider;
import org.spongepowered.api.entity.living.monster.raider.Ravager;
import org.spongepowered.api.entity.living.monster.raider.illager.Pillager;
import org.spongepowered.api.entity.living.monster.raider.illager.Vindicator;
import org.spongepowered.api.entity.living.monster.raider.illager.spellcaster.Evoker;
import org.spongepowered.api.entity.living.monster.raider.illager.spellcaster.Spellcaster;
import org.spongepowered.api.entity.living.monster.slime.Slime;
import org.spongepowered.api.entity.living.monster.spider.Spider;
import org.spongepowered.api.entity.living.monster.zombie.ZombieVillager;
import org.spongepowered.api.entity.living.monster.zombie.ZombifiedPiglin;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.entity.living.player.User;
import org.spongepowered.api.entity.living.player.chat.ChatVisibility;
import org.spongepowered.api.entity.living.player.gamemode.GameMode;
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
import org.spongepowered.api.entity.living.trader.Trader;
import org.spongepowered.api.entity.living.trader.Villager;
import org.spongepowered.api.entity.projectile.DamagingProjectile;
import org.spongepowered.api.entity.projectile.EyeOfEnder;
import org.spongepowered.api.entity.projectile.FishingBobber;
import org.spongepowered.api.entity.projectile.Potion;
import org.spongepowered.api.entity.projectile.Projectile;
import org.spongepowered.api.entity.projectile.ShulkerBullet;
import org.spongepowered.api.entity.projectile.arrow.Arrow;
import org.spongepowered.api.entity.projectile.arrow.ArrowEntity;
import org.spongepowered.api.entity.projectile.explosive.FireworkRocket;
import org.spongepowered.api.entity.projectile.explosive.WitherSkull;
import org.spongepowered.api.entity.projectile.explosive.fireball.FireballEntity;
import org.spongepowered.api.entity.vehicle.Boat;
import org.spongepowered.api.entity.vehicle.minecart.BlockOccupiedMinecart;
import org.spongepowered.api.entity.vehicle.minecart.CommandBlockMinecart;
import org.spongepowered.api.entity.vehicle.minecart.FurnaceMinecart;
import org.spongepowered.api.entity.vehicle.minecart.Minecart;
import org.spongepowered.api.entity.vehicle.minecart.MinecartLike;
import org.spongepowered.api.entity.weather.LightningBolt;
import org.spongepowered.api.entity.weather.WeatherEffect;
import org.spongepowered.api.event.cause.entity.damage.source.DamageSources;
import org.spongepowered.api.fluid.FluidStackSnapshot;
import org.spongepowered.api.item.FireworkEffect;
import org.spongepowered.api.item.FireworkShape;
import org.spongepowered.api.item.ItemRarity;
import org.spongepowered.api.item.ItemType;
import org.spongepowered.api.item.ItemTypes;
import org.spongepowered.api.item.enchantment.Enchantment;
import org.spongepowered.api.item.enchantment.EnchantmentTypes;
import org.spongepowered.api.item.inventory.Inventory;
import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.item.inventory.ItemStackSnapshot;
import org.spongepowered.api.item.inventory.Slot;
import org.spongepowered.api.item.inventory.equipment.EquipmentType;
import org.spongepowered.api.item.inventory.slot.EquipmentSlot;
import org.spongepowered.api.item.inventory.type.GridInventory;
import org.spongepowered.api.item.merchant.TradeOffer;
import org.spongepowered.api.item.potion.PotionType;
import org.spongepowered.api.map.MapCanvas;
import org.spongepowered.api.map.MapInfo;
import org.spongepowered.api.map.decoration.MapDecoration;
import org.spongepowered.api.profile.GameProfile;
import org.spongepowered.api.profile.property.ProfileProperty;
import org.spongepowered.api.projectile.source.ProjectileSource;
import org.spongepowered.api.raid.RaidWave;
import org.spongepowered.api.statistic.Statistic;
import org.spongepowered.api.util.Axis;
import org.spongepowered.api.util.Color;
import org.spongepowered.api.util.Direction;
import org.spongepowered.api.util.RespawnLocation;
import org.spongepowered.api.util.Ticks;
import org.spongepowered.api.util.orientation.Orientation;
import org.spongepowered.api.util.weighted.WeightedSerializableObject;
import org.spongepowered.api.world.explosion.Explosion;
import org.spongepowered.api.world.server.ServerLocation;
import org.spongepowered.api.world.server.ServerWorld;
import org.spongepowered.api.world.weather.WeatherType;
import org.spongepowered.api.world.weather.WeatherTypes;
import org.spongepowered.math.vector.Vector2i;
import org.spongepowered.math.vector.Vector3d;
import org.spongepowered.math.vector.Vector3i;
import org.spongepowered.plugin.PluginContainer;
import java.time.Instant;
import java.util.List;
import java.util.Locale;
import java.util.UUID;
/**
* An enumeration of known {@link Key}s used throughout the API.
*/
@SuppressWarnings({"unused", "WeakerAccess"})
public final class Keys {
// @formatter:off
// SORTFIELDS:ON
/**
* The {@link PotionEffectTypes#ABSORPTION} amount of a {@link Living} entity.
*/
public static final Key> ABSORPTION = Keys.key(ResourceKey.sponge("absorption"), Double.class);
/**
* The acceleration of a {@link DamagingProjectile}.
*/
public static final Key> ACCELERATION = Keys.key(ResourceKey.sponge("acceleration"), Vector3d.class);
/**
* The item a {@link Living} entity is currently using.
* For example a player eating a food or blocking with a shield.
*
* If there is no item, the snapshot will be empty. You can check this
* with {@link ItemStackSnapshot#isEmpty()}.
*/
public static final Key> ACTIVE_ITEM = Keys.key(ResourceKey.sponge("active_item"), ItemStackSnapshot.class);
/**
* Whether a {@link Player}s affects spawning.
*
* A {@link Player} who does not affect spawning will be treated as a
* spectator in regards to spawning. A {@link MobSpawner} will not be
* activated by his presence and mobs around him may naturally despawn
* if there is no other Player around who affects spawning.
*/
public static final Key> AFFECTS_SPAWNING = Keys.key(ResourceKey.sponge("affects_spawning"), Boolean.class);
/**
* The age (in ticks) of an entity.
* e.g. The age of an {@link AreaEffectCloud}.
* Note that in vanilla this value is not persisted for most entities.
*/
public static final Key> AGE = Keys.key(ResourceKey.sponge("age"), Integer.class);
/**
* The modifier to {@link Keys#VELOCITY} of a {@link Minecart} while airborne.
*/
public static final Key> AIRBORNE_VELOCITY_MODIFIER = Keys.key(ResourceKey.sponge("airborne_velocity_modifier"), Vector3d.class);
/**
* The anger level of a {@link ZombifiedPiglin}.
*
* Unlike {@link Keys#IS_ANGRY}, the aggressiveness represented by this key may
* fade over time and the entity will become peaceful again once its anger
* reaches its minimum.
*/
public static final Key> ANGER_LEVEL = Keys.key(ResourceKey.sponge("anger_level"), Integer.class);
/**
* The set of {@link PotionEffect}s applied on use of an {@link ItemStack}.
* Readonly
*/
public static final Key> APPLICABLE_POTION_EFFECTS = Keys.weightedKey(ResourceKey.sponge("applicable_potion_effects"), PotionEffect.class);
/**
* The enchantments applied to an {@link ItemStack}.
*
* This data is usually applicable to all types of armor, weapons and
* tools. Enchantments that are only stored on an item stack in order to
* be transferred to another item (like on
* {@link ItemTypes#ENCHANTED_BOOK}s) use the {@link #STORED_ENCHANTMENTS}
* key instead.)
*/
public static final Key> APPLIED_ENCHANTMENTS = Keys.listKey(ResourceKey.sponge("applied_enchantments"), Enchantment.class);
/**
* The {@link ArmorMaterial} of an armor {@link ItemStack}.
* Readonly
*/
public static final Key> ARMOR_MATERIAL = Keys.key(ResourceKey.sponge("armor_material"), ArmorMaterial.class);
/**
* The type of {@link ArtType} shown by {@link Painting}s.
*/
public static final Key> ART_TYPE = Keys.key(ResourceKey.sponge("art_type"), ArtType.class);
/**
* The attachment {@link AttachmentSurface} of a button or lever {@link BlockState}
*/
public static final Key> ATTACHMENT_SURFACE = Keys.key(ResourceKey.sponge("attachment_surface"), AttachmentSurface.class);
/**
* The damage dealt by an {@link ArrowEntity} on impact.
*/
public static final Key> ATTACK_DAMAGE = Keys.key(ResourceKey.sponge("attack_damage"), Double.class);
/**
* The time of a {@link Ravager} is considered attacking.
*/
public static final Key> ATTACK_TIME = Keys.key(ResourceKey.sponge("attack_time"), Ticks.class);
/**
* Remaining ticks of the auto spin attack a {@link Living} is doing.
* @see #IS_AUTO_SPIN_ATTACK
*/
public static final Key> AUTO_SPIN_ATTACK_TICKS = Keys.key(ResourceKey.sponge("auto_spin_attack_ticks"), Ticks.class);
/**
* The author of a {@link ItemTypes#WRITTEN_BOOK} {@link ItemStack}.
*/
public static final Key> AUTHOR = Keys.key(ResourceKey.sponge("author"), Component.class);
/**
* The {@link Axis} direction of a {@link BlockState}.
*/
public static final Key> AXIS = Keys.key(ResourceKey.sponge("axis"), Axis.class);
/**
* The ticks until a {@link Ageable} turns into an adult.
*/
public static final Key> BABY_TICKS = Keys.key(ResourceKey.sponge("baby_ticks"), Ticks.class);
/**
* The {@link BannerPatternLayer}s of a {@link Banner}.
*/
public static final Key> BANNER_PATTERN_LAYERS = Keys.listKey(ResourceKey.sponge("banner_pattern_layers"), BannerPatternLayer.class);
/**
* The width of the physical form of an {@link Entity}.
*
* Together with {@link #HEIGHT} and {@link #SCALE} this defines
* the size of an {@link Entity}.
* Readonly
*/
public static final Key> BASE_SIZE = Keys.key(ResourceKey.sponge("base_size"), Double.class);
/**
* The base vehicle a passenger is riding at the moment.
* This may be different from {@link Keys#VEHICLE} as the
* vehicle an {@link Entity} is riding may itself be the passenger of
* another vehicle.
* Readonly
*/
public static final Key> BASE_VEHICLE = Keys.key(ResourceKey.sponge("base_vehicle"), Entity.class);
/**
* The target entity of a {@link Guardian} beam.
*/
public static final Key> BEAM_TARGET_ENTITY = Keys.key(ResourceKey.sponge("beam_target_entity"), Living.class);
/**
* The default temperature of a biome at a specific {@link ServerLocation}.
* For the exact block temperature see {@link #BLOCK_TEMPERATURE}.
* Readonly
*/
public static final Key> BIOME_TEMPERATURE = Keys.key(ResourceKey.sponge("biome_temperature"), Double.class);
/**
* The blast resistance of a {@link BlockState}.
* Readonly
*/
public static final Key> BLAST_RESISTANCE = Keys.key(ResourceKey.sponge("blast_resistance"), Double.class);
/**
* The amount of light that is emitted by the surrounding blocks at a block {@link ServerLocation}.
* The value scales normally from 0 to 1.
* In vanilla minecraft is this value in steps of 1/15 from 0 to 1.
* For the skylight see {@link #SKY_LIGHT}.
* Readonly
*/
public static final Key> BLOCK_LIGHT = Keys.key(ResourceKey.sponge("block_light"), Integer.class);
/**
* The {@link BlockState} of a {@link BlockOccupiedMinecart} or {@link FallingBlock}.
*/
public static final Key> BLOCK_STATE = Keys.key(ResourceKey.sponge("block_state"), BlockState.class);
/**
* The temperature at a specific {@link ServerLocation}.
* For the default biome temperature see {@link #BIOME_TEMPERATURE}.
* Readonly
*/
public static final Key> BLOCK_TEMPERATURE = Keys.key(ResourceKey.sponge("block_temperature"), Double.class);
/**
* The type of the boat.
*/
public static final Key> BOAT_TYPE = Keys.key(ResourceKey.sponge("boat_type"), BoatType.class);
/**
* The rotation of specific body parts of a {@link ArmorStand} or {@link Living}.
*
* This value provides a mapping, effectively combining the data
* referenced by {@link #HEAD_ROTATION}, {@link #CHEST_ROTATION},
* {@link #RIGHT_ARM_ROTATION}, {@link #LEFT_ARM_ROTATION},
* {@link #RIGHT_LEG_ROTATION}, and {@link #LEFT_LEG_ROTATION}.
*/
public static final Key> BODY_ROTATIONS = Keys.mapKey(ResourceKey.sponge("body_rotations"), BodyPart.class, Vector3d.class);
/**
* The {@link BossBar} displayed to the client by a {@link Boss}.
* TODO Readonly but mutable?
*/
public static final Key> BOSS_BAR = Keys.key(ResourceKey.sponge("boss_bar"), BossBar.class);
/**
* The {@link BlockType}s able to be broken by an {@link ItemStack}.
*/
public static final Key> BREAKABLE_BLOCK_TYPES = Keys.setKey(ResourceKey.sponge("breakable_block_types"), BlockType.class);
/**
* The current breeder of an {@link Animal}, usually a {@link Player}s UUID.
*/
public static final Key> BREEDER = Keys.key(ResourceKey.sponge("breeder"), UUID.class);
/**
* The ticks until an {@link Animal} can breed again. Also see {@link #CAN_BREED}.
*/
public static final Key> BREEDING_COOLDOWN = Keys.key(ResourceKey.sponge("breeding_cooldown"), Ticks.class);
/**
* The burntime of an {@link ItemStack} fuel in a furnace.
* See {@link #FUEL} for the time
* Readonly
*/
public static final Key> BURN_TIME = Keys.key(ResourceKey.sponge("burn_time"), Integer.class);
/**
* Whether an {@link Animal} can breed.
* In Vanilla, animals can breed if their {@link Keys#BREEDING_COOLDOWN} is equal to 0.
*/
public static final Key> CAN_BREED = Keys.key(ResourceKey.sponge("can_breed"), Boolean.class);
/**
* Whether a {@link FallingBlock} can drop as an item.
*/
public static final Key> CAN_DROP_AS_ITEM = Keys.key(ResourceKey.sponge("can_drop_as_item"), Boolean.class);
/**
* Whether a {@link Humanoid} can fly.
*
* For a {@link Player} this means they are able to toggle flight mode
* by double-tapping the jump button.
*/
public static final Key> CAN_FLY = Keys.key(ResourceKey.sponge("can_fly"), Boolean.class);
/**
* Whether a {@link Living} entity may change blocks.
* This mostly applies to {@link Enderman} or
* {@link Creeper}s, but also to some projectiles like {@link FireballEntity}s or {@link WitherSkull}.
*/
public static final Key> CAN_GRIEF = Keys.key(ResourceKey.sponge("can_grief"), Boolean.class);
/**
* The set of harvestable {@link BlockType}s with an {@link ItemStack}. {@link #EFFICIENCY}
* Readonly
*/
public static final Key> CAN_HARVEST = Keys.setKey(ResourceKey.sponge("can_harvest"), BlockType.class);
/**
* Whether a {@link FallingBlock} will damage an {@link Entity} it lands on.
*/
public static final Key> CAN_HURT_ENTITIES = Keys.key(ResourceKey.sponge("can_hurt_entities"), Boolean.class);
/**
* Whether a {@link Raider} can join a raid.
*/
public static final Key> CAN_JOIN_RAID = Keys.key(ResourceKey.sponge("can_join_raid"), Boolean.class);
/**
* Whether a {@link Boat} can move on land.
*/
public static final Key> CAN_MOVE_ON_LAND = Keys.key(ResourceKey.sponge("can_move_on_land"), Boolean.class);
/**
* Whether a {@link FallingBlock} will place itself upon landing.
*/
public static final Key> CAN_PLACE_AS_BLOCK = Keys.key(ResourceKey.sponge("can_place_as_block"), Boolean.class);
/**
* The number of candles within a candle block.
*/
public static final Key> CANDLES = Keys.key(ResourceKey.sponge("candles"), Integer.class);
/**
* The current casting time of a {@link Spellcaster}.
*/
public static final Key> CASTING_TIME = Keys.key(ResourceKey.sponge("casting_time"), Integer.class);
/**
* The type of a {@link Cat}.
*/
public static final Key> CAT_TYPE = Keys.key(ResourceKey.sponge("cat_type"), CatType.class);
/**
* Whether a {@link ServerPlayer} can will see colours sent in messages.
*/
public static final Key> CHAT_COLORS_ENABLED = Keys.key(ResourceKey.sponge("chat_colors_enabled"), Boolean.class);
/**
* The types of chat a {@link ServerPlayer} can see.
*/
public static final Key> CHAT_VISIBILITY = Keys.key(ResourceKey.sponge("chat_visibility"), ChatVisibility.class);
/**
* The attachment of a {@link BlockTypes#CHEST} or {@link BlockTypes#TRAPPED_CHEST} {@link BlockState}.
*/
public static final Key> CHEST_ATTACHMENT_TYPE = Keys.key(ResourceKey.sponge("chest_attachment_type"), ChestAttachmentType.class);
/**
* The rotation of the {@link BodyParts#CHEST}.
*/
public static final Key> CHEST_ROTATION = Keys.key(ResourceKey.sponge("chest_rotation"), Vector3d.class);
/**
* The {@link Color} of an {@link ItemStack}
*
* e.g. {@link ItemTypes#LEATHER_CHESTPLATE} or {@link ItemTypes#POTION} custom color
*
* or an {@link AreaEffectCloud}.
*/
public static final Key> COLOR = Keys.key(ResourceKey.sponge("color"), Color.class);
/**
* A command stored in a {@link CommandBlock} or {@link CommandBlockMinecart}.
*/
public static final Key> COMMAND = Keys.key(ResourceKey.sponge("command"), String.class);
/**
* The {@link ComparatorMode} of a {@link BlockTypes#COMPARATOR} {@link BlockState}.
*/
public static final Key> COMPARATOR_MODE = Keys.key(ResourceKey.sponge("comparator_mode"), ComparatorMode.class);
/**
* The connected directions of a {@link BlockState}.
*
* e.g. {@link BlockTypes#GLASS_PANE}, {@link BlockTypes#IRON_BARS}, {@link BlockTypes#CHEST},
*
*/
public static final Key> CONNECTED_DIRECTIONS = Keys.setKey(ResourceKey.sponge("connected_directions"), Direction.class);
/**
* The container {@link ItemType} of an {@link ItemStack}.
* e.g. {@link ItemTypes#BUCKET} for a {@link ItemTypes#WATER_BUCKET} stack.
* Readonly
*/
public static final Key> CONTAINER_ITEM = Keys.key(ResourceKey.sponge("container_item"), ItemType.class);
/**
* The amount of ticks a {@link Hopper} has to wait before transferring the next item. (in Vanilla this is 8 ticks)
* or
* The amount of ticks a {@link EndGateway} has to wait for the next teleportation.
*/
public static final Key> COOLDOWN = Keys.key(ResourceKey.sponge("cooldown"), Ticks.class);
/**
* The creator, usually of an {@link Entity}. It is up to the implementation to define.
*/
public static final Key> CREATOR = Keys.key(ResourceKey.sponge("creator"), UUID.class);
/**
* The current {@link SpellType} a {@link Spellcaster} is casting.
*/
public static final Key> CURRENT_SPELL = Keys.key(ResourceKey.sponge("current_spell"), SpellType.class);
/**
* The damage dealt towards entities of a specific {@link EntityType} by a {@link ArrowEntity}.
*
* Note that in events, the damage defined for the provided
* {@link EntityType} will take priority over the "default" damage as
* defined from {@link ArrowEntity#attackDamage()}.
*
* Types not present in this mapping will be
* dealt damage to according to {@link #ATTACK_DAMAGE}.
*/
public static final Key, Double>> CUSTOM_ATTACK_DAMAGE = Keys.mapKey(ResourceKey.sponge("custom_attack_damage"), new TypeToken>() {}, TypeToken.get(Double.class));
/**
* The resource pack model index of an {@link ItemStack}.
*
* Resource packs can use the same index in their files to replace the
* item model of an ItemStack.
*/
public static final Key> CUSTOM_MODEL_DATA = Keys.key(ResourceKey.sponge("custom_model_data"), Integer.class);
/**
* The custom name of an {@link Entity}, {@link ItemStack} or {@link BlockEntity}.
* If no custom name is set the dataholder may still have a {@link Keys#DISPLAY_NAME}
*/
public static final Key> CUSTOM_NAME = Keys.key(ResourceKey.sponge("custom_name"), Component.class);
/**
* The damage absorbed by an armor {@link ItemStack}.
* Readonly
*/
public static final Key> DAMAGE_ABSORPTION = Keys.key(ResourceKey.sponge("damage_absorption"), Double.class);
/**
* How much damage a {@link FallingBlock} deals to {@link Living} entities
* it hits per block fallen.
*
* This damage is capped by {@link #MAX_FALL_DAMAGE}.
*/
public static final Key> DAMAGE_PER_BLOCK = Keys.key(ResourceKey.sponge("damage_per_block"), Double.class);
/**
* The distance at which a {@link BlockState} will decay.
* This usually applies to leaves, for example {@link BlockTypes#OAK_LEAVES}.
*/
public static final Key> DECAY_DISTANCE = Keys.key(ResourceKey.sponge("decay_distance"), Integer.class);
/**
* The modifier to {@link Keys#VELOCITY} of a {@link Minecart} while derailed.
*/
public static final Key> DERAILED_VELOCITY_MODIFIER = Keys.key(ResourceKey.sponge("derailed_velocity_modifier"), Vector3d.class);
/**
* The despawn delay (in ticks) of a {@link Item}, {@link Endermite}, {@link WeatherType} {@link TraderLlama} or {@link EyeOfEnder}.
*/
public static final Key> DESPAWN_DELAY = Keys.key(ResourceKey.sponge("despawn_delay"), Ticks.class);
/**
* The destroy speed of a {@link BlockState}s {@link BlockType}.
*
* This value is read-only.
*/
public static final Key> DESTROY_SPEED = Keys.key(ResourceKey.sponge("destroy_speed"), Double.class);
/**
* The detonator of a {@link PrimedTNT}.
*/
public static final Key> DETONATOR = Keys.key(ResourceKey.sponge("detonator"), Living.class);
/**
* The {@link Direction} a {@link BlockState}, {@link Hanging}, or {@link Shulker} is facing or the
* heading of a {@link ShulkerBullet}.
*/
public static final Key> DIRECTION = Keys.key(ResourceKey.sponge("direction"), Direction.class);
/**
* The display name of an {@link Entity}, {@link ItemStack} or {@link BlockEntity}.
*
* To change a display name set a {@link Keys#CUSTOM_NAME} instead.
* On an {@link Entity}, this represents a combination of {@link Keys#CUSTOM_NAME} (if set), scoreboard info, and any click data.
* On an {@link ItemStack}, this represents the {@link Keys#CUSTOM_NAME} or if not set the {@link ItemType}s translation.
*
On a {@link BlockEntity}, this usually represents the name displayed in its {@link org.spongepowered.api.item.inventory.Container}
*/
public static final Key> DISPLAY_NAME = Keys.key(ResourceKey.sponge("display_name"), Component.class);
/**
* The dominant {@link HandPreference} of an {@link Agent} entity.
*
* NOTE: For {@link Player}s is this key read-only, the
* {@link HandPreference} of a player can not be changed server-side.
*/
public static final Key> DOMINANT_HAND = Keys.key(ResourceKey.sponge("dominant_hand"), HandPreference.class);
/**
* The {@link DoorHinge} of a door {@link BlockState}.
*/
public static final Key> DOOR_HINGE = Keys.key(ResourceKey.sponge("door_hinge"), DoorHinge.class);
/**
* Whether exact teleport location should be used with a {@link EndGateway}.
*/
public static final Key> DO_EXACT_TELEPORT = Keys.key(ResourceKey.sponge("do_exact_teleport"), Boolean.class);
/**
* The type of dripstone a certain {@link BlockTypes#DRIPSTONE_BLOCK} represents.
*/
public static final Key> DRIPSTONE_SEGMENT = Keys.key(ResourceKey.sponge("dripstone_segment"), DripstoneSegment.class);
/**
* The remaining duration (in ticks) of an {@link AreaEffectCloud}.
*/
public static final Key> DURATION = Keys.key(ResourceKey.sponge("duration"), Ticks.class);
/**
* The amount of ticks the duration of an {@link AreaEffectCloud}
* is increased or reduced when it applies its effect.
*/
public static final Key> DURATION_ON_USE = Keys.key(ResourceKey.sponge("duration_on_use"), Ticks.class);
/**
* The color of a dyeable {@link BlockState}, {@link ItemStack} or entity like {@link Cat}s.
* or
* The base {@link DyeColor} of a {@link Banner} or {@link TropicalFish}.
*/
public static final Key> DYE_COLOR = Keys.key(ResourceKey.sponge("dye_color"), DyeColor.class);
/**
* The time a {@link Panda} has been eating (in ticks)
*/
public static final Key> EATING_TIME = Keys.key(ResourceKey.sponge("eating_time"), Ticks.class);
/**
* The efficiency of an {@link ItemStack} tool. Affects mining speed of supported materials. {@link #CAN_HARVEST}
* Readonly
*/
public static final Key> EFFICIENCY = Keys.key(ResourceKey.sponge("efficiency"), Double.class);
/**
* The time (in ticks) until a {@link Chicken} lays an {@link ItemTypes#EGG}.
*
*
* Vanilla will calculate the egg timer by taking a random value between
* 0 (inclusive) and 6000 (exclusive) and then add that by another 6000.
* This unit ends up being in ticks. Once the chicken lays the egg, this
* calculation is ran again.
*
*/
public static final Key> EGG_TIME = Keys.key(ResourceKey.sponge("egg_time"), Ticks.class);
/**
* The age (in ticks) of an {@link EndGateway}
*/
public static final Key> END_GATEWAY_AGE = Keys.key(ResourceKey.sponge("end_gateway_age"), Ticks.class);
/**
* The {@link EntityType entity type} of a spawn egg, which may be one of
* several based on {@link ItemTypes#ZOMBIE_SPAWN_EGG}, etc. It is not
* guaranteed that the type of entity is the same as the one that will be
* spawned when used. It is likely unable to change the type of entity on
* an {@link ItemStack}, but it is possible to change the
* {@link EntityArchetype archetype} by using {@link #ENTITY_TO_SPAWN}.
*
* @see #ENTITY_TO_SPAWN
*/
@SuppressWarnings("unchecked")
public static final Key>> ENTITY_TYPE = Keys.key(ResourceKey.sponge("entity_type"), (Class) EntityType.class);
/**
* The {@link EntityArchetype} to spawn from any spawn egg, such as a
* {@link ItemTypes#ZOMBIE_SPAWN_EGG} or {@link ItemTypes#CREEPER_SPAWN_EGG}.
* The {@link #ENTITY_TYPE} is not guaranteed to be the same as the
* {@link EntityArchetype#type()} returned, but the spawned entity will be
* based on the {@link EntityArchetype} returned here.
*/
public static final Key> ENTITY_TO_SPAWN = Keys.key(ResourceKey.sponge("entity_to_spawn"), EntityArchetype.class);
/**
* The {@link EquipmentType} that the target inventory supports. This usually applies to {@link EquipmentSlot}s.
* or
* The {@link EquipmentType} of an {@link ItemStack}
* Readonly
*/
public static final Key> EQUIPMENT_TYPE = Keys.key(ResourceKey.sponge("equipment_type"), EquipmentType.class);
/**
* The current level of exhaustion of a {@link Humanoid}.
*
* When the exhaustion level reaches 0, saturation is usually diminished
* such that saturation is decreased and then exhaustion is reset to the
* maximum. This type of effect occurs over time and can be modified by
* movements and actions performed by the {@link Humanoid}.
*/
public static final Key> EXHAUSTION = Keys.key(ResourceKey.sponge("exhaustion"), Double.class);
/**
* The amount of experience a {@link Player} has or an {@link ExperienceOrb} contains.
*/
public static final Key> EXPERIENCE = Keys.key(ResourceKey.sponge("experience"), Integer.class);
/**
* The total experience a {@link Player} requires to advance from his current level to the next one.
* Readonly
*/
public static final Key> EXPERIENCE_FROM_START_OF_LEVEL = Keys.key(ResourceKey.sponge("experience_from_start_of_level"), Integer.class);
/**
* The current level a {@link Player} has.
*/
public static final Key> EXPERIENCE_LEVEL = Keys.key(ResourceKey.sponge("experience_level"), Integer.class);
/**
* The amount of experience a {@link Player} has collected towards the next level.
*/
public static final Key> EXPERIENCE_SINCE_LEVEL = Keys.key(ResourceKey.sponge("experience_since_level"), Integer.class);
/**
* The radius of the {@link Explosion} to be created by detonating an {@link Explosive}.
*
* May be absent if the explosion radius is unknown because it is either
* determined randomly at the time of the explosion or computed from the
* context in which the {@link Explosive} explodes.
*/
public static final Key> EXPLOSION_RADIUS = Keys.key(ResourceKey.sponge("explosion_radius"), Integer.class);
/**
* The eye height of an {@link Entity}.
* Readonly
*/
public static final Key> EYE_HEIGHT = Keys.key(ResourceKey.sponge("eye_height"), Double.class);
/**
* The eye position of an {@link Entity}.
* Readonly
*/
public static final Key> EYE_POSITION = Keys.key(ResourceKey.sponge("eye_position"), Vector3d.class);
/**
* The distance an {@link Entity} has fallen.
*/
public static final Key> FALL_DISTANCE = Keys.key(ResourceKey.sponge("fall_distance"), Double.class);
/**
* The amount of ticks a {@link FallingBlock} has been falling for.
*/
public static final Key> FALL_TIME = Keys.key(ResourceKey.sponge("fall_time"), Ticks.class);
/**
* The {@link FireworkEffect}s of a
* {@link ItemTypes#FIREWORK_STAR}, {@link ItemTypes#FIREWORK_ROCKET} {@link ItemStack} or a
* {@link FireworkRocket}.
*/
public static final Key> FIREWORK_EFFECTS = Keys.listKey(ResourceKey.sponge("firework_effects"), FireworkEffect.class);
/**
* The flight duration of a {@link FireworkRocket}
*
* The duration is tiered and will stay partially random. A rocket will
* fly for roughly {@code modifier * 10 + (random number from 0 to 13)}
* ticks in Vanilla Minecraft.
*/
public static final Key> FIREWORK_FLIGHT_MODIFIER = Keys.key(ResourceKey.sponge("firework_flight_modifier"), Ticks.class);
public static final Key> FIREWORK_SHAPE = Keys.key(ResourceKey.sponge("firework_shape"), FireworkShape.class);
/**
* The delay in ticks until the {@link Entity} will be damaged by the fire.
*/
public static final Key> FIRE_DAMAGE_DELAY = Keys.key(ResourceKey.sponge("fire_damage_delay"), Ticks.class);
/**
* The amount of ticks an {@link Entity} is still burning.
*/
public static final Key> FIRE_TICKS = Keys.key(ResourceKey.sponge("fire_ticks"), Ticks.class);
/**
* The time a {@link User} first joined on the Server.
*/
public static final Key> FIRST_DATE_JOINED = Keys.key(ResourceKey.sponge("first_date_joined"), Instant.class);
/**
* A {@link Fox fox's} first trusted {@link UUID}, usually a {@link Player}.
*/
public static final Key> FIRST_TRUSTED = Keys.key(ResourceKey.sponge("first_trusted"), UUID.class);
/**
* The {@link FluidStackSnapshot} contained within an item container.
* Item containers may include buckets and other mod added items.
* See {@link #CONTAINER_ITEM}
*/
public static final Key> FLUID_ITEM_STACK = Keys.key(ResourceKey.sponge("fluid_item_stack"), FluidStackSnapshot.class);
/**
* The fluid level of a liquid {@link BlockState}.
*/
public static final Key> FLUID_LEVEL = Keys.key(ResourceKey.sponge("fluid_level"), Integer.class);
/**
* The directional tank information.
* TODO dataholder? cauldron blockstate? modded?
*/
public static final Key>> FLUID_TANK_CONTENTS = Keys.mapKey(ResourceKey.sponge("fluid_tank_contents"), TypeToken.get(Direction.class), new TypeToken>() {});
/**
* The speed at which an {@link Player} flies.
*/
public static final Key> FLYING_SPEED = Keys.key(ResourceKey.sponge("flying_speed"), Double.class);
/**
* The food level of a {@link Humanoid}.
*
* For a {@link Humanoid}, food level has health effects, depending on game difficulty and
* hunger levels. If the food level is high enough, the humanoid may heal. If the food level is at 0,
* the humanoid may starve.
*/
public static final Key> FOOD_LEVEL = Keys.key(ResourceKey.sponge("food_level"), Integer.class);
/**
* The type of a {@link Fox}.
*/
public static final Key> FOX_TYPE = Keys.key(ResourceKey.sponge("fox_type"), FoxType.class);
/**
* Represents the {@link Key} for the amount of fuel left in a {@link BrewingStand} or {@link FurnaceBlockEntity} or {@link FurnaceMinecart}
*
* One {@link ItemTypes#BLAZE_POWDER} adds 20 fuel to the brewing stand.
* The fuel value corresponds with the number of batches of potions that can be brewed.
*
* See {@link #BURN_TIME} for the burn time added by a fuel {@link ItemStack} to a furnace
*/
public static final Key> FUEL = Keys.key(ResourceKey.sponge("fuel"), Integer.class);
/**
* The time (in ticks) a {@link FusedExplosive}'s fuse will burn before the explosion.
*/
public static final Key> FUSE_DURATION = Keys.key(ResourceKey.sponge("fuse_duration"), Ticks.class);
/**
* The {@link GameMode} a {@link Humanoid} has.
*/
public static final Key> GAME_MODE = Keys.key(ResourceKey.sponge("game_mode"), GameMode.class);
/**
* The player represented by a {@link BlockTypes#PLAYER_HEAD} (and {@link BlockTypes#PLAYER_WALL_HEAD})
* {@link BlockState} or a {@link ItemTypes#PLAYER_HEAD} {@link ItemStack}.
*
* The offered game profile will be set exactly, unlike in vanilla where the game profile will
* be resolved automatically for properties (including textures). You can obtain a game profile with
* properties using {@link org.spongepowered.api.profile.GameProfileManager#profile}.
*/
public static final Key> GAME_PROFILE = Keys.key(ResourceKey.sponge("game_profile"), GameProfile.class);
/**
* The generation of a {@link ItemTypes#WRITTEN_BOOK} {@link ItemStack}.
* Depending on the book's generation it may be impossible to copy it.
*/
public static final Key> GENERATION = Keys.key(ResourceKey.sponge("generation"), Integer.class);
/**
* Whether a {@link Sign} has glowing text (from dying
* with {@link ItemTypes#GLOW_INK_SAC}).
*/
public static final Key> GLOWING_TEXT = Keys.key(ResourceKey.sponge("glowing_text"), Boolean.class);
/**
* The "growth stage" state of a {@link BlockState}.
* e.g. {@link BlockTypes#CACTUS} or {@link BlockTypes#WHEAT} etc.
*/
public static final Key> GROWTH_STAGE = Keys.key(ResourceKey.sponge("growth_stage"), Integer.class);
/**
* Whether an {@link ArmorStand}'s arms are visible.
*/
public static final Key> HAS_ARMS = Keys.key(ResourceKey.sponge("has_arms"), Boolean.class);
/**
* Whether an {@link ArmorStand} has a visible base plate.
*/
public static final Key> HAS_BASE_PLATE = Keys.key(ResourceKey.sponge("has_base_plate"), Boolean.class);
/**
* Whether a {@link BlockTypes#CAVE_VINES} or
* {@link BlockTypes#CAVE_VINES_PLANT} has glow berries.
*/
public static final Key> HAS_BERRIES = Keys.key(ResourceKey.sponge("has_berries"), Boolean.class);
/**
* Whether a {@link PackHorse} has a chest.
*/
public static final Key> HAS_CHEST = Keys.key(ResourceKey.sponge("has_chest"), Boolean.class);
/**
*Whether a {@link Turtle} currently has an egg.
*/
public static final Key> HAS_EGG = Keys.key(ResourceKey.sponge("has_egg"), Boolean.class);
/**
* Whether a {@link Dolphin} has a fish.
*
* Dolphins will navigate to a treasure (if a structure that provides one is nearby)
* if they have been given a fish.
*
*/
public static final Key> HAS_FISH = Keys.key(ResourceKey.sponge("has_fish"), Boolean.class);
/**
* Whether an {@link ArmorStand} is a "marker" stand.
*
* If {@code true}, the armor stand's bounding box is near
* impossible to see, and the armor stand can no longer be
* interacted with.
*/
public static final Key> HAS_MARKER = Keys.key(ResourceKey.sponge("has_marker"), Boolean.class);
/**
* Whether a giant mushroom {@link BlockState} has pores on the {@link Direction#DOWN} direction. See {@link #PORES}.
*/
public static final Key> HAS_PORES_DOWN = Keys.key(ResourceKey.sponge("has_pores_down"), Boolean.class);
/**
* Whether a giant mushroom {@link BlockState} has pores on the {@link Direction#EAST} direction. See {@link #PORES}.
*/
public static final Key> HAS_PORES_EAST = Keys.key(ResourceKey.sponge("has_pores_east"), Boolean.class);
/**
* Whether a giant mushroom {@link BlockState} has pores on the {@link Direction#NORTH} direction. See {@link #PORES}.
*/
public static final Key> HAS_PORES_NORTH = Keys.key(ResourceKey.sponge("has_pores_north"), Boolean.class);
/**
* Whether a giant mushroom {@link BlockState} has pores on the {@link Direction#SOUTH} direction. See {@link #PORES}.
*/
public static final Key> HAS_PORES_SOUTH = Keys.key(ResourceKey.sponge("has_pores_south"), Boolean.class);
/**
* Whether a giant mushroom {@link BlockState} has pores on the {@link Direction#UP} direction. See {@link #PORES}.
*/
public static final Key> HAS_PORES_UP = Keys.key(ResourceKey.sponge("has_pores_up"), Boolean.class);
/**
* Whether a giant mushroom {@link BlockState} has pores on the {@link Direction#WEST} direction. See {@link #PORES}.
*/
public static final Key> HAS_PORES_WEST = Keys.key(ResourceKey.sponge("has_pores_west"), Boolean.class);
/**
* Whether a server player has viewed the credits.
*
* The credits are displayed the first time a player returns to the overworld safely using an end portal.
*/
public static final Key> HAS_VIEWED_CREDITS = Keys.key(ResourceKey.sponge("has_viewed_credits"), Boolean.class);
/**
* The rotation of a {@link Living}'s or {@link ArmorStand}'s head.
*
* The format of the rotation is represented by:
*
*
* - {@code x -> pitch}
* - {@code y -> yaw}
* - {@code z -> roll}
*
*
* Note that the pitch will be the same x value returned by
* {@link Entity#rotation()} and Minecraft does not currently support
* head roll so the z value will always be zero.
*/
public static final Key> HEAD_ROTATION = Keys.key(ResourceKey.sponge("head_rotation"), Vector3d.class);
/**
* The {@link EndCrystal} currently healing an {@link EnderDragon}.
*/
public static final Key> HEALING_CRYSTAL = Keys.key(ResourceKey.sponge("healing_crystal"), EndCrystal.class);
/**
* A {@link Living}'s or {@link EndCrystal}'s current health.
*
* The range of the health depends on the object on which this
* method is defined. For {@link Player Players} in Minecraft, the nominal range is
* between 0 and 20, inclusive, but the range can be adjusted.
*
* Convention dictates that health does not fall below 0 but this
* convention may be broken.
*/
public static final Key> HEALTH = Keys.key(ResourceKey.sponge("health"), Double.class);
/**
* The value a {@link ServerPlayer}s max-health (excluding absorption) in the GUI will scale to.
* Two health is equal to one heart displayed.
* With scaling is disabled health automatically scales to {@link #MAX_HEALTH}
*/
public static final Key> HEALTH_SCALE = Keys.key(ResourceKey.sponge("health_scale"), Double.class);
/**
* The height of the physical form of an {@link Entity}.
*
* Together with {@link #BASE_SIZE} and {@link #SCALE} this defines the size of an
* {@link Entity}.
* Readonly
*/
public static final Key> HEIGHT = Keys.key(ResourceKey.sponge("height"), Double.class);
/**
* The {@link ItemType} a {@link BlockState} represents.
* Readonly
*/
public static final Key> HELD_ITEM = Keys.key(ResourceKey.sponge("held_item"), ItemType.class);
/**
* The hidden {@link PandaGene gene} of a {@link Panda}.
*/
public static final Key> HIDDEN_GENE = Keys.key(ResourceKey.sponge("hidden_gene"), PandaGene.class);
/**
* Whether the attributes of an {@link ItemStack} are hidden.
*/
public static final Key> HIDE_ATTRIBUTES = Keys.key(ResourceKey.sponge("hide_attributes"), Boolean.class);
/**
* Whether the {@link #BREAKABLE_BLOCK_TYPES} of an {@link ItemStack} are hidden.
*/
public static final Key> HIDE_CAN_DESTROY = Keys.key(ResourceKey.sponge("hide_can_destroy"), Boolean.class);
/**
* Whether the {@link #PLACEABLE_BLOCK_TYPES} of an {@link ItemStack} are hidden.
*/
public static final Key> HIDE_CAN_PLACE = Keys.key(ResourceKey.sponge("hide_can_place"), Boolean.class);
/**
* Whether the {@link #APPLIED_ENCHANTMENTS} of an {@link ItemStack} are hidden.
*/
public static final Key> HIDE_ENCHANTMENTS = Keys.key(ResourceKey.sponge("hide_enchantments"), Boolean.class);
/**
* Whether miscellaneous values of an {@link ItemStack} are hidden.
* e.g. potion effects or shield pattern info
*/
public static final Key> HIDE_MISCELLANEOUS = Keys.key(ResourceKey.sponge("hide_miscellaneous"), Boolean.class);
/**
* Whether {@link #IS_UNBREAKABLE} state of an {@link ItemStack} is hidden.
*/
public static final Key> HIDE_UNBREAKABLE = Keys.key(ResourceKey.sponge("hide_unbreakable"), Boolean.class);
/**
* The {@link Vector3i position} where a {@link Turtle} lays {@link BlockTypes#TURTLE_EGG eggs}.
*/
public static final Key> HOME_POSITION = Keys.key(ResourceKey.sponge("home_position"), Vector3i.class);
/**
* The {@link HorseColor} of a {@link Horse}.
*/
public static final Key> HORSE_COLOR = Keys.key(ResourceKey.sponge("horse_color"), HorseColor.class);
/**
* The {@link HorseStyle} of a {@link Horse}.
*/
public static final Key> HORSE_STYLE = Keys.key(ResourceKey.sponge("horse_style"), HorseStyle.class);
/**
* The inaccuracy of an {@link ItemStack} that launches {@link Projectile}s.
*
* An inaccuracy of 0 means perfect accuracy. Inaccuracy of 1 is the default for most vanilla items.
*/
public static final Key> INACCURACY = Keys.key(ResourceKey.sponge("inaccuracy"), Double.class);
/**
* Whether an {@link Item} will not despawn for an infinite time.
*/
public static final Key> INFINITE_DESPAWN_DELAY = Keys.key(ResourceKey.sponge("infinite_despawn_delay"), Boolean.class);
/**
* Whether an {@link Item} has an infinite pickup delay.
*/
public static final Key> INFINITE_PICKUP_DELAY = Keys.key(ResourceKey.sponge("infinite_pickup_delay"), Boolean.class);
/**
* The {@link InstrumentType} of a {@link BlockTypes#NOTE_BLOCK} {@link BlockState}.
*/
public static final Key> INSTRUMENT_TYPE = Keys.key(ResourceKey.sponge("instrument_type"), InstrumentType.class);
/**
* Whether a {@link BlockTypes#DAYLIGHT_DETECTOR} {@link BlockState} is inverted.
*/
public static final Key> INVERTED = Keys.key(ResourceKey.sponge("inverted"), Boolean.class);
/**
* The amount of ticks an {@link Entity} will remain invulnerable for.
*/
public static final Key> INVULNERABILITY_TICKS = Keys.key(ResourceKey.sponge("invulnerability_ticks"), Ticks.class);
/**
* Whether an {@link Entity} is invulnerable.
*
* This does not protect from the void, players in creative mode,
* and manual killing like the /kill command.
*/
public static final Key> INVULNERABLE = Keys.key(ResourceKey.sponge("invulnerable"), Boolean.class);
/**
* Whether a fence gate {@link BlockState} is in a wall.
*/
public static final Key> IN_WALL = Keys.key(ResourceKey.sponge("in_wall"), Boolean.class);
/**
* Whether an {@link Ageable} is considered an adult.
*/
public static final Key> IS_ADULT = Keys.key(ResourceKey.sponge("is_adult"), Boolean.class);
/**
* Whether a {@link Blaze} is currently burning.
*
* Unlike {@link Keys#FIRE_TICKS}, the burning effect will not damage
* the burning entity.
*/
public static final Key> IS_AFLAME = Keys.key(ResourceKey.sponge("is_aflame"), Boolean.class);
/**
* Whether an {@link Agent}s AI is enabled.
*/
public static final Key> IS_AI_ENABLED = Keys.key(ResourceKey.sponge("is_ai_enabled"), Boolean.class);
/**
* Whether an entity is currently aggressive.
* e.g. {@link Wolf wolves} or {@link ZombifiedPiglin}
*/
public static final Key> IS_ANGRY = Keys.key(ResourceKey.sponge("is_angry"), Boolean.class);
/**
* Whether a {@link BlockState} is "attached" to another block.
*/
public static final Key> IS_ATTACHED = Keys.key(ResourceKey.sponge("is_attached"), Boolean.class);
/**
* Whether a {@link Living} is doing an auto spin attack (doable with the {@link EnchantmentTypes#RIPTIDE} enchantment.)
* @see #AUTO_SPIN_ATTACK_TICKS
*/
public static final Key> IS_AUTO_SPIN_ATTACK = Keys.key(ResourceKey.sponge("is_auto_spin_attack"), Boolean.class);
/**
* Whether an entity is begging for food.
* e.g. {@link Cat cats} or tamed {@link Wolf wolves}
*/
public static final Key> IS_BEGGING_FOR_FOOD = Keys.key(ResourceKey.sponge("is_begging_for_food"), Boolean.class);
/**
* Whether {@link Raider}s are currently celebrating.
*/
public static final Key> IS_CELEBRATING = Keys.key(ResourceKey.sponge("is_celebrating"), Boolean.class);
/**
* Whether a {@link Creeper} is charged.
*/
public static final Key> IS_CHARGED = Keys.key(ResourceKey.sponge("is_charged"), Boolean.class);
/**
* Whether a {@link Pillager} is charging it's crossbow.
*/
public static final Key> IS_CHARGING_CROSSBOW = Keys.key(ResourceKey.sponge("is_charging_crossbow"), Boolean.class);
/**
* Whether a {@link Spider} is currently climbing.
*/
public static final Key> IS_CLIMBING = Keys.key(ResourceKey.sponge("is_climbing"), Boolean.class);
/**
* Whether a {@link BlockState} is connected to the {@link Direction#EAST}.
* Also see {@link #CONNECTED_DIRECTIONS}.
*/
public static final Key> IS_CONNECTED_EAST = Keys.key(ResourceKey.sponge("is_connected_east"), Boolean.class);
/**
* Whether a {@link BlockState} is connected to the {@link Direction#NORTH}.
* Also see {@link #CONNECTED_DIRECTIONS}.
*/
public static final Key> IS_CONNECTED_NORTH = Keys.key(ResourceKey.sponge("is_connected_north"), Boolean.class);
/**
* Whether a {@link BlockState} is connected to the {@link Direction#SOUTH}.
* Also see {@link #CONNECTED_DIRECTIONS}.
*/
public static final Key> IS_CONNECTED_SOUTH = Keys.key(ResourceKey.sponge("is_connected_south"), Boolean.class);
/**
* Whether a {@link BlockState} is connected to the {@link Direction#UP}.
* Also see {@link #CONNECTED_DIRECTIONS}.
*/
public static final Key> IS_CONNECTED_UP = Keys.key(ResourceKey.sponge("is_connected_up"), Boolean.class);
/**
* Whether a {@link BlockState} is connected to the {@link Direction#WEST}.
* Also see {@link #CONNECTED_DIRECTIONS}.
*/
public static final Key> IS_CONNECTED_WEST = Keys.key(ResourceKey.sponge("is_connected_west"), Boolean.class);
/**
* Whether an {@link Arrow} will cause a critical hit.
*/
public static final Key> IS_CRITICAL_HIT = Keys.key(ResourceKey.sponge("is_critical_hit"), Boolean.class);
/**
* Whether a {@link Fox} is currently crouching.
*/
public static final Key> IS_CROUCHING = Keys.key(ResourceKey.sponge("is_crouching"), Boolean.class);
/**
* Whether a custom name is visible on an {@link Entity}.
*/
public static final Key> IS_CUSTOM_NAME_VISIBLE = Keys.key(ResourceKey.sponge("is_custom_name_visible"), Boolean.class);
/**
* Whether a {@link Fox} is currently defending.
*/
public static final Key> IS_DEFENDING = Keys.key(ResourceKey.sponge("is_defending"), Boolean.class);
/**
* Whether a {@link BlockState} is disarmed.
* e.g. {@link BlockTypes#TRIPWIRE}s and {@link BlockTypes#TRIPWIRE_HOOK}s.
*/
public static final Key> IS_DISARMED = Keys.key(ResourceKey.sponge("is_disarmed"), Boolean.class);
/**
* Whether an entity is eating.
* e.g. {@link Panda}
*/
public static final Key> IS_EATING = Keys.key(ResourceKey.sponge("is_eating"), Boolean.class);
/**
* Whether a {@link WeatherEffect} like {@link LightningBolt} is harmful to other {@link Entity entities}.
* Readonly
*/
public static final Key> IS_EFFECT_ONLY = Keys.key(ResourceKey.sponge("is_effect_only"), Boolean.class);
/**
* Whether a {@link Player} is flying with an {@link ItemTypes#ELYTRA}.
*/
public static final Key> IS_ELYTRA_FLYING = Keys.key(ResourceKey.sponge("is_elytra_flying"), Boolean.class);
/**
* Whether a piston {@link BlockState} is currently extended.
* TODO {@link Piston}?
*/
public static final Key> IS_EXTENDED = Keys.key(ResourceKey.sponge("is_extended"), Boolean.class);
/**
* Whether a {@link Fox} is currently faceplanted.
*/
public static final Key> IS_FACEPLANTED = Keys.key(ResourceKey.sponge("is_faceplanted"), Boolean.class);
/**
* Whether a {@link BlockState} is filled.
* e.g. {@link BlockTypes#END_PORTAL_FRAME}s.
*/
public static final Key> IS_FILLED = Keys.key(ResourceKey.sponge("is_filled"), Boolean.class);
/**
* Whether a {@link BlockState} is flammable.
* Readonly
*/
public static final Key> IS_FLAMMABLE = Keys.key(ResourceKey.sponge("is_flammable"), Boolean.class);
/**
* Whether an {@link Entity} is flying. TODO only player?
*
* This key only tells whether an entity is flying at the moment. On a
* {@link Player} it does not necessarily mean that the player may toggle
* freely between flying and walking. To check whether a player may switch
* his flying state, check {@link #CAN_FLY}.
*/
public static final Key> IS_FLYING = Keys.key(ResourceKey.sponge("is_flying"), Boolean.class);
/**
* Whether an entity is frightened.
*
* In vanilla, {@link Panda}s that have a {@link Panda#knownGene()}
* of {@link PandaGenes#WORRIED} and are in a {@link ServerWorld world} whose {@link WeatherType} is currently a
* {@link WeatherTypes#THUNDER} are considered "frightened".
*/
public static final Key> IS_FRIGHTENED = Keys.key(ResourceKey.sponge("is_frightened"), Boolean.class);
/**
* Whether the block at the {@link ServerLocation} is a full block.
*/
public static final Key> IS_FULL_BLOCK = Keys.key(ResourceKey.sponge("is_full_block"), Boolean.class);
/**
* Whether an {@link Entity} has a glowing outline.
*/
public static final Key> IS_GLOWING = Keys.key(ResourceKey.sponge("is_glowing"), Boolean.class);
/**
* Whether {@link Turtle} is proceeding to it's {@link Vector3i home position}.
*/
public static final Key> IS_GOING_HOME = Keys.key(ResourceKey.sponge("is_going_home"), Boolean.class);
/**
* Whether something is affected by gravity.
* e.g. {@link Entity}s and {@link BlockState}s
* Readonly(BlockState.class)
*/
public static final Key> IS_GRAVITY_AFFECTED = Keys.key(ResourceKey.sponge("is_gravity_affected"), Boolean.class);
/**
* Whether a {@link Cat} is hissing.
*/
public static final Key> IS_HISSING = Keys.key(ResourceKey.sponge("is_hissing"), Boolean.class);
/**
* Whether a {@link Ravager} is immobilized.
* Readonly
*/
public static final Key> IS_IMMOBILIZED = Keys.key(ResourceKey.sponge("is_immobilized"), Boolean.class);
/**
* Whether a {@link ServerLocation} is indirectly powered.
* Readonly
*/
public static final Key> IS_INDIRECTLY_POWERED = Keys.key(ResourceKey.sponge("is_indirectly_powered"), Boolean.class);
/**
* Whether a {@link Fox} is currently interested in something.
*/
public static final Key> IS_INTERESTED = Keys.key(ResourceKey.sponge("is_interested"), Boolean.class);
/**
* Whether an {@link Entity} is currently invisible.
* This will only simply render the entity as vanished,
* but not prevent any entity updates being sent to clients.
* To fully "vanish" an {@link Entity}, use {@link #VANISH_STATE}.
*/
public static final Key> IS_INVISIBLE = Keys.key(ResourceKey.sponge("is_invisible"), Boolean.class);
/**
* Whether a {@link Boat} is currently in {@link BlockTypes#WATER}.
* Readonly
*/
public static final Key> IS_IN_WATER = Keys.key(ResourceKey.sponge("is_in_water"), Boolean.class);
/**
* Whether a {@link Vindicator} is exhibiting "johnny" behavior.
*
* @see
* The Minecraft Wiki for more information about "johnny" behavior
*/
public static final Key> IS_JOHNNY = Keys.key(ResourceKey.sponge("is_johnny"), Boolean.class);
/**
* Whether a {@link Turtle} is currently digging to lay an egg.
*/
public static final Key> IS_LAYING_EGG = Keys.key(ResourceKey.sponge("is_laying_egg"), Boolean.class);
/**
* Whether a {@link Patroller} is the leader.
*/
public static final Key> IS_LEADER = Keys.key(ResourceKey.sponge("is_leader"), Boolean.class);
/**
* Whether a {@link BlockState} is lit.
* e.g. {@link BlockTypes#FURNACE}, {@link BlockTypes#CAMPFIRE}
* or {@link BlockTypes#REDSTONE_TORCH}.
*/
public static final Key> IS_LIT = Keys.key(ResourceKey.sponge("is_lit"), Boolean.class);
/**
* Whether a {@link Cat} is lying down.
*
* In vanilla, a cat lies down near its owner when the owner goes to
* sleep.
*/
public static final Key> IS_LYING_DOWN = Keys.key(ResourceKey.sponge("is_lying_down"), Boolean.class);
/**
* Whether a {@link Panda} is lying on it's back.
*/
public static final Key> IS_LYING_ON_BACK = Keys.key(ResourceKey.sponge("is_lying_on_back"), Boolean.class);
/**
* Whether a bed {@link BlockState} is occupied.
* e.g. {@link BlockTypes#WHITE_BED}.
*/
public static final Key> IS_OCCUPIED = Keys.key(ResourceKey.sponge("is_occupied"), Boolean.class);
/**
* Whether a {@link Minecart} is on it's rail
* Readonly
*/
public static final Key> IS_ON_RAIL = Keys.key(ResourceKey.sponge("is_on_rail"), Boolean.class);
/**
* Whether a door/fencegate/trapdoor {@link BlockState} is open.
*/
public static final Key> IS_OPEN = Keys.key(ResourceKey.sponge("is_open"), Boolean.class);
/**
* Whether a {@link BlockState} is passable (can be walked through).
* Readonly
*/
public static final Key> IS_PASSABLE = Keys.key(ResourceKey.sponge("is_passable"), Boolean.class);
/**
* Whether a {@link Patroller} is currently patrolling.
*/
public static final Key> IS_PATROLLING = Keys.key(ResourceKey.sponge("is_patrolling"), Boolean.class);
/**
* Whether an {@link Entity} or leaves {@link BlockState} will
* be prevented from despawning/decaying.
*
* In Vanilla, entities may despawn if the player moves too far from
* them. A persisting entity will not be removed due to no players being
* near it.
*/
public static final Key> IS_PERSISTENT = Keys.key(ResourceKey.sponge("is_persistent"), Boolean.class);
/**
* Whether players are prevented from placing
* items from an equipment slot on an {@link ArmorStand}
*/
public static final Key> IS_PLACING_DISABLED = Keys.mapKey(ResourceKey.sponge("is_placing_disabled"), EquipmentType.class, Boolean.class);
/**
* Whether a {@link IronGolem} has been created by a {@link Player}.
*/
public static final Key> IS_PLAYER_CREATED = Keys.key(ResourceKey.sponge("is_player_created"), Boolean.class);
/**
* Whether a {@link Fox} is currently pouncing.
*/
public static final Key> IS_POUNCING = Keys.key(ResourceKey.sponge("is_pouncing"), Boolean.class);
/**
* Whether a {@link BlockState} is powered.
*
* Applies to blocks that may be powered in order to emit a
* Redstone signal of consistently maximum strength, such as
* {@link BlockTypes#LEVER}, {@link BlockTypes#OAK_BUTTON},
* {@link BlockTypes#OAK_PRESSURE_PLATE}, and their stone
* counterparts.
*/
public static final Key> IS_POWERED = Keys.key(ResourceKey.sponge("is_powered"), Boolean.class);
/**
* Whether a {@link FusedExplosive} is currently primed.
* Readonly
*/
public static final Key> IS_PRIMED = Keys.key(ResourceKey.sponge("is_primed"), Boolean.class);
/**
* Whether a {@link Cat} is purring.
*/
public static final Key> IS_PURRING = Keys.key(ResourceKey.sponge("is_purring"), Boolean.class);
/**
* Whether a {@link Cat} is relaxed.
*
* In vanilla, a cat relaxes before lying down.
*/
public static final Key> IS_RELAXED = Keys.key(ResourceKey.sponge("is_relaxed"), Boolean.class);
/**
* Whether a {@link BlockState} can be replaced by a player without breaking it first.
* e.g. {@link BlockTypes#WATER}
* Readonly
*/
public static final Key> IS_REPLACEABLE = Keys.key(ResourceKey.sponge("is_replaceable"), Boolean.class);
/**
* Whether a {@link Ravager} is roaring.
* Readonly
*/
public static final Key> IS_ROARING = Keys.key(ResourceKey.sponge("is_roaring"), Boolean.class);
/**
* Whether a {@link Panda} is rolling around.
*/
public static final Key> IS_ROLLING_AROUND = Keys.key(ResourceKey.sponge("is_rolling_around"), Boolean.class);
/**
* Whether an entity is saddled.
* e.g. {@link Horse}s and {@link Pig}s
*/
public static final Key> IS_SADDLED = Keys.key(ResourceKey.sponge("is_saddled"), Boolean.class);
/**
* Whether an {@link Enderman} is screaming.
*/
public static final Key> IS_SCREAMING = Keys.key(ResourceKey.sponge("is_screaming"), Boolean.class);
/**
* Whether a {@link Sheep} is sheared.
*/
public static final Key> IS_SHEARED = Keys.key(ResourceKey.sponge("is_sheared"), Boolean.class);
/**
* Whether an {@link Entity} is silent.
*
* A silent entity will not emit sounds or make noises.
*/
public static final Key> IS_SILENT = Keys.key(ResourceKey.sponge("is_silent"), Boolean.class);
/**
* Whether a {@link Wolf}, {@link Cat}, {@link Panda}, or {@link Fox} is sitting.
*/
public static final Key> IS_SITTING = Keys.key(ResourceKey.sponge("is_sitting"), Boolean.class);
/**
* Whether a {@link Bat}, {@link Fox} or {@link Player} is sleeping.
*
* If a player is considered sleeping as per this data value, the player does
* not need to be in bed in order for the other players to be able to
* advance through the night by going to bed.
* Readonly(Player.class)
*/
public static final Key> IS_SLEEPING = Keys.key(ResourceKey.sponge("is_sleeping"), Boolean.class);
/**
* Whether a {@link Player Player's} sleeping status is ignored when checking whether to
* skip the night due to players sleeping. The time in a world will be
* advanced to day if all players in it either are sleeping or are set to ignore.
*/
public static final Key> IS_SLEEPING_IGNORED = Keys.key(ResourceKey.sponge("is_sleeping_ignored"), Boolean.class);
/**
* Whether an {@link ArmorStand} is small.
*/
public static final Key> IS_SMALL = Keys.key(ResourceKey.sponge("is_small"), Boolean.class);
/**
* Whether an {@link Entity} is sneaking.
*
* Sneaking entities generally move slower and do not make walking
* sounds.
*/
public static final Key> IS_SNEAKING = Keys.key(ResourceKey.sponge("is_sneaking"), Boolean.class);
/**
* Whether a {@link Panda} is sneezing.
*/
public static final Key> IS_SNEEZING = Keys.key(ResourceKey.sponge("is_sneezing"), Boolean.class);
/**
* Whether a {@link BlockTypes#DIRT} {@link BlockState} is snowy.
*/
public static final Key> IS_SNOWY = Keys.key(ResourceKey.sponge("is_snowy"), Boolean.class);
/**
* Whether a {@link BlockState} is solid.
* Readonly
*/
public static final Key> IS_SOLID = Keys.key(ResourceKey.sponge("is_solid"), Boolean.class);
/**
* Whether an {@link Entity} is sprinting.
*/
public static final Key> IS_SPRINTING = Keys.key(ResourceKey.sponge("is_sprinting"), Boolean.class);
/**
* Whether a {@link PolarBear} is currently standing.
*/
public static final Key> IS_STANDING = Keys.key(ResourceKey.sponge("is_standing"), Boolean.class);
/**
* Whether a {@link Ravager} is stunned.
* Readonly
*/
public static final Key> IS_STUNNED = Keys.key(ResourceKey.sponge("is_stunned"), Boolean.class);
/**
* Whether a {@link BlockState} is a surrogate block for a block that was provided in an environment
* (almost always modded), that the block type provider no longer exists.
* If true this may indicate that the surrogate block functions differently than the original block.
* Readonly
*/
public static final Key> IS_SURROGATE_BLOCK = Keys.key(ResourceKey.sponge("is_surrogate_block"), Boolean.class);
/**
* Whether players are prevented from taking
* items from an equipment slot on an {@link ArmorStand}
*/
public static final Key> IS_TAKING_DISABLED = Keys.mapKey(ResourceKey.sponge("is_taking_disabled"), EquipmentType.class, Boolean.class);
/**
* Whether a {@link TameableAnimal} is currently tamed
*/
public static final Key> IS_TAMED = Keys.key(ResourceKey.sponge("is_tamed"), Boolean.class);
/**
* Whether a {@link Trader} is currently trading with a {@link Player}.
* Readonly
*/
public static final Key> IS_TRADING = Keys.key(ResourceKey.sponge("is_trading"), Boolean.class);
/**
* Whether a {@link Turtle} is currently traveling.
*/
public static final Key> IS_TRAVELING = Keys.key(ResourceKey.sponge("is_traveling"), Boolean.class);
/**
* Whether an {@link Ocelot} is currently trusting of {@link Player}s.
*/
public static final Key> IS_TRUSTING = Keys.key(ResourceKey.sponge("is_trusting"), Boolean.class);
/**
* Whether an {@link ItemStack} or {@link BlockState} is unbreakable.
*
* Setting this to {@code true} will prevent the item stack's
* {@link #ITEM_DURABILITY} from changing.
* Readonly(BlockState.class)
*/
public static final Key> IS_UNBREAKABLE = Keys.key(ResourceKey.sponge("is_unbreakable"), Boolean.class);
/**
* Whether a {@link Panda} is unhappy.
*/
public static final Key> IS_UNHAPPY = Keys.key(ResourceKey.sponge("is_unhappy"), Boolean.class);
/**
* Whehter a {@link BlockState} is waterlogged.
*/
public static final Key> IS_WATERLOGGED = Keys.key(ResourceKey.sponge("is_waterlogged"), Boolean.class);
/**
* Whether an {@link Entity} like {@link Wolf} is wet.
* Readonly(Entity.class) except Wolf
*/
public static final Key> IS_WET = Keys.key(ResourceKey.sponge("is_wet"), Boolean.class);
/**
* The durability of an {@link ItemStack}. {@link #MAX_DURABILITY}
*/
public static final Key> ITEM_DURABILITY = Keys.key(ResourceKey.sponge("item_durability"), Integer.class);
/**
* The rarity of an item.
*/
public static final Key> ITEM_RARITY = Keys.key(ResourceKey.sponge("item_rarity"), ItemRarity.class);
/**
* The {@link ItemStackSnapshot item} in an
* {@link Item}, {@link ItemFrame}, {@link Jukebox}, {@link Lectern} or
* {@link Potion}.
*/
public static final Key> ITEM_STACK_SNAPSHOT = Keys.key(ResourceKey.sponge("item_stack_snapshot"), ItemStackSnapshot.class);
/**
* The knockback strength applied by an {@link ArrowEntity}.
*
* For the knockback provided by hits with a weapon according to the
* enchantment of the same name, see {@link #APPLIED_ENCHANTMENTS}.
*/
public static final Key> KNOCKBACK_STRENGTH = Keys.key(ResourceKey.sponge("knockback_strength"), Double.class);
/**
* The known {@link PandaGene gene} of a {@link Panda}.
*/
public static final Key> KNOWN_GENE = Keys.key(ResourceKey.sponge("known_gene"), PandaGene.class);
/**
* The last attacking {@link Entity} of a {@link Living}.
*/
public static final Key> LAST_ATTACKER = Keys.key(ResourceKey.sponge("last_attacker"), Entity.class);
/**
* The output yielded by the last command of a {@link CommandBlock} or {@link CommandBlockMinecart}.
*/
public static final Key> LAST_COMMAND_OUTPUT = Keys.key(ResourceKey.sponge("last_command_output"), Component.class);
/**
* The last damage a {@link Living} received.
*/
public static final Key