All functions
Generated
This page is generated from the source's Javadoc by ./gradlew apiReference. Do not edit it; fix the source comment and generate it again.
Every public constructor and method of the API in one list, by package: what it returns, the first sentence of its description, and the release that added it. The name links to its full entry: signature, every parameter, the return value, the exceptions, when to call it and on which thread.
client
| Function | Returns | Description | Since |
|---|---|---|---|
BlockEntityCanvas.animationTime() | float | World time plus the partial tick, for smooth animation. | 0.1.0-alpha.4 or earlier |
BlockEntityCanvas.block(BlockStateView, double, double, double, float, float) | void | Draws the block model of state, for example a lamp that is lit, placed like block(ResourceId, double, double, double, float, float). | 0.1.0-alpha.4 or earlier |
BlockEntityCanvas.block(ResourceId, double, double, double, float, float) | void | Draws the block model of block's default state, centred on x, y, z and turned yawDegrees around the vertical axis; scale 1 is full block size. | 0.1.0-alpha.4 or earlier |
BlockEntityCanvas.defaultState(ResourceId) | BlockStateView | The default state of block, to change with BlockStateView.with and draw with block(BlockStateView, double, double, double, float, float). | 0.1.0-alpha.4 or earlier |
BlockEntityCanvas.item(ResourceId, double, double, double, float, float) | void | Draws an item as in an item frame. | 0.1.0-alpha.4 or earlier |
BlockEntityCanvas.quads(ShaderPipeline, Consumer<VertexSink>) | void | Quads drawn with a mod shader pipeline, four vertices per quad, in the same coordinates as the other draws (the block's lowest corner is 0, 0, 0). | 0.1.0-alpha.4 or earlier |
BlockEntityCanvas.text(String, double, double, double, float, int) | void | Draws text centred at the position, facing the camera. | 0.1.0-alpha.4 or earlier |
BlockEntityPainter.paint(BlockEntityView, BlockEntityCanvas) | void | Draws for one block entity; canvas is placed at the block's lowest corner. | 0.1.0-alpha.4 or earlier |
ClientConnectionListener.onConnection(ClientView) | void | Called on the client thread when the client joins or leaves a world. | 0.1.0-alpha.4 or earlier |
ClientRegistrar.blockEntityRenderer(ResourceId, BlockEntityPainter) | void | Draws extra things for a mod block that has a block entity. | 0.1.0-alpha.4 or earlier |
ClientRegistrar.dynamicTexture(String, int, int) | DynamicTexture | Declares a texture with pixels set by code, <mod id>:dynamic/<path>. | 0.1.0-alpha.4 or earlier |
ClientRegistrar.hudLayer(String, HudLayer) | void | Adds a layer drawn over the game's HUD every frame, after the game's own layers, in registration order. | 0.1.0-alpha.4 or earlier |
ClientRegistrar.keyBinding(String, int) | KeyBinding | Declares a key binding that players can rebind in Controls. | 0.1.0-alpha.4 or earlier |
ClientRegistrar.shaderPipeline(String, ShaderPipelineDefinition) | ShaderPipeline | Declares render pipeline <mod id>:<path> using the mod's own core shader, for WorldCanvas.quads and BlockEntityCanvas.quads. | 0.1.0-alpha.4 or earlier |
ClientRegistrar.worldPainter(String, WorldPainter) | void | Draws in the world every frame with painter. | 0.1.0-alpha.4 or earlier |
ClientTickListener.onClientTick(ClientView) | void | Called at the end of each client tick. | 0.1.0-alpha.4 or earlier |
ClientView.cameraPerspective() | CameraPerspective | The camera perspective. | 0.1.0-alpha.4 or earlier |
ClientView.clearPostEffect() | void | Removes the post effect. | 0.1.0-alpha.4 or earlier |
ClientView.closeScreen() | void | Closes the open screen, if any, returning to the game. | 0.1.0-alpha.4 or earlier |
ClientView.isScreenOpen() | boolean | Whether any screen (menu, inventory, chat, mod screen) is open. | 0.1.0-alpha.4 or earlier |
ClientView.leaveWorld() | void | Leaves the world like "Save and Quit to Title" (single player) or "Disconnect" (servers). | 0.1.0-alpha.4 or earlier |
ClientView.openScreen(ModScreen) | void | Opens screen, replacing any open screen. | 0.1.0-alpha.4 or earlier |
ClientView.player() | Optional<PlayerView> | The local player, when in a world. | 0.1.0-alpha.4 or earlier |
ClientView.postEffect() | Optional<ResourceId> | The active post effect, if any. | 0.1.0-alpha.4 or earlier |
ClientView.setCameraPerspective(CameraPerspective) | void | Changes the camera perspective, as F5 does. | 0.1.0-alpha.4 or earlier |
ClientView.setPostEffect(ResourceId) | boolean | Applies a full-screen post effect from assets/<namespace>/post_effect/<path>.json, with its shaders, until cleared. | 0.1.0-alpha.4 or earlier |
ClientView.showActionBar(String) | void | Shows a message above the hotbar (the action bar). | 0.1.0-alpha.4 or earlier |
ClientView.world() | Optional<WorldView> | The client's copy of the current world, when in one. | 0.1.0-alpha.4 or earlier |
DynamicTexture.fill(int) | void | Sets every pixel. | 0.1.0-alpha.4 or earlier |
DynamicTexture.height() | int | Height in pixels. | 0.1.0-alpha.4 or earlier |
DynamicTexture.id() | ResourceId | The texture's ID, <mod id>:dynamic/<path>. | 0.1.0-alpha.4 or earlier |
DynamicTexture.setPixel(int, int, int) | void | Sets one pixel, 0xAARRGGBB. | 0.1.0-alpha.4 or earlier |
DynamicTexture.upload() | void | Sends the pixels to the graphics card. | 0.1.0-alpha.4 or earlier |
DynamicTexture.width() | int | Width in pixels. | 0.1.0-alpha.4 or earlier |
FovModifier.modifyFov(float) | float | Returns the field of view in degrees to use instead of fov; listeners chain. | 0.1.0-alpha.4 or earlier |
HudCanvas.drawText(String, int, int, int) | void | Draws text with a shadow. | 0.1.0-alpha.4 or earlier |
HudCanvas.drawTexture(ResourceId, int, int, int, int) | void | Draws a whole texture, such as my_mod:textures/gui/icon.png or a DynamicTexture, stretched to width × height. | 0.1.0-alpha.4 or earlier |
HudCanvas.fill(int, int, int, int, int) | void | Fills the rectangle from (x1, y1) inclusive to (x2, y2) exclusive. | 0.1.0-alpha.4 or earlier |
HudCanvas.height() | int | Height of the screen in GUI pixels. | 0.1.0-alpha.4 or earlier |
HudCanvas.textWidth(String) | int | Width of text in the game font. | 0.1.0-alpha.4 or earlier |
HudCanvas.width() | int | Width of the screen in GUI pixels. | 0.1.0-alpha.4 or earlier |
HudLayer.render(HudCanvas) | void | Draws the layer. | 0.1.0-alpha.4 or earlier |
ItemTooltipListener.onItemTooltip(ItemStackRef, TooltipLines, boolean) | void | Called on the client thread whenever the game builds an item's tooltip (every frame the tooltip is shown, and for the creative search), after the game's own lines. | 0.1.0-alpha.4 or earlier |
KeyBinding.consumeClick() | boolean | Returns true once per press since the last call, so no press is lost between ticks. | 0.1.0-alpha.4 or earlier |
KeyBinding.id() | ResourceId | The binding's ID. | 0.1.0-alpha.4 or earlier |
KeyBinding.isDown() | boolean | Whether the key is held now. | 0.1.0-alpha.4 or earlier |
ModScreen.init(ScreenBuilder) | void | Places widgets. | 0.1.0-alpha.4 or earlier |
ModScreen.onClosed() | void | The screen was closed, by the player (Esc) or by code. | 0.1.0-alpha.4 or earlier |
ModScreen.pausesGame() | boolean | Whether the game pauses while the screen is open (single player only). | 0.1.0-alpha.4 or earlier |
ModScreen.render(HudCanvas) | void | Draws extra content every frame, above the background and below the widgets. | 0.1.0-alpha.4 or earlier |
ModScreen.title() | String | Title used for narration and the window title. | 0.1.0-alpha.4 or earlier |
ScreenBuilder.button(String, int, int, int, int, Runnable) | void | A clickable button; onPress runs on the client thread. | 0.1.0-alpha.4 or earlier |
ScreenBuilder.close() | void | Closes this screen. | 0.1.0-alpha.4 or earlier |
ScreenBuilder.height() | int | Screen height. | 0.1.0-alpha.4 or earlier |
ScreenBuilder.label(String, int, int, int) | void | Text drawn every frame. | 0.1.0-alpha.4 or earlier |
ScreenBuilder.textInput(int, int, int, String) | TextInput | A single-line text input, 20 pixels high. | 0.1.0-alpha.4 or earlier |
ScreenBuilder.textWidth(String) | int | Width of text in the game font. | 0.1.0-alpha.4 or earlier |
ScreenBuilder.width() | int | Screen width. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.Builder.blend(ShaderPipelineDefinition.Blend) | ShaderPipelineDefinition.Builder | How colours mix; Blend.TRANSLUCENT by default. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.Builder.build() | ShaderPipelineDefinition | Creates the definition. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.Builder.cull() | ShaderPipelineDefinition.Builder | Skips quads facing away from the camera. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.Builder.depthWrite() | ShaderPipelineDefinition.Builder | The quads hide what is drawn behind them later, like solid geometry. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.Builder.noDepthTest() | ShaderPipelineDefinition.Builder | Draws the quads in front of blocks. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.Builder.texture(ResourceId) | ShaderPipelineDefinition.Builder | Binds a texture as the next sampler: the first call is Sampler0. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.Builder.uniform(String, ShaderUniform.Type, ShaderUniform.Source) | ShaderPipelineDefinition.Builder | Adds a field to the pipeline's ModUniforms block, after the ones added before. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.ShaderPipelineDefinition(ResourceId, ShaderPipelineDefinition.Blend, boolean, boolean, boolean) | new instance | A pipeline without textures or mod uniforms. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.ShaderPipelineDefinition(ResourceId, ShaderPipelineDefinition.Blend, boolean, boolean, boolean, List<ResourceId>, List<ShaderUniform>) | new instance | Validates the definition. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.builder(ResourceId) | ShaderPipelineDefinition.Builder | A translucent, double-sided pipeline that blocks hide and that hides nothing. | 0.1.0-alpha.4 or earlier |
ShaderPipelineDefinition.textured() | boolean | Whether the vertices carry texture coordinates (UV0). | 0.1.0-alpha.4 or earlier |
ShaderUniform.Source.values() | float[] | The value: exactly Type.components() floats. | 0.1.0-alpha.4 or earlier |
ShaderUniform.Type.components() | int | How many floats Source.values() must return. | 0.1.0-alpha.4 or earlier |
TextInput.setValue(String) | void | Replaces the text. | 0.1.0-alpha.4 or earlier |
TextInput.value() | String | The current text. | 0.1.0-alpha.4 or earlier |
TooltipLines.add(String) | void | Adds a line at the end. | 0.1.0-alpha.4 or earlier |
TooltipLines.add(int, String) | void | Inserts a line before line index; size() appends. | 0.1.0-alpha.4 or earlier |
TooltipLines.get(int) | String | The text of line index without formatting. | 0.1.0-alpha.4 or earlier |
TooltipLines.remove(int) | void | Removes line index. | 0.1.0-alpha.4 or earlier |
TooltipLines.size() | int | Number of lines, the name included. | 0.1.0-alpha.4 or earlier |
VertexSink.vertex(double, double, double, float, float, int) | VertexSink | Adds a vertex with a texture coordinate and a colour 0xAARRGGBB; the shader receives them as Position, UV0 and Color. | 0.1.0-alpha.4 or earlier |
VertexSink.vertex(double, double, double, int) | VertexSink | Adds a vertex with a colour 0xAARRGGBB and texture coordinate (0, 0). | 0.1.0-alpha.4 or earlier |
WorldCanvas.animationTime() | float | Game time in ticks plus the partial tick, for smooth animation. | 0.1.0-alpha.4 or earlier |
WorldCanvas.blockOutline(BlockPos, int, float) | void | The edges of one block. | 0.1.0-alpha.4 or earlier |
WorldCanvas.box(double, double, double, double, double, double, int, float, int) | void | A box between two corners: its edges in strokeArgb (width pixels wide) and its faces filled with fillArgb; pass 0 for either to leave it out. | 0.1.0-alpha.4 or earlier |
WorldCanvas.cameraX() | double | Camera x this frame. | 0.1.0-alpha.4 or earlier |
WorldCanvas.cameraY() | double | Camera y this frame. | 0.1.0-alpha.4 or earlier |
WorldCanvas.cameraZ() | double | Camera z this frame. | 0.1.0-alpha.4 or earlier |
WorldCanvas.line(double, double, double, double, double, double, int, float) | void | A line from one point to another, width pixels wide. | 0.1.0-alpha.4 or earlier |
WorldCanvas.onTop() | WorldCanvas | This canvas, drawing lines, boxes, points and text in front of blocks. | 0.1.0-alpha.4 or earlier |
WorldCanvas.point(double, double, double, int, float) | void | A square dot size pixels wide. | 0.1.0-alpha.4 or earlier |
WorldCanvas.quads(ShaderPipeline, Consumer<VertexSink>) | void | Quads drawn with a mod shader pipeline: four vertices per quad, in world coordinates. | 0.1.0-alpha.4 or earlier |
WorldCanvas.text(String, double, double, double, int, float) | void | Text facing the camera, centred on the point; scale 1 is the game's label size. | 0.1.0-alpha.4 or earlier |
WorldPainter.paint(WorldCanvas) | void | Draws this frame's shapes on canvas. | 0.1.0-alpha.4 or earlier |
command
| Function | Returns | Description | Since |
|---|---|---|---|
ArgumentCommand.type() | CommandArgumentType | What the argument accepts. | 0.1.0-alpha.4 or earlier |
CommandAction.run(CommandContext) | int | Runs the command. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.blockPos() | CommandArgumentType | Block coordinates. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.bool() | CommandArgumentType | true or false. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.decimal() | CommandArgumentType | Any decimal number. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.greedyString() | CommandArgumentType | The rest of the command line. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.integer() | CommandArgumentType | Any whole number. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.integer(int, int) | CommandArgumentType | A whole number in [min, max]. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.player() | CommandArgumentType | One online player. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.string() | CommandArgumentType | A word or quoted text. | 0.1.0-alpha.4 or earlier |
CommandArgumentType.word() | CommandArgumentType | A single word. | 0.1.0-alpha.4 or earlier |
CommandContext.getBlockPos(String) | BlockPos | Value of a CommandArgumentType.blockPos() argument, resolved against the source. | 0.1.0-alpha.4 or earlier |
CommandContext.getBoolean(String) | boolean | Value of a CommandArgumentType.bool() argument. | 0.1.0-alpha.4 or earlier |
CommandContext.getDouble(String) | double | Value of a CommandArgumentType.decimal() argument. | 0.1.0-alpha.4 or earlier |
CommandContext.getInteger(String) | int | Value of an CommandArgumentType.integer() argument. | 0.1.0-alpha.4 or earlier |
CommandContext.getPlayer(String) | PlayerView | Value of a CommandArgumentType.player() argument. | 0.1.0-alpha.4 or earlier |
CommandContext.getString(String) | String | Value of a text argument. | 0.1.0-alpha.4 or earlier |
CommandContext.source() | CommandSource | Who ran the command. | 0.1.0-alpha.4 or earlier |
CommandFailure.CommandFailure(String) | new instance | Creates a failure with the message shown to the user. | 0.1.0-alpha.4 or earlier |
CommandNode.action() | Optional<CommandAction> | The action run when the command ends here. | 0.1.0-alpha.4 or earlier |
CommandNode.argument(String, CommandArgumentType) | ArgumentCommand | A typed value; read it in actions with context.get*(name). | 0.1.0-alpha.4 or earlier |
CommandNode.children() | List<CommandNode<?>> | Child nodes in registration order. | 0.1.0-alpha.4 or earlier |
CommandNode.executes(CommandAction) | N | Lets the command end at this node and run action. | 0.1.0-alpha.4 or earlier |
CommandNode.literal(String) | LiteralCommand | A fixed word, for example /hello. | 0.1.0-alpha.4 or earlier |
CommandNode.name() | String | The word or argument name. | 0.1.0-alpha.4 or earlier |
CommandNode.permissionLevel() | int | Required permission level, 0–4. | 0.1.0-alpha.4 or earlier |
CommandNode.permissionNode() | Optional<PermissionNode> | The required named permission, if any (checked in addition to the level). | 0.1.0-alpha.4 or earlier |
CommandNode.requiresPermission(PermissionNode) | N | Only sources that have node can see and run this node. | 0.1.0-alpha.4 or earlier |
CommandNode.requiresPermission(int) | N | Only sources with at least this permission level can see and run this node: 0 everyone, 2 game masters (command blocks, operators), 4 server owners. | 0.1.0-alpha.4 or earlier |
CommandNode.then(CommandNode<?>) | N | Adds a child that may follow this node. | 0.1.0-alpha.4 or earlier |
CommandRegistrar.register(LiteralCommand) | void | Registers a top-level command. | 0.1.0-alpha.4 or earlier |
CommandSource.blockPos() | BlockPos | The block position the command runs at. | 0.1.0-alpha.4 or earlier |
CommandSource.hasPermission(PermissionNode) | boolean | Whether the source has the permission: for players as PlayerView.hasPermission; for the console, command blocks, and functions by the node's default level. | 0.1.0-alpha.4 or earlier |
CommandSource.hasPermission(int) | boolean | Whether the source has at least permission level (0–4). | 0.1.0-alpha.4 or earlier |
CommandSource.name() | String | Display name, for example a player name or Server. | 0.1.0-alpha.4 or earlier |
CommandSource.player() | Optional<PlayerView> | The player who ran the command, if a player did. | 0.1.0-alpha.4 or earlier |
CommandSource.sendFailure(String) | void | Sends an error message (shown in red to players). | 0.1.0-alpha.4 or earlier |
CommandSource.sendMessage(String) | void | Sends feedback text to the source. | 0.1.0-alpha.4 or earlier |
CommandSource.world() | WorldView | The world the command runs in. | 0.1.0-alpha.4 or earlier |
content
| Function | Returns | Description | Since |
|---|---|---|---|
AdvancementTrigger.id() | ResourceId | The trigger ID used in advancement files. | 0.1.0-alpha.4 or earlier |
AdvancementTrigger.trigger(PlayerView) | void | Meets every criterion with this trigger for player. | 0.1.0-alpha.4 or earlier |
ContentHandle.id() | ResourceId | The content's ID, <mod id>:<path>. | 0.1.0-alpha.4 or earlier |
ContentHandle.isRegistered() | boolean | Whether the game has created and registered the content yet. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.addToTag(TagKey, ResourceId[]) | void | Adds entries to a tag of any namespace, as a tag file with "replace": false in the mod jar would; Poly Mod Loader writes them to its generated data pack. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.advancementTrigger(String) | AdvancementTrigger | Declares an advancement criterion trigger <mod id>:<path>. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.block(String, BlockDefinition) | BlockHandle | Declares a block; unless the definition says otherwise, a block item with the same ID is declared too. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.booleanRule(String, boolean, GameRuleCategory) | GameRuleKey<Boolean> | Declares a boolean game rule. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.creativeTab(String, CreativeTabDefinition) | ContentHandle | Declares a creative inventory tab <mod id>:<path>, titled by the translation of itemGroup.<mod id>.<path>. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.effect(String, EffectDefinition) | EffectHandle | Declares a status effect usable with /effect and LivingEntityView.addEffect. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.entity(String, EntityDefinition) | EntityHandle | Declares a mob type; with spawnEgg also an item <path>_spawn_egg. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.entityData(String, EntityDataOptions) | EntityDataKey | Declares data that entities carry, with synchronisation and version options. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.entityData(String, boolean) | EntityDataKey | Declares data that entities carry; see EntityDataKey. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.integerRule(String, int, int, int, GameRuleCategory) | GameRuleKey<Integer> | Declares an integer game rule limited to [min, max]. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.item(String, ItemDefinition) | ItemHandle | Declares an item. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.itemComponent(String, ComponentType<T>) | ItemComponentKey<T> | Declares a data component that item stacks can carry. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.particle(String, ParticleDefinition) | ContentHandle | Declares a particle type, spawnable with WorldView.spawnParticles and /particle. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.projectile(String, ProjectileDefinition) | EntityHandle | Declares a thrown projectile type. | 0.1.0-alpha.4 or earlier |
ContentRegistrar.sound(String) | SoundHandle | Declares a sound event. | 0.1.0-alpha.4 or earlier |
CreativeTabDefinition.Builder.build() | CreativeTabDefinition | Builds the definition. | 0.1.0-alpha.4 or earlier |
CreativeTabDefinition.Builder.entries(ResourceId[]) | CreativeTabDefinition.Builder | Adds items to the end of the tab, in order. | 0.1.0-alpha.4 or earlier |
CreativeTabDefinition.Builder.entry(ResourceId) | CreativeTabDefinition.Builder | Adds an item to the end of the tab. | 0.1.0-alpha.4 or earlier |
CreativeTabDefinition.Builder.icon(ResourceId) | CreativeTabDefinition.Builder | Sets the item shown on the tab. | 0.1.0-alpha.4 or earlier |
CreativeTabDefinition.builder() | CreativeTabDefinition.Builder | A builder for a tab without entries yet. | 0.1.0-alpha.4 or earlier |
CreativeTabDefinition.iconOrFirstEntry() | ResourceId | The icon: the declared one or the first entry. | 0.1.0-alpha.4 or earlier |
EntityDataKey.syncToOwner() | boolean | Whether a player's own client receives the player's data. | 0.1.0-alpha.4 or earlier |
EntityDataOptions.syncedToOwner() | EntityDataOptions | A copy whose data a player's own client receives. | 0.1.0-alpha.4 or earlier |
EntityDataOptions.syncedToTrackers() | EntityDataOptions | A copy whose data every client that can see the entity receives. | 0.1.0-alpha.4 or earlier |
EntityDataOptions.withVersion(int, DataMigration) | EntityDataOptions | A copy with data version value; upgrade converts data saved with an older version. | 0.1.0-alpha.4 or earlier |
content.block
| Function | Returns | Description | Since |
|---|---|---|---|
BlockBehavior.onNeighborChanged(WorldView, BlockPos) | void | A neighbouring block changed (server and client); typical for redstone-like reactions. | 0.1.0-alpha.4 or earlier |
BlockBehavior.onPlaced(WorldView, BlockPos, EntityView) | void | The block was placed by an entity (server and client). | 0.1.0-alpha.4 or earlier |
BlockBehavior.onRandomTick(WorldView, BlockPos) | void | A random tick reached the block (server only, about every 68 seconds per block at the default randomTickSpeed). | 0.1.0-alpha.4 or earlier |
BlockBehavior.onSteppedOn(WorldView, BlockPos, EntityView) | void | An entity walks on top of the block. | 0.1.0-alpha.4 or earlier |
BlockBehavior.onUse(BlockUse) | InteractionResult | A player used the block with an empty hand. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.behavior(BlockBehavior) | BlockDefinition.Builder | Sets the interaction callbacks. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.blockEntity(BlockEntityDefinition) | BlockDefinition.Builder | Gives the block per-position saved state. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.build() | BlockDefinition | Creates the definition; invalid values throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.collisionShape(BlockShape) | BlockDefinition.Builder | What entities collide with, when it differs from shape: a low fence-like box, for example. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.collisionShape(Function<BlockStateView,BlockShape>) | BlockDefinition.Builder | What entities collide with, computed from the state. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.facesPlayerWhenPlaced(BlockProperty.DirectionProperty) | BlockDefinition.Builder | Adds facing as a property and sets it on placement so the block faces the player. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.friction(float) | BlockDefinition.Builder | Sets the friction (0.6 default, 0.98 ice). | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.item(ItemDefinition) | BlockDefinition.Builder | Sets the properties of the block item declared with the block. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.lightLevel(ToIntFunction<BlockStateView>) | BlockDefinition.Builder | Computes the emitted light from each state, for example state -> state.get(LIT) ? 15 : 0. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.lightLevel(int) | BlockDefinition.Builder | Sets the emitted light level, 0–15. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.noCollision() | BlockDefinition.Builder | Entities pass through the block. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.noItem() | BlockDefinition.Builder | Declares no block item. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.noOcclusion() | BlockDefinition.Builder | The block does not hide its neighbours' faces (glass-like blocks). | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.properties(BlockProperty<?>[]) | BlockDefinition.Builder | Adds block state properties; their default values form the default state. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.randomTicks() | BlockDefinition.Builder | The block receives random ticks. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.requiresCorrectTool() | BlockDefinition.Builder | The block drops only when mined with the correct tool. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.shape(BlockShape) | BlockDefinition.Builder | The block's outline and collision: a slab, a post, a pipe. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.shape(Function<BlockStateView,BlockShape>) | BlockDefinition.Builder | The block's outline and collision computed from the state, for example turned with BlockShape.facing by a facing property. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.sound(BlockSound) | BlockDefinition.Builder | Sets the sound type. | 0.1.0-alpha.4 or earlier |
BlockDefinition.Builder.strength(float, float) | BlockDefinition.Builder | Sets hardness and explosion resistance (stone is 1.5 / 6.0). | 0.1.0-alpha.4 or earlier |
BlockDefinition.builder() | BlockDefinition.Builder | A builder with the game's defaults for a plain stone-like block that has a block item. | 0.1.0-alpha.4 or earlier |
BlockShape.box(double, double, double, double, double, double) | BlockShape | One box, in pixels. | 0.1.0-alpha.4 or earlier |
BlockShape.facing(Direction) | BlockShape | This shape, drawn facing north, turned around the block's vertical axis to face facing. | 0.1.0-alpha.4 or earlier |
BlockShape.or(BlockShape) | BlockShape | This shape together with other. | 0.1.0-alpha.4 or earlier |
content.block.entity
| Function | Returns | Description | Since |
|---|---|---|---|
BlockEntityDefinition.Builder.build() | BlockEntityDefinition | Creates the definition. | 0.1.0-alpha.4 or earlier |
BlockEntityDefinition.Builder.dataVersion(int, DataMigration) | BlockEntityDefinition.Builder | Sets the data version; block entities saved with an older one run upgrade on load. | 0.1.0-alpha.4 or earlier |
BlockEntityDefinition.Builder.inventory(int, String) | BlockEntityDefinition.Builder | Adds an inventory of rows × 9 slots with a menu titled title. | 0.1.0-alpha.4 or earlier |
BlockEntityDefinition.Builder.menu(MenuLayout, String) | BlockEntityDefinition.Builder | Adds an inventory with one slot per layout slot, shown in a menu with that layout. | 0.1.0-alpha.4 or earlier |
BlockEntityDefinition.Builder.syncToClients() | BlockEntityDefinition.Builder | Sends data changes to clients when BlockEntityView.markChanged() is called. | 0.1.0-alpha.4 or earlier |
BlockEntityDefinition.Builder.ticker(BlockEntityTicker) | BlockEntityDefinition.Builder | Runs ticker on the server every tick. | 0.1.0-alpha.4 or earlier |
BlockEntityDefinition.builder() | BlockEntityDefinition.Builder | A builder for a block entity with data only. | 0.1.0-alpha.4 or earlier |
BlockEntityDefinition.inventorySize() | int | Number of inventory slots: from the layout, or rows × 9. | 0.1.0-alpha.4 or earlier |
BlockEntityTicker.tick(BlockEntityView) | void | Called on the server thread; entity is valid only during the call. | 0.1.0-alpha.4 or earlier |
BlockEntityView.data() | DataTree | Its saved data; call markChanged() after changing it. | 0.1.0-alpha.4 or earlier |
BlockEntityView.inventory() | Optional<InventoryView> | Its inventory, when the definition has one. | 0.1.0-alpha.4 or earlier |
BlockEntityView.markChanged() | void | Marks the data for saving and, for synchronised block entities, sends it to clients. | 0.1.0-alpha.4 or earlier |
BlockEntityView.pos() | BlockPos | Its position. | 0.1.0-alpha.4 or earlier |
BlockEntityView.world() | WorldView | The world it is in. | 0.1.0-alpha.4 or earlier |
MenuLayout.Builder.background(ResourceId) | MenuLayout.Builder | Draws texture instead of the plain panel. | 0.1.0-alpha.4 or earlier |
MenuLayout.Builder.build() | MenuLayout | Creates the layout; invalid values throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
MenuLayout.Builder.grid(int, int, int, int) | MenuLayout.Builder | Adds a columns × rows grid of slots with 18-pixel spacing. | 0.1.0-alpha.4 or earlier |
MenuLayout.Builder.outputSlot(int, int) | MenuLayout.Builder | Adds a slot players can only take from. | 0.1.0-alpha.4 or earlier |
MenuLayout.Builder.playerInventory(int, int) | MenuLayout.Builder | Moves the player's inventory (default 8, height - 82). | 0.1.0-alpha.4 or earlier |
MenuLayout.Builder.progressBar(int, int, MenuLayout.ProgressStyle, String, String) | MenuLayout.Builder | Adds a progress bar. | 0.1.0-alpha.4 or earlier |
MenuLayout.Builder.slot(int, int) | MenuLayout.Builder | Adds a slot. | 0.1.0-alpha.4 or earlier |
MenuLayout.builder(int, int) | MenuLayout.Builder | A builder for a width × height menu with the inventory at the game's usual place. | 0.1.0-alpha.4 or earlier |
content.block.state
| Function | Returns | Description | Since |
|---|---|---|---|
BlockProperty.BooleanProperty.defaultValue() | Boolean | Value of the block's default state. | 0.1.0-alpha.4 or earlier |
BlockProperty.BooleanProperty.name() | String | Property name used in blockstate files and commands. | 0.1.0-alpha.4 or earlier |
BlockProperty.BooleanProperty.values() | List<Boolean> | Every allowed value, in the game's order. | 0.1.0-alpha.4 or earlier |
BlockProperty.BooleanProperty.withDefault(boolean) | BlockProperty.BooleanProperty | The same property with another default. | 0.1.0-alpha.4 or earlier |
BlockProperty.ChoiceProperty.defaultValue() | String | Value of the block's default state. | 0.1.0-alpha.4 or earlier |
BlockProperty.ChoiceProperty.name() | String | Property name used in blockstate files and commands. | 0.1.0-alpha.4 or earlier |
BlockProperty.ChoiceProperty.values() | List<String> | Every allowed value, in the game's order. | 0.1.0-alpha.4 or earlier |
BlockProperty.ChoiceProperty.withDefault(String) | BlockProperty.ChoiceProperty | The same property with another default. | 0.1.0-alpha.4 or earlier |
BlockProperty.DirectionProperty.defaultValue() | Direction | Value of the block's default state. | 0.1.0-alpha.4 or earlier |
BlockProperty.DirectionProperty.name() | String | Property name used in blockstate files and commands. | 0.1.0-alpha.4 or earlier |
BlockProperty.DirectionProperty.values() | List<Direction> | Every allowed value, in the game's order. | 0.1.0-alpha.4 or earlier |
BlockProperty.DirectionProperty.withDefault(Direction) | BlockProperty.DirectionProperty | The same property with another default. | 0.1.0-alpha.4 or earlier |
BlockProperty.IntegerProperty.defaultValue() | Integer | Value of the block's default state. | 0.1.0-alpha.4 or earlier |
BlockProperty.IntegerProperty.name() | String | Property name used in blockstate files and commands. | 0.1.0-alpha.4 or earlier |
BlockProperty.IntegerProperty.values() | List<Integer> | Every allowed value, in the game's order. | 0.1.0-alpha.4 or earlier |
BlockProperty.IntegerProperty.withDefault(int) | BlockProperty.IntegerProperty | The same property with another default. | 0.1.0-alpha.4 or earlier |
BlockProperty.bool(String) | BlockProperty.BooleanProperty | A true/false property, default false. | 0.1.0-alpha.4 or earlier |
BlockProperty.choice(String, String[]) | BlockProperty.ChoiceProperty | A property with named values, in this order; the first is the default. | 0.1.0-alpha.4 or earlier |
BlockProperty.defaultValue() | T | Value of the block's default state. | 0.1.0-alpha.4 or earlier |
BlockProperty.direction(String) | BlockProperty.DirectionProperty | Any of the six directions, default north. | 0.1.0-alpha.4 or earlier |
BlockProperty.horizontalFacing(String) | BlockProperty.DirectionProperty | A horizontal facing (north, south, west, east), default north. | 0.1.0-alpha.4 or earlier |
BlockProperty.integer(String, int, int) | BlockProperty.IntegerProperty | A whole-number property in [min, max] with 0 <= min < max <= min + 255, default min. | 0.1.0-alpha.4 or earlier |
BlockProperty.name() | String | Property name used in blockstate files and commands. | 0.1.0-alpha.4 or earlier |
BlockProperty.values() | List<T> | Every allowed value, in the game's order. | 0.1.0-alpha.4 or earlier |
BlockStateView.block() | ResourceId | The block, for example minecraft:furnace. | 0.1.0-alpha.4 or earlier |
BlockStateView.find(BlockProperty<T>) | Optional<T> | The property's value, or empty when the block has no such property. | 0.1.0-alpha.4 or earlier |
BlockStateView.get(BlockProperty<T>) | T | The property's value. | 0.1.0-alpha.4 or earlier |
BlockStateView.has(BlockProperty<?>) | boolean | Whether the block has a property with this name and value type. | 0.1.0-alpha.4 or earlier |
BlockStateView.with(BlockProperty<T>, T) | BlockStateView | This state with one property changed; this snapshot stays as it is. | 0.1.0-alpha.4 or earlier |
content.effect
| Function | Returns | Description | Since |
|---|---|---|---|
EffectBehavior.onTick(LivingEntityView, int) | void | Called on the server every tickInterval ticks while the entity has the effect. | 0.1.0-alpha.4 or earlier |
content.entity
| Function | Returns | Description | Since |
|---|---|---|---|
AiGoal.canStart(MobView) | boolean | Whether the goal should start now. | 0.1.0-alpha.4 or earlier |
AiGoal.controls() | Set<GoalControl> | The controls this goal needs while it runs; default GoalControl.MOVE. | 0.1.0-alpha.4 or earlier |
AiGoal.shouldContinue(MobView) | boolean | Whether a running goal keeps running; default canStart. | 0.1.0-alpha.4 or earlier |
AiGoal.start(MobView) | void | The goal started. | 0.1.0-alpha.4 or earlier |
AiGoal.stop(MobView) | void | The goal stopped or was interrupted. | 0.1.0-alpha.4 or earlier |
AiGoal.tick(MobView) | void | Every tick while running. | 0.1.0-alpha.4 or earlier |
EntityBehavior.onInteract(EntityInteraction) | InteractionResult | A player used the mob (both sides; check world().isClientSide()). | 0.1.0-alpha.4 or earlier |
EntityBehavior.onServerTick(LivingEntityView) | void | Every server tick while the mob is alive. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.attackPlayers(double) | EntityDefinition.Builder | The mob chases and hits players for damage. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.behavior(EntityBehavior) | EntityDefinition.Builder | Callbacks for ticks and interaction. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.build() | EntityDefinition | Creates the definition; invalid values throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.category(MobCategory) | EntityDefinition.Builder | Spawn group; MobCategory.CREATURE by default. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.flying(double) | EntityDefinition.Builder | The mob flies and hovers (Movement.FLY) at flyingSpeed (parrot 0.4) in the air; movementSpeed still applies on the ground. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.goal(int, Supplier<AiGoal>) | EntityDefinition.Builder | Adds an AI goal created for each mob by factory. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.maxHealth(double) | EntityDefinition.Builder | Health in half-hearts; 20 by default. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.model(EntityModelDefinition) | EntityDefinition.Builder | Draws the mob with a box model instead of the player-shaped one. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.movementSpeed(double) | EntityDefinition.Builder | Base speed (zombie 0.23, villager 0.5); 0.25 by default. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.noGravity() | EntityDefinition.Builder | The mob is not pulled down by gravity. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.noWandering() | EntityDefinition.Builder | The mob stands still. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.notPushable() | EntityDefinition.Builder | Other entities do not push the mob. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.panicWhenHurt() | EntityDefinition.Builder | The mob runs away for a while after being hurt. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.rideable(boolean) | EntityDefinition.Builder | Players can ride the mob; with steerable they also steer it. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.size(float, float) | EntityDefinition.Builder | Hitbox width and height in blocks. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.spawnEgg(CreativeTab) | EntityDefinition.Builder | Declares a spawn egg item <id>_spawn_egg listed in tab. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.spawnsNaturally(BiomeSelector, int, int, int) | EntityDefinition.Builder | The mob spawns by itself in biomes, in groups of minGroup..maxGroup. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.swimming() | EntityDefinition.Builder | The mob swims under water (Movement.SWIM) at movementSpeed. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.targetGoal(int, Supplier<AiGoal>) | EntityDefinition.Builder | Adds a target goal (chooses whom to attack) created for each mob by factory. | 0.1.0-alpha.4 or earlier |
EntityDefinition.Builder.temptedBy(ResourceId) | EntityDefinition.Builder | The mob follows players holding item. | 0.1.0-alpha.4 or earlier |
EntityDefinition.builder(ResourceId) | EntityDefinition.Builder | A builder for a 0.6×1.95 creature (player-sized) with the given skin texture. | 0.1.0-alpha.4 or earlier |
ProjectileBehavior.onHitBlock(ProjectileHit) | void | The projectile hit a block. | 0.1.0-alpha.4 or earlier |
ProjectileBehavior.onHitEntity(ProjectileHit) | void | The projectile hit an entity, after its damage was dealt. | 0.1.0-alpha.4 or earlier |
ProjectileDefinition.Builder.behavior(ProjectileBehavior) | ProjectileDefinition.Builder | Callbacks for hitting blocks and entities. | 0.1.0-alpha.4 or earlier |
ProjectileDefinition.Builder.build() | ProjectileDefinition | Creates the definition; invalid values throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
ProjectileDefinition.Builder.damage(float) | ProjectileDefinition.Builder | Damage to a hit entity, 0 for none. | 0.1.0-alpha.4 or earlier |
ProjectileDefinition.Builder.gravity(double) | ProjectileDefinition.Builder | Downward acceleration per tick (snowball 0.03). | 0.1.0-alpha.4 or earlier |
ProjectileDefinition.Builder.size(float) | ProjectileDefinition.Builder | Hitbox width and height in blocks. | 0.1.0-alpha.4 or earlier |
ProjectileDefinition.builder(ResourceId) | ProjectileDefinition.Builder | A builder for a 0.25-block projectile drawn as item, with snowball gravity and no damage. | 0.1.0-alpha.4 or earlier |
content.entity.model
| Function | Returns | Description | Since |
|---|---|---|---|
EntityModelDefinition.Builder.animation(String, KeyframeAnimation) | EntityModelDefinition.Builder | Adds a keyframe animation called name; KeyframeAnimation.Trigger.ON_DEMAND ones are started by name with MobView.playAnimation. | 0.1.0-alpha.4 or earlier |
EntityModelDefinition.Builder.build() | EntityModelDefinition | Creates the model; invalid parts throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
EntityModelDefinition.Builder.part(String, Consumer<ModelPartDefinition.Builder>) | EntityModelDefinition.Builder | Adds a part configured by part. | 0.1.0-alpha.4 or earlier |
EntityModelDefinition.builder(int, int) | EntityModelDefinition.Builder | A builder for a model using a textureWidth × textureHeight texture. | 0.1.0-alpha.4 or earlier |
EntityModelDefinition.onDemandAnimations() | List<String> | Names of the KeyframeAnimation.Trigger.ON_DEMAND animations, in declaration order. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.build() | KeyframeAnimation | Creates the animation; invalid values throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.keyframe(String, KeyframeAnimation.Target, float, float, float, float, KeyframeAnimation.Interpolation) | KeyframeAnimation.Builder | Adds a keyframe with every detail given. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.looping() | KeyframeAnimation.Builder | Starts over at the end. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.position(String, float, float, float, float) | KeyframeAnimation.Builder | Moves part by x, y, z model pixels (y up) at time seconds. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.rotation(String, float, float, float, float) | KeyframeAnimation.Builder | Rotates part by x, y, z degrees at time seconds. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.scale(String, float, float, float, float) | KeyframeAnimation.Builder | Scales part by x, y, z (1 keeps the size) at time seconds. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.smooth() | KeyframeAnimation.Builder | Blends the keyframes added after this call along smooth curves instead of straight lines. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.Builder.trigger(KeyframeAnimation.Trigger) | KeyframeAnimation.Builder | When the animation plays; Trigger.ON_DEMAND by default. | 0.1.0-alpha.4 or earlier |
KeyframeAnimation.builder(float) | KeyframeAnimation.Builder | A builder for an animation lengthSeconds long that plays when the server starts it. | 0.1.0-alpha.4 or earlier |
ModelPartDefinition.Builder.animation(PartAnimation) | ModelPartDefinition.Builder | How the part moves on its own; PartAnimation.NONE by default. | 0.1.0-alpha.4 or earlier |
ModelPartDefinition.Builder.box(int, int, float, float, float, float, float, float) | ModelPartDefinition.Builder | Adds a box whose texture net starts at u, v. | 0.1.0-alpha.4 or earlier |
ModelPartDefinition.Builder.mirroredBox(int, int, float, float, float, float, float, float) | ModelPartDefinition.Builder | Adds a box with a mirrored texture. | 0.1.0-alpha.4 or earlier |
ModelPartDefinition.Builder.parent(String) | ModelPartDefinition.Builder | Attaches the part to parent; its pivot becomes relative to the parent's. | 0.1.0-alpha.4 or earlier |
ModelPartDefinition.Builder.pivot(float, float, float) | ModelPartDefinition.Builder | The point the part turns around, relative to the parent's pivot (model pixels, y down). | 0.1.0-alpha.4 or earlier |
ModelPartDefinition.Builder.rotation(float, float, float) | ModelPartDefinition.Builder | Rest rotation in degrees. | 0.1.0-alpha.4 or earlier |
content.item
| Function | Returns | Description | Since |
|---|---|---|---|
ComponentType.valueClass() | Class<T> | Java type of the value. | 0.1.0-alpha.4 or earlier |
ItemBehavior.onUse(ItemUse) | InteractionResult | The item was used in the air. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.behavior(ItemBehavior) | ItemDefinition.Builder | Sets the use callbacks. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.build() | ItemDefinition | Creates the definition; invalid values throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.creativeTab(CreativeTab) | ItemDefinition.Builder | Lists the item at the end of a creative inventory tab. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.durability(int) | ItemDefinition.Builder | Gives the item durability; also sets the stack size to 1. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.fireResistant() | ItemDefinition.Builder | The dropped item survives fire and lava. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.food(FoodDefinition) | ItemDefinition.Builder | Makes the item edible. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.maxStackSize(int) | ItemDefinition.Builder | Sets the maximum stack size, 1–99. | 0.1.0-alpha.4 or earlier |
ItemDefinition.Builder.rarity(ItemRarity) | ItemDefinition.Builder | Sets the name colour. | 0.1.0-alpha.4 or earlier |
ItemDefinition.builder() | ItemDefinition.Builder | A builder for a common item stacking to 64, listed in no tab. | 0.1.0-alpha.4 or earlier |
content.particle
| Function | Returns | Description | Since |
|---|---|---|---|
ParticleDefinition.asGlowing() | ParticleDefinition | A copy drawn at full brightness, also in the dark. | 0.1.0-alpha.4 or earlier |
ParticleDefinition.of(int) | ParticleDefinition | Lives lifetimeTicks, no gravity, default size, normal lighting, no tint. | 0.1.0-alpha.4 or earlier |
ParticleDefinition.withGravity(float) | ParticleDefinition | A copy with this downward acceleration (0 floats). | 0.1.0-alpha.4 or earlier |
ParticleDefinition.withScale(float) | ParticleDefinition | A copy with this size multiplier. | 0.1.0-alpha.4 or earlier |
ParticleDefinition.withTint(int) | ParticleDefinition | A copy with this colour, 0xRRGGBB, multiplied into the sprite. | 0.1.0-alpha.4 or earlier |
data
| Function | Returns | Description | Since |
|---|---|---|---|
DataMigration.migrate(DataTree, int) | void | Upgrades data from fromVersion to the current version. | 0.1.0-alpha.4 or earlier |
DataTree.child(String) | DataTree | The child tree under key, creating it (and replacing a non-tree value) if needed. | 0.1.0-alpha.4 or earlier |
DataTree.clear() | void | Removes every entry. | 0.1.0-alpha.4 or earlier |
DataTree.copy() | DataTree | A deep copy. | 0.1.0-alpha.4 or earlier |
DataTree.create() | DataTree | An empty tree. | 0.1.0-alpha.4 or earlier |
DataTree.findChild(String) | Optional<DataTree> | The child tree under key, without creating it. | 0.1.0-alpha.4 or earlier |
DataTree.getBoolean(String, boolean) | boolean | The boolean under key, or fallback if there is none. | 0.1.0-alpha.4 or earlier |
DataTree.getBytes(String) | Optional<byte[]> | A copy of the stored bytes. | 0.1.0-alpha.4 or earlier |
DataTree.getDouble(String, double) | double | The double under key, or fallback if there is none. | 0.1.0-alpha.4 or earlier |
DataTree.getInt(String, int) | int | The integer under key, or fallback if there is none. | 0.1.0-alpha.4 or earlier |
DataTree.getLong(String, long) | long | The long under key, or fallback if there is none. | 0.1.0-alpha.4 or earlier |
DataTree.getString(String, String) | String | The string under key, or fallback if there is none. | 0.1.0-alpha.4 or earlier |
DataTree.has(String) | boolean | Whether any value is stored under key. | 0.1.0-alpha.4 or earlier |
DataTree.keys() | Set<String> | Keys in insertion order. | 0.1.0-alpha.4 or earlier |
DataTree.putBoolean(String, boolean) | DataTree | Stores a boolean under key; returns this tree. | 0.1.0-alpha.4 or earlier |
DataTree.putBytes(String, byte[]) | DataTree | Stores a copy of value under key; returns this tree. | 0.1.0-alpha.4 or earlier |
DataTree.putDouble(String, double) | DataTree | Stores a double under key; returns this tree. | 0.1.0-alpha.4 or earlier |
DataTree.putInt(String, int) | DataTree | Stores an integer under key; returns this tree. | 0.1.0-alpha.4 or earlier |
DataTree.putLong(String, long) | DataTree | Stores a long under key; returns this tree. | 0.1.0-alpha.4 or earlier |
DataTree.putString(String, String) | DataTree | Stores a string under key; returns this tree. | 0.1.0-alpha.4 or earlier |
DataTree.raw(String) | Optional<Object> | The raw value under key: Integer, Long, Double, Boolean, String, byte[] (shared, do not modify), or DataTree; empty when absent. | 0.1.0-alpha.4 or earlier |
DataTree.remove(String) | void | Removes the value under key, if any. | 0.1.0-alpha.4 or earlier |
devtools.gametest
| Function | Returns | Description | Since |
|---|---|---|---|
GameTest.run(GameTestContext) | void | Starts the test on the server thread. | 0.1.0-alpha.4 or earlier |
GameTestContext.absolute(BlockPos) | BlockPos | Converts a test-relative position into a world position. | 0.1.0-alpha.4 or earlier |
GameTestContext.assertBlock(BlockPos, ResourceId) | void | Fails unless the block at a test-relative position is expected. | 0.1.0-alpha.4 or earlier |
GameTestContext.assertTrue(boolean, String) | void | Fails with message unless condition holds. | 0.1.0-alpha.4 or earlier |
GameTestContext.attackEntity(PlayerView, EntityView) | void | Makes a server player attack target with its main hand, as a left-click does (interaction events, then damage and knockback). | 0.1.0-alpha.4 or earlier |
GameTestContext.breakBlock(PlayerView, BlockPos) | boolean | Makes a server player break the block at a test-relative position at once, the way the server finishes a player's digging: block events, the game's checks, drops in survival mode. | 0.1.0-alpha.4 or earlier |
GameTestContext.createConnectedMockPlayer() | PlayerView | Creates a survival-mode player that joins the server like a client over an in-memory connection (PlayerEvents.JOINED fires) and reports that it finished loading, so it can take damage. | 0.1.0-alpha.4 or earlier |
GameTestContext.createMockPlayer() | PlayerView | Creates a survival-mode player in the test world that is not connected to any client. | 0.1.0-alpha.4 or earlier |
GameTestContext.createMockServerPlayer() | PlayerView | Creates a survival-mode server player that is not connected and not in the world, for what needs one, such as advancements. | 0.1.0-alpha.4 or earlier |
GameTestContext.disconnect(PlayerView) | void | Disconnects a player from createConnectedMockPlayer() (PlayerEvents.LEAVING fires); does nothing for a player that already left. | 0.1.0-alpha.4 or earlier |
GameTestContext.fail(String) | void | Marks the test failed. | 0.1.0-alpha.4 or earlier |
GameTestContext.interactBlock(PlayerView, BlockPos, Direction) | InteractionResult | Makes a server player (from createMockServerPlayer()) right-click a face of the block at a test-relative position with its main hand, the way the server handles the click from a connected client: interaction events first, then the held item and the block. | 0.1.0-alpha.4 or earlier |
GameTestContext.interactEntity(PlayerView, EntityView) | InteractionResult | Makes a server player right-click target with its main hand, the way the server handles the click from a connected client (interaction events, then the entity and the item). | 0.1.0-alpha.4 or earlier |
GameTestContext.interactItem(PlayerView) | InteractionResult | Makes a server player use the item in its main hand in the air, the way the server handles the click from a connected client (interaction events, then the item). | 0.1.0-alpha.4 or earlier |
GameTestContext.respawn(PlayerView, boolean) | PlayerView | Respawns a player from createConnectedMockPlayer() as its client asks from the death screen (or after the End credits): the game builds a new player object, PlayerEvents.COPY and RESPAWNED fire, and the new player reports that it loaded. | 0.1.0-alpha.4 or earlier |
GameTestContext.runAfter(int, Runnable) | void | Runs action after ticks more ticks, on the server thread. | 0.1.0-alpha.4 or earlier |
GameTestContext.runCommand(String) | int | Runs a command as the server at the test area's origin. | 0.1.0-alpha.4 or earlier |
GameTestContext.setBlock(BlockPos, ResourceId) | void | Places the default state of block at a test-relative position. | 0.1.0-alpha.4 or earlier |
GameTestContext.succeed() | void | Marks the test passed. | 0.1.0-alpha.4 or earlier |
GameTestContext.useBlock(BlockPos, PlayerView) | void | Makes player use (right-click) the block at a test-relative position with an empty hand. | 0.1.0-alpha.4 or earlier |
GameTestContext.world() | WorldView | The world the test runs in. | 0.1.0-alpha.4 or earlier |
GameTestRegistrar.register(String, GameTest) | void | Registers a required test that must finish within 100 ticks. | 0.1.0-alpha.4 or earlier |
GameTestRegistrar.register(String, int, GameTest) | void | Registers a required test. | 0.1.0-alpha.4 or earlier |
GameTestRegistrar.register(String, int, TestArea, GameTest) | void | Registers a required test that gets area to itself. | 0.1.0-alpha.4 or earlier |
TestArea.cube(int) | TestArea | A size × size × size cube. | 0.1.0-alpha.4 or earlier |
entity
| Function | Returns | Description | Since |
|---|---|---|---|
EntityView.blockPos() | BlockPos | The block the entity stands in. | 0.1.0-alpha.4 or earlier |
EntityView.changeDimension(ResourceId, double, double, double) | EntityView | Moves the entity to another dimension, for example minecraft:the_nether or a mod dimension from data; server side only. | 0.1.0-alpha.4 or earlier |
EntityView.data(EntityDataKey) | StoredData | The entity's data for key; call markChanged() after changing it. | 0.1.0-alpha.4 or earlier |
EntityView.hasNoGravity() | boolean | Whether gravity is off for this entity. | 0.1.0-alpha.4 or earlier |
EntityView.isAlive() | boolean | Whether the entity is alive and in a world. | 0.1.0-alpha.4 or earlier |
EntityView.isIn(TagKey) | boolean | Whether the entity's type is in an entity type tag, for example #minecraft:skeletons. | 0.1.0-alpha.4 or earlier |
EntityView.isOnGround() | boolean | Whether the entity stands on a block. | 0.1.0-alpha.4 or earlier |
EntityView.name() | String | Display name as plain text. | 0.1.0-alpha.4 or earlier |
EntityView.passengers() | List<EntityView> | Who rides the entity. | 0.1.0-alpha.4 or earlier |
EntityView.pitch() | float | Vertical facing in degrees (-90 up, 90 down). | 0.1.0-alpha.4 or earlier |
EntityView.remove() | void | Removes the entity without dropping loot; server side only. | 0.1.0-alpha.4 or earlier |
EntityView.setNoGravity(boolean) | void | Turns gravity off or on. | 0.1.0-alpha.4 or earlier |
EntityView.setRotation(float, float) | void | Turns the entity. | 0.1.0-alpha.4 or earlier |
EntityView.setVelocity(double, double, double) | void | Sets the velocity; for players it reaches their client. | 0.1.0-alpha.4 or earlier |
EntityView.startRiding(EntityView) | boolean | Mounts vehicle. | 0.1.0-alpha.4 or earlier |
EntityView.stopRiding() | void | Dismounts, if riding. | 0.1.0-alpha.4 or earlier |
EntityView.teleport(double, double, double) | void | Moves the entity within its dimension; server side only. | 0.1.0-alpha.4 or earlier |
EntityView.type() | ResourceId | Entity type, for example minecraft:pig. | 0.1.0-alpha.4 or earlier |
EntityView.uuid() | UUID | Unique, persistent entity ID. | 0.1.0-alpha.4 or earlier |
EntityView.vehicle() | Optional<EntityView> | What the entity rides, if anything. | 0.1.0-alpha.4 or earlier |
EntityView.velocity() | Vector3 | Velocity in blocks per tick. | 0.1.0-alpha.4 or earlier |
EntityView.world() | WorldView | The world the entity is in. | 0.1.0-alpha.4 or earlier |
EntityView.x() | double | X coordinate. | 0.1.0-alpha.4 or earlier |
EntityView.y() | double | Y coordinate (feet). | 0.1.0-alpha.4 or earlier |
EntityView.yaw() | float | Horizontal facing in degrees (0 south, 90 west, 180 north, 270 east). | 0.1.0-alpha.4 or earlier |
EntityView.z() | double | Z coordinate. | 0.1.0-alpha.4 or earlier |
LivingEntityView.addEffect(ResourceId, int, int) | void | Adds a status effect, such as minecraft:speed or a mod effect. | 0.1.0-alpha.4 or earlier |
LivingEntityView.hasEffect(ResourceId) | boolean | Whether the entity has the effect. | 0.1.0-alpha.4 or earlier |
LivingEntityView.health() | float | Current health in half-hearts. | 0.1.0-alpha.4 or earlier |
LivingEntityView.hurt(ResourceId, float) | boolean | Deals damage of a data-defined damage type, such as minecraft:magic or one from the mod's data/<mod id>/damage_type/. | 0.1.0-alpha.4 or earlier |
LivingEntityView.hurt(float) | boolean | Deals generic damage on the server, as if from /damage. | 0.1.0-alpha.4 or earlier |
LivingEntityView.launchProjectile(ResourceId, float, float) | EntityView | Launches a projectile, such as a mod projectile or minecraft:snowball, from the eyes in the look direction. | 0.1.0-alpha.4 or earlier |
LivingEntityView.maxHealth() | float | Maximum health. | 0.1.0-alpha.4 or earlier |
LivingEntityView.setHealth(float) | void | Sets health, clamped to [0, maxHealth]; server side only. | 0.1.0-alpha.4 or earlier |
MobView.isNavigating() | boolean | Whether the mob is following a path. | 0.1.0-alpha.4 or earlier |
MobView.lookAt(double, double, double) | void | Turns the head towards a position this tick. | 0.1.0-alpha.4 or earlier |
MobView.navigateTo(double, double, double, double) | boolean | Starts walking to a position along a path. | 0.1.0-alpha.4 or earlier |
MobView.playAnimation(String) | void | Plays one of the mob's ON_DEMAND model animations from the start on every client that sees the mob. | 0.1.0-alpha.4 or earlier |
MobView.setTarget(LivingEntityView) | void | Sets the attack target, or clears it with null. | 0.1.0-alpha.4 or earlier |
MobView.stopAnimation(String) | void | Stops an ON_DEMAND animation on every client; a non-looping one also stops by itself at its end. | 0.1.0-alpha.4 or earlier |
MobView.stopNavigating() | void | Stops following the path. | 0.1.0-alpha.4 or earlier |
MobView.target() | Optional<LivingEntityView> | The attack target, if any. | 0.1.0-alpha.4 or earlier |
PlayerView.countItem(ResourceId) | int | How many of item the player carries in their inventory. | 0.1.0-alpha.4 or earlier |
PlayerView.give(ResourceId, int) | void | Gives the player count of item; what does not fit is dropped at their feet. | 0.1.0-alpha.4 or earlier |
PlayerView.grantAdvancement(ResourceId) | boolean | Completes every criterion of an advancement, with its rewards and announcement. | 0.1.0-alpha.4 or earlier |
PlayerView.hasAdvancement(ResourceId) | boolean | Whether the player has completed an advancement, such as minecraft:story/mine_stone. | 0.1.0-alpha.4 or earlier |
PlayerView.hasPermission(PermissionNode) | boolean | Whether the player has the permission: the first deciding provider, else the node's default operator level. | 0.1.0-alpha.4 or earlier |
PlayerView.inventory() | InventoryView | The player's inventory: 36 main slots (hotbar 0–8), then armour and off hand. | 0.1.0-alpha.4 or earlier |
PlayerView.mainHandItem() | ResourceId | The item in the main hand, minecraft:air when empty. | 0.1.0-alpha.4 or earlier |
PlayerView.mainHandStack() | ItemStackRef | The live stack in the main hand. | 0.1.0-alpha.4 or earlier |
PlayerView.openMenu(BlockPos) | boolean | Opens the menu of the block entity at pos (a chest-style or laid-out mod menu, or a game container such as a furnace) for this player. | 0.1.0-alpha.4 or earlier |
PlayerView.revokeAdvancement(ResourceId) | boolean | Clears every criterion of an advancement. | 0.1.0-alpha.4 or earlier |
PlayerView.sendMessage(String) | void | Shows text in the player's chat. | 0.1.0-alpha.4 or earlier |
event
| Function | Returns | Description | Since |
|---|---|---|---|
EventKey.id() | String | Diagnostic ID, e.g. | 0.1.0-alpha.4 or earlier |
EventKey.listenerType() | Class<L> | The listener interface. | 0.1.0-alpha.4 or earlier |
EventKey.of(String, Class<L>) | EventKey<L> | Creates a key; id is namespace:path and only used for diagnostics. | 0.1.0-alpha.4 or earlier |
EventRegistry.register(EventKey<L>, EventPriority, L) | void | Registers listener for event. | 0.1.0-alpha.4 or earlier |
EventRegistry.register(EventKey<L>, L) | void | Registers listener for event with EventPriority.NORMAL. | 0.1.0-alpha.4 or earlier |
EventResult.isDecided() | boolean | Whether this result decides the event, i.e. is not PASS. | 0.1.0-alpha.4 or earlier |
event.block
| Function | Returns | Description | Since |
|---|---|---|---|
BlockBreakListener.onBlockBreak(WorldView, BlockPos, ResourceId, PlayerView) | EventResult | Called on the server thread before the block is removed. | 0.1.0-alpha.4 or earlier |
BlockBrokenListener.onBlockBroken(WorldView, BlockPos, ResourceId, PlayerView) | void | Called on the server thread after the block was removed and its drops spawned. | 0.1.0-alpha.4 or earlier |
BlockPlaceListener.onBlockPlace(WorldView, BlockPos, ResourceId, PlayerView) | EventResult | Called on the server thread after the game checked that the block fits, before it is set. | 0.1.0-alpha.4 or earlier |
BlockPlacedListener.onBlockPlaced(WorldView, BlockPos, ResourceId, PlayerView) | void | Called on the server thread after the block was placed, its block entity data applied, and the item used up. | 0.1.0-alpha.4 or earlier |
event.entity
| Function | Returns | Description | Since |
|---|---|---|---|
AllowDamageListener.allowDamage(LivingEntityView, DamageInfo) | boolean | Returns false to cancel the damage. | 0.1.0-alpha.4 or earlier |
DamageModifier.modifyDamage(LivingEntityView, DamageInfo) | float | Returns the damage to deal instead of damage.amount(); return it unchanged to keep it. | 0.1.0-alpha.4 or earlier |
DeathListener.onDied(LivingEntityView, DamageInfo) | void | Called on the server thread when death starts, before drops. | 0.1.0-alpha.4 or earlier |
EntityJoinedWorldListener.onEntityJoinedWorld(EntityView, WorldView) | void | Called on the server thread while the world starts tracking the entity. | 0.1.0-alpha.4 or earlier |
event.interaction
| Function | Returns | Description | Since |
|---|---|---|---|
AttackEntityListener.onAttackEntity(PlayerView, EntityView) | EventResult | Called on the server thread. | 0.1.0-alpha.4 or earlier |
UseBlockListener.onUseBlock(PlayerView, Hand, ItemStackRef, BlockPos, Direction) | InteractionResult | Called on the server thread. | 0.1.0-alpha.4 or earlier |
UseEntityListener.onUseEntity(PlayerView, Hand, ItemStackRef, EntityView) | InteractionResult | Called on the server thread. | 0.1.0-alpha.4 or earlier |
UseItemListener.onUseItem(PlayerView, Hand, ItemStackRef) | InteractionResult | Called on the server thread, also for an empty hand. | 0.1.0-alpha.4 or earlier |
event.lifecycle
| Function | Returns | Description | Since |
|---|---|---|---|
ModsInitializedListener.onModsInitialized() | void | Handles the event. | 0.1.0-alpha.10 |
event.player
| Function | Returns | Description | Since |
|---|---|---|---|
LoginCheckListener.checkLogin(UUID, String) | Optional<String> | Returns a reason to refuse the player, shown on their disconnect screen, or empty to let them in. | 0.1.0-alpha.4 or earlier |
PlayerCopyListener.onPlayerCopy(PlayerView, PlayerView, boolean) | void | Called on the server thread while the game builds the new player object for a respawn, after the game copied what it keeps (inventory with keepInventory, everything when returning from the End) and after Poly Mod Loader copied EntityDataKey data. | 0.1.0-alpha.4 or earlier |
PlayerJoinedListener.onPlayerJoined(PlayerView) | void | Called on the server thread; player is valid only during the call. | 0.1.0-alpha.4 or earlier |
PlayerLeavingListener.onPlayerLeaving(PlayerView) | void | Called on the server thread before the player is removed; player is valid only during the call. | 0.1.0-alpha.4 or earlier |
PlayerRespawnedListener.onPlayerRespawned(PlayerView, boolean) | void | Called on the server thread after the new player object was placed in its world. | 0.1.0-alpha.4 or earlier |
event.server
| Function | Returns | Description | Since |
|---|---|---|---|
ServerStartedListener.onServerStarted(ServerView) | void | Handles the event. | 0.1.0-alpha.4 or earlier |
ServerStartingListener.onServerStarting(ServerView) | void | Handles the event. | 0.1.0-alpha.4 or earlier |
ServerStoppedListener.onServerStopped(ServerView) | void | Handles the event. | 0.1.0-alpha.4 or earlier |
ServerStoppingListener.onServerStopping(ServerView) | void | Handles the event. | 0.1.0-alpha.4 or earlier |
ServerTickListener.onServerTick(ServerView) | void | Handles the event. | 0.1.0-alpha.4 or earlier |
ServerView.dedicated() | boolean | Whether Minecraft reports this server as dedicated. | 0.1.0-alpha.4 or earlier |
ServerView.motd() | String | Message of the day shown in the server list. | 0.1.0-alpha.4 or earlier |
ServerView.playerCount() | int | Players currently connected. | 0.1.0-alpha.4 or earlier |
ServerView.tickCount() | int | Ticks processed so far. | 0.1.0-alpha.4 or earlier |
event.world
| Function | Returns | Description | Since |
|---|---|---|---|
ChunkListener.onChunk(WorldView, int, int) | void | A chunk of world; coordinates are chunk coordinates. | 0.1.0-alpha.4 or earlier |
WorldListener.onWorld(WorldView) | void | Called on the server thread; world is valid only during the call. | 0.1.0-alpha.4 or earlier |
WorldReadyListener.onWorldReady(WorldView) | void | Called on the server thread at the start of the dimension's first tick. | 0.1.0-alpha.4 or earlier |
inventory
| Function | Returns | Description | Since |
|---|---|---|---|
InventoryView.add(ResourceId, int) | int | Adds items to existing stacks first, then to empty slots. | 0.1.0-alpha.4 or earlier |
InventoryView.clear() | void | Empties every slot. | 0.1.0-alpha.4 or earlier |
InventoryView.count(ResourceId) | int | How many of item the inventory holds. | 0.1.0-alpha.4 or earlier |
InventoryView.get(int) | ItemStackView | The stack in slot; IndexOutOfBoundsException for a bad slot. | 0.1.0-alpha.4 or earlier |
InventoryView.set(int, ResourceId, int) | void | Replaces the stack in slot; a count of 0 empties it. | 0.1.0-alpha.4 or earlier |
InventoryView.size() | int | Number of slots. | 0.1.0-alpha.4 or earlier |
InventoryView.stackAt(int) | ItemStackRef | The live stack in slot, to read or change its components. | 0.1.0-alpha.4 or earlier |
ItemStackRef.count() | int | How many, 0 when empty. | 0.1.0-alpha.4 or earlier |
ItemStackRef.customName() | Optional<String> | The name given with an anvil or setCustomName, if any. | 0.1.0-alpha.4 or earlier |
ItemStackRef.damage() | int | Durability used up, 0 for undamaged or undamageable items. | 0.1.0-alpha.4 or earlier |
ItemStackRef.get(ItemComponentKey<T>) | Optional<T> | The component's value, or empty when the stack does not have it. | 0.1.0-alpha.4 or earlier |
ItemStackRef.isEmpty() | boolean | Whether the stack is empty. | 0.1.0-alpha.4 or earlier |
ItemStackRef.isIn(TagKey) | boolean | Whether the stack's item is in an item tag, for example #minecraft:logs; false for an empty stack. | 0.1.0-alpha.4 or earlier |
ItemStackRef.item() | ResourceId | The item, minecraft:air when empty. | 0.1.0-alpha.4 or earlier |
ItemStackRef.maxDamage() | int | Durability, 0 for undamageable items. | 0.1.0-alpha.4 or earlier |
ItemStackRef.remove(ItemComponentKey<?>) | void | Removes the component. | 0.1.0-alpha.4 or earlier |
ItemStackRef.set(ItemComponentKey<T>, T) | void | Sets the component's value. | 0.1.0-alpha.4 or earlier |
ItemStackRef.setCount(int) | void | Changes the count; 0 empties the stack. | 0.1.0-alpha.4 or earlier |
ItemStackRef.setCustomName(String) | void | Gives the stack a name, or removes it with null. | 0.1.0-alpha.4 or earlier |
ItemStackRef.setDamage(int) | void | Sets the used durability, clamped to [0, maxDamage]. | 0.1.0-alpha.4 or earlier |
ItemStackRef.snapshot() | ItemStackView | A snapshot of item and count. | 0.1.0-alpha.4 or earlier |
ItemStackView.isEmpty() | boolean | Whether the slot is empty. | 0.1.0-alpha.4 or earlier |
lifecycle
| Function | Returns | Description | Since |
|---|---|---|---|
ClientModInitializer.onInitializeClient(ModContext) | void | Initialises the mod's client-only parts. | 0.1.0-alpha.4 or earlier |
CommonModInitializer.onInitializeCommon(ModContext) | void | Initialises the mod's common (side-independent) parts. | 0.1.0-alpha.4 or earlier |
DedicatedServerModInitializer.onInitializeDedicatedServer(ModContext) | void | Initialises the mod's dedicated-server-only parts. | 0.1.0-alpha.4 or earlier |
LoadedMods.all() | List<LoadedMods.Mod> | Every loaded mod: first those a host loader runs, then the others in the order their entrypoints run. | 0.1.0-alpha.18 |
LoadedMods.find(String) | Optional<LoadedMods.Mod> | The loaded mod with modId: the mod whose own ID it is, otherwise the first mod that provides it; empty when none is loaded. | 0.1.0-alpha.18 |
LoadedMods.isLoaded(String) | boolean | Whether a mod with modId is loaded, by its own ID or an ID it provides (provides in fabric.mod.json). | 0.1.0-alpha.18 |
ModContext.client() | ClientRegistrar | Client-only registrations: key bindings and HUD layers. | 0.1.0-alpha.4 or earlier |
ModContext.commands() | CommandRegistrar | Registers this mod's server commands. | 0.1.0-alpha.4 or earlier |
ModContext.configDirectory() | Path | This mod's configuration directory, config/<mod id> in the game directory; created on first call. | 0.1.0-alpha.4 or earlier |
ModContext.content() | ContentRegistrar | Declares this mod's blocks and items (common entrypoints only). | 0.1.0-alpha.4 or earlier |
ModContext.events() | EventRegistry | Registers event listeners owned by this mod. | 0.1.0-alpha.4 or earlier |
ModContext.gameTests() | GameTestRegistrar | Registers this mod's in-game tests. | 0.1.0-alpha.4 or earlier |
ModContext.modId() | String | The mod ID declared in poly.mod.json, for example minimal_native_mod. | 0.1.0-alpha.4 or earlier |
ModContext.modVersion() | String | The mod version declared in poly.mod.json. | 0.1.0-alpha.4 or earlier |
ModContext.mods() | LoadedMods | The mods loaded in this game, of every loader (Poly Mods, Fabric mods, Forge mods). | 0.1.0-alpha.18 |
ModContext.network() | NetworkRegistrar | Declares this mod's network channels. | 0.1.0-alpha.4 or earlier |
ModContext.onShutdown(String, Runnable) | void | Registers work to run when the game process exits. | 0.1.0-alpha.4 or earlier |
ModContext.permissions() | PermissionRegistrar | The mod's permissions and permission providers. | 0.1.0-alpha.4 or earlier |
ModContext.resources() | ResourceRegistrar | Reload listeners for the mod's own data and asset files. | 0.1.0-alpha.4 or earlier |
ModContext.side() | GameSide | Whether this process is a client or a dedicated server. | 0.1.0-alpha.4 or earlier |
ModContext.systems() | SystemLookup | The active implementation of each Poly Mod Loader system, after replacements were applied. | 0.1.0-alpha.4 or earlier |
ModContext.worldgen() | WorldgenRegistrar | Attaches this mod's placed features to biomes. | 0.1.0-alpha.4 or earlier |
network
| Function | Returns | Description | Since |
|---|---|---|---|
ClientPayloadHandler.receive(T) | void | Called on the client thread. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.Answer.answer(T) | T | The reply to the server's request. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.Check.check(UUID, String, Optional<T>) | Optional<String> | Empty to let the player in, or the message shown to them when the connection is refused. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.Request.request(UUID, String) | Optional<T> | The message for player playerName, or empty to skip the exchange for them. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.clientAnswer(ConfigurationExchange.Answer<T>) | ConfigurationExchange<T> | How the client answers; without it the client does not answer. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.id() | ResourceId | The exchange's ID, <mod id>:<path>. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.serverCheck(ConfigurationExchange.Check<T>) | ConfigurationExchange<T> | Whether the server lets the player in after the client's answer. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.serverRequest(ConfigurationExchange.Request<T>) | ConfigurationExchange<T> | What the server sends to each joining player; without it the exchange is skipped. | 0.1.0-alpha.4 or earlier |
ConfigurationExchange.timeoutTicks(int) | ConfigurationExchange<T> | How long the server waits for the answer, in ticks; 100 (5 seconds) by default. | 0.1.0-alpha.4 or earlier |
NetworkRegistrar.channel(String, PayloadCodec<T>) | PayloadChannel<T> | Declares a channel. | 0.1.0-alpha.4 or earlier |
NetworkRegistrar.configurationExchange(String, PayloadCodec<T>) | ConfigurationExchange<T> | Declares configuration exchange <mod id>:<path>: a question the server asks each joining client before the player enters the world. | 0.1.0-alpha.4 or earlier |
PayloadChannel.id() | ResourceId | The channel ID. | 0.1.0-alpha.4 or earlier |
PayloadChannel.onClientReceive(ClientPayloadHandler<T>) | void | Sets what the client does with payloads from the server. | 0.1.0-alpha.4 or earlier |
PayloadChannel.onServerReceive(ServerPayloadHandler<T>) | void | Sets what the server does with payloads from clients. | 0.1.0-alpha.4 or earlier |
PayloadChannel.sendToPlayer(PlayerView, T) | void | Sends a payload to one player. | 0.1.0-alpha.4 or earlier |
PayloadChannel.sendToServer(T) | void | Sends a payload to the server. | 0.1.0-alpha.4 or earlier |
PayloadCodec.decode(PayloadReader) | T | Reads a value written by encode. | 0.1.0-alpha.4 or earlier |
PayloadCodec.encode(T, PayloadWriter) | void | Writes value. | 0.1.0-alpha.4 or earlier |
PayloadCodec.string() | PayloadCodec<String> | A codec for a single UTF-8 string. | 0.1.0-alpha.4 or earlier |
PayloadReader.readBoolean() | boolean | Reads a boolean. | 0.1.0-alpha.4 or earlier |
PayloadReader.readBytes() | byte[] | Reads a byte array. | 0.1.0-alpha.4 or earlier |
PayloadReader.readDouble() | double | Reads a double. | 0.1.0-alpha.4 or earlier |
PayloadReader.readInt() | int | Reads an int. | 0.1.0-alpha.4 or earlier |
PayloadReader.readLong() | long | Reads a long. | 0.1.0-alpha.4 or earlier |
PayloadReader.readString() | String | Reads a string. | 0.1.0-alpha.4 or earlier |
PayloadReader.remaining() | int | Bytes not read yet. | 0.1.0-alpha.4 or earlier |
PayloadWriter.writeBoolean(boolean) | PayloadWriter | Writes a boolean as one byte. | 0.1.0-alpha.4 or earlier |
PayloadWriter.writeBytes(byte[]) | PayloadWriter | Writes a length-prefixed byte array. | 0.1.0-alpha.4 or earlier |
PayloadWriter.writeDouble(double) | PayloadWriter | Writes an 8-byte double. | 0.1.0-alpha.4 or earlier |
PayloadWriter.writeInt(int) | PayloadWriter | Writes a 4-byte int. | 0.1.0-alpha.4 or earlier |
PayloadWriter.writeLong(long) | PayloadWriter | Writes an 8-byte long. | 0.1.0-alpha.4 or earlier |
PayloadWriter.writeString(String) | PayloadWriter | Writes a length-prefixed UTF-8 string (at most 32767 characters). | 0.1.0-alpha.4 or earlier |
ServerPayloadHandler.receive(T, PlayerView) | void | Called on the server thread. | 0.1.0-alpha.4 or earlier |
permission
| Function | Returns | Description | Since |
|---|---|---|---|
PermissionProvider.check(PlayerView, PermissionNode) | PermissionResult | Whether player has node, or PermissionResult.UNDECIDED to let the next provider or the node's default decide. | 0.1.0-alpha.4 or earlier |
PermissionRegistrar.node(String, int) | PermissionNode | Declares <mod id>.<path>. | 0.1.0-alpha.4 or earlier |
PermissionRegistrar.provider(PermissionProvider) | void | Adds a provider asked for every permission check of every mod. | 0.1.0-alpha.4 or earlier |
resource
| Function | Returns | Description | Since |
|---|---|---|---|
BinaryReloadListener.onReload(Map<ResourceId,byte[]>) | void | Files by ID (<namespace>:<path without the suffix>); the arrays are the listener's own. | 0.1.0-alpha.4 or earlier |
ResourceId.minecraft(String) | ResourceId | An identifier in the minecraft namespace. | 0.1.0-alpha.4 or earlier |
ResourceId.of(String, String) | ResourceId | Creates namespace:path. | 0.1.0-alpha.4 or earlier |
ResourceId.parse(String) | ResourceId | Parses namespace:path; text without a colon is in the minecraft namespace, as in the game's commands and data files. | 0.1.0-alpha.4 or earlier |
ResourceRegistrar.onAssetFiles(String, String, BinaryReloadListener) | void | Like onAssetReload, for files ending in suffix, as bytes. | 0.1.0-alpha.4 or earlier |
ResourceRegistrar.onAssetReload(String, ResourceReloadListener) | void | Reads assets/<namespace>/<directory>/**.json from the enabled resource packs when the client starts and on F3+T; the listener runs on the client thread. | 0.1.0-alpha.4 or earlier |
ResourceRegistrar.onDataFiles(String, String, BinaryReloadListener) | void | Like onDataReload, for files ending in suffix (for example .png or .txt), handed over as bytes. | 0.1.0-alpha.4 or earlier |
ResourceRegistrar.onDataReload(String, ResourceReloadListener) | void | Reads data/<namespace>/<directory>/**.json from all enabled data packs (including mod jars) when the server starts and on /reload; the listener runs on the server thread after the game's own data has loaded. | 0.1.0-alpha.4 or earlier |
ResourceReloadListener.onReload(Map<ResourceId,String>) | void | The JSON files found, by ID: data/<namespace>/<directory>/<path>.json becomes <namespace>:<path>; contents are UTF-8 text. | 0.1.0-alpha.4 or earlier |
stability
| Function | Returns | Description | Since |
|---|---|---|---|
ApiStability.value() | StabilityLevel | The stability level of the annotated element. | 0.1.0-alpha.4 or earlier |
system
| Function | Returns | Description | Since |
|---|---|---|---|
SystemId.parse(String) | Optional<SystemId> | Parses value, or returns empty when it is not a valid system ID. | 0.1.0-alpha.4 or earlier |
SystemLookup.get(Class<T>) | T | Returns the active implementation of contract. | 0.1.0-alpha.4 or earlier |
SystemProvider.create(SystemContext) | T | Creates the system implementation. | 0.1.0-alpha.4 or earlier |
system.brand
| Function | Returns | Description | Since |
|---|---|---|---|
GameBrandSystem.brand(GameSide) | String | The brand reported by side. | 0.1.0-alpha.4 or earlier |
tag
| Function | Returns | Description | Since |
|---|---|---|---|
TagKey.block(ResourceId) | TagKey | A block tag, for example TagKey.block(ResourceId.minecraft("mineable/pickaxe")). | 0.1.0-alpha.4 or earlier |
TagKey.entityType(ResourceId) | TagKey | An entity type tag, for example TagKey.entityType(ResourceId.minecraft("skeletons")). | 0.1.0-alpha.4 or earlier |
TagKey.item(ResourceId) | TagKey | An item tag, for example TagKey.item(ResourceId.minecraft("logs")). | 0.1.0-alpha.4 or earlier |
TagKey.toString() | String | The tag as written in commands and data files, for example #minecraft:logs. | 0.1.0-alpha.4 or earlier |
TagRegistry.directory() | String | The folder under tags/ that holds this registry's tag files, for example block. | 0.1.0-alpha.4 or earlier |
TagView.contains(TagKey, ResourceId) | boolean | Whether entry (a block, item, or entity type ID, matching the tag's registry) is in the tag, including through nested tags. | 0.1.0-alpha.4 or earlier |
TagView.entries(TagKey) | List<ResourceId> | Every entry of the tag, nested tags resolved, in the game's order; empty for an unknown tag. | 0.1.0-alpha.4 or earlier |
world
| Function | Returns | Description | Since |
|---|---|---|---|
BlockPos.above() | BlockPos | The position one block up. | 0.1.0-alpha.4 or earlier |
BlockPos.below() | BlockPos | The position one block down. | 0.1.0-alpha.4 or earlier |
BlockPos.of(int, int, int) | BlockPos | Creates a position. | 0.1.0-alpha.4 or earlier |
BlockPos.offset(int, int, int) | BlockPos | This position moved by the given amounts. | 0.1.0-alpha.4 or earlier |
Direction.isHorizontal() | boolean | Whether this is one of the four horizontal directions. | 0.1.0-alpha.4 or earlier |
Direction.opposite() | Direction | The direction pointing the other way. | 0.1.0-alpha.4 or earlier |
StorageOptions.syncedToClients() | StorageOptions | These options, synchronised to clients. | 0.1.0-alpha.4 or earlier |
StorageOptions.withVersion(int, DataMigration) | StorageOptions | These options at version, upgrading older data with migration. | 0.1.0-alpha.4 or earlier |
StoredData.data() | DataTree | The data; call markChanged() after changing it so it is saved. | 0.1.0-alpha.4 or earlier |
StoredData.markChanged() | void | Marks the data for saving with the next world save. | 0.1.0-alpha.4 or earlier |
Vector3.length() | double | Length of the vector. | 0.1.0-alpha.4 or earlier |
WorldView.biomeAt(BlockPos) | ResourceId | The biome at pos, for example minecraft:plains. | 0.1.0-alpha.4 or earlier |
WorldView.blockAt(BlockPos) | ResourceId | The block at pos, for example minecraft:air. | 0.1.0-alpha.4 or earlier |
WorldView.blockEntityAt(BlockPos) | Optional<BlockEntityView> | The mod block entity at pos, if there is one. | 0.1.0-alpha.4 or earlier |
WorldView.dimension() | ResourceId | The dimension, for example minecraft:overworld. | 0.1.0-alpha.4 or earlier |
WorldView.emittedLight(BlockPos) | int | Light the block at pos emits, 0–15. | 0.1.0-alpha.4 or earlier |
WorldView.entitiesNear(double, double, double, double) | List<EntityView> | Entities whose position is within radius blocks of the point. | 0.1.0-alpha.4 or earlier |
WorldView.gameRule(GameRuleKey<T>) | T | The current value of a game rule in this world; server side only. | 0.1.0-alpha.4 or earlier |
WorldView.gameTime() | long | Ticks since the world was created. | 0.1.0-alpha.4 or earlier |
WorldView.isBlockIn(BlockPos, TagKey) | boolean | Whether the block at pos is in a block tag, for example #minecraft:logs. | 0.1.0-alpha.4 or earlier |
WorldView.isChunkLoaded(int, int) | boolean | Whether the chunk is loaded. | 0.1.0-alpha.4 or earlier |
WorldView.isClientSide() | boolean | Whether this is the client's copy of the world, which must not be changed. | 0.1.0-alpha.4 or earlier |
WorldView.naturalSpawns(BlockPos, MobCategory) | List<ResourceId> | Mobs that can spawn by themselves at pos in category, by the biome there; for checking natural spawn settings. | 0.1.0-alpha.4 or earlier |
WorldView.otherDimension(ResourceId) | Optional<WorldView> | Another loaded dimension of the same server, such as a mod dimension from data; server side only. | 0.1.0-alpha.4 or earlier |
WorldView.playSound(BlockPos, ResourceId, float, float) | void | Plays a sound to players near pos (server) or locally (client). | 0.1.0-alpha.4 or earlier |
WorldView.players() | List<PlayerView> | Players in this dimension. | 0.1.0-alpha.4 or earlier |
WorldView.schedule(int, Runnable) | void | Runs task on the server thread after ticks ticks of this dimension (0 = next tick). | 0.1.0-alpha.4 or earlier |
WorldView.setBlock(BlockPos, ResourceId) | boolean | Replaces the block at pos with the default state of block and notifies neighbours and clients. | 0.1.0-alpha.4 or earlier |
WorldView.setChunkForced(int, int, boolean) | boolean | Keeps a chunk loaded (and ticking) until released, like /forceload; saved with the world. | 0.1.0-alpha.4 or earlier |
WorldView.setGameRule(GameRuleKey<T>, T) | void | Changes a game rule for this world; server side only. | 0.1.0-alpha.4 or earlier |
WorldView.setProperty(BlockPos, BlockProperty<T>, T) | boolean | Changes one property of the block at pos, keeping the others. | 0.1.0-alpha.4 or earlier |
WorldView.spawnEntity(ResourceId, double, double, double) | EntityView | Spawns an entity of type (for example minecraft:pig or a mod mob) at the position; server side only. | 0.1.0-alpha.4 or earlier |
WorldView.spawnParticles(ResourceId, double, double, double, int, double) | void | Shows a simple particle (one without options, such as minecraft:heart or minecraft:flame) to nearby players; server side only. | 0.1.0-alpha.4 or earlier |
WorldView.stateAt(BlockPos) | BlockStateView | The block and its property values at pos. | 0.1.0-alpha.4 or earlier |
WorldView.storage(ResourceId) | StoredData | Data saved with this dimension under id (use your mod ID as namespace), created empty on first use. | 0.1.0-alpha.4 or earlier |
WorldView.storage(ResourceId, StorageOptions) | StoredData | World storage with a data version and optional client synchronisation. | 0.1.0-alpha.4 or earlier |
WorldView.tags() | TagView | The block, item, and entity type tags the game loaded (the server's data, or the client's copy). | 0.1.0-alpha.4 or earlier |
worldgen
| Function | Returns | Description | Since |
|---|---|---|---|
BiomeDefinition.Builder.build() | BiomeDefinition | Creates the definition. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.climate(float, float, boolean) | BiomeDefinition.Builder | Temperature (plains 0.8), downfall (plains 0.4) and whether it rains or snows. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.feature(GenerationStepName, ResourceId) | BiomeDefinition.Builder | Adds a placed feature, such as minecraft:trees_plains, in step. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.fogColor(int) | BiomeDefinition.Builder | Fog colour, 0xRRGGBB. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.foliageColor(int) | BiomeDefinition.Builder | Leaf colour, 0xRRGGBB, instead of one computed from the climate. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.grassColor(int) | BiomeDefinition.Builder | Grass colour, 0xRRGGBB, instead of one computed from the climate. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.skyColor(int) | BiomeDefinition.Builder | Sky colour, 0xRRGGBB. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.spawn(MobCategory, ResourceId, int, int, int) | BiomeDefinition.Builder | Adds a naturally spawning mob. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.Builder.waterColor(int) | BiomeDefinition.Builder | Water colour, 0xRRGGBB. | 0.1.0-alpha.4 or earlier |
BiomeDefinition.builder() | BiomeDefinition.Builder | A builder with plains-like values and no features or spawns. | 0.1.0-alpha.4 or earlier |
BiomeSelector.ids(ResourceId[]) | BiomeSelector | Biomes with one of these IDs. | 0.1.0-alpha.4 or earlier |
BiomeSelector.tag(ResourceId) | BiomeSelector | Biomes in this tag. | 0.1.0-alpha.4 or earlier |
CodeFeature.place(FeatureContext) | boolean | Places the feature around FeatureContext.origin(). | 0.1.0-alpha.4 or earlier |
ColumnBuilder.fill(int, int, ResourceId) | void | Sets block from fromY to toY, both inclusive. | 0.1.0-alpha.4 or earlier |
ColumnBuilder.maxY() | int | Highest Y of the dimension (inclusive). | 0.1.0-alpha.4 or earlier |
ColumnBuilder.minY() | int | Lowest Y of the dimension. | 0.1.0-alpha.4 or earlier |
ColumnBuilder.seed() | long | A number derived from the world seed and the generator ID, the same for every column. | 0.1.0-alpha.4 or earlier |
ColumnBuilder.set(int, ResourceId) | void | Sets the default state of block at y; positions outside the dimension are ignored. | 0.1.0-alpha.4 or earlier |
FeatureContext.blockAt(BlockPos) | ResourceId | The block at pos, without properties. | 0.1.0-alpha.4 or earlier |
FeatureContext.isAir(BlockPos) | boolean | Whether pos is air. | 0.1.0-alpha.4 or earlier |
FeatureContext.maxY() | int | The highest block y of the world. | 0.1.0-alpha.4 or earlier |
FeatureContext.minY() | int | The lowest block y of the world. | 0.1.0-alpha.4 or earlier |
FeatureContext.origin() | BlockPos | The position the placement chose, for example on the surface or at a random height. | 0.1.0-alpha.4 or earlier |
FeatureContext.random() | RandomGenerator | Randomness for this placement; the same world seed and position give the same values. | 0.1.0-alpha.4 or earlier |
FeatureContext.setBlock(BlockPos, ResourceId) | void | Sets the default state of block at pos. | 0.1.0-alpha.4 or earlier |
FeatureContext.surfaceY(int, int) | int | The y of the first air block above the terrain at x, z, as generation sees it so far. | 0.1.0-alpha.4 or earlier |
FeaturePlacement.atHeight(int, int, int) | FeaturePlacement | countPerChunk tries at random heights from minY to maxY in each chunk. | 0.1.0-alpha.4 or earlier |
FeaturePlacement.onSurface(int) | FeaturePlacement | countPerChunk tries on the surface of each chunk. | 0.1.0-alpha.4 or earlier |
FeaturePlacement.rarity(int) | FeaturePlacement | This placement in only 1 of rarity chunks. | 0.1.0-alpha.4 or earlier |
NoiseFunction.compute(int, int, int) | double | The density at block x, y, z. | 0.1.0-alpha.4 or earlier |
StructureBuilder.build(StructurePieceContext) | void | Writes the structure's blocks through context. | 0.1.0-alpha.4 or earlier |
StructureDefinition.Builder.adaptTerrain() | StructureDefinition.Builder | Smooths the terrain around the box, like around a village. | 0.1.0-alpha.4 or earlier |
StructureDefinition.Builder.biomes(BiomeSelector) | StructureDefinition.Builder | Where it may generate; every overworld biome (#minecraft:is_overworld) by default. | 0.1.0-alpha.4 or earlier |
StructureDefinition.Builder.build() | StructureDefinition | Creates the definition; invalid values throw IllegalArgumentException. | 0.1.0-alpha.4 or earlier |
StructureDefinition.Builder.spacing(int, int) | StructureDefinition.Builder | Average and minimum distance between structures in chunks; 32 and 8 by default. | 0.1.0-alpha.4 or earlier |
StructureDefinition.Builder.step(GenerationStepName) | StructureDefinition.Builder | The generation step; GenerationStepName.SURFACE_STRUCTURES by default. | 0.1.0-alpha.4 or earlier |
StructureDefinition.Builder.yOffset(int) | StructureDefinition.Builder | Raises (or with a negative value sinks) the box relative to the surface; 0 by default. | 0.1.0-alpha.4 or earlier |
StructureDefinition.builder(int, int, int, StructureBuilder) | StructureDefinition.Builder | A builder for a sizeX × sizeY × sizeZ structure built by builder. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.blockAt(int, int, int) | ResourceId | The block at a box position, without properties. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.fill(int, int, int, int, int, int, ResourceId) | void | Fills the box positions from (x1, y1, z1) to (x2, y2, z2), both included. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.origin() | BlockPos | World position of the box's lowest corner. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.random() | RandomGenerator | Randomness for this structure; the same on every call for the same structure. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.setBlock(int, int, int, ResourceId) | void | Sets the default state of block at a box position. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.sizeX() | int | Box size along x. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.sizeY() | int | Box size along y. | 0.1.0-alpha.4 or earlier |
StructurePieceContext.sizeZ() | int | Box size along z. | 0.1.0-alpha.4 or earlier |
TerrainGenerator.fillColumn(int, int, ColumnBuilder) | void | Fills the column at world position x, z; unset blocks stay air. | 0.1.0-alpha.4 or earlier |
TerrainGenerator.seaLevel() | int | Sea level of dimensions using this generator; the game spawns water mobs and fish below it. | 0.1.0-alpha.4 or earlier |
WorldgenRegistrar.addFeature(BiomeSelector, GenerationStepName, ResourceId) | void | Adds a placed feature at the end of step in every selected biome. | 0.1.0-alpha.4 or earlier |
WorldgenRegistrar.biome(String, BiomeDefinition) | ResourceId | Defines biome <mod id>:<path> in code. | 0.1.0-alpha.4 or earlier |
WorldgenRegistrar.chunkGenerator(String, TerrainGenerator) | ResourceId | Registers terrain written in code as generator type <mod id>:<path>, for dimensions in data packs. | 0.1.0-alpha.4 or earlier |
WorldgenRegistrar.densityFunction(String, double, double, NoiseFunction) | ResourceId | Registers a density function written in code as type <mod id>:<path>. | 0.1.0-alpha.4 or earlier |
WorldgenRegistrar.feature(String, FeaturePlacement, CodeFeature) | ResourceId | Registers a feature written in code as feature type <mod id>:<path>, and writes a configured and a placed feature with the same ID into Poly Mod Loader's generated data pack. | 0.1.0-alpha.4 or earlier |
WorldgenRegistrar.structure(String, StructureDefinition) | ResourceId | Registers a structure built in code as <mod id>:<path>, with its structure set, in Poly Mod Loader's generated data pack. | 0.1.0-alpha.4 or earlier |