Interface in @minecraft/server
Extended by DimensionLocation
A position or direction in the world.
import type { Vector3 } from '@minecraft/server';Example
Section titled “Example”import { world, type Vector3 } from '@minecraft/server';
const vector3: Vector3 = world.getDefaultSpawnLocation();console.log(vector3.x);import { world } from '@minecraft/server';
const vector3 = world.getDefaultSpawnLocation();console.log(vector3.x);Properties
Section titled “Properties”x: number;y: number;z: number;Used by
Section titled “Used by”EntityFilterOptions.location, TeleportOptions.facingLocation, ItemStack.getDynamicProperty, ItemStack.setDynamicProperty, ItemStack.setDynamicProperties, BlockVolume.constructor, BlockVolume.from, BlockVolume.to, BlockVolume.getMax, BlockVolume.getMin, BlockVolume.getSpan, BlockVolume.isInside, BlockVolume.translate, Block.location, Block.offset, Block.center, Block.bottomCenter, Block.getDynamicProperty, Block.setDynamicProperty, Block.setDynamicProperties, ContainerSlot.getDynamicProperty, ContainerSlot.setDynamicProperty, ContainerSlot.setDynamicProperties, Seat.position and 116 more