Module
@ember/types
The types the other modules share, such as Player and ItemStack. Require it to name them in annotations: local types = require("@ember/types"), then types.Player.
local types = require("@ember/types")Types
- types.BlockA block as it stands in the world.
- types.BlockTypeHandleA block type or block tag;
blocks.BlockTypetypes it with its state and data. - types.BlockUseEventA player right-clicking a block of a custom type.
- types.BreakEventA player breaking a block.
- types.ChunkThe chunk being generated: 16 by 16 columns from
minYup tomaxY. - types.ConnectionReturned by
connect; disconnecting twice does nothing. - types.ConsumeEventEating or drinking an item declared
consumable. - types.EntityAn entity a script spawned.
- types.EntityClickEventA player right-clicking or hitting an entity.
- types.EntryOne player's place on a leaderboard.
- types.FaceA block face or a horizontal direction.
- types.FollowOptionsHow an entity follows its target.
- types.GameModeA player's game mode.
- types.HandThe hand an item is used from: the selected hotbar slot, or the offhand.
- types.HurtEventA player about to be hurt.
- types.ImageTypeA font image from
content.image. - types.InteractEventA player using a block of the map: opening, pressing or editing it.
- types.InterceptRuns while the action is happening, before it takes effect.
- types.ItemChangesWhat
items.createandItemStack:withset; a field left nil keeps what the stack has. - types.ItemFieldA field
ItemStack:withoutputs back to the item's own. - types.ItemStackA stack of items.
- types.ItemTypeSignals that fire only for stacks of one item type, or of any type in an item tag.
- types.LeaderboardA leaderboard that keeps each player's best score, shared by every instance of the experience.
- types.LeaderboardOptionsHow a leaderboard ranks.
- types.LookWhich way something faces, in degrees.
- types.MarkerA named point placed in the map.
- types.MiniMessageMiniMessage text such as
"<red>hi</red>", at most 4096 characters. - types.MobTypeA mob type from
content.mob. - types.NoiseSeeded value noise in [-1, 1].
- types.PlaceEventA player placing a block.
- types.PlayerA player in this instance.
- types.PlayerInventoryA player's inventory.
- types.PlaytimeA player's time in this experience on its live servers, read when
playtimeis; playtests and local runs count nothing before this visit. - types.RandomA seeded random stream from
Chunk:random. - types.RegionA region of the world.
- types.ShapeAn area of the world.
- types.SignalHandlers run in the script's slot of the tick after the event, and may yield.
- types.SlotNameA slot outside the rows: the armour slots and the offhand.
- types.SlotRowA row of inventory slots:
"hotbar"has 9,"main"the 27 above it. - types.SortOrderWhich scores rank first.
- types.StateValueA boolean property is a boolean, a range a number, and a list of names a string.
- types.StructureA structure to paste with
world.paste: blocks in a frame, facing the way they were captured. - types.TimeOptionsHow
world.setTimesets the clock. - types.TitleOptionsHow a title shows.
- types.UseEventA player right-clicking with an item type, in the air or on a block.
- types.WeatherThe sky over the world.
- types.WeatherOptionsHow
world.setWeatherchanges the sky.