All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.spongepowered.api.data.Keys Maven / Gradle / Ivy

The newest version!
/*
 * 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> LAST_DAMAGE_RECEIVED = Keys.key(ResourceKey.sponge("last_damage_received"), Double.class); /** * The last time a {@link User} joined on the server. */ public static final Key> LAST_DATE_JOINED = Keys.key(ResourceKey.sponge("last_date_joined"), Instant.class); /** * The last time a {@link User} has been playing on the server. */ public static final Key> LAST_DATE_PLAYED = Keys.key(ResourceKey.sponge("last_date_played"), Instant.class); /** * The amount of layers a {@link BlockState} has. * e.g. {@link BlockTypes#SNOW}, {@link BlockTypes#CAKE} */ public static final Key> LAYER = Keys.key(ResourceKey.sponge("layer"), Integer.class); /** * The holder of a leashed {@link Agent} * e.g. a {@link Player} or {@link LeashKnot}. *

Usually, a {@link LeashKnot} will always exist so long as there is * a leashed {@link Entity} attached. If the leash is broken, the leash * hitch is removed.

*/ public static final Key> LEASH_HOLDER = Keys.key(ResourceKey.sponge("leash_holder"), Entity.class); /** * The rotation of an {@link ArmorStand}'s left arm. */ public static final Key> LEFT_ARM_ROTATION = Keys.key(ResourceKey.sponge("left_arm_rotation"), Vector3d.class); /** * The rotation of an {@link ArmorStand}'s left leg. */ public static final Key> LEFT_LEG_ROTATION = Keys.key(ResourceKey.sponge("left_leg_rotation"), Vector3d.class); /** * The amount of ticks till a {@link Vex} starts * taking damage due to living too long. * *

When this value hits 0 or lower, the Vex will receive damage and * then the value will set back to 20 until the Vex dies.

* *

If the Vex was summoned by a player, this value will be pegged at 0 * and the Vex will not take any damage.

*/ public static final Key> LIFE_TICKS = Keys.key(ResourceKey.sponge("life_ticks"), Ticks.class); /** * The amount of light that emitted by a {@link BlockState}. * Readonly */ public static final Key> LIGHT_EMISSION = Keys.key(ResourceKey.sponge("light_emission"), Integer.class); /** * A {@link Llama}'s {@link LlamaType}. */ public static final Key> LLAMA_TYPE = Keys.key(ResourceKey.sponge("llama_type"), LlamaType.class); /** * A {@link ServerPlayer}'s client language. */ public static final Key> LOCALE = Keys.key(ResourceKey.sponge("locale"), Locale.class); /** * The token used to lock a {@link CarrierBlockEntity}. Or the token on an {@link ItemStack} to unlock it. */ public static final Key> LOCK_TOKEN = Keys.key(ResourceKey.sponge("lock_token"), String.class); /** * A lodestone location, used with {@link ItemTypes#COMPASS}. */ public static final Key> LODESTONE = Keys.key(ResourceKey.sponge("lodestone"), ServerLocation.class); /** * The displayed description ("lore") text of an {@link ItemStack}. * *

The lore text is usually displayed when the player hovers his cursor * over the stack. For the contents of a book see {@link #PAGES} * instead.

*/ public static final Key> LORE = Keys.listKey(ResourceKey.sponge("lore"), Component.class); /** * Represents the {@link Key} for the {@link MapCanvas} of a map * for a {@link MapInfo}. * This contains the colors displayed on a map. * */ public static final Key> MAP_CANVAS = Keys.key(ResourceKey.sponge("map_canvas"), MapCanvas.class); /** * Represents the {@link Key} for the Set of {@link MapDecoration}s * for a {@link MapInfo}. * */ public static final Key> MAP_DECORATIONS = Keys.setKey(ResourceKey.sponge("map_decorations"), MapDecoration.class); /** * Represents the {@link Key} for the {@link MapInfo} * of an {@link ItemStack} of type {@link ItemTypes#FILLED_MAP}. * * Can be null if the ItemStack was made by a plugin and hasn't been offered a MapInfo yet. */ public static final Key> MAP_INFO = Keys.key(ResourceKey.sponge("map_info"), MapInfo.class); /** * Represents the {@link Key} for the centre x and z of where a * {@link MapInfo} represents. * This will be automatically centralised correctly. */ public static final Key> MAP_LOCATION = Keys.key(ResourceKey.sponge("map_location"), Vector2i.class); /** * Represents the {@link Key} for whether a map updates from players * for a {@link MapInfo}. * By default this is false. * Can be used in combination with {@link Keys#MAP_CANVAS} to create * custom static map. * See Minecraft Wiki - Map Locking */ public static final Key> MAP_LOCKED = Keys.key(ResourceKey.sponge("map_locked"), Boolean.class); /** * Represents the {@link Key} for the scale of a map * for a {@link MapInfo}. * @see Minecraft Wiki - Zoom Details */ public static final Key> MAP_SCALE = Keys.key(ResourceKey.sponge("map_scale"), Integer.class); /** * Represents the {@link Key} for whether a {@link MapInfo} * tracks player positions. */ public static final Key> MAP_TRACKS_PLAYERS = Keys.key(ResourceKey.sponge("map_tracks_players"), Boolean.class); /** * Represents the {@link Key} for whether a {@link MapInfo} can track * a player from anywhere in the world. */ public static final Key> MAP_UNLIMITED_TRACKING = Keys.key(ResourceKey.sponge("map_unlimited_tracking"), Boolean.class); /** * Represents the {@link Key} for the {@link ResourceKey} of a {@link ServerWorld}. * {@link MapInfo} */ public static final Key> MAP_WORLD = Keys.key(ResourceKey.sponge("map_world"), ResourceKey.class); /** * The matter state of a {@link BlockState} * Readonly */ public static final Key> MATTER_TYPE = Keys.key(ResourceKey.sponge("matter_type"), MatterType.class); /** * The maximum air supply a {@link Living} may have. * *

For the current amount of air, check {@link #REMAINING_AIR}.

*/ public static final Key> MAX_AIR = Keys.key(ResourceKey.sponge("max_air"), Integer.class); /** * The maximum amount of ticks a {@link FurnaceBlockEntity} * can burn with the currently used fuel item. */ public static final Key> MAX_BURN_TIME = Keys.key(ResourceKey.sponge("max_burn_time"), Ticks.class); /** * The total time the current {@link ItemStack} in a * {@link FurnaceBlockEntity} has to be cooked. */ public static final Key> MAX_COOK_TIME = Keys.key(ResourceKey.sponge("max_cook_time"), Ticks.class); /** * The maximum durability of an {@link ItemStack}. {@link #ITEM_DURABILITY} * Readonly */ public static final Key> MAX_DURABILITY = Keys.key(ResourceKey.sponge("max_durability"), Integer.class); /** * The maximum exhuastion of a {@link Humanoid}. Readonly. * * @see Keys#EXHAUSTION */ public static final Key> MAX_EXHAUSTION = Keys.key(ResourceKey.sponge("max_exhaustion"), Double.class); /** * The maximum damage a {@link FallingBlock} can deal. */ public static final Key> MAX_FALL_DAMAGE = Keys.key(ResourceKey.sponge("max_fall_damage"), Double.class); /** * The maximum food level of a {@link Humanoid}. Readonly. * * @see Keys#FOOD_LEVEL */ public static final Key> MAX_FOOD_LEVEL = Keys.key(ResourceKey.sponge("max_food_level"), Integer.class); /** * The maximum health of a {@link Living}. * *

The maximum health set here may affect the attribute increasing * health points. The base health should be minded that it may be lower * than the total maximum health of the entity.

*/ public static final Key> MAX_HEALTH = Keys.key(ResourceKey.sponge("max_health"), Double.class); /** * The maximum number of entities around a {@link MobSpawner}. * A spawner will not spawn entities if there are more * entities around than this value permits. */ public static final Key> MAX_NEARBY_ENTITIES = Keys.key(ResourceKey.sponge("max_nearby_entities"), Integer.class); /** * The maximum saturation of a {@link Humanoid}. Readonly. * * @see Keys#SATURATION */ public static final Key> MAX_SATURATION = Keys.key(ResourceKey.sponge("max_saturation"), Double.class); /** * The maximum amount of ticks between two * batches of entities spawned by a {@link MobSpawner}. */ public static final Key> MAX_SPAWN_DELAY = Keys.key(ResourceKey.sponge("max_spawn_delay"), Ticks.class); /** * The max speed of a {@link Boat}. In vanilla, this is 0.4 */ public static final Key> MAX_SPEED = Keys.key(ResourceKey.sponge("max_speed"), Double.class); /** * The maximum stack size of slots in an inventory. For most vanilla inventories this is 64. * Readonly */ public static final Key> MAX_STACK_SIZE = Keys.key(ResourceKey.sponge("max_stack_size"), Integer.class); /** * The represented block's offset of a {@link MinecartLike}. */ public static final Key> MINECART_BLOCK_OFFSET = Keys.key(ResourceKey.sponge("minecart_block_offset"), Integer.class); /** * The minimum amount of ticks between two * batches of entities spawned by a {@link MobSpawner}. */ public static final Key> MIN_SPAWN_DELAY = Keys.key(ResourceKey.sponge("min_spawn_delay"), Ticks.class); /** * The moisture value of a {@link BlockTypes#FARMLAND} {@link BlockState}. */ public static final Key> MOISTURE = Keys.key(ResourceKey.sponge("moisture"), Integer.class); /** * The type of a {@link Mooshroom}. */ public static final Key> MOOSHROOM_TYPE = Keys.key(ResourceKey.sponge("mooshroom_type"), MooshroomType.class); /** * The type of {@link MusicDisc} an {@link ItemStack} holds. */ public static final Key> MUSIC_DISC = Keys.key(ResourceKey.sponge("music_disc"), MusicDisc.class); /** * The next entity that will be spawned by a {@link MobSpawner}. * *

Normally the entities to be spawned are determined by a random value * applied to the {@link #SPAWNABLE_ENTITIES} weighted collection. If this * value exists, it will override the random spawn with a definite one.

*/ public static final Key>> NEXT_ENTITY_TO_SPAWN = Keys.key(ResourceKey.sponge("next_entity_to_spawn"), new TypeToken>() {}); /** * The pitch of a {@link BlockTypes#NOTE_BLOCK} {@link BlockState}. */ public static final Key> NOTE_PITCH = Keys.key(ResourceKey.sponge("note_pitch"), NotePitch.class); /** * The notifier, usually of an {@link Entity}. It is up to the implementation to define. */ public static final Key> NOTIFIER = Keys.key(ResourceKey.sponge("notifier"), UUID.class); /** * The deceleration a {@link Boat} while it has {@link Keys#PASSENGERS}. */ public static final Key> OCCUPIED_DECELERATION = Keys.key(ResourceKey.sponge("occupied_deceleration"), Double.class); /** * Whether an {@link Entity} is currently considered to be on the ground. * Readonly */ public static final Key> ON_GROUND = Keys.key(ResourceKey.sponge("on_ground"), Boolean.class); /** * The {@link Orientation} of an {@link ItemFrame}. */ public static final Key> ORIENTATION = Keys.key(ResourceKey.sponge("orientation"), Orientation.class); /** * The content of a {@link ItemTypes#WRITTEN_BOOK} {@link ItemStack}. * *

Use {@link Keys#PLAIN_PAGES} if you wish to inspect the contents * of a {@link ItemTypes#WRITABLE_BOOK}.

*/ public static final Key> PAGES = Keys.listKey(ResourceKey.sponge("pages"), Component.class); /** * The {@link ParrotType type} of a {@link Parrot}. */ public static final Key> PARROT_TYPE = Keys.key(ResourceKey.sponge("parrot_type"), ParrotType.class); /** * The particle type of an {@link AreaEffectCloud}. * *

Only a few {@link ParticleOption}s will be usable for this * effect for specific {@link ParticleType}s and not every * {@link ParticleType} will be applicable.

*/ public static final Key> PARTICLE_EFFECT = Keys.key(ResourceKey.sponge("particle_effect"), ParticleEffect.class); /** * The amount of ticks a {@link FurnaceBlockEntity} has * been cooking the current item for. * *

Once this value reaches the {@link #MAX_COOK_TIME}, the * item will be finished cooking.

*/ public static final Key> PASSED_COOK_TIME = Keys.key(ResourceKey.sponge("passed_cook_time"), Ticks.class); /** * The entities that act as passengers for an {@link Entity}. * *

For example, a {@link Player} riding on a {@link Horse} or a * {@link Pig} would be considered its passenger.

*/ public static final Key> PASSENGERS = Keys.listKey(ResourceKey.sponge("passengers"), Entity.class); /** * A {@link TropicalFish}'s pattern color. */ public static final Key> PATTERN_COLOR = Keys.key(ResourceKey.sponge("pattern_color"), DyeColor.class); /** * The {@link PhantomPhase phase} of a {@link Phantom}. */ public static final Key> PHANTOM_PHASE = Keys.key(ResourceKey.sponge("phantom_phase"), PhantomPhase.class); /** * The pickup delay (in ticks) of an {@link Item}. */ public static final Key> PICKUP_DELAY = Keys.key(ResourceKey.sponge("pickup_delay"), Ticks.class); /** * The {@link PickupRule} of an {@link ArrowEntity}. */ public static final Key> PICKUP_RULE = Keys.key(ResourceKey.sponge("pickup_rule"), PickupRule.class); /** * The piston type of a piston {@link BlockState} TODO dataholder {@link Piston}. */ public static final Key> PISTON_TYPE = Keys.key(ResourceKey.sponge("piston_type"), PistonType.class); /** * The block types an {@link ItemStack} may be placed on. */ public static final Key> PLACEABLE_BLOCK_TYPES = Keys.setKey(ResourceKey.sponge("placeable_block_types"), BlockType.class); /** * The content of a {@link ItemTypes#WRITABLE_BOOK} {@link ItemStack}. * *

Use {@link Keys#PAGES} if you wish to get the contents of a * {@link ItemTypes#WRITTEN_BOOK}

*/ public static final Key> PLAIN_PAGES = Keys.listKey(ResourceKey.sponge("plain_pages"), String.class); /** * The plugin that created an {@link Inventory} */ public static final Key> PLUGIN_CONTAINER = Keys.key(ResourceKey.sponge("plugin_container"), PluginContainer.class); /** * The pore sides of a {@link BlockTypes#BROWN_MUSHROOM_BLOCK} or * {@link BlockTypes#RED_MUSHROOM_BLOCK} {@link BlockState}. * See {@link #HAS_PORES_UP}, {@link #HAS_PORES_DOWN}, {@link #HAS_PORES_NORTH}, {@link #HAS_PORES_EAST}, {@link #HAS_PORES_SOUTH}, {@link #HAS_PORES_WEST}. */ public static final Key> PORES = Keys.setKey(ResourceKey.sponge("pores"), Direction.class); /** * The {@link PortionType} of a {@link BlockState}. * e.g. {@link BlockTypes#OAK_DOOR}, {@link BlockTypes#ROSE_BUSH} or {@link BlockTypes#WHITE_BED} * For slabs use {@link #SLAB_PORTION} instead */ public static final Key> PORTION_TYPE = Keys.key(ResourceKey.sponge("portion_type"), PortionType.class); /** * The potential max speed of a {@link Minecart}. */ public static final Key> POTENTIAL_MAX_SPEED = Keys.key(ResourceKey.sponge("potential_max_speed"), Double.class); /** * The potion effects that are present on an {@link Entity} *

or applied by an {@link AreaEffectCloud} or {@link ArrowEntity}

*

or stored on an {@link ItemStack}.

*/ public static final Key> POTION_EFFECTS = Keys.listKey(ResourceKey.sponge("potion_effects"), PotionEffect.class); /** * The potion type of an {@link ItemStack}. */ public static final Key> POTION_TYPE = Keys.key(ResourceKey.sponge("potion_type"), PotionType.class); /** * The signal power of a {@link BlockState}. * *

Applies to blocks that may emit a Redstone signal of variable * strength, such as {@link BlockTypes#REDSTONE_WIRE}, * {@link BlockTypes#DAYLIGHT_DETECTOR}, * {@link BlockTypes#LIGHT_WEIGHTED_PRESSURE_PLATE} etc.

*/ public static final Key> POWER = Keys.key(ResourceKey.sponge("power"), Integer.class); /** * A {@link Beacon}'s primary effect. */ public static final Key> PRIMARY_POTION_EFFECT_TYPE = Keys.key(ResourceKey.sponge("primary_potion_effect_type"), PotionEffectType.class); /** * The {@link Villager} or {@link ZombieVillager}'s {@link ProfessionType}. */ public static final Key> PROFESSION_TYPE = Keys.key(ResourceKey.sponge("profession_type"), ProfessionType.class); /** * The {@link Villager} or {@link ZombieVillager}'s {@link ProfessionType} level. */ public static final Key> PROFESSION_LEVEL = Keys.key(ResourceKey.sponge("profession_level"), Integer.class); /** * The type of a {@link Rabbit}. */ public static final Key> RABBIT_TYPE = Keys.key(ResourceKey.sponge("rabbit_type"), RabbitType.class); /** * The radius of an {@link AreaEffectCloud}. */ public static final Key> RADIUS = Keys.key(ResourceKey.sponge("radius"), Double.class); /** * The amount the radius of an * {@link AreaEffectCloud} grows or shrinks each time it applies its * effect. */ public static final Key> RADIUS_ON_USE = Keys.key(ResourceKey.sponge("radius_on_use"), Double.class); /** * The amount the radius of an * {@link AreaEffectCloud} grows or shrinks per tick. */ public static final Key> RADIUS_PER_TICK = Keys.key(ResourceKey.sponge("radius_per_tick"), Double.class); /** * The wave number of a raid a {@link Raider} is in. * Readonly but mutable */ public static final Key> RAID_WAVE = Keys.key(ResourceKey.sponge("raid_wave"), RaidWave.class); /** * The {@link RailDirection} of a {@link BlockState}. */ public static final Key> RAIL_DIRECTION = Keys.key(ResourceKey.sponge("rail_direction"), RailDirection.class); /** * The delay (in ticks) after which an * {@link AreaEffectCloud} will reapply its effect on a previously * affected {@link Entity}. */ public static final Key> REAPPLICATION_DELAY = Keys.key(ResourceKey.sponge("reapplication_delay"), Ticks.class); /** * The redstone delay on a {@link BlockTypes#REPEATER} {@link BlockState}. */ public static final Key> REDSTONE_DELAY = Keys.key(ResourceKey.sponge("redstone_delay"), Integer.class); /** * The amount of air a {@link Living} has left. */ public static final Key> REMAINING_AIR = Keys.key(ResourceKey.sponge("remaining_air"), Integer.class); /** * The remaining amount of ticks the current brewing * process of a {@link BrewingStand} will take. * *

If nothing is being brewed, the remaining brew time will be 0.

*/ public static final Key> REMAINING_BREW_TIME = Keys.key(ResourceKey.sponge("remaining_brew_time"), Ticks.class); /** * Represents the {@link Key} for the remaining number of ticks to pass * before another attempt to spawn entities is made by a {@link MobSpawner}. */ public static final Key> REMAINING_SPAWN_DELAY = Keys.key(ResourceKey.sponge("remaining_spawn_delay"), Ticks.class); /** * The amount of food a food {@link ItemStack} restores when eaten. * Readonly */ public static final Key> REPLENISHED_FOOD = Keys.key(ResourceKey.sponge("replenished_food"), Integer.class); /** * The amount of saturation a food {@link ItemStack} provides when eaten. * Readonly */ public static final Key> REPLENISHED_SATURATION = Keys.key(ResourceKey.sponge("replenished_saturation"), Double.class); /** * The {@link InstrumentType} of a {@link BlockState} when placed under a {@link BlockTypes#NOTE_BLOCK}. * Readonly */ public static final Key> REPRESENTED_INSTRUMENT = Keys.key(ResourceKey.sponge("represented_instrument"), InstrumentType.class); /** * How close a {@link Player} has to be around the {@link MobSpawner} * in order for it to attempt to spawn entities. */ public static final Key> REQUIRED_PLAYER_RANGE = Keys.key(ResourceKey.sponge("required_player_range"), Double.class); /** * The spawn locations a {@link Player} * may have for various worlds based on {@link UUID} of the world. */ public static final Key> RESPAWN_LOCATIONS = Keys.mapKey(ResourceKey.sponge("respawn_locations"), ResourceKey.class, RespawnLocation.class); /** * The rotation of an {@link ArmorStand}'s right arm. */ public static final Key> RIGHT_ARM_ROTATION = Keys.key(ResourceKey.sponge("right_arm_rotation"), Vector3d.class); /** * The rotation of an {@link ArmorStand}'s right leg. */ public static final Key> RIGHT_LEG_ROTATION = Keys.key(ResourceKey.sponge("right_leg_rotation"), Vector3d.class); /** * The time a {@link Ravager} is roaring. */ public static final Key> ROARING_TIME = Keys.key(ResourceKey.sponge("roaring_time"), Ticks.class); /** * The current saturation of a {@link Player}. * *

When the saturation level reaches 0, the food level is usually * diminished such that the food level is decreased by 1, then * saturation is reset to the maximum value. This type of effect occurs * over time and can be modified by movements and actions performed by the * {@link Player}.

*/ public static final Key> SATURATION = Keys.key(ResourceKey.sponge("saturation"), Double.class); /** * The "scale" for the size of an {@link Entity}. * *

Together with {@link #BASE_SIZE} and {@link #HEIGHT} this defines the size of an {@link Entity}.

*/ public static final Key> SCALE = Keys.key(ResourceKey.sponge("scale"), Double.class); /** * The scoreboard tags applied to an {@link Entity}. * * @see * https://minecraft.gamepedia.com/Scoreboard#Tags */ public static final Key> SCOREBOARD_TAGS = Keys.setKey(ResourceKey.sponge("scoreboard_tags"), String.class); /** * The triggering state of a {@link BlockTypes#SCULK_SENSOR}. */ public static final Key> SCULK_SENSOR_STATE = Keys.key(ResourceKey.sponge("sculk_sensor_state"), SculkSensorState.class); /** * A {@link Beacon}'s secondary effect. */ public static final Key> SECONDARY_POTION_EFFECT_TYPE = Keys.key(ResourceKey.sponge("secondary_potion_effect_type"), PotionEffectType.class); /** * A {@link Fox fox's} second trusted {@link UUID}, usually a {@link Player}. */ public static final Key> SECOND_TRUSTED = Keys.key(ResourceKey.sponge("second_trusted"), UUID.class); /** * The shooter of a {@link Projectile}. */ public static final Key> SHOOTER = Keys.key(ResourceKey.sponge("shooter"), ProjectileSource.class); /** * Whether a {@link EndCrystal} should show its bottom bedrock platform. */ public static final Key> SHOW_BOTTOM = Keys.key(ResourceKey.sponge("show_bottom"), Boolean.class); /** * The lines displayed on a {@link Sign}. */ public static final Key> SIGN_LINES = Keys.listKey(ResourceKey.sponge("sign_lines"), Component.class); /** * The size of a {@link Slime}. * or * The size of a {@link Phantom}. In vanilla, this ranges between 0 and 64. */ public static final Key> SIZE = Keys.key(ResourceKey.sponge("size"), Integer.class); /** * The parts of a {@link ServerPlayer} skin that should be displayed. * *

This is a read-only value, set by the client.

*/ public static final Key> SKIN_PARTS = Keys.setKey(ResourceKey.sponge("skin_parts"), SkinPart.class); /** * The skin of a {@link Humanoid}. * *

Skins can only be manipulated by supplying the UUID of a player * having that skin. The binary skin data is signed by Mojang so fully * customized skins are not possible.

* Readonly (Player) */ public static final Key> SKIN_PROFILE_PROPERTY = Keys.key(ResourceKey.sponge("skin_profile_property"), ProfileProperty.class); /** * The "moisture" state of a {@link Dolphin}. * *

* Vanilla sets the dolphin's skin moisture to 2400 so long as the entity * is in water, being rained on, or in a bubble column. If not, the dolphin * will loose 1 moisture per tick. Once this value is 0 or below, the dolphin * will be damaged via {@link DamageSources#DRYOUT} with a value of 1 per tick * until death. *

*/ public static final Key> SKIN_MOISTURE = Keys.key(ResourceKey.sponge("skin_moisture"), Integer.class); /** * The skylight value at a {@link ServerLocation}. * For the blocklight see {@link #BLOCK_LIGHT}. * Readonly */ public static final Key> SKY_LIGHT = Keys.key(ResourceKey.sponge("sky_light"), Integer.class); /** * The {@link SlabPortion} of a {@link BlockState}. */ public static final Key> SLAB_PORTION = Keys.key(ResourceKey.sponge("slab_portion"), SlabPortion.class); /** * The sleep timer of a {@link Player}. */ public static final Key> SLEEP_TIMER = Keys.key(ResourceKey.sponge("sleep_timer"), Integer.class); /** * The index of a {@link Slot} in an {@link Inventory} * Readonly */ public static final Key> SLOT_INDEX = Keys.key(ResourceKey.sponge("slot_index"), Integer.class); /** * The position of a {@link Slot} within a {@link GridInventory}. * Readonly */ public static final Key> SLOT_POSITION = Keys.key(ResourceKey.sponge("slot_position"), Vector2i.class); /** * The side of a particular {@link Slot}, for use in querying "sided inventories". * Readonly */ public static final Key> SLOT_SIDE = Keys.key(ResourceKey.sponge("slot_side"), Direction.class); /** * Whether a {@link Minecart} slows down when it has no {@link Keys#PASSENGERS}. */ public static final Key> SLOWS_UNOCCUPIED = Keys.key(ResourceKey.sponge("slows_unoccupied"), Boolean.class); /** * The time a {@link Panda} has been sneezing (in ticks) */ public static final Key> SNEEZING_TIME = Keys.key(ResourceKey.sponge("sneezing_time"), Ticks.class); /** * The list of {@link EntityArchetype}s able to be spawned by a {@link MobSpawner}. */ public static final Key> SPAWNABLE_ENTITIES = Keys.weightedKey(ResourceKey.sponge("spawnable_entities"), EntityArchetype.class); /** * How many entities a {@link MobSpawner} has spawned so far. */ public static final Key> SPAWN_COUNT = Keys.key(ResourceKey.sponge("spawn_count"), Integer.class); /** * How far away from the {@link MobSpawner} the entities spawned by it may appear. */ public static final Key> SPAWN_RANGE = Keys.key(ResourceKey.sponge("spawn_range"), Double.class); /** * The {@link Entity target} of the spectator camera of a {@link Player}. */ public static final Key> SPECTATOR_TARGET = Keys.key(ResourceKey.sponge("spectator_target"), Entity.class); /** * The {@link StairShape} of a {@link BlockState}. */ public static final Key> STAIR_SHAPE = Keys.key(ResourceKey.sponge("stair_shape"), StairShape.class); /** * The {@link Statistic}s of a {@link Player}. */ public static final Key> STATISTICS = Keys.mapKey(ResourceKey.sponge("statistics"), Statistic.class, Long.class); /** * The enchantments stored on an {@link ItemStack}. * *

Stored enchantments are meant to be transferred. Usually this key * applies to {@link ItemTypes#ENCHANTED_BOOK} {@link ItemStack}s. Enchantments * affecting the item stack are retrieved via {@link #APPLIED_ENCHANTMENTS} * instead.

*/ public static final Key> STORED_ENCHANTMENTS = Keys.listKey(ResourceKey.sponge("stored_enchantments"), Enchantment.class); /** * A {@link Llama}s carrying strength. The higher the strength, * the more items it can carry (effectively the size of inventory). */ public static final Key> STRENGTH = Keys.key(ResourceKey.sponge("strength"), Integer.class); /** * The author of a structure from a {@link StructureBlock}. */ public static final Key> STRUCTURE_AUTHOR = Keys.key(ResourceKey.sponge("structure_author"), String.class); /** * Whether a {@link StructureBlock} should * ignore entities when saving a structure. */ public static final Key> STRUCTURE_IGNORE_ENTITIES = Keys.key(ResourceKey.sponge("structure_ignore_entities"), Boolean.class); /** * The integrity of a {@link StructureBlock}. */ public static final Key> STRUCTURE_INTEGRITY = Keys.key(ResourceKey.sponge("structure_integrity"), Double.class); /** * The mode of a {@link StructureBlock}. */ public static final Key> STRUCTURE_MODE = Keys.key(ResourceKey.sponge("structure_mode"), StructureMode.class); /** * The position of a {@link StructureBlock}. */ public static final Key> STRUCTURE_POSITION = Keys.key(ResourceKey.sponge("structure_position"), Vector3i.class); /** * Whether a {@link StructureBlock} is powered. */ public static final Key> STRUCTURE_POWERED = Keys.key(ResourceKey.sponge("structure_powered"), Boolean.class); /** * The seed of a {@link StructureBlock} */ public static final Key> STRUCTURE_SEED = Keys.key(ResourceKey.sponge("structure_seed"), Long.class); /** * Whether a * {@link StructureBlock} should make all {@link BlockTypes#AIR}, * {@link BlockTypes#CAVE_AIR}, {@link BlockTypes#STRUCTURE_VOID} visible. */ public static final Key> STRUCTURE_SHOW_AIR = Keys.key(ResourceKey.sponge("structure_show_air"), Boolean.class); /** * Whether a {@link StructureBlock} shows the bounding box. */ public static final Key> STRUCTURE_SHOW_BOUNDING_BOX = Keys.key(ResourceKey.sponge("structure_show_bounding_box"), Boolean.class); /** * The size of a {@link StructureBlock}s structure. */ public static final Key> STRUCTURE_SIZE = Keys.key(ResourceKey.sponge("structure_size"), Vector3i.class); /** * The amount of "stuck arrows" in a {@link Living}. */ public static final Key> STUCK_ARROWS = Keys.key(ResourceKey.sponge("stuck_arrows"), Integer.class); /** * The time (in ticks) a {@link Ravager} is stunned. */ public static final Key> STUNNED_TIME = Keys.key(ResourceKey.sponge("stunned_time"), Ticks.class); /** * The amount of successful executions of a command * stored in a {@link CommandBlock} or {@link CommandBlockMinecart}. */ public static final Key> SUCCESS_COUNT = Keys.key(ResourceKey.sponge("success_count"), Integer.class); /** * Whether a {@link BlockState} is suspended. */ public static final Key> SUSPENDED = Keys.key(ResourceKey.sponge("suspended"), Boolean.class); /** * The swiftness of an {@link Entity} e.g. {@link Minecart}s. *

This is equivalent to the magnitude of the {@link #VELOCITY} vector

*/ public static final Key> SWIFTNESS = Keys.key(ResourceKey.sponge("swiftness"), Double.class); /** * The tamer of a {@link TameableAnimal} or {@link HorseLike}. */ public static final Key> TAMER = Keys.key(ResourceKey.sponge("tamer"), UUID.class); /** * The targeted entity either by an {@link Agent} and it's * {@link GoalExecutorTypes#TARGET} selector or by a {@link FishingBobber} or {@link ShulkerBullet}. */ public static final Key> TARGET_ENTITY = Keys.key(ResourceKey.sponge("target_entity"), Entity.class); /** * A target location. * e.g. An {@link EyeOfEnder} target or a {@link Player}'s compass. */ public static final Key> TARGET_LOCATION = Keys.key(ResourceKey.sponge("target_location"), Vector3d.class); /** * A target block position. * e.g. A {@link Patroller}'s patrol target, * the travel position of a {@link Turtle}, * the exit portal position of a {@link EndGateway} or * an {@link EndCrystal}'s beam target. */ public static final Key> TARGET_POSITION = Keys.key(ResourceKey.sponge("target_position"), Vector3i.class); /** * The remaining fuse time in ticks of a {@link FusedExplosive}. * This value may be set to an arbitrary value * if the explosive is not primed. */ public static final Key> TICKS_REMAINING = Keys.key(ResourceKey.sponge("ticks_remaining"), Ticks.class); /** * The tilt of a {@link BlockTypes#BIG_DRIPLEAF} block, as triggered by * player motion. */ public static final Key> TILT = Keys.key(ResourceKey.sponge("tilt"), Tilt.class); /** * The {@link ItemTier} of an {@link ItemStack} tool. * Readonly */ public static final Key> TOOL_TYPE = Keys.key(ResourceKey.sponge("tool_type"), ItemTier.class); /** * Whether a {@link CommandBlock} does track its output. * *

If this is set, the output of the most recent execution can be * retrieved using {@link #LAST_COMMAND_OUTPUT}.

*/ public static final Key> TRACKS_OUTPUT = Keys.key(ResourceKey.sponge("tracks_output"), Boolean.class); /** * The {@link TradeOffer}s offered by a {@link Trader}. */ public static final Key> TRADE_OFFERS = Keys.listKey(ResourceKey.sponge("trade_offers"), TradeOffer.class); /** * Whether an {@link Entity} is transient. * This prevents the entity from being saved to disk. * The rules for this are as follows... * If the entity type says that it isn't transient then this key is readonly. * If the entity type says that it is transient, then this key dictates the current state. */ public static final Key> TRANSIENT = Keys.key(ResourceKey.sponge("transient"), Boolean.class); /** * A {@link TropicalFish}'s shape. */ public static final Key> TROPICAL_FISH_SHAPE = Keys.key(ResourceKey.sponge("tropical_fish_shape"), TropicalFishShape.class); /** * The time a {@link Panda} has been unhappy (in ticks) */ public static final Key> UNHAPPY_TIME = Keys.key(ResourceKey.sponge("unhappy_time"), Ticks.class); /** * The {@link UUID} of a custom inventory. */ public static final Key> UNIQUE_ID = Keys.key(ResourceKey.sponge("unique_id"), UUID.class); /** * The deceleration a {@link Boat} while it does not have {@link Keys#PASSENGERS}. */ public static final Key> UNOCCUPIED_DECELERATION = Keys.key(ResourceKey.sponge("unoccupied_deceleration"), Double.class); /** * Whether a {@link BlockTypes#TNT} {@link BlockState} is unstable. */ public static final Key> UNSTABLE = Keys.key(ResourceKey.sponge("unstable"), Boolean.class); /** * Whether a {@link BlockTypes#POINTED_DRIPSTONE} is facing up or down. * *

Only supports {@link Direction#UP} or {@link Direction#DOWN}

*/ public static final Key> UP_OR_DOWN = Keys.key(ResourceKey.sponge("up_or_down"), Direction.class); /** * Whether changes to {@link Keys#SKIN_PROFILE_PROPERTY} should * be reflected in an entity's {@link GameProfile}. */ public static final Key> UPDATE_GAME_PROFILE = Keys.key(ResourceKey.sponge("update_game_profile"), Boolean.class); /** * The {@link VanishState} of an {@link Entity}. * *

The presence of a vanished entity will not be made known to a client; * no packets pertaining to this entity are sent. Client-side, this entity * will cease to exist. Server-side it may still be targeted by hostile * entities or collide with other entities.

* *

Vanishing an {@link Entity} ridden by other entities (see * {@link #PASSENGERS} will cause problems.

*/ public static final Key> VANISH_STATE = Keys.key(ResourceKey.sponge("vanish"), VanishState.class); /** * The vehicle an {@link Entity} is riding. * *

Vehicles may be nested as a vehicle might itself ride another entity. * To get the vehicle on bottom, use {@link Keys#BASE_VEHICLE}.

*/ public static final Key> VEHICLE = Keys.key(ResourceKey.sponge("vehicle"), Entity.class); /** * The velocity of an {@link Entity}. */ public static final Key> VELOCITY = Keys.key(ResourceKey.sponge("velocity"), Vector3d.class); /** * The client view distance of a {@link ServerPlayer}. Read-only. * *

This value represents the radius (around the player) in * unit chunks.

*/ public static final Key> VIEW_DISTANCE = Keys.key(ResourceKey.sponge("view_distance"), Integer.class); /** * The type of a {@link Villager} or {@link ZombieVillager}. */ public static final Key> VILLAGER_TYPE = Keys.key(ResourceKey.sponge("villager_type"), VillagerType.class); /** * The duration in ticks after which an * {@link AreaEffectCloud} will begin to apply its effect to entities. */ public static final Key> WAIT_TIME = Keys.key(ResourceKey.sponge("wait_time"), Ticks.class); /** * The base speed at which a {@link Player} or {@link Living} walks. */ public static final Key> WALKING_SPEED = Keys.key(ResourceKey.sponge("walking_speed"), Double.class); /** * Whether a thrown {@link EyeOfEnder} will shatter. */ public static final Key> WILL_SHATTER = Keys.key(ResourceKey.sponge("will_shatter"), Boolean.class); /** * The {@link WireAttachmentType}s of a {@link BlockTypes#REDSTONE_WIRE} {@link BlockState} for its neighboring blocks. */ public static final Key> WIRE_ATTACHMENTS = Keys.mapKey(ResourceKey.sponge("wire_attachments"), Direction.class, WireAttachmentType.class); /** * The {@link WireAttachmentType} of a {@link BlockTypes#REDSTONE_WIRE} {@link BlockState} * for its neighboring block to the {@link Direction#EAST}. */ public static final Key> WIRE_ATTACHMENT_EAST = Keys.key(ResourceKey.sponge("wire_attachment_east"), WireAttachmentType.class); /** * The {@link WireAttachmentType} of a {@link BlockTypes#REDSTONE_WIRE} {@link BlockState} * for its neighboring block to the {@link Direction#NORTH}. */ public static final Key> WIRE_ATTACHMENT_NORTH = Keys.key(ResourceKey.sponge("wire_attachment_north"), WireAttachmentType.class); /** * The {@link WireAttachmentType} of a {@link BlockTypes#REDSTONE_WIRE} {@link BlockState} * for its neighboring block to the {@link Direction#SOUTH}. */ public static final Key> WIRE_ATTACHMENT_SOUTH = Keys.key(ResourceKey.sponge("wire_attachment_south"), WireAttachmentType.class); /** * The {@link WireAttachmentType} of a {@link BlockTypes#REDSTONE_WIRE} {@link BlockState} * for its neighboring block to the {@link Direction#WEST}. */ public static final Key> WIRE_ATTACHMENT_WEST = Keys.key(ResourceKey.sponge("wire_attachment_west"), WireAttachmentType.class); /** * The entities targeted by the three {@link Wither} heads. In vanilla the wither only targets {@link Living}. {@code null} for no target entity. */ public static final Key> WITHER_TARGETS = Keys.listKey(ResourceKey.sponge("wither_targets"), Entity.class); /** * The {@link Sheep} who is being targeted by the {@link SpellTypes#WOLOLO} * spell being casted by an {@link Evoker} */ public static final Key> WOLOLO_TARGET = Keys.key(ResourceKey.sponge("wololo_target"), Sheep.class); // SORTFIELDS:OFF // @formatter:on private static Key> key(final ResourceKey resourceKey, final TypeToken token) { return Key.builder().key(resourceKey).elementType(token).build(); } private static Key> key(final ResourceKey resourceKey, final Class type) { return Key.builder().key(resourceKey).elementType(type).build(); } private static Key> listKey(final ResourceKey resourceKey, final Class elementType) { return Key.builder().key(resourceKey).listElementType(elementType).build(); } private static Key> listKey(final ResourceKey resourceKey, final TypeToken elementType) { return Key.builder().key(resourceKey).listElementType(elementType).build(); } private static Key> setKey(final ResourceKey resourceKey, final Class elementType) { return Key.builder().key(resourceKey).setElementType(elementType).build(); } private static Key> setKey(final ResourceKey resourceKey, final TypeToken elementType) { return Key.builder().key(resourceKey).setElementType(elementType).build(); } private static Key> mapKey(final ResourceKey resourceKey, final Class keyType, final Class valueType) { return Key.builder().key(resourceKey).mapElementType(keyType, valueType).build(); } private static Key> mapKey(final ResourceKey resourceKey, final TypeToken keyType, final TypeToken valueType) { return Key.builder().key(resourceKey).mapElementType(keyType, valueType).build(); } private static Key> weightedKey(final ResourceKey resourceKey, final Class elementType) { return Key.builder().key(resourceKey).weightedCollectionElementType(elementType).build(); } private static Key> weightedKey(final ResourceKey resourceKey, final TypeToken elementType) { return Key.builder().key(resourceKey).weightedCollectionElementType(elementType).build(); } private Keys() { } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy