Protected
constructorReadonly
idIdentifier of the dimension.
This property can throw when used.
Beta
Optional
options: EntityQueryOptionsAdditional options that can be used to filter the set of entities returned.
An entity array.
Returns a set of entities based on a set of conditions defined via the EntityQueryOptions set of filter criteria.
This function can throw errors.
testThatEntityIsFeatherItem.ts
const query = {
type: "item",
location: targetLocation,
};
const items = overworld.getEntities(query);
for (const item of items) {
const itemComp = item.getComponent("item") as any;
if (itemComp) {
if (itemComp.itemStack.id.endsWith("feather")) {
console.log("Success! Found a feather", 1);
}
}
}
Beta
Optional
options: EntityQueryOptionsAdditional options that can be used to filter the set of players returned.
A player array.
Returns a set of players based on a set of conditions defined via the EntityQueryOptions set of filter criteria.
This function can throw errors.
Command to run. Note that command strings should not start with slash.
For commands that return data, returns a CommandResult with an indicator of command results.
Runs a particular command asynchronously from the context of the broader dimension. Note that there is a maximum queue of 128 asynchronous commands that can be run in a given tick.
This function can throw errors.
A class that represents a particular dimension (e.g., The End) within a world.