Package org.spongepowered.api.world
Interface Locatable
- All Known Subinterfaces:
AcceleratingProjectile
,Aerial
,Ageable
,Agent
,Allay
,Ambient
,Angerable
,Animal
,Aquatic
,AreaEffectCloud
,Armadillo
,ArmorStand
,Arrow
,ArrowLike
,Attackable
,Axolotl
,Banner
,Barrel
,Bat
,Beacon
,Bed
,Bee
,Beehive
,Bell
,BlastFurnace
,Blaze
,BlockCarrier
,BlockDisplay
,BlockEntity
,BlockOccupiedMinecart
,Boat
,Bogged
,Boss
,Breedable
,Breeze
,BreezeWindCharge
,BrewingStand
,Camel
,Campfire
,CarrierBlockEntity
,CarrierMinecart<M>
,Cat
,CaveSpider
,Chargeable
,Chest
,ChestBoat
,ChestMinecart
,Chicken
,ClientPlayer
,Cod
,CommandBlock
,CommandBlockMinecart
,Comparator
,ComplexLiving<T>
,ComplexLivingPart<P>
,Conduit
,Cow
,Crafter
,Creaking
,CreakingHeart
,Creeper
,DaylightDetector
,DecoratedPot
,Dispenser
,DisplayEntity
,Dolphin
,Donkey
,DragonFireball
,Dropper
,Drowned
,Egg
,ElderGuardian
,EnchantmentTable
,EndCrystal
,EnderChest
,EnderDragon
,EnderDragonPart
,Enderman
,Endermite
,EnderPearl
,EndGateway
,EndPortal
,Entity
,Evoker
,EvokerFangs
,ExperienceBottle
,ExperienceOrb
,Explosion
,Explosive
,ExplosiveFireball
,EyeOfEnder
,FallingBlock
,FireworkRocket
,Fish
,FishingBobber
,Fox
,Frog
,Furnace
,FurnaceBlockEntity
,FurnaceMinecart
,FusedExplosive
,Ghast
,Giant
,GlowItemFrame
,GlowSquid
,Goat
,Golem
,Guardian
,Hanging
,Hoglin
,Hopper
,HopperMinecart
,Horse
,HorseLike
,Hostile
,Human
,Humanoid
,Husk
,IgnitingProjectile
,Illager
,Illusioner
,Interaction
,IronGolem
,Item
,ItemDisplay
,ItemFrame
,ItemRepresentable
,Jigsaw
,Jukebox
,Leashable
,LeashKnot
,Lectern
,LightningBolt
,Living
,Llama
,LlamaSpit
,LocalPlayer
,LocatableBlock
,MagmaCube
,Marker
,Merchant
,Minecart
,MinecartLike
,MobSpawner
,Monster
,Mooshroom
,Mule
,MultiBlockCarrier
,NameableBlockEntity
,NameableCarrierBlockEntity
,Ocelot
,OminousItemSpawner
,Ownable
,PackHorse
,Painting
,Panda
,Parrot
,PathfinderAgent
,Patroller
,Phantom
,Pig
,Piglin
,PiglinBrute
,PiglinLike
,Pillager
,Piston
,Player
,PolarBear
,Potion
,PrimedTNT
,Projectile
,Pufferfish
,Rabbit
,Raft
,Raider
,RangedAgent
,Ranger
,Ravager
,RemotePlayer
,Saddleable
,Salmon
,ScheduledUpdate<T>
,SchoolingFish
,SculkSensor
,ServerPlayer
,Sheep
,Shulker
,ShulkerBox
,ShulkerBullet
,Sign
,Silverfish
,SingleBlockCarrier
,Sittable
,Skeleton
,SkeletonHorse
,SkeletonLike
,Skull
,Slime
,SmallFireball
,Smoker
,Sniffer
,Snowball
,SnowGolem
,SpawnerMinecart
,SpectralArrow
,Spellcaster
,Spider
,Squid
,Stray
,Strider
,StructureBlock
,Tadpole
,TameableAnimal
,Targeting
,TextDisplay
,ThrowableItemProjectile
,TNTMinecart
,TraderLlama
,TrappedChest
,TrialSpawner
,Trident
,TropicalFish
,Turtle
,Vehicle
,Vex
,Villager
,VillagerLike
,Vindicator
,WanderingTrader
,Warden
,WindCharge
,WindChargeLike
,Witch
,Wither
,WitherSkeleton
,WitherSkull
,Wolf
,Zoglin
,Zombie
,ZombieHorse
,ZombieVillager
,ZombifiedPiglin
public interface Locatable
Represents anything with a location.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Vector3i
Location
<?, ?> location()
Gets the location of the source.default ServerLocation
Gets the location of the source as aServerLocation
.World
<?, ?> world()
Gets theWorld
.
-
Method Details
-
world
World<?,?> world()Gets theWorld
.- Returns:
- The World
-
location
Location<?,?> location()Gets the location of the source.- Returns:
- The location
-
serverLocation
Gets the location of the source as aServerLocation
.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 theServer
will result in a hard crash, do so at your own peril.- Returns:
- The location
-
blockPosition
-