Interface Locatable

All Known Subinterfaces:
Aerial, Ageable, Agent, Ambient, Animal, Aquatic, AreaEffectCloud, ArmorStand, Arrow, ArrowEntity, Axolotl, Banner, Barrel, Bat, Beacon, Bed, Bee, Beehive, Bell, BlastFurnace, Blaze, BlockCarrier, BlockEntity, BlockOccupiedMinecart, Boat, Boss, BrewingStand, Campfire, CarrierBlockEntity, CarrierMinecart<M>, Cat, CaveSpider, Chest, ChestMinecart, Chicken, ClientPlayer, Cod, CommandBlock, CommandBlockMinecart, Comparator, ComplexLiving<T>, ComplexLivingPart<P>, Conduit, Cow, Creature, Creeper, DamagingProjectile, DaylightDetector, Dispenser, Dolphin, Donkey, DragonFireball, Dropper, Drowned, Egg, ElderGuardian, EnchantmentTable, EndCrystal, EnderChest, EnderDragon, EnderDragonPart, Enderman, Endermite, EnderPearl, EndGateway, EndPortal, Entity, EntityTargetingProjectile, Evoker, EvokerFangs, ExperienceBottle, ExperienceOrb, Explosion, Explosive, ExplosiveFireball, EyeOfEnder, FallingBlock, FireballEntity, FireworkRocket, Fish, FishingBobber, Fox, Furnace, FurnaceBlockEntity, FurnaceMinecart, FusedExplosive, Ghast, Giant, GlowSquid, Goat, Golem, Guardian, Hanging, Hoglin, Hopper, HopperMinecart, Horse, HorseLike, Hostile, Human, Humanoid, Husk, Illager, Illusioner, IronGolem, Item, ItemFrame, Jigsaw, Jukebox, LeashKnot, Lectern, LightningBolt, Living, Llama, LlamaLike, LlamaSpit, LocalPlayer, LocatableBlock, MagmaCube, Marker, Merchant, Minecart, MinecartLike, MobSpawner, Monster, Mooshroom, Mule, MultiBlockCarrier, NameableBlockEntity, NameableCarrierBlockEntity, Ocelot, PackHorse, Painting, Panda, Parrot, Patroller, Phantom, Pig, Piglin, PiglinBrute, PiglinLike, Pillager, Piston, Player, PolarBear, Potion, PrimedTNT, Projectile, Pufferfish, Rabbit, Raider, Ranger, Ravager, RemotePlayer, Salmon, ScheduledUpdate<T>, SchoolingFish, ServerPlayer, Sheep, Shulker, ShulkerBox, ShulkerBullet, Sign, Silverfish, SingleBlockCarrier, Sittable, Skeleton, SkeletonHorse, SkeletonLike, Skull, Slime, SmallFireball, Smoker, Snowball, SnowGolem, SpawnerMinecart, SpectralArrow, Spellcaster, Spider, Squid, Stray, Strider, StructureBlock, TameableAnimal, TameableHorse, TNTMinecart, Trader, TraderLlama, TrappedChest, Trident, TropicalFish, Turtle, Vehicle, Vex, Villager, Vindicator, WanderingTrader, WeatherEffect, Witch, Wither, WitherSkeleton, WitherSkull, Wolf, Zoglin, Zombie, ZombieHorse, ZombieLike, ZombieVillager, ZombifiedPiglin

public interface Locatable
Represents anything with a location.
  • Method Details

    • world

      World<?,​?> world()
      Gets the World.
      Returns:
      The World
    • location

      Location<?,​?> location()
      Gets the location of the source.
      Returns:
      The location
    • serverLocation

      default ServerLocation serverLocation()
      Gets the location of the source as a ServerLocation.

      For ease of use, we provide this as a quick way to not have to map out the optional in Location. Calling this when the source is not on the Server will result in a hard crash, do so at your own peril.

      Returns:
      The location
    • blockPosition

      default Vector3i blockPosition()