Mod API reference

This page is a generated index of the catalog-backed trait hooks (crates/sunrise-mod-vocab/src/hooks/) and area-declared host methods (crates/sunrise-mod-vocab/src/host/). For complete trait definitions (including non-catalog methods), handles, and cross-linked rustdoc, build the crate docs locally with cargo doc -p sunrise-mod-api --no-deps --open.

From Sunrise's modding book716c272

Hooks (Hooks trait)

  • add_attribute_tooltips

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    AddAttributeTooltipsEvent
    Summary
    AddAttributeTooltipsEvent: the lines that follow a stack's attribute lines (ItemStack.addAttributeTooltips), after the modifiers the stack shows and gather_skipped_attribute_tooltips left in. Push lines to lines, each with a colour as rgba packs it (u32::MAX keeps the text's own); they land beside the attribute lines without finding where those end. shown is whether the stack's minecraft:tooltip_display shows the attribute modifiers (shouldShow); the hook is asked either way. player and player_entity_id are the local player's, None for the recipe book's search text, which has none and drops the colours, and for a stack nested in another's tooltip (a crossbow's loaded projectile); advanced (F3+H) and creative (a creative tab's own slot) are the tooltip's TooltipFlag. Asked when lines are built for display, recipe book search or ItemResource::tooltip. Display and resource-query builds skip it when the stack hides its entire tooltip. Reentrant line queries do not dispatch it. Client-side, only while a mod listens. A component deeper than 512 nodes refuses capture or the whole writeback; no event field is applied if any Text field fails conversion.
  • add_client_reload_listeners

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientReloadListenerContext
    NeoForge
    AddClientReloadListenersEvent
    Summary
    Register client asset reload listeners before a reload stages its assets (NeoForge's AddClientReloadListenersEvent, the client's counterpart of add_server_reload_listeners): the first load on the loader thread, then every later reload — the player changed resource packs, F3+T was pressed, or a server sent its packs. The listener's prepare then reads the merged asset view with resource-pack overrides resolved, and its returned apply publishes the parsed state, all applies after all prepares, before client_resources_reloaded. Dependencies on the model manager order both its real model build and its publication. Atlas upload precedes the model manager. A listener prepare or engine preflight that refuses the candidate aborts the load before any listener applies. Client-side, taking a ClientReloadListenerContext. Later registration is on the render thread, prepare on the loader, and apply on the owning game thread. On initial startup before any resources are published, context.published() is None; on later reloads it returns Some(&dyn ClientReloadHost). Registration errors are returned and logged at the call, without stopping the reload. A panicking registration callback contributes no listeners or dependencies; unrelated callbacks still run.
  • add_pack_finders

    Side
    both
    Contract
    listen
    Host / context
    &mut dyn PackDiscoveryContext
    NeoForge
    AddPackFindersEvent
    Summary
    Add discoverable resource or data packs before a repository selects its packs (AddPackFindersEvent). The builder reports the repository's pack type. Runs at startup and whenever that repository is rediscovered; no world state is available during startup registration. Disabled native mods' listeners are skipped from the first startup discovery onwards. A callback that panics contributes no packs; later callbacks still run.
  • add_section_geometry

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    AddSectionGeometryEvent
    Summary
    Extra geometry in chunk section meshes (NeoForge's AddSectionGeometryEvent): register(renderer) adds the mod's own SectionGeometry, which the mesher asks to add its quads every time it meshes a section, on its worker threads. The quads are part of that section's mesh: they follow its rebuilds, are never drawn twice, and go when it unloads. Asked once at start on the client, before resources load. A registration callback that panics or incurs a phase refusal contributes no renderers.
  • add_server_reload_listeners

    Side
    server
    Contract
    listen
    Host / context
    &dyn ReloadContext
    NeoForge
    AddServerReloadListenersEvent
    Summary
    Register server data reload listeners after packs are selected. The ReloadContext gives registry access at registration, as AddServerReloadListenersEvent.getRegistryAccess does. Runs every data load on the owning server thread; world handles, services and transactions are not present on this context. Existing data-load callbacks retain their DataLoadContext. Each listener's prepare returns an owned action, consumed once on the server thread after all prepares succeed. Registration errors are returned and logged at the call, without stopping the reload. A panicking registration callback contributes no ordered or retained listeners or dependencies; unrelated callbacks still run.
  • alter_ground

    Side
    server
    Contract
    collect
    Host / context
    &dyn WorldgenHost
    NeoForge
    AlterGroundEvent
    Summary
    A tree's alter_ground decorator (AlterGroundDecorator.place, the podzol under a big spruce) is about to turn the ground around positions: the lowest of its trunk or roots (logs if it has no roots, logs and roots when they start level, else roots); only those at the first one's Y are placed around. logs, leaves and roots are the decorator context's lists, each sorted by Y. Set provider to your own GroundProvider::Mod to choose a canonical BlockState for the ground; to change it only where you like, wrap the provider you found and ask it for the rest, since several mods may each wrap the one before. Once per decorated tree, before any ground is placed; the hook itself draws nothing. Server-side, on the worldgen worker threads (and on the server thread when a sapling grows), with the server's worldgen context: no Host, no writes.
  • animal_tame

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    AnimalTameEvent
    Summary
    The player tamer (UUID) and tamer_entity_id is about to tame the mob entity of kind (AnimalTameEvent): its taming roll succeeded (a wolf's bone, a cat's fish, a parrot's seeds or a nautilus's food; a horse, donkey, mule or llama the player rides). Set cancel for the attempt to fail instead, as a failed roll does: smoke for a pet, and a horse bucks its rider off. Before entity_tame. Server-side.
  • anvil_craft_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    AnvilCraftEvent.Post
    Summary
    A player took an anvil's result at pos and the levels, inputs and anvil wear are done (AnvilCraftEvent.Post); a broken anvil is already air. inputs borrows the same pre-take input stacks and result as anvil_craft_pre. Not called when anvil_craft_pre cancelled.
  • anvil_craft_pre

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    AnvilCraftEvent.Pre
    Summary
    A player took an anvil's result at pos (AnvilCraftEvent.Pre, matching NeoForge AnvilMenu.onTake), before the levels are charged, the inputs used up and the anvil worn. inputs borrows the input stacks and result from before the take. Set cancel to return early before charging levels, consuming inputs, damaging the anvil or firing anvil_craft_post, without undoing the click's item move (the listener handles any post-processing itself).
  • anvil_damaged

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    An anvil at pos took damage, changing its block from from to to. to is air when the anvil broke. Server-side.
  • anvil_update

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    AnvilUpdateEvent
    Summary
    An anvil at pos made vanilla's result with a left input, for player (UUID) and player_entity_id (AnvilUpdateEvent, matching NeoForge AnvilMenu.createResult / CommonHooks.onAnvilUpdate), live on every createResult with no answer cache: inputs lends the stacks, rename text and vanilla result; edits starts with Keep and vanilla's costs. Set an output or edit the costs without changing the inputs. Cancellation clears the result and both costs. An invalid replacement output is logged and ignored (keeping vanilla's output while still applying the cost edits). edits.xp_cost stays signed during listener dispatch and clamps to 0 when applied (AnvilMenu.setCost). Both sides, including the update after material consumption with the left slot still present. On the server that update observes the player after AnvilMenu.onTake has charged the levels.
  • arm_pose_transform

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    HumanoidModel.ArmPose
    Summary
    Apply a registered pose (HumanoidModel.ArmPose's transformer). Asked only for a selected registered pose, once per model and arm during humanoid extraction, in vanilla's physical-arm application order. Suppressed poses do not call the transformer. humanoid contains the selected poses after get_arm_pose answers. right_arm identifies the physical arm, not the hand. Write absolute pitch, yaw and roll in radians into angles; initially all components are non-finite, meaning preserve the base model angle. Each non-finite component is ignored. The ordinary swing and species animations still run afterward.
  • armor_hurt

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    ArmorHurtEvent
    Summary
    Armor is about to take durability damage from a hit (NeoForge's ArmorHurtEvent, vanilla's LivingEntity.doHurtEquipment): once per hit, for the pieces that would wear, and first for the helmet alone when a falling block hits a player (hurtHelmet). entity is the wearer's entity id, player its UUID (None for a mob), kind its type and source the hit's damage type (causing and direct are 0: the hit does not carry them here). Each entry has its slot, the stack, the damage vanilla worked out and a new_damage a mod may change (0 for none; Unbreaking is applied after). Canceling means no armor damage. A server player's feet, legs, chest and head; a mob's body (a horse's armor). Server-side.
  • armor_stand_manipulate

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player takes an item from an armor stand or puts one on it (ArmorStand.interactAt, after the stand's disabled-slot checks and swapItem's take/put locks, before anything moves): stand_id is the stand's Entity.getId and slot the one the click reached (mainhand, offhand, feet, legs, chest or head). Set cancel and nothing changes: neither the stand nor the player's hand, and the click is spent. The player's state is swapped in for the call; player is the UUID the helpers take. Not told of a click that changes nothing (an empty hand on an empty slot). The listener may change the world: straight after it returns without cancelling, the game finds the stand again by stand_id and checks that it still exists, that the slot's stack and the held stack keep their item and count, and that the slot is not now locked; if not, the click is spent and nothing moves. Not covered, other ways a stand's equipment moves: breaking or blasting the stand (its items drop), a dispenser putting armour on one, a mod's own changes. Server-side, for every player of the world.
  • arrow_loose

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    ArrowLooseEvent
    Summary
    NeoForge's ArrowLooseEvent: the player releases a bow stack with has_ammo and charge ticks held. Change charge or set canceled to prevent the shot; negative charge also prevents it. Unlike living_entity_use_item_stop, this does not skip the whole item release; entity_shoot_bow reports a spawned arrow afterward with read-only force. Fires on the Game running the bow release, including LAN guests; a remote client's own release path is not covered. Crossbows are not covered; arrow_nock is the bow's start.
  • arrow_nock

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    ArrowNockEvent
    Summary
    A player is about to nock bow with hand (BowItem.use, NeoForge's ArrowNockEvent): has_ammo is whether getProjectile found ammunition or the player is in creative. Set cancel to fail the use.
  • attack_entity

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    AttackEntityEvent
    Summary
    A player attacks the entity entity (Entity.getId) of type kind (minecraft:item_frame, minecraft:cow, minecraft:player) standing at pos: ServerGamePacketListenerImpl.handleInteract's attack, once in reach, where Player.attack starts. The swing has not begun, so the attacking player's attack strength is still the charge the blow uses (vanilla reads it at the start of Player.attack; the swing resets it afterwards). Set canceled and the blow does nothing (no damage, no knockback, the frame keeps its item). Server-side, for every player of the world (host.players().acting_player() says who).
  • baby_entity_spawn

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    BabyEntitySpawnEvent
    Summary
    Two animals bred and the baby they made is about to join the world (NeoForge's BabyEntitySpawnEvent, vanilla's Animal.spawnChildFromBreeding): dimension is the level they are in (a replacement baby's PendingMobSpec names it), parent and partner are entity ids, player and player_entity_id the UUID and entity id of the player who fed them into love (getCausedByPlayer, None when none). The baby (a mule for a horse and a donkey) is already constructed, with its inheritance drawn, but not finalized or in any level: it is the single entry of the engine-owned list edits.children() names, which edits changes. Edit the baby in place (edits.set_position, edits.set_yaw), replace it with another baby (edits.construct a baby PendingMobSpec, then edits.replace), or remove it (edits.remove) for none. A second baby is refused with Capacity, and a replacement must be a baby. Set cancel for no baby either: the parents still rest and lose their love (their ages were already set to 6000), but there is no baby, no experience, no animals_bred statistic, no advancement and no heart particles. The construction draws stay spent. A panicking callback is reported and disabled for the session, and this breeding is cancelled. A refusal (including an explicit veto or a stale parent) rolls back journaled listener writes in the breeding level. An accepted baby is applied before deferred join callbacks run. Every handle is borrowed for one listener only. Not fired for turtles, frogs and sniffers (an egg, no baby), or their hatching; armadillos take the ordinary animal path and are included. Villagers do not post this animal-only event, matching NeoForge's documented Animal.spawnChildFromBreeding posting site; a rejected villager join instead leaves the child's bed free. On the server.
  • beacon_state_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A beacon at pos activated or deactivated after its beam was checked. active says whether it now has a complete pyramid. Server-side.
  • bell_ring

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    On an authoritative server, a bell at pos is about to ring. Set cancel to stop the ring and its raider reveal.
  • biome_colors

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Change the colours of biome (minecraft:plains) on this client: the grass, foliage (leaves, vines), dry foliage (leaf litter) and water tints, 0xRRGGBB, as its biome file and the colormaps set them. Asked for every biome when a mod calls native_refresh_biome_colors, which rebuilds the terrain with them; a season mod answers from its season and calls that when the season turns. The dark forest's modifier still applies to the grass set here; the swamp's noise colours replace it.
  • block_break_progress_update

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server guest's block-breaking animation changed to progress at pos (0 through 9).
  • block_burn

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    On an authoritative server, fire is about to burn the block at pos away. Set cancel to keep that block.
  • block_changed

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    An authoritative server committed a changed state through Level.setBlock. The world contains new; block side effects and neighbour updates follow. flags are the BlockUpdateFlags applied to the write that reached the level, not to any intermediate changes staged in a transaction. KNOWN_SHAPE skips the neighbour shape passes, not this notice. Each listener gets its own event.
  • block_cook

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A block finished cooking item into result at pos.
  • block_damage_abort

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player stopped digging pos before the block broke, after the server cleared the dig and sent the block back to the client. The player's state is not swapped in.
  • block_dispense_armor

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A dispenser equipped item on the first eligible target in front of its block at pos. target is player, mob or armor_stand. The equip, item consumption, sound and game event have completed. Server-side.
  • block_drops

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    BlockDropsEvent
    Summary
    NeoForge's BlockDropsEvent: Block.dropResources has prepared the item entities but has not joined them to the level. Fires for player and mob block breaks using this path, and level-side breaks (pistons, water, neighbour updates, /setblock destroy). Not fired for explosions, dispensers or other loot-table drops. Use can_drop_from_explosion to decide whether a blasted block drops, and loot_drops to edit its stacks before the blast merges them. Player and mob loot also runs loot_drops first; other level-side breaks do not.
  • block_entity_type_add_blocks

    Side
    both
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    BlockEntityTypeAddBlocksEvent
    Summary
    Extend existing types' valid blocks (NeoForge BlockEntityTypeAddBlocksEvent). Fired after content declarations, before worlds load. event.types is the list of registered types. Use event.modify(kind, blocks) for a direct addition, or event.modify_matching(predicate, blocks) for all matching registered keys. Neither changes the block's factory or ticker. Duplicate additions are harmless; unknown keys or incompatible classes fail startup. Existing sign-template memberships remain valid without a listener. Blocks must share the common vanilla superclass of the type's existing blocks.
  • block_fade

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    A block at pos is about to fade from from to to because of melting or coral death. Set cancel to keep it. Server-side.
  • block_failed_dispense

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A dispenser at pos failed to dispense item. Server-side.
  • block_form

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    Precipitation is about to form ice or place or thicken snow at pos. from and to are block state IDs. Set cancel to keep the old state. Server-side.
  • block_grow_feature

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    BlockGrowFeatureEvent
    Summary
    A sapling, azalea, mushroom or fungus at pos is about to grow into the configured feature, None when vanilla has none to place (a lone dark oak sapling). Set cancel, or feature to None, to keep the block; set feature to another key to grow that one. Server-side. Draw from the level's live stream with host.with_random(|rng| rng.next_int_bound(bound)).
  • block_highlight

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ExtractBlockOutlineRenderStateEvent
    Summary
    Before an eligible targeted block's selection outline is built. Cancel skips only the default block highlight, after normal HUD and game-mode gates.
  • block_ignite

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    On an authoritative server, fire is about to be placed at pos by flint and steel, a fire charge, lava, lightning or fire spread. Set player is the acting server player when there is one. Set cancel to leave the position unchanged.
  • block_lock_check

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest's block inventory lock check at pos. locked is the vanilla result and may be changed. The guest's state is not swapped in.
  • block_receive_game

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A sculk sensor or shrieker received a vibration for event at pos. Set cancel to suppress its response. Server-side.
  • block_shear_entity

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A dispenser sheared entity of kind kind at the block in front of its own block at pos, after the shearing effects. Server-side.
  • block_spread

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    On an authoritative server, a fluid flows or fire spreads from from into to (kind is fluid or fire): FlowingFluid.spreadTo, and FireBlock.tick setting fire to to or burning it (checkBurnOut). Set canceled to leave the block at to as it is. Fluids ask on every flow: answer fast.
  • block_tool_modification

    Side
    both
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    BlockEvent.BlockToolModificationEvent
    Summary
    A tool is about to transform a block. Cancel or replace the final state; None suppresses the transformation. The block's own tool_modified_state part answers first, and a block whose part cancelled the action never reaches this hook.
  • blocks

    Side
    both
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEvent
    Summary
    Declare blocks in code once at startup on each side, before resources load. Pass each mod_api::Block to event.register. The declaration belongs to the submitting package — in its own namespaces or in a content package it serves (served_by) — and works like data/<id>/sunrise/block/<path>.json in a content mod, including a block item unless disabled with Block::with_item(false). Duplicate IDs across the host and served layers, and declarations into a side = "server" package's namespace, are refused. register returns a typed DeclarationError for invalid IDs or fields. The game records the refusal and stops startup even if a returning listener ignores it. A panic discards this listener's declarations and diagnostics without rejecting startup.
  • bonemeal

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    BonemealEvent
    Summary
    BonemealEvent: bone meal from stack used on the block state at pos (BoneMealItem.growCrop), by player or, when it is None, by a dispenser or a villager. valid_bonemeal_target is the block's isValidBonemealTarget. Cancel skips vanilla's growth, the block's own bone meal Parts and the meal's use: growCrop then answers successful (setSuccessful), which is false unless a mod sets it. Fired on both sides; changes to stack stay. Set it to None to consume the whole stack; a nonempty result is validated before any write-back.
  • break_block

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    BreakBlockEvent
    Summary
    A player breaks the block state at pos, once the game allowed it (the held item can break blocks, the debug stick didn't take the click): where ServerPlayerGameMode.destroyBlock starts. Set canceled to keep the block: nothing is destroyed or dropped, and a guest sees it back. Set exp_to_drop to Some(amount) to replace the experience sample later, after item drops are prepared; None keeps sampling. A subscribed block part's exp_drop answer is supplied as this event's initial amount. block_drops sees and may change that amount afterwards; cancellation or disabled block drops suppresses it. Server-side, for every player of the world (the helpers read the acting one). Diverges from upstream: renamed from destroy_block, to NeoForge's BreakBlockEvent.
  • brewing_complete

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A brewing stand finished brewing at pos, after its bottle contents were changed. Server-side.
  • brewing_fuel

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A brewing stand at pos consumed fuel and gained brewing fuel. Server-side.
  • brewing_start

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A brewing stand at pos began brewing ingredient, after fuel and the timer were set. Server-side.
  • broadcast_message

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    A server broadcast line is about to be logged and sent. Change line or set cancel to drop it.
  • bucket_empty

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player empties a bucket at pos (fluid: minecraft:water, minecraft:lava, minecraft:powder_snow; a fish or axolotl bucket empties minecraft:water): where BucketItem.use has found the block the fluid goes into and the player may build there, right before it is placed. Set cancel and nothing is poured and the bucket stays full. The player's state is swapped in, so PlayerRef::tell answers them. Only for guests of a server. fill_bucket hears this click too (and the filling one) without the player and the fluid. Not heard: a dispenser, a cauldron, and a fluid a block places itself.
  • build_creative_mode_tab_contents

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    BuildCreativeModeTabContentsEvent
    Summary
    Edit a creative mode tab's ordered parent and search lists after its generator and before feature-flag filtering (NeoForge's BuildCreativeModeTabContentsEvent). Runs once for every registered tab, including Search, Hotbar and Inventory, on the logical side that requests the build. The event gives the tab id, enabled feature flags, permission profile and a build-scoped edit handle. Edits are visible to later listeners in dispatch order.
  • calculate_player_turn

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    CalculatePlayerTurnEvent
    Summary
    The mouse sensitivity and cinematic camera option a grabbed player's mouse turn reads this frame (MouseHandler.turnPlayer). Change either for this turn only; the options are unchanged. Client-side. This shapes how far the mouse turns the view; ClientHost::set_local_rotation sets the view directly, and the two meet in the same angles the tick's move packet sends.
  • camera_distance

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    CalculateDetachedCameraDistanceEvent
    Summary
    Final scaled third-person camera distance, before visual-shape collision clipping. entity includes its living scale/distance and optional mount scale/distance. Only finite requests in 0..=1024 blocks replace the vanilla distance.
  • camera_pose

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ViewportEvent.ComputeCameraAngles
    Summary
    The camera this frame is drawn from, partial ticks past the last tick, after vanilla placed it (Camera.setup): its position, and its yaw and pitch in degrees. Set them to draw the world from anywhere: a cinematic or replay camera. Only the picture, the sound's listener and the billboards facing the camera follow it; the player, where they aim, the first-person hand and which chunks load stay the player's. Values that aren't finite keep vanilla's. Not called on the title screen's panorama.
  • camera_shake

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ViewportEvent.ComputeCameraAngles
    Summary
    The camera shake native mods ask for in this frame, partial ticks past the last tick (0 to 1): add your pitch, yaw and roll in degrees and your offset in blocks, along the camera's right, up and back, to shake, so several mods' shakes add up. Read while playing only; Sunrise scales the sum by Distortion Effects and bounds it (native_shake_matrix).
  • camera_submersion

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Override the client view's submersion. Camera fluid reads (Camera.getFluidInCamera) start with the game's fog type after state_at_viewpoint. The first-person water overlay instead asks at the local player's eye with Water if the player's tick sampled water there, or Atmospheric otherwise. The sample comes from death tick 20 once the local player is removed, until respawn. Setting Water enables the overlay; any other value suppresses it. Set Atmospheric to clear submersion or a fluid to force it. Later listeners see the last successful value. A panic disables only that mod's listener for the session and is reported in the log and the client error toast.
  • camera_type_cycle

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    key.togglePerspective (F5) is cycling the window's camera type (Minecraft.handleKeybinds calling Options.setCameraType(getCameraType().cycle())): previous is the type it leaves, and next comes in as vanilla's next one (first person, third person behind, third person in front, then first person again); set next to another, to skip a type or keep one. Once a press, before the type changes; the post effect of the camera entity follows the answer as it follows vanilla's. camera_type and set_camera_type read and set the type at any other moment. Client-side. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • campfire_start

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    An item was placed on a campfire at pos and began cooking.
  • can_continue_sleeping

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    CanContinueSleepingEvent
    Summary
    CanContinueSleepingEvent: a sleeping living entity's check that it may go on sleeping, run each tick for a server player the dead and health checks would not already wake, and for a sleeping villager or wandering trader. entity is its UUID, name a player's name (empty for a mob) and kind its type (minecraft:player). problem is what vanilla found (getProblem): NotPossibleHere when the bed at pos is gone, NotPossibleNow when a player's bed rule no longer lets them sleep (daytime), none when nothing is wrong. may_continue starts empty, meaning problem.is_none() (mayContinueSleeping); set it Some(true) to keep them asleep, Some(false) to wake them. The player's state is not swapped in on a guest tick.
  • can_eat

    Side
    both
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Player.canEat, from Consumable.canConsume when eating starts and block interaction eligibility for cake and candle cake. player is the eater: the acting server player (including a LAN guest) or the local player whose use the client predicts. Read their effects through host.living(player.entity()). For food items, stack is the food being consumed. For cake and candle cake, stack is None regardless of the held item. Vanilla computes eligibility with always-eat false for cake, or the stack's food component for food. vanilla_can_eat is that answer (creative, always-eat, or hungry). Answer Some(false) to refuse the food, Some(true) to let a full player eat; can_eat left None keeps vanilla_can_eat. Both sides (the client starts eating as the server does), so answer from the stack and the player alone. Not asked without a resident eater or an open lifecycle epoch; vanilla's answer stands during those world/login lifecycle gaps.
  • can_player_sleep

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    CanPlayerSleepEvent
    Summary
    A server player tries to sleep in the bed whose head is at pos (NeoForge's CanPlayerSleepEvent, vanilla's ServerPlayer.startSleepInBed). problem is what vanilla found, first problem only: too_far_away, obstructed, not_possible_now (not night or thunder, the bed rule), not_safe (monsters near), or None. A mod may set None to let the player sleep anyway, or one of those names (other_problem refuses without a message) to refuse. The spawn point is set before it fires, as in vanilla, only when vanilla found no problem. After it, player_bed_enter still fires and may cancel. Server-side.
  • can_start_swimming

    Side
    both
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    IEntityExtension.canStartSwimming
    Summary
    Replace IEntityExtension.canStartSwimming for the player being simulated. Entry is asked of a sprinting player who isn't already swimming or flying, before excluding passengers. ShallowWater is asked in local sprint eligibility when the vanilla shallow-water clause is false but the body touches a swimmable fluid; a false answer then means shallow. The first Some(true) or Some(false) wins. If no listener answers, Sunrise uses vanilla's saved-eye and feet-cell entry checks, or the ordinary vanilla shallow-water result. This does not change the player's fluid samples, flight or existing swim. Declare side = "both" and install the mod on both sides. Base the answer on facts available to both sides that tick; the server remains authoritative for position.
  • cauldron_level_changed

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    On an authoritative server, a cauldron at pos is about to change fill level from from_level to to_level for reason. Set cancel to leave it unchanged. For extinguishing (a burning entity in a water or powder snow cauldron), the game checks after the hook returns without cancelling that the block at pos still has the block id and properties it judged; if not, the block is not changed.
  • chat_recipient

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A public chat line from sender (sender_name) is about to reach the placed player recipient: a player's chat after server_chat let it through, or a /say or /me (signed or not). For a non-player /say source such as the console or a command block, sender is the nil UUID (0) and sender_name is the source's display name. message is the text players see: what server_chat left, or the command's text. Set hidden and that one receiver is not sent the line at all, no chat index and no pending acknowledgement. The others still get it, signed as it was sent, so its signature still verifies for them. The hook is asked once for each placed receiver, the sender included, before any of them is sent the line, in the order the hub lists them. Whispers (/msg) are not public and are not heard here, and neither is the line the server's log keeps: hiding is per receiver. This is not a second server_chat: that hook is heard once for a line, only for typed chat, and cancels it for everyone; this one is per receiver, and covers /say and /me. With no listener nothing is asked and nothing is allocated. A /say requested while this hook is running fails rather than reentering the hook or sending an unchecked line. No player's state is swapped in. Server-side.
  • chat_suggestion_applied

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    chat_suggestion_applied(original, start, end, suggestion, input) reports a chat completion after Tab or a click. The range is in UTF-16 units of the list's original input, including when cycling; input is the resulting length-limited field value. Client-only, read-only. Bundles need "hooks": @API:chat_suggestion_applied@.
  • chunk_data_load

    Side
    server
    Contract
    listen
    Host / context
    &dyn ChunkDiskHost
    NeoForge
    ChunkDataEvent.Load
    Summary
    The disk record's attachments have decoded, before the chunk is published. Runs on a chunk worker with a restricted Host. Read and edit data through its typed methods; edits become the loaded store only if the entire job succeeds. Missing records and proto-to-full promotion do not fire this hook. Borrow the captured metadata from host.job(). A codec error, panic, or invalid or over-budget disk NBT refuses publication of the whole store. Later listeners still run on the last accepted envelopes. A phase refusal discards only that callback's proposal; only a panic disables a callback for this hook for the session.
  • chunk_data_save

    Side
    server
    Contract
    listen
    Host / context
    &dyn ChunkDiskHost
    NeoForge
    ChunkDataEvent.Save
    Summary
    A committed chunk snapshot is about to encode on the chunk worker. data belongs only to that snapshot: typed edits change the disk record, never the live chunk. Exactly once per captured record, for full and proto chunks alike. The restricted Host cannot resolve live chunks or mutate the world; host.job() borrows the captured metadata. A failed job, including invalid or over-budget disk NBT, retains its snapshot and the prior disk record. After a callback panics or hits a codec error, later listeners still run on the last accepted envelopes, but the job cannot publish. A phase refusal discards only that callback's proposal; only a panic disables a callback for this hook for the session.
  • chunk_load

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ChunkEvent.Load
    Summary
    Chunk chunk ([x, z], in chunks) of dimension came into the world (NeoForge's ChunkEvent.Load): new when it was just generated, false when read from the save. A flat world's chunk that leaves before it's first lit isn't saved, so it's generated, and new, again; one generated as the players left is new when it next comes, unless the server restarts first, or the level closes for being empty, which drops its memory of what never saved. Its blocks and block entities are there, but its saved entities join afterwards and its light may not be ready: change the world from a later tick. The chunks around the spawn come before server_started. Not told of a chunk a client receives. The chunks leaving in the same tick were already copied for their last save: an edit made here to one of them (a neighbour's block entity, say) is not in that copy, and is dropped with the chunk. Server-side.
  • chunk_sent

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ChunkWatchEvent.Sent
    Summary
    chunk's packet went to player (NeoForge's ChunkWatchEvent.Sent, at the end of PlayerChunkSender.sendChunk), after chunk_watch, so a mod can send its own data for the chunk now. Told after the server's network step for the level, with the state after that step, as chunk_watch. Server-side.
  • chunk_ticket_level_updated

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ChunkTicketLevelUpdatedEvent
    Summary
    chunk's ticket level went from old to new (NeoForge's ChunkTicketLevelUpdatedEvent, from ChunkMap.updateChunkScheduling): a player, a forced chunk, a portal or the dragon fight's arena began or ceased to keep it alive or ticking. It is the level of the chunk's loading tickets (DistanceManager's chunk tracker), not the simulation distance's. A level is a ChunkTicketLevel: the number ChunkLevel gives, 31 and lower entity ticking, 32 block ticking and 33 loaded without ticking, or Unloaded; none is clamped to the ticking range. Never told with old == new.
  • chunk_unload

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ChunkEvent.Unload
    Summary
    Chunk chunk of dimension left the world (NeoForge's ChunkEvent.Unload), with a level that closes for being empty too. Don't read its blocks. Its block entities are still there, but changes made in this hook aren't saved: as in vanilla, the chunk is saved before it unloads. Not told when the world closes, which world_lifecycle tells. Server-side.
  • chunk_unwatch

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ChunkWatchEvent.UnWatch
    Summary
    player stopped watching chunk (NeoForge's ChunkWatchEvent.UnWatch, ChunkMap.dropChunk): it left their view, or they leave the level (through a portal or a teleport, or respawning) or the server. Once for each chunk chunk_watch told of. After a disconnect the player handle no longer reads. Told after the server's network step for the level, with the state after that step, as chunk_watch. Not told when the server stops. Server-side.
  • chunk_watch

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ChunkWatchEvent.Watch
    Summary
    player started watching chunk (NeoForge's ChunkWatchEvent.Watch): the chunk came into their view and goes to their client, once until chunk_unwatch. Vanilla tells it as the chunk is queued (ChunkMap.markChunkPendingToSend); Sunrise picks a chunk only as it sends it, so this comes just before chunk_sent for the same chunk. Told after the server's network step for the level, and a handler sees the state after that step; the order per player and chunk is vanilla's. Server-side.
  • client_attack_target

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    AttackEntityEvent
    Summary
    Before a client's ordinary melee click attacks entities (not a spear jab), after the interaction-key cancellation hook. targets starts with the crosshair entity, if any. Replace, clear or append targets for redirected or multi-target hits. There is no batch cap. Duplicates are sent once, in first-occurrence order. The committed crosshair entry keeps its tick-pick point and client occlusion policy; the tick's selection is not re-hit. Additional targets are rechecked for the current client epoch, attackability, reach, held-item range and occlusion. Clearing an entity hit does not mine the block behind it; an untouched empty list keeps vanilla's block/miss path. Server checks and cooldowns still apply to every attack. Returning Flow::Cancel cancels the whole batch. NeoForge's AttackEntityEvent is the corresponding attack notice; this hook is client-side only.
  • client_block_changed

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The block at pos in dimension went from old to new in this client's level (vanilla's Level.setBlock on a ClientLevel), after the write: the level already reads new. Told once per block whose state changed, on every route a client writes a block by: the server's block update, each block of its batched section update, the client's own predictions (a break, a placement, a use; predicted is true) and their reconciliation when the server acknowledges them (a refused prediction comes back, predicted false). A write that keeps the state is not told, and neither is a server update held under a pending prediction until the acknowledgement applies it. Whole columns arriving and leaving are client_chunk_load and client_chunk_unload. Only on a client of a server, a LAN guest included, and without a server-side mod; an integrated world's own blocks are the server's block_changed. A level a server opens for viewing (sunrise:levels) is not told. Client-side; with no listener a write costs one flag check. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • client_chat

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientChatEvent
    Summary
    NeoForge's ClientChatEvent: a client is about to send message. original_message is immutable; change message or set cancel to prevent sending.
  • client_chat_received

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientChatReceivedEvent, ClientChatReceivedEvent.Player, ClientChatReceivedEvent.System
    Summary
    NeoForge's ClientChatReceivedEvent: a chat line from the server is about to show, once Chat Delay lets it through. system is a system message (ClientChatReceivedEvent.System), shown in the action bar when overlay is set; otherwise a player or disguised message in its chat type chat_type (getBoundChatType, its registry name; None for a system message or an inline chat type). sender is the player's UUID, 0 (Util.NIL_UUID) for system and disguised messages. player_message is the message as the player signed it (ClientChatReceivedEvent.Player.getPlayerChatMessage): its body, whether a signature validated, timestamp, salt, the server's unsigned replacement and the filter mask; None for system and disguised messages. message starts as the decorated line; replace it and the chat shows the new one, while the narrator still says the original. Set cancel and it doesn't show: a delayed message lets the next one through. Lines the client adds itself and validation errors are not told. Client-side.
  • client_chunk_load

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ChunkEvent.Load
    Summary
    Chunk chunk ([x, z], in chunks) of dimension came into this client's level from the server (NeoForge's ChunkEvent.Load on the client, whose isNewChunk is always false there): once per chunk packet the client adopts, after the column and its block entities are in the level, so a listener reads its blocks through ClientHost. A column the server sends again while it is resident is told again. Only on a client of a server, a LAN guest included; an integrated world's own chunks have the server's chunk_load. Client-side.
  • client_chunk_unload

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ChunkEvent.Unload
    Summary
    Chunk chunk ([x, z], in chunks) of dimension is leaving this client's level (NeoForge's ChunkEvent.Unload on the client): once per column whose data is freed, with its blocks still there, just before they are freed. Told on every route that frees a column: the server's forget packet, a newer column taking the slot of one out of view, the view radius shrinking, and the client level going (a dimension change, a respawn into another level, leaving the server). The view centre moving away tells nothing: ClientChunkCache keeps those columns in their slots, out of view, and shows one again untold when it is back in view, with no client_chunk_load. That is wider than NeoForge, which tells only the forget packet, so a listener never keeps state for a column that is gone. Only on a client of a server, a LAN guest included; an integrated world's own chunks have the server's chunk_unload. Client-side.
  • client_disconnecting

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ClientPlayerNetworkEvent.LoggingOut
    Summary
    Before an actual connection is discarded, not on a dimension change.
  • client_identity

    Side
    client
    Contract
    replace
    Host / context
    &dyn ClientIdentityHost
    NeoForge
    —
    Summary
    Choose what the client reports to the server at initial configuration (ClientHandshakePacketListenerImpl.handleLoginFinished, ClientBrandRetriever.getClientModName). Runs on the network thread once per join that reaches configuration. A transfer joins a new destination; play-to-configuration transitions and the integrated server do not fire it.
  • client_information_updated

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ClientInformationUpdatedEvent
    Summary
    NeoForge's ClientInformationUpdatedEvent: a server player's client sent new client information (language, view distance, chat, skin parts, main hand, filtering, listing, particles) in play. old and new are the values before and after this packet, one call per packet; they can be equal. The join's own information is reported too, once, just before player_logged_in, with old the defaults (ClientInformation.createDefault) and new what the client joined with, as NeoForge fires it when ServerPlayer first sets it. The player is not swapped in. Server-side.
  • client_level_load

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    LevelEvent.Load
    Summary
    The client made a new level for dimension (NeoForge's LevelEvent.Load from the ClientLevel constructor): on joining a server, single player's own included, and on changing dimension. Its chunks come after. When the dimension changes, the old level's client_level_unload follows this, as Minecraft.setLevel tells it after the new level is made. Client-side, on the window; the server's levels have level_load.
  • client_level_unload

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    LevelEvent.Unload
    Summary
    The client dropped its level for dimension (LevelEvent.Unload from Minecraft.setLevel and disconnect): replaced by another dimension's, or on leaving the server. Once for each client_level_load. Not told when the game itself quits. Client-side.
  • client_mining_predict

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Veto a predicted client dig after the interaction mapping and vanilla eligibility checks. Auto-tool and mining overlay mods can use this instead of a mining prediction mixin. The snapshot is read-only. A veto skips the new mining operation and preserves any retained dig. Release and correction still perform ordinary cleanup.
  • client_packet

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    A play packet from the server reached the window's game, decoded, just before the game handles it (Connection.genericsFtw handing it to ClientPacketListener): every packet of the play phase, custom payloads included, in the order the server sent them. Control packets are not heard, whether standalone or bundled: keep-alives, chunk batch starts and finishes, bundle delimiters, resource pack pushes and pops, cookies, server links, transfers, disconnects, the configuration switch, minecraft:brand and far terrain tiles; neither is the configuration phase. Read-only: the game handles the packet as it would without the mod. Client-side, on any server, single player's own included. Every packet exposes its protocol type id. Custom payloads also expose their channel and raw bytes; no other decoded fields cross the API.
  • client_packet_send

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    A play packet the window's game is about to send to the server (Connection.send): every packet of the play phase it sends, in the order it sends them, the selected slot that goes out before an attack or a use included. Not heard: what the network thread sends itself (keep-alives, chunk batch acknowledgements, configuration pongs, cookies, the configuration phase), the answers the connection sends in whichever phase it is in (a resource pack's status, a dialog's custom click action), and far terrain requests. Cancel drops the packet: the game goes on as if it had been sent, so the server never hears of it. Client-side, on any server, single player's own included. Every packet exposes its protocol type id; custom payloads also expose their channel and raw bytes, as client_packet does for the packets that arrive. Play-phase pongs pass through this hook; return Flow::Cancel to drop a packet. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • client_pause_change_post

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientPauseChangeEvent.Post
    Summary
    NeoForge's ClientPauseChangeEvent.Post: the pause state changed.
  • client_pause_change_pre

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientPauseChangeEvent.Pre
    Summary
    NeoForge's ClientPauseChangeEvent.Pre: cancel a proposed pause change.
  • client_pick

    Side
    client
    Contract
    collect
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    Whenever vanilla picks: once per client tick at partial_tick = 1.0, after the game mode tick and before key handling (also while paused), and once per frame at the frame's game-time partial tick before extraction. Both sites overwrite the same stored result. origin is the world-space XYZ eye position of the camera entity used by this pick: interpolated at the frame's partial tick, current for the tick pick. original is the vanilla answer; block and entity candidates are supplied independently. Each listener receives the same inputs. Only result is shared between listeners: it starts at original and may be replaced or cleared in dependency order. Tick inputs, including both hands of use, read the tick's result without another pick. The highlight reads the frame's result, which can differ from the tick's. Reentrant crosshair_target reads see original. A replacement is validated once at writeback; invalid output becomes a miss, never a recomputed pick. Consumption does not recheck block state or entity liveness. Server checks and item-specific rays (including buckets and brushes) are unchanged. No NeoForge 26.3 counterpart.
  • client_player_change_game_type

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientPlayerChangeGameTypeEvent
    Summary
    NeoForge's ClientPlayerChangeGameTypeEvent: observe any PlayerInfo game type change before the new mode is stored and after LocalPlayer.onGameModeChanged runs. player_id is Some when the profile has a player entity in the client level.
  • client_player_clone

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientPlayerNetworkEvent.Clone
    Summary
    After the client replaces its player on respawn or dimension change (NeoForge's ClientPlayerNetworkEvent.Clone). Client-side.
  • client_player_logging_in

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientPlayerNetworkEvent.LoggingIn
    Summary
    The client accepted a play login and initialized its level and player identity (NeoForge's ClientPlayerNetworkEvent.LoggingIn). player_id is the server's entity ID. Client-side, once per connection, including single player.
  • client_player_logging_out

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientPlayerNetworkEvent.LoggingOut
    Summary
    Before client disconnect teardown (NeoForge's ClientPlayerNetworkEvent.LoggingOut). The player may be absent. Client-side.
  • client_resources_reloaded

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientReloadHost
    NeoForge
    ClientResourceLoadFinishedEvent
    Summary
    Render-thread notification after a resource-pack reload has applied successfully. Atlas, models, renderer and client caches already refer to the new resources. Selection/F3+T and server-pack reloads share this point; initial startup does not (client_setup is the once-only moment after the initial load). Receives a ClientReloadHost for published asset/data queries; world handles and transactions are not present on this context.
  • client_setup

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientSetupContext
    NeoForge
    FMLClientSetupEvent
    Summary
    NeoForge's FMLClientSetupEvent: the client has started. It fires once per game process, on the render thread, after the first client load has applied (the atlas, models and every client reload listener's published state are final) and before the title screen's first frame. Returning to the title screen and opening another world is not a new start, so it never fires again. This is the opposite of client_resources_reloaded, which never runs at initial startup and runs after every later reload. The listener runs on the main thread; work a mod wants done in parallel is its own. The dedicated server has no client and never fires it (see server_about_to_start for its FMLDedicatedServerSetupEvent). Receives a ClientSetupContext for client setup and published resource queries without world handles or transactions.
  • client_stopped

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientStoppedEvent
    Summary
    The client has finished shutting down, after client_stopping. Fires once on the render thread for an orderly client exit, not for a dedicated server. NeoForge's ClientStoppedEvent.
  • client_stopping

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientStoppingEvent
    Summary
    The client is closing: it fires once per game process, on the render thread, when the game shuts down, after the world the player was in is left and saved, while the game still holds its settings and resources, so a listener can read them through the ClientHost and save its own client state. It is the closing counterpart of client_setup. Closing the window, a quit shortcut and the process's stop signals all reach it; a crash does not. A dedicated server has no client and never fires it (server_stopping is its stop). Fabric's ClientLifecycleEvents.CLIENT_STOPPING fires earlier, before the integrated server stops, so it is not a counterpart. NeoForge has no event for this moment. A listener is a pure function of its ClientHost reads and its own state.
  • client_tick_post

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientTickEvent.Post
    Summary
    Once every client tick, paused or not and on the title screen too, after the window's tick ran (NeoForge's ClientTickEvent.Post): the window's Game only, so not on a server's own tick (server_tick is that moment). Client-side.
  • client_tick_pre

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ClientTickEvent.Pre
    Summary
    Once every client tick, paused or not and on the title screen too, before the window's tick runs (NeoForge's ClientTickEvent.Pre): the window's Game only, so not on a server's own tick (server_tick is that moment). Client-side.
  • command

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    A command the local player typed or clicked in chat, without its slash, before the server and Sunrise's commands see it: set ran when the mod ran it. Client-side: a server never asks, not for command blocks, guests or the console.
  • component_hover

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    GuiGraphicsExtractor.componentHoverEffect: the hover of the text component under the cursor, about to be drawn, in the chat, a book or a dialog. hover is the component's hover action: its text, an item or an entity. x and y are the cursor in GUI pixels. Set cancel and the game draws nothing for it: no text tooltip, no item tooltip and no entity lines. A mod can draw its own with draw. Left alone, a text hover is wrapped at half the screen's width (at least 200) as vanilla wraps it, an item hover draws its stack's tooltip (which asks item_tooltip and the render_tooltip_* hooks as any item tooltip does), and an entity hover shows its name, type and UUID while advanced tooltips are on. Asked each frame a hovered component shows, only while a mod listens. Client-side.
  • component_types

    Side
    both
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEvent
    Summary
    Register namespaced NBT component types before content loads. Call ComponentTypesEvent::register with each owned ID, such as "mymod:charge".into(). IDs are checked together at startup: invalid IDs, the minecraft namespace and duplicate IDs are refused before the component registry is frozen.
  • compost_item

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player added a compostable item to the composter at pos.
  • compute_fog_color

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ViewportEvent.ComputeFogColor
    Summary
    Computed world fog RGB, after ordinary effects and before upload. Title panoramas skip it. Only finite RGB components in 0..=1 are accepted; alpha and distances stay unchanged.
  • compute_fov

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ViewportEvent.ComputeFov
    Summary
    World field of view, after normal calculation and zoom and before projection/Nausea. Called for world rendering and near-plane overlays; hand/HUD FOV uses its own path. Only finite values in 1..=179 degrees replace the computed FOV.
  • compute_fov_modifier

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ComputeFovModifierEvent
    Summary
    Player FOV scale, once per client tick with a player, after vanilla effects and before zoom and easing. Invalid values or values outside 0.01..=10 revert to base.
  • config_loading

    Side
    both
    Contract
    listen
    Host / context
    &dyn ConfigContext
    NeoForge
    ModConfigEvent.Loading
    Summary
    A registered config was read (ModConfigEvent.Loading): config says whose, which file and its text, which the mod parses (TOML by convention). Every mod hears every config, so check mod_id. Fired where the config's kind loads (register_configs), a Server one before server_about_to_start. Receives a ConfigContext with settings reads and the scoped ConfigFiles service. Client and Common load once on their owning side, Server once per world.
  • config_reloading

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    ModConfigEvent.Reloading
    Summary
    A loaded config's file changed on disk (ModConfigEvent.Reloading): its new text. The game looks at the files' modification times once a second, on the window and on the server's tick; a file saved with the same text, removed or unreadable fires nothing and keeps its last text. Receives the polling game's HostSide; world queries return None if no world is open. A panic disables only the offending mod’s reload callback; later listeners still run. Live writes outside a journal stand.
  • config_unloading

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ModConfigEvent.Unloading
    Summary
    A Server config is dropped as its server stops (ModConfigEvent.Unloading), after server_stopping; the next world reads it again. Client and Common configs stay until the game quits. Receives the stopping game's ServerHost, before the final save and teardown. A panic disables only that mod’s unload callback, not other listeners or the rest of teardown. Live writes outside a journal stand.
  • console_line

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Observe an operator-visible log line on a dedicated or integrated server. level is INFO, WARN or ERROR, thread names the logging thread, and message is the text without its timestamp, thread or level prefix. Lines from every logging thread are delivered in order on the server thread at the start of the next server tick. The tap starts on the first tick with an enabled listener; without one, no log is captured and no queue is allocated or locked in the idle path. A listener's own log calls are not tapped. The queue keeps the oldest 4096 lines and discards later ones until it drains. dropped reports the number discarded on the first line of that batch and is zero on all other lines. message keeps its first 8192 bytes and thread its first 128, at a character boundary. A listener cannot change or suppress the log.
  • consume_effect

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A custom entry of the stack's effective consumable, in list order, interleaved with built-in effects. stack is the read-only snapshot before consumption shrinks it, including components. user is the player or mob consuming it. An unclaimed kind does nothing. Register a custom kind's save codec and Wire value with Registrar::register_consume_effect_type before placing it in a stack that will be sent to a client. A registered kind's data holds the canonical fields returned by its save codec, with their exact NBT types.
  • container_loot_filled

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    Sunrise addition: no NeoForge counterpart. Fired once per container fill, each half of a double chest separately, on the rolled list in roll order before shuffle, splitting and slot placement. Add, replace or remove drops; empty stacks are dropped. Stacks over their item's maximum are trimmed at placement, after the hook; overflow that cannot fit is discarded. The opener is named only when a player's open starts the fill. Other accesses (including an ItemPlace::EntitySlot read, even during a player action) give None. The origin is the block's centre or the container entity's position. Already filled containers and block or mob drops do not fire this hook. Listeners run in dispatch order, each seeing the previous list, after loot_table_load's changes. The level Host provides reads only; only the drop list is writable. Non-negative damage within the signed integer range is accepted even above an item's maximum. Invalid component writes retain the prior list and warn. Panics follow the runtime listener isolation policy. Listeners use their own randomness. With no listener, the roll and placement random draws remain unchanged.
  • container_opened

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player opens one of the game's own menus (ServerPlayer.openMenu; the job of NeoForge's PlayerContainerEvent.Open, which comes after the menu is open and cannot stop it): kind is the menu type (minecraft:generic_9x3, minecraft:furnace, minecraft:crafting, minecraft:merchant, minecraft:anvil, minecraft:lectern...; a horse's inventory is minecraft:horse_inventory) and pos the block it belongs to, none for a villager, a mount or a vehicle's chest. Heard after the checks that refuse the menu (a locked container, a spectator) and before the menu that was open closes. Set cancel and nothing opens: the open menu stays as it was and the click is spent. The player's state is swapped in for the call, so host.players().acting_player(), PlayerRef::tell and the item helpers reach them. Not heard: a menu a mod opens (native_open_menu), the inventory screen, and the editors (sign, book, command block). Server-side, for every player of the world.
  • crafter_craft

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A crafter at pos completed recipe recipe.
  • create_fluid_source

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    CreateFluidSourceEvent
    Summary
    A fluid source at pos (state) is about to count towards turning the flowing fluid beside it into a source (NeoForge's CreateFluidSourceEvent, FlowingFluid.getNewLiquid): two counted sources beside a block over a solid block or a source make it one. Asked for each horizontal neighbour source, whenever the game works out a block's new fluid, spread checks included: answer fast. can_convert starts as the fluid's rule (water_source_conversion or lava_source_conversion). Server-side.
  • create_skull_models

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    EntityRenderersEvent.CreateSkullModels
    Summary
    Skull models for a mod's own skull types (NeoForge's EntityRenderersEvent.CreateSkullModels): call event.register(model) with one SkullModel per type, giving its kind, model layer and default texture. A minecraft:head item model may then name the kind, so the head draws in hand, in a GUI and in an item frame. Called once at client startup. Any valid canonical <namespace>:<path> identifier (including minecraft: for non-vanilla paths) is accepted; invalid identifiers, the seven built-in vanilla skull types (minecraft:skeleton, minecraft:wither_skeleton, minecraft:player, minecraft:zombie, minecraft:creeper, minecraft:piglin, minecraft:dragon), duplicate registrations, entries with a layer neither a mod nor vanilla has, or entries with an empty texture are logged and left out. API @API:create_skull_models@.
  • create_spawn_position

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    LevelEvent.CreateSpawnPosition
    Summary
    Before a new server level selects its initial world spawn (NeoForge's LevelEvent.CreateSpawnPosition).
  • creative_slot

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A creative-mode player sets a slot of their inventory from the creative screen (ServerGamePacketListenerImpl.handleSetCreativeModeSlot): slot is the inventory menu's slot (5 to 8 armour, 9 to 35 the inventory, 36 to 44 the hotbar, 45 the off hand; below 0 is a stack thrown out of the screen, which is dropped) and item (minecraft:air for an emptied slot) and count what is put there. Heard once the packet passed vanilla's checks (a creative player, a real slot, a valid stack) and before the slot changes or the stack drops. Set cancel and the packet is ignored. The player's state is swapped in for the call, so host.players().acting_player(), PlayerRef::tell and the item helpers reach them. Not heard: stacks a creative player gets other ways (middle-click pick block, /give). Server-side, for every player of the world.
  • creeper_ignite

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player ignited a creeper with an item.
  • creeper_power

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Lightning charged a creeper.
  • critical_hit

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    CriticalHitEvent
    Summary
    NeoForge's CriticalHitEvent: a player's melee hit on a living target_kind (minecraft:zombie, minecraft:armor_stand) that deals damage, where Player.attack decides whether it is critical. vanilla_critical is vanilla's answer; critical starts as it and may be forced or denied (as in vanilla a critical hit prevents the sweep, so a forced crit loses it; a denied crit loses the crit sound and particles); damage_multiplier starts at 1.5 for vanilla's critical and 1.0 otherwise, and scales the damage only while critical ends true. Not fired for a target that is no living entity (a dragon part) or when the hit does no damage. Fires on the Game that runs the attack.
  • crop_grow_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    CropGrowEvent.Post
    Summary
    A crop-like block grew (NeoForge's CropGrowEvent.Post). Diverges from NeoForge: original_state is always the pre-growth state. state is what is at pos now. Sugar cane reports the new cane above it, and kelp and vines the new head, while original_state names the growing plant before growth. A full-age stem fires even without fruit; sugar cane fires only when adding a cane, not when only aging. Cactus and chorus report the plant's position. Server-side.
  • crop_grow_pre

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    CropGrowEvent.Pre
    Summary
    A crop-like block at pos is about to grow on a random tick (NeoForge's CropGrowEvent.Pre): crops, stems, nether wart, cocoa, sweet berries and bamboo at their own position; cactus and chorus flowers at the block above; sugar cane at its own position; kelp, weeping and twisting vines and cave vines at the block they grow into. state is the growing block. Leave result at Default for vanilla's own chance, or set True to grow now or False to stop it (DO_NOT_GROW). Vanilla's random roll is drawn either way, in vanilla's order. Server-side.
  • custom_click_action

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    CustomClickActionEvent
    Summary
    NeoForge's CustomClickActionEvent: a server player's client sent a custom click action (a dialog button or a text component's click event): its id and optional payload. Vanilla only logs it; set cancel to skip that. Only play-phase clicks are reported: one sent during configuration (no player yet) is not. The player is not swapped in. Server-side.
  • custom_spawner_tick

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ModifyCustomSpawnersEvent
    Summary
    CustomSpawner.tick for a spawner a mod added with modify_custom_spawners: the level dimension ticks the spawner key, once per tick in the list's order, with spawn_enemies as ServerLevel.isSpawningMonsters (the spawn_monsters rule, and not peaceful). Every mod gets the call, and the mod that owns key spawns through host (its spawns go through finalize_spawn and the spawn checks like any other); the rest ignore it. It is called only while the spawn_mobs rule is on, as vanilla's custom spawners are, and only for a key in the list, so a level with no mod spawner pays one check per tick. Beyond NeoForge: a key and this hook stand in for the CustomSpawner object. Server-side.
  • customize_boss_event_progress

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    CustomizeGuiOverlayEvent.BossEventProgress
    Summary
    One boss bar is about to be drawn (NeoForge's CustomizeGuiOverlayEvent.BossEventProgress, in BossHealthOverlay): bar is the bar, x and y come in as its top-left corner in GUI pixels (91 left of the screen's centre; 12 for the first bar), and increment as the spacing to the next bar's y (19). Move x and y to draw this bar, and its title, there; set increment to space the next bar, which comes in that far below where this one came in (moving y does not move the bars after it). Set cancel and this bar is not drawn; the increment is still applied, leaving room for what a mod draws in its place. Asked once a frame per bar, in the order the server added them, until the next bar would start a third of the way down the screen; not under F1. Client-side. A bar the API can't carry (a server's name text the API refuses) isn't heard and is drawn as vanilla draws it.
  • customize_chat_overlay

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    CustomizeGuiOverlayEvent.Chat
    Summary
    The in-game chat is about to be drawn (NeoForge's CustomizeGuiOverlayEvent.Chat, in Gui.renderChat): x and y come in as the chat's bottom-left corner in GUI pixels (0 and the GUI height minus 40, vanilla's place); move them to draw the chat elsewhere. focused is whether the chat screen is open, and gui_width/gui_height the scaled GUI size. Asked once a frame the chat layer draws, focused or not; not while the chat is hidden (F1 with the chat closed). Only the drawing moves: the chat screen's input box, and clicks and hovers on messages, stay where vanilla puts them, as with NeoForge. Client-side.
  • data_map_types

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    RegisterDataMapTypesEvent
    Summary
    The server is assembling its data tables, as for data_pack_files (a world's first open and every /reload): push the data map types your mod registers (NeoForge's RegisterDataMapTypesEvent). A type is a namespaced id (namespace:path) for a registry: any the game names. Its values come from the world's data packs' data/<namespace>/data_maps/<registry folder>/<path>.json (the registry's path for a minecraft registry, <namespace>/<path> otherwise), and from files you push through native_data_pack_files under the key data_maps/<namespace>:<registry folder>/<path>. Each file has a values object mapping entry IDs and #tags to JSON, with an optional boolean replace and a remove list. Entry conditions (neoforge:conditions) are evaluated before the value, including on direct objects. A malformed layer is logged and skipped as a whole; otherwise newer values override older ones. Push a typed map's DataMap::ty and use the key's data (ItemKey::data, EntityTypeKey::data...) for an owned decoded value. By name, data_map_value borrows a raw tag and data_map_entries borrows the whole slice in entry ID order. Both borrow from the host; copy values only if you need them after the borrow. Server-side, not synced to clients.
  • data_maps_updated

    Side
    both
    Contract
    listen
    Host / context
    &dyn ReloadContext
    NeoForge
    DataMapsUpdatedEvent
    Summary
    The data maps of a registry were reloaded on the server or synced to the client (NeoForge's DataMapsUpdatedEvent): the place to build caches from the new values or post-process them. registry is the registry's id (minecraft:item, minecraft:block) and cause says how they arrived. A listener cannot cancel or change anything.
  • data_pack_files

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    AddPackFindersEvent
    Summary
    The server is assembling its data tables from the world's data packs (ReloadableServerResources): a world is opening, or /reload was run, and the recipes, tags, loot and advancements are built after this. Push (path, bytes) pack files and they join this load. path is the overlay's key, <kind>/<namespace>:<path> without .json, over the kinds the tables read: recipe/mymod:thing, tags/mymod:block/thing, loot_table/…, advancement/…, trade_set/…, villager_trade/…, dialog/…. A file that isn't JSON is skipped with a warning. Asked once per load on both paths, so this is where a mod recomputes them. Contributed files sit below the world's own data packs: a pack's file for the same path still overrides a mod's. Server-side (the single player's integrated server included). Listener applies run first. A later reload refusal preserves the old engine generation, but does not undo callback effects. Contributions share one list, so a failed file cannot be attributed to a particular mod.
  • datapack_sync

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    OnDatapackSyncEvent
    Summary
    Collect recipe types once the joining player exists, after admission and before that player's recipes are sent. On reload, asked once per online player, at most once per player per reload, before their recipes are re-sent. With nobody online this hook is not asked. player always identifies the recipient. Configuration tags precede admission. Only this player's Sunrise client receives the selected recipes; vanilla clients receive nothing new. Recipes using a vanilla serializer carry the server's resolved item candidates, not the source's ingredient definitions or bound predicates. A mod serializer still writes its own recipe content. An empty answer retains the client's own recipes, or restores them after an earlier nonempty answer.
  • default_components_bound

    Side
    both
    Contract
    listen
    Host / context
    &dyn ReloadContext
    NeoForge
    DefaultDataComponentsBoundEvent
    Summary
    Items' default components are bound and readable (NeoForge's DefaultDataComponentsBoundEvent); cause says how, as tags_updated's does. The place to build or rebuild caches derived from item defaults (stack sizes, food, tool rules): from now on the default-component reads return the published defaults, modify_default_components' edits included.
  • difficulty_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    DifficultyChangeEvent
    Summary
    The server's difficulty changed, from from to to (peaceful, easy, normal, hard; NeoForge's DifficultyChangeEvent). It is vanilla's MinecraftServer.setDifficulty, which /difficulty, a dedicated server's management and a test environment's difficulty all go through, and it is told only when the difficulty is another one. It only hears: the change has already happened. Server-side.
  • dragon_egg_form

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    The Ender Dragon fight is about to place its first dragon egg at pos. Set cancel to leave the block unchanged. Server-side.
  • effect_particle_modification

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    EffectParticleModificationEvent
    Summary
    NeoForge's EffectParticleModificationEvent, vanilla's LivingEntity.updateSynchronizedMobEffectParticles: asked for each active effect effect of the living entity entity (a LivingRef, a mob or a player), the ones vanilla hides included, as the server is about to send their swirls in its synched data (DATA_EFFECT_PARTICLES, DATA_EFFECT_AMBIENCE_ID). original_particle is vanilla's for the effect: an entity_effect in its colour (alpha 38 of 255 when ambient), the omens' own particles. particle starts as it: replace it, or set it to None to go back to the original. visible starts as the effect's own: set it to show a hidden effect's swirl or hide a visible one. The visible effects' particles are sent in the order the effects are kept; particles that need a block state, and item, trail and vibration particles, can't be sent and are left out. A mod's own particle (ParticleOptions::simple with its registered ParticleKey) goes only to Sunrise clients: the others get the list without it. Whether the swirls are ambient (drawn fainter and rarer) follows from the answers as vanilla's areAllEffectsAmbient does: a visible effect that is not ambient makes it false, an effect a mod made visible counts as visible and one it hid doesn't, and it is true when none is visible. Asked when the entity's effects change (one is added, removed, or changes its amplifier, visibility or ambience), as vanilla recomputes them only then, and only while a mod listens; the answers are sent until the next change. The window's own player draws its swirls from its own effects, not from these answers. Server-side.
  • emissive

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    At most 32 pairs of already-loaded base and transparent overlay sprites. Per-pixel alpha in the overlay marks full-bright material, without illuminating the surrounding block or changing gameplay light.
  • enchant_effect

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    RegisterEvent
    Summary
    A minecraft:post_attack effect of a mod's own kind, on a mob a player's weapon hit: the entry says enchanted attacker and affected victim, its requirements passed, and its effect names a type in a namespace outside minecraft:. Told the enchantment id, the kind, the effect payload as a borrowed Tag, the level and the mob's id (it may have just died). The acting player is the one whose weapon carries the enchantment. Each such entry is told once a hit, and once for each mob a sweep lands on. A hit on a player, and an entry inside minecraft:all_of, aren't told yet. An unclaimed kind does nothing.
  • enchant_item

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player applied an enchantment at pos; item is the finished item and levels the levels charged. The player's state is not swapped in.
  • enchanted_block_loot

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    EnchantedBlockLootEvent
    Summary
    NeoForge's EnchantedBlockLootEvent: a block's loot table is reading the level of enchantment on tool to decide what state at pos drops, in ApplyBonusCount.run or BonusLevelTableCondition.test. level starts as the tool's level, after get_enchantment_level; what is left in it is what that one count or condition uses, and the tool keeps its own. A u32 can't be negative, the case setEnchantmentLevel refuses; one above 1024 counts as 1024, as vanilla's levels stop at 255 and a level sizes a formula's loop. tool is none for an empty hand or a break with no tool, and the read is still asked, at level 0. entity is LootContextParams.THIS_ENTITY: the player mining, the mob breaking the block, the blast's direct source (primed TNT, TNT cart, exploding mob, fireball, wither skull, end crystal), the enderman whose carried block drops, the source of /loot ... mine, the projectile that broke a chorus flower or a decorated pot, the villager harvesting, the ravager walking through a crop, or none for a break with no entity (a neighbour update, a piston, water, a trident through a speleothem). A boat through a lily pad also gives none, though vanilla names it. Asked once per read, so a table may ask several times per break, or not at all, and the table's draws stay in vanilla's order. It runs inside the roll, so it gets the read-only level host: no writes, no draws, and entity is a handle a listener can keep and compare but not read until it has a Host. Authoritative servers only. Use get_enchantment_level when the block doesn't matter. Tick-time effect: one listened test per roll when no mod listens.
  • enchanted_entity_loot

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    EnchantedEntityLootEvent
    Summary
    An entity's loot table reads an enchantment's level (NeoForge's EnchantedEntityLootEvent): asked in the middle of the roll, each time an enchanted_count_increase function or a random_chance_with_enchanted_bonus condition is evaluated, for a death and for /loot ... kill. entity is the living entity dropping the loot, source the killing blow (minecraft:magic for the command) and attacker the attacking entity (getAttacker): the one that caused the blow, or the command's source, even when source names nobody. It is None without one, and it need not be living: such a read is asked too, from a level of 0. level comes in as the living attacker's level of enchantment; what a mod leaves in it is what the table uses, so a level raised from 0 counts even with no attacker. A level can't be negative, and one above 1024 counts as 1024: vanilla's levels stop at 255, and a table's count grows with the level. Mods that don't need the entities prefer get_enchantment_level; a mob's equipment drop chance isn't this hook's (get_equipment_drop_chance). Not asked for a /loot ... kill of an entity that isn't living, nor for a table rolled any other way. The draws a mod makes from the level's random stay in order with the roll's. Server-side.
  • enchantment_level_set

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    EnchantmentLevelSetEvent
    Summary
    An enchanting table at pos drew the level of one offer (EnchantmentMenu.slotsChanged, after getEnchantmentCost): offer holds the server player whose table it is, the row (0 to 2), the power (bookshelves counted), the item and the level drawn. Change level to change the offer; a level below row + 1 offers nothing, as vanilla's. Asked for each row in order, before prepare_item_enchant. Server-side.
  • ender_entity_teleport

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LoopContext
    NeoForge
    EntityTeleportEvent.EnderEntity
    Summary
    An enderman or a shulker is about to teleport on its own (EntityTeleportEvent.EnderEntity). A mod may move target or cancel. It is given the loop context of the side that ticks the entity (its registries, settings and mod list); it fires inside the tick's own AI step, before the teleport's own random draws, so it takes no Host.
  • ender_pearl_teleport

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityTeleportEvent.EnderPearl
    Summary
    A server player's or mob's ender pearl is about to teleport its owner (EntityTeleportEvent.EnderPearl, ThrownEnderpearl.onHit). owner is the live entity handle, pearl its projectile id, from the owner's feet and target the pearl's previous position. A mod may move the target; non-finite changes keep the original spot. Canceling leaves the owner in place with no teleport sound, damage or endermite roll; the pearl is used up. Player owners keep their acting-player context and mutable fall damage (5; nonpositive causes no health loss, but zero remains a hit attempt that asks the invulnerability predicate). Mob owners take no fall damage and make no endermite draw; their damage starts at zero and is player-only. An owner moved, removed, killed or put to sleep by a listener is not moved again using the old decision. The impact hook still hears the hit. What the pearl hit (getHitResult), in projectile_impact's shape: the entity hit_entity (a dragon part is the dragon), or, with it None, the block hit_block on its hit_face (the face's normal); hit_at is the hit point. For an entity, hit_block is the cell of hit_at and hit_face is [0, 0, 0].
  • enderman_anger

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    EndermanAngerEvent
    Summary
    player stares at enderman (NeoForge's EndermanAngerEvent, at the end of Enderman.isBeingStaredBy): the look is within the enderman's cone, in line of sight, and no carved pumpkin hides the face. Asked each time the enderman's goals check the stare: to get angry, to freeze while looked at and to teleport away up close. Set cancel and that stare doesn't count. Server-side.
  • entities_load

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Entities from chunk finished loading into the server world. count is the number of saved entity records read.
  • entities_unload

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Entities in chunk left the active server world and were queued for saving. count is the number of entity records.
  • entity_break_door

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A mob broke the door at pos.
  • entity_breed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Two mobs completed a breeding action. child is absent when vanilla lays an egg instead of creating a baby.
  • entity_change_block

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A mob changed a block at pos, after the new state was applied.
  • entity_change_block_pre

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A mob or a player is about to change the block at pos: a landing's trampling (farmland to dirt, a turtle egg breaking), before its neighbour updates and events. player is the player whose landing it was, entity and kind the mob for a mob's landing (None and the player's type here). from and to are resolved block states. Set cancel and the block stays as it was and nothing the change would have caused happens, as Bukkit's EntityChangeBlockEvent (@API:entity_change_block_v2@). The fork names this pre-change veto entity_change_block_pre; entity_change_block is the separate post-change notice.
  • entity_constructing

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    EntityEvent.EntityConstructing
    Summary
    A new entity is being made (NeoForge's EntityEvent.EntityConstructing, vanilla's Entity.<init>): kind is its type (minecraft:zombie, minecraft:player for a player) and holder holds its attachments. Set attachments here and the entity starts with them: this runs before any mod reads them, and an entity read from disk or from a summon's NBT reads its saved attachments over what you set. The entity may not be in the level yet, so read nothing else of it. Nothing can be cancelled.
  • entity_drop_item

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A mob is about to drop count of item at pos (Bukkit's EntityDropItemEvent).
  • entity_enter_block

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A bee entered the hive at pos and was stored there.
  • entity_enter_love_mode

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A mob entered love mode after player interaction. player is the feeder when known.
  • entity_entering_section

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    EntityEvent.EnteringSection
    Summary
    entity moved from the 16x16x16 section old_section into new_section (NeoForge's EntityEvent.EnteringSection, vanilla's EntitySectionStorage callbacks on Entity.setPosRaw). Both are section coordinates (SectionPos: each block coordinate shifted right by 4), and chunk_changed is NeoForge's didChunkChange: the x or z section differs, so the entity is in another chunk column. host is the side that saw the move. Nothing can be cancelled: the entity is already in its new section.
  • entity_interact

    Side
    both
    Contract
    replace
    Host / context
    HostSide
    NeoForge
    PlayerInteractEvent.EntityInteract
    Summary
    A player right-clicks the entity entity (Entity.getId) of type kind (minecraft:cow) with hand (Hand::Main or Hand::Off), holding stack (none in an empty hand): where Player.interactOn starts, before the entity's own interact and the item's interactLivingEntity. Both logical sides answer independently, once per hand, main hand before off hand. A consuming client result ends the loop; only Success swings there. SuccessServer and Consume consume without a client swing. Fail, Pass and TryWithEmptyHand fall through on this entity path. A server-only answer leaves the client's off-hand prediction unchanged. ClientHost permits reads and local effects, not authoritative writes. A client without this mod predicts vanilla here; the server corrects it.
  • entity_interact_specific

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerInteractEvent.EntityInteractSpecific
    Summary
    a right-click on an entity with the point clicked: entity_interact_specific hears the entity, its type, the held stack and the point clicked, measured from the entity's position, before native_interact_entity (NeoForge's PlayerInteractEvent.EntityInteractSpecific counterpart); a claim swings the hand and ends the click. Server-side. Bundles need "hooks": @API:entity_interact_specific@.
  • entity_invulnerability_check

    Side
    both
    Contract
    listen
    Host / context
    LevelSide
    NeoForge
    EntityInvulnerabilityCheckEvent
    Summary
    Decide whether an entity is invulnerable to this specific damage source (Entity.isInvulnerableTo). original_invulnerability is the vanilla answer and invulnerable starts with that value. Listeners may change it before the hit is applied. This fires once per player or mob hit that enters the invulnerability predicate, including creative/PvP, death, fire-resistance, shield and cooldown refusals. Nested player predicates and equipment continuations reuse the same base decision; a new attempt asks again. Ghast and warden overrides are observed too, including reflected fireballs and digging. No amount is supplied: vanilla's predicate takes a source, not an amount. Amount mutation remains on living_incoming_damage, before cooldown. Zero-damage projectile collisions and player pearl teleport damage still ask before the zero-damage refusal. Skull impact and its explosion are separate attempts. Fireworks directly hurt their attached entity; their splash query excludes spectators, not dead or unloaded residents.
  • entity_join_level

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityJoinLevelEvent
    Summary
    An entity joins the server level dimension (NeoForge's EntityJoinLevelEvent): vanilla's PersistentEntitySectionManager.addEntity. loaded_from_disk is true for an entity coming back with its chunk, false for one added fresh (addFreshEntity: a drop, an orb, /summon, an arrival through a portal). entity is its ID and kind its type (minecraft:item). It is already in the level's lists, so helpers that take an entity ID find it. Set canceled to keep it out: it is taken back out as if never added, and a /summon of it fails. Tells every kind in the game's entity lists (items, orbs, mobs, boats, minecarts, armor stands, primed TNT, falling blocks, projectiles, rockets, tridents, end crystals, the dragon, cushions, paintings, item frames, block/item/text displays, markers and interactions), once each, in the order they were created; check kind. A drop, an orb, a mob, a /summon and a chunk's entities are told at once, any other spawn between the tick's phases (it is checked after the blocks, the vehicles, the projectiles, the items and the mobs, and at the tick's end). A mod that cancels one of the others sees it removed before it ticks again. Inside a transaction (Host::transaction) opened in the entity's own level the join is told at that transaction's root commit, not at the spawn call (an entity spawned in another level, as by a command run in it, is told at once): before the commit the entity exists and entity_constructing has run, but no one is told it joined, and a listener reads the entity when the commit runs. An aborted transaction tells nothing, and the entity it spawned is gone. A join cancelled at the commit leaves the spawn's handle stale. Joins at one commit come in the order the entities were added, before the removals the transaction asked for take effect. Join notifications in the same level requested while a commit is announcing its joins (from a direct spawn or a committed transaction in that level) are delivered after that announcing batch, in request order. Live fallback-store entities also notify: displays, markers, interactions, and summoned or chunk-restored eyes of ender and explicit leash knots. Gameplay-thrown eyes and naturally tied leash knots live in separate lists and do not notify yet. loaded_from_disk is set when a chunk restores an entity. Saved data kept for a missing mod is not an entity in the level and does not notify. Server-side.
  • entity_leave_level

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityLeaveLevelEvent
    Summary
    An entity leaves the server level dimension (NeoForge's EntityLeaveLevelEvent): vanilla's onTrackingEnd, when it is removed for any reason (picked up, merged, despawned, burnt, blown up, killed, taken by a hopper or a mob, gone through a portal) or its chunk unloads, a level closing with nobody in it included. Not for the entities still loaded when the server stops, as in vanilla. entity is its ID and kind its type (minecraft:item); it is no longer in the level's lists. It only hears. It tells every kind entity_join_level does (kind is the type), each once, when the game next notices it gone (the tick or action that removed it). Inside a transaction (Host::transaction) opened in the entity's own level an entity's removal takes effect, and this hook fires, at that transaction's root commit, not at the removal call (an entity in another level, as by a command run in it, leaves at once): from the call on its handle and selectors no longer find it. An aborted transaction removes nothing and tells nothing. An entity the transaction spawned and removed is never told to join, so it never leaves. Check kind. Server-side.
  • entity_mob_griefing

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    EntityMobGriefingEvent
    Summary
    May entity change the world? (NeoForge's EntityMobGriefingEvent, EventHooks.canEntityGrief.) can_grief starts as the mob_griefing game rule; set it either way. Asked for a mob explosion (ExplosionInteraction.MOB, for the creeper, wither, ghast fireball or wither skull), a mob picking up items, an enderman taking or placing a block, a sheep eating grass, a mob trampling farmland or turtle eggs, a ravager breaking leaves or crops, a wither breaking blocks or leaving a wither rose, a silverfish leaving or entering stone, a snow golem's snow, a fox's berries, a rabbit's carrots, a villager's farming, an evoker's sheep, a zombie trampling eggs, an allay's pickup, and a mob's arrow or small fireball changing a block (asked for its owner), a zombie breaking a door, the dragon breaking blocks, a ravager breaking pitcher crops, a burning mob melting powder snow, a weaving mob's cobwebs, and decorations and items in explosions (asked for the exploding entity, and for the mob that causes the blast). Asked often: answer fast. Server-side.
  • entity_mount

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityMountEvent
    Summary
    An entity mounts or dismounts a vehicle (NeoForge's EntityMountEvent, posted from Entity.startRiding and removeVehicle): entity of type kind (minecraft:player, minecraft:zombie) in the server level dimension, getting on (mounting) or off the vehicle of type vehicle_kind (minecraft:oak_boat, minecraft:minecart, minecraft:horse, minecraft:cushion). Set canceled and it does not: a player stays where they were, a mob does not board, a /ride fails, and a rider whose dismount is canceled keeps riding. Players hear boarding and dismounts by input, /ride, hits, bucking, teleport or spectator mode; mobs hear boarding and dismounts (jockeys, ravager raiders, /ride, hits), including removal cleanup. The departing rider's own dismount is asked first, then its direct passengers in passenger-list order. The removed vehicle is no longer a valid handle or query result during these callbacks. A Mob's canceled dismount keeps the relationship with a removed boat, cart or mob; each later dismount asks again. A resident Mob retries immediately before its next eligible entity tick: its chunk must be entity-ticking and its tick must not have been canceled. A server player retries on its next vehicle tick. Either can be later in the same world tick. A rejected, nonresident passenger does not autonomously tick or retry. A mob riding a player is compulsorily ejected on save, logout, death or dimension change: the dismount notifies this hook, but cancellation cannot keep the mob aboard. Loading a save does not notify. A mob that boards a boat by touching it is checked again after the hook returns without canceling: the boat is found again by id (gone: the contact pass for that boat ends), its passengers are counted again, and the mob must still exist, not be removed and not already ride; a full boat or an unfit mob skips that mob. A player who sits on a cushion has the cushion found again by id after the board and dismount checks: gone, the click is spent and the player is not seated. Server-side.
  • entity_move

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    One physical Entity.move invocation (#2414, design #2308, the maintainer ruling of the same issue): the entity entity of kind (minecraft:zombie) is about to move by delta (blocks this tick) for cause's sake - itself, the player behind a position packet, a piston, a shulker box lid, a shulker mob's opening lid, a moving collider carrying or shoving the body. It fires before the move's own handling, no-physics and the stuck multiplier included, in the one gate every kind's physics resolves through, so a forgotten family cannot move around it. Change delta to replace the movement (still through every ordinary restriction) or set event.cancelled or return Flow::Cancel to skip it: no position, velocity, collision-flag or fall change, and no displacement notice. Replacement components must be finite; there is no additional per-axis limit. A non-finite replacement rejects that listener's delta and veto together and logs the mod and field. An unchanged game delta is not revalidated. An earlier accepted veto cannot be cleared. If a listener panics or incurs a phase refusal, its edits and cancel flag are discarded; earlier results stand and later eligible listeners still run. Only a panic disables this mod's callback for the session. It takes no Host - the maintainer ruling, like the enderman's teleport: the listener only decides the delta, and its context is the loop context of the side that ticks the body. The hook fires only on the server. The client predicts ordinary collider displacement for its own player, not a listener's replacement. The server remains authoritative. Beyond NeoForge: there is no counterpart.
  • entity_outline

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Whether an entity the client draws has the glowing outline, and in which colour (Entity.isCurrentlyGlowing and getTeamColor, what Fabric's and NeoForge's glowing and team colour overrides change). outline comes in as vanilla's answer: Some(0xRRGGBB), the team's colour or white, when the entity glows, None when it doesn't. Set Some to make any entity glow in that colour, None to take its outline away. It changes only what this client draws: the entity's Glowing flag, what the server and other players see, stays. Asked each frame for every mob, player (yourself in third person when you hold the camera), dropped item and projectile drawn. In the ordered body pass, these queries for mobs, players and dropped items follow level join order, interleaved with general entity renderer submissions. Projectile queries run in a later pass. General entities, the dragon and end crystals add no outline queries. API @API:entity_outline@.
  • entity_place

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    BlockEvent.EntityPlaceEvent, BlockEvent.EntityMultiPlaceEvent
    Summary
    BlockEvent.EntityPlaceEvent (and EntityMultiPlaceEvent, which extends it): placer set the block state at pos against placed_against, before it is written. placer is the player for BlockItem.place (before the stack shrinks), or the mob for an enderman putting its carried block down and a snow golem's trail; None is reserved for a placement with no entity. placement is Single, or Multi with every block the placement writes (a bed's foot and head, a door's halves, a tall plant), where state and pos stay the primary block (the foot, the lower half). For players, placed_against is the state adjacent to the primary placement position opposite the clicked face, including when the clicked block is replaceable. For mobs it is the state below the placement. Cancel stops the whole placement: no block is written, the stack is kept and an enderman keeps carrying its block. Server-side. Diverges from upstream: replaces the listen-only place_block; a mod that stopped placements by claiming native_use_on cancels here.
  • entity_portal

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server entity finished its portal wait and is beginning to leave dimension through pos. The destination follows the portal rules.
  • entity_pose_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest player's synchronized pose changed from from to to.
  • entity_shoot_bow

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player bow or crossbow launched an arrow with force, after the projectile entered the level.
  • entity_size

    Side
    both
    Contract
    collect
    Host / context
    &dyn Host
    NeoForge
    EntityEvent.Size
    Summary
    An entity's dimensions are being resolved for pose (NeoForge's EntityEvent.Size, fired from vanilla's Entity.refreshDimensions and from the entity's constructor): it is new, its pose changed to pose, it grew up, its minecraft:scale changed, or another value its vanilla size follows changed; or as a player's pre-motion candidate (version 2, below). size (width, height and eye height, in blocks) starts as vanilla's new size and old_size is the size it had. Change size and the entity's box and eyes take it; later mods see earlier mods' edits. The answer holds while the entity keeps that pose and vanilla size; the next change asks again, starting from vanilla's. Changing the width or height leaves the eye height as it is: set it too. Zero-size answers are valid. An answer is ignored if any component is non-finite, negative or greater than 32 blocks. This bounds collision and pathfinding work while allowing sizes larger than naturally occurring vanilla entities. host reads the side that asks; the entity may be new, so read only what you need of it.
  • entity_struck_by_lightning

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityStruckByLightningEvent
    Summary
    A lightning bolt is about to hit entity (NeoForge's EntityStruckByLightningEvent, before Entity.thunderHit): once per bolt strike for each entity whose box meets the strike box (3 blocks around, 9 up), players included. bolt is the lightning bolt. Set cancel to spare the entity: no fire or damage, and no conversion (pig, villager, mooshroom, creeper, copper golem). It still counts as struck for Channeling's advancement. Not asked for a visual-only bolt, which hits nothing. Server-side.
  • entity_tame

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A mob became tamed after its owner and persistent state were set.
  • entity_teleport

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server entity was moved by a same-level teleport command, after its position changed. entity is its network id; from and to are coordinates in dimension. This hook reports command teleports that use Sunrise's same-level target path; it does not change vanilla's movement.
  • entity_tick_listened

    Side
    both
    Contract
    collect
    Host / context
    HostSide
    NeoForge
    —
    Summary
    Whether a mod listens to entity_tick_pre and entity_tick_post: a mod that hooks them hooks this one too and sets listened (HEAD, *listened = true). Without it the game tells no entity's tick, and keeps no list of them. Asked once for each family each tick, on the server and on a client (host says which side). Contract version 2: version 1 was asked on the server only.
  • entity_tick_post

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    EntityTickEvent.Post
    Summary
    The entities entities ticked in the level dimension, and kinds holds the type of each, in the same order (NeoForge's EntityTickEvent.Post): those entity_tick_pre was told and did not cancel, also one that died or was removed in its tick. An entity entity_tick_pre was told alone is told alone here too, right after its own tick; a family is told once, after its last tick. Told where entity_tick_pre is, on the server and on a client (host says which side). Version 3 observes additional families without changing the event signature.
  • entity_tick_pre

    Side
    both
    Contract
    collect
    Host / context
    HostSide
    NeoForge
    EntityTickEvent.Pre
    Summary
    The entities entities are about to tick in the level dimension, and kinds holds the type of each (minecraft:zombie, minecraft:item), in the same order (NeoForge's EntityTickEvent.Pre, posted right before each entity's tick in tickNonPassenger). Told on the server for the mobs, players, item entities, minecarts, boats, general entity rows and projectiles that tick in an entity-ticking chunk, and the entities the server keeps without simulating them (displays, markers, interactions), whose tick is only told (not a player's own boat or cart, which ticks with the player); and on a client for the mobs, other players, projectiles, tridents and displays it ticks; host says which side. Minecarts, boats and general rows are each told alone. Eligible types named at registration with entity_tick_each (or requested through entity_tick_each_entity) are also told alone. Other observed entities are told once per family. On the server, player Pre runs before the observed parts of ServerPlayer.tick, not the connection body's player_tick_pre. The local client player is not yet observed here. Push an ID from entities onto canceled to skip that entity's observed tick work and suppress its Post. IDs outside this call are ignored; repeated IDs count once. A mod using these hooks also opts in through entity_tick_listened. Removing a general entity during its own Pre skips its tick and Post and dismounts its passengers unless dismount is vetoed. An eligible former passenger can still tick as a root in this pass if it has not ticked and its join-order slot is still ahead. An already-passed slot is not revisited. Version 3 expands the version 2 coverage without changing the event signature.
  • entity_toggle_glide

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest's fall flying state changed on the server. The change has already been applied.
  • entity_travel_to_dimension

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityTravelToDimensionEvent
    Summary
    entity is about to travel to the level dimension (NeoForge's EntityTravelToDimensionEvent), before anything of it moves: the entity is still where it is, in its own level. cause is why: nether_portal, end_portal or end_gateway for a portal, or teleport for a teleport that changes level (/tp and /teleport, a spectator's teleport to a player in another level). Set cancel to keep it where it is: a portal's wait is forgotten, a teleport is dropped and /tp still reports success. An End gateway leads to the level the entity is already in, so its dimension is the entity's own.
  • entity_unleash

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A leashed mob's leash was removed, before any lead drop is handled (Bukkit's EntityUnleashEvent).
  • exp_bottle

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    An experience bottle broke and its experience was awarded.
  • experience_orb_can_merge

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Whether the experience orb into takes the orb from in (vanilla's ExperienceOrb.canMerge): the same value, and ids a multiple of 40 apart. Asked for each pair whose boxes meet, when an orb spawns (tryMergeToExisting: from is 0, the new orb isn't an entity yet, and only from_value is known) and every 20 ticks as an orb scans for neighbours (scanForMerges). can_merge holds vanilla's answer; change it either way. A merged orb counts as count orbs of into's value, so forcing orbs of different values together drops points unless the mod raises into's value with native_set_experience_orb in experience_orb_merge. Server-side.
  • experience_orb_merge

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The experience orb into (into_value points, into_count orbs) is about to take from (from_value points, from_count orbs) in, after experience_orb_can_merge said yes (from is 0 and from_count 1 for a new orb that is spawning). Set canceled to stop it: both orbs stay, and a spawning orb tries the next orb in reach, then spawns on its own. Left alone, into adds from's count, as vanilla does. A mod that writes into's value or count with set_experience_orb here makes that write the merged orb: from is taken in without adding its count, so into_value = 11, into_count = 1 pays 11 once. The merge is refused, and into put back as it was (value, count and age), when from has changed or left reach by the time the merge applies. A merge whose count would pass i32::MAX (what a save holds) is refused the same way. A write the listener made to from itself is not undone. Server-side.
  • explosion_detonate

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    ExplosionEvent.Detonate
    Summary
    An explosion at center in dimension (minecraft:overworld) is about to break blocks and reach entities: ServerExplosion.explode with its toBlow, before any block or entity is hit. Take out the positions to spare; they keep their block and get no fire. entities is getEntities(source, box): every entity in the box the centre ± (2 × radius + 1), in walk order, without the exploding source, those that will ignore the blast included — the entity-list walk, then the item frames, paintings, cushions and end crystals it misses. Take one out and it is neither hurt nor pushed, and explosion_knockback is not asked for it; one a mod adds is walked as any other, and the list the listeners leave controls membership, subject to the usual distance, exposure and per-kind immunity checks. Order controls the ordinary-storage walk only, not global effect order: crystals/dragon and players run in separate earlier passes, and decorations run last in storage order. Block positions are shuffled before destruction, so their list order is not destruction order either. Server-side.
  • explosion_knockback

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    ExplosionKnockbackEvent
    Summary
    An explosion at center in dimension, about to break blocks, pushes entity (None for a player, whom host.players().acting_player() names): ServerExplosion.hurtEntities, after the knockback is calculated. Change knockback_velocity to change what is added to the entity's velocity; a player's client is sent the same. Wind bursts too, except dragons and end crystals. End crystals are also omitted from ordinary blasts: Sunrise removes them without a velocity to change. Server-side.
  • explosion_prime

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server explosion is about to begin at center, with radius (Bukkit's ExplosionPrimeEvent). This is listen-only: the explosion proceeds as usual. Server-side, including the single-player server.
  • explosion_start

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    ExplosionEvent.Start
    Summary
    A server explosion is about to happen (ExplosionEvent.Start, in ServerLevel.explode before ServerExplosion.explode): every one, TNT, creepers, beds and anchors, fireballs, withers, end crystals and wind bursts. Set cancel and nothing of it happens: no blocks, no damage or knockback, no sound, particles or game event. Before explosion_prime, which a cancel skips. Server-side.
  • extend_poi_types

    Side
    server
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    ExtendPoiTypesEvent
    Summary
    Add block states to an existing POI type (NeoForge ExtendPoiTypesEvent): a mod's bed to minecraft:home, its workstation to minecraft:armorer. Asked once the block registry is resolved, before any world's POI tables are built, and again on a resource reload. Build each predicate on event.extensions.metadata() and hand it to event.extensions.extend(poi_type, states); a block predicate with no constraints means all of the block's states. The engine resolves the additions and refuses, one logged warning each naming both types, an unknown POI type and a state vanilla or an earlier addition already gives to a different type; the rest of a mod's additions still apply. A state added to the type it already has is a no-op. A tag predicate is refused: additions name blocks. A callback that panics or incurs a phase refusal contributes no predicates.
  • extract_block_screen_effect

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ExtractBlockScreenEffectEvent
    Summary
    Before an overlay from ScreenEffectRenderer is drawn, once a frame per eligible overlay: Block with the view-blocking state at pos the camera is inside, Water with water's default state at the eye's block pos, and Fire with fire's default state at the player's block pos. Never for a spectator; Water and Fire only in first person. Water eligibility comes from the player's eye fluid, sampled through death tick 20. While the death screen stays open after removal, extraction keeps that last sample. camera_submersion can still override it at the eye. Cancel to leave the vanilla overlay out, except that a selected fire renderer still decides whether its vanilla quads follow it. Use ExtractBlockScreenEffectEvent::set_custom_renderer to prepend or replace the quads. A failed listener leaves the previous choice and cancellation intact so later eligible listeners still run. A panic disables that mod's listener for the session and is reported in the log and the client error toast. partial_tick is world interpolation; player_partial_tick is local-player interpolation, which continues when the level is frozen. Client-side.
  • farmland_trample

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    BlockEvent.FarmlandTrampleEvent
    Summary
    A player or mob that fell onto farmland is about to turn it to its base block (BlockEvent.FarmlandTrampleEvent, from FarmlandBlock.fallOn). entity is the landing living entity: read its pose, sneak state and type through the handle. It fires after vanilla's own chance and checks (the draw, the mob-griefing rule or spawn protection, and the size test), so a listener only ever sees a trample that was going to happen. Cancel and the farmland and its crop stay as they are; the entity takes its fall damage either way.
  • fill_bucket

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player fills (stack an empty bucket) or empties a bucket at pos: BucketItem.use, where it asks Level.mayInteract. Set canceled and the bucket does nothing. Server-side, for every player of the world (host.players().acting_player() says who).
  • finalize_spawn

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    FinalizeSpawnEvent
    Summary
    NeoForge's FinalizeSpawnEvent: the new mob of type kind is at pos and Mob.finalizeSpawn (equipment, attributes, variants, the class's own setup) is about to run for reason. spawner is the spawner block for a spawner or trial spawner spawn, none otherwise (a minecart spawner too). difficulty is the local difficulty finalization reads: change it to change what the mob gets. There are two cancels. Return Flow::Cancel to skip finalization: no finalizeSpawn runs, and the mob still spawns uninitialised (no equipment, attributes or class setup). Set spawn_cancelled to stop the spawn: no mob is added and finalization does not run. It draws nothing itself; skipped finalization skips its draws, and with no listener or an untouched event the draws are vanilla's. Fired only where vanilla 26.3 calls finalizeSpawn on a mob the game makes, with vanilla's reason at that call: natural spawning, chunk generation's animals, spawners, trial spawners, patrols, raids and sieges, zombie reinforcements, a cat spawner's cat, phantoms, jockeys, /summon and /raid, spawn eggs and dispensers, the nether portal's piglin (Structure), a skeleton trap's horse and riders, an evoker's vexes and wandering traders. A conversion fires with Conversion, and a cancel there leaves the converted mob as it is. Not fired where vanilla creates the mob without finalizeSpawn: breeding and a baby from a spawn egg, an infested block's or effect's silverfish, a thrown egg's chick, a thrown pearl's endermite, a hatching egg's turtle, sniffer or tadpole, a copper golem built from blocks, a slime from the oozing effect and a lightning trap's horse. Nor for entities loaded from disk or structure mobs placed by world generation. mob is the mob itself, not yet in a level: read it through the host (mob.kind(host), mob.equipment(host, slot), mob.attribute_base(host, id)) and change it through edits (edits.set_equipment(mob, slot, item), edits.set_attribute_base(mob, id, base), tags and the custom name); the handle and the editor reach only this mob, and after the hook returns the handle answers Expired. Listeners run before finalization: finalization's own rolls (equipment, attribute bonuses, variants) still run after them and overwrite what a listener put in the same slot or attribute; Flow::Cancel keeps every edit, since no finalization follows. A mob finalization itself makes (a chicken jockey's chicken, a zombie horse's rider) is lent with its own handle. group is the pack's spawn group data (SpawnGroupData, SpawnGroup): what the listener leaves there is what finalization reads for this mob. Every site this hook fires at hands it None: the game threads no group data through a live pack; chunk generation's animals share it only inside the generator, out of the hook's reach. The host is the read-only one, and edits changes nothing but this mob: listeners run on replayed ticks, so they must be pure functions of their inputs and edit only mob and group. Server-side.
  • firework_explode

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A firework rocket completed its explosion effects.
  • fishing_medium

    Side
    both
    Contract
    replace
    Host / context
    HostSide
    NeoForge
    —
    Summary
    A fishing bobber bobber at position in level is flying or floating outside water (FishingHook.tick's fluid test found none), and a mod may say it floats and fishes in a medium there: lava, the void under an island, a cloud. owner is the player who cast it and owner_position where they stand (their feet); a client may know neither for another player's bobber. Answer a FishingMedium to make the spot a medium, or None to leave vanilla's (the bobber falls). The first mod to answer, in dependency order, wins.
  • flip_frame

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    FlipFrameEvent
    Summary
    Once for each frame presented, in a world or not, after that frame's render_frame_post (NeoForge's FlipFrameEvent): the place to rotate per-frame GPU data. Not cancellable. A frame that was not presented does not fire it. Client-side.
  • fluid_flow

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    The current of the fluid block at pos (FlowingFluid.getFlow, the vector that pushes an entity standing in it) is about to push a player, mob, item, experience orb, armor stand or arrow. fluid is the fluid's id (minecraft:water, minecraft:flowing_lava...); a mod may change flow, so it can rotate, strengthen or still a current. It runs for each fluid block the entity touches, so keep it short. The vector the renderer reads to turn a fluid's texture is not changed. Fires on both sides, on the client's replayed ticks too, with the loop context of the side that ticks the entity (its registries, settings and mod list): register the mod on both, and keep the listener a pure function of its inputs so prediction and the server agree. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • fluid_level_change

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    A flowing fluid at pos is about to change level. fluid is water or lava; the levels are 0 through 8. Set cancel to keep the old level. Server-side.
  • fluid_place_block

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    BlockEvent.FluidPlaceBlockEvent
    Summary
    Liquid at liquid_pos is about to place state at pos. Set cancel to prevent placement or change new_state to replace it. Server-side.
  • fluid_tick

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    The fluid at pos is about to run its scheduled tick (FlowingFluid.tick). fluid is water, lava or a mod fluid's id. Set cancel and the tick does nothing at all: no level change, no spreading and no new tick. For a mod that simulates a fluid itself; fluid_level_change and block_spread still ask about each change of a tick that runs. A cancelled tick schedules nothing; a mod taking over must re-schedule itself. It's asked once per tick, so keep it cheap. Server-side.
  • fluid_tooltip

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    FluidTooltipEvent
    Summary
    FluidTooltipEvent: the tooltip of stack, a fluid the game draws a slot of (the recipe viewer's fluid wells), once its name, its amount in millibuckets and, with F3+H, its id are in lines, each with a colour as rgba packs it (u32::MAX keeps the text's own). Add, change, reorder or remove lines, and an empty list draws nothing. It fires before the tooltip is laid out or drawn, with no item and no item_tooltip involved: a tank's or a fluid slot's tooltip has neither. Asked each frame the tooltip shows, only while a mod listens. Client-side.
  • food_level_changed

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The food level of the server player player (name) is about to change from from to to (Bukkit's FoodLevelChangeEvent): eating, hunger and saturation effects, the exhaustion that costs a point, starving. Change to (kept between 0 and 20; saturation never exceeds it) or set cancel to leave the level at from, saturation included. Heard once for the change a player's turn made as a whole, so two changes in one tick arrive as one. Not heard: the full food bar a respawn gives, the food a player joins with and the host of a LAN world. The player's state is swapped in, so host.players().acting_player(), PlayerRef::tell and the item helpers reach them. On a server.
  • framerate_limit

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The frame rate this window is about to be held to: Max Framerate after the inactivity throttle and Battery Mode (260 is unlimited). focused is whether the window has focus, minimized whether it is minimised and in_world whether a world is open. A mod may lower limit, as Dynamic FPS does for a window in the background: Sunrise keeps the lower of its own limit and the mod's, and ignores values below 1.
  • furnace_burn

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A furnace at pos consumed fuel and began or resumed burning it. fuel is the item consumed from its fuel slot. Server-side.
  • furnace_extract

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player took an output from a furnace at pos; item is the output item id and count is how many were taken. The player's state is not swapped in.
  • furnace_smelt

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A furnace finished smelting item into result at pos. Server-side.
  • furnace_start_smelt

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A furnace at pos began cooking item (its cooking timer advanced from zero). Server-side.
  • game_rule_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    GameRuleChangedEvent
    Summary
    A server game rule rule (minecraft:keep_inventory) was set to value (GameRuleChangedEvent, from GameRules.set with a server: /gamerule, the game rules screen, the management protocol, a test environment, server.properties). actor is present when a player caused the change. level.game_rules(host) of any of the server's levels reads every rule, the new value included. Server-side.
  • game_shutting_down

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    GameShuttingDownEvent
    Summary
    The game process is shutting down, after the client or dedicated server has stopped. Fires once on the process's game thread on an orderly exit, with the host for that side. NeoForge's GameShuttingDownEvent.
  • gather_effect_screen_tooltips

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    GatherEffectScreenTooltipsEvent
    Summary
    GatherEffectScreenTooltipsEvent: the tooltip of the effect panel the cursor is over beside the survival or creative inventory. tooltip starts empty when the panel's information is fully visible, or holds the full name then duration when compact or clipped. Each line has a colour as rgba packs it (u32::MAX keeps the text's own); add, change, reorder or remove lines, and an empty list draws nothing. effect is the effect the panel shows, screen the inventory. Asked each frame a rendered panel is hovered, only while a mod listens. Client-side.
  • gather_skipped_attribute_tooltips

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    GatherSkippedAttributeTooltipsEvent
    Summary
    GatherSkippedAttributeTooltipsEvent: the attribute modifiers a stack's tooltip leaves out (ItemStack.addAttributeTooltips), asked once before its attribute lines are built. Set skip_all to hide every one, push modifier ids (minecraft:base_attack_damage, a bare name is minecraft:'s) to skipped_ids, or EquipmentSlotGroup names (mainhand, armor, any) to skipped_groups; a slot group with nothing left shows no heading. Display and resource-query builds skip it when minecraft:tooltip_display hides the attribute modifiers or the entire tooltip. player and player_entity_id are the local player's, or None for recipe book search and a stack nested in another's tooltip (a crossbow's loaded projectile). advanced (F3+H) and creative are the tooltip's TooltipFlag. Asked when lines are built for display, recipe book search or ItemResource::tooltip, except during reentrant line queries. Client-side, only while a mod listens.
  • get_arm_pose

    Side
    client
    Contract
    replace
    Host / context
    &dyn ClientHost
    NeoForge
    IClientItemExtensions.getArmPose
    Summary
    NeoForge's IClientItemExtensions.getArmPose: the pose of the arm that holds stack in hand, as a humanoid model draws it (local and remote players and humanoid mobs). humanoid borrows both held stacks, the main arm, use state and selected poses before listeners answer; item declarations are included in those poses. Set pose to a vanilla or registered custom pose and it replaces what the item would give, whatever the use animation, a loaded crossbow or the item's own arm_pose declaration say; leave it unset to keep those. Asked once a tick per humanoid model and non-empty hand, never for an empty hand. A two-handed pose (bow_and_arrow, crossbow_hold, crossbow_charge) still poses the other hand as vanilla's does. Vanilla's spear pose poses an arm only for an item with a kinetic weapon. Register a custom pose with ArmPosesRegistrar, return ArmPose::Custom here, and write its angles in arm_pose_transform. Unknown registration slots are ignored. Mob-specific animations still run after the humanoid base pose, as in vanilla. Client-side, with a ClientHost.
  • get_enchantment_level

    Side
    both
    Contract
    listen
    Host / context
    —
    NeoForge
    GetEnchantmentLevelEvent
    Summary
    GetEnchantmentLevelEvent: the enchantments gameplay sees on stack, starting from its own minecraft:enchantments. target is the one enchantment a read asks for (ItemStack.getEnchantmentLevel), and then only its level counts; None when every one is read (ItemStack.getAllEnchantments). Set, upgrade or remove levels in enchantments: what is left is what fights, mining, fishing, tridents, crossbows, armor, loot and every other enchantment effect use. Tooltips, the anvil, the grindstone, the enchanting table, saves and the network keep the stack's own component. Asked on every such read, often many times a tick, on the server and on a client (its tooltip modifiers). A client without this mod keeps its vanilla tooltip; server gameplay uses the modded levels.
  • get_equipment_drop_chance

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    GetEquipmentDropChanceEvent
    Summary
    A dying mob entity of kind is about to roll its drop chance for the item stack in slot (Mob.dropCustomDeathLoot, NeoForge's GetEquipmentDropChanceEvent). original_chance is DropChances.byEquipment; chance starts as the chance after the enchantments of the attacker and the victim (getOriginalChance and getDropChance); change chance (1.0 or more always drops, 0 or less never does). preserved is DropChances.isPreserved: the slot drops without a player kill, whatever the mod chooses. Each slot is asked at its own point of the loop, after the mob's loot table was rolled and just before the slot's roll, only when it holds an item and its recorded chance isn't 0, in EquipmentSlot order. The roll is drawn whatever the chance is, so the mob's random follows vanilla's order. source and recently_hit are as in native_living_drops. Server-side.
  • grindstone_place

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    GrindstoneEvent.OnPlaceItem
    Summary
    A grindstone at pos made its result after its inputs changed, for the server player player (UUID) and player_entity_id (GrindstoneEvent.OnPlaceItem, matching NeoForge CommonHooks.onGrindstoneChange in GrindstoneMenu.createResult), including the three input notifications of an accepted take: inputs lends the input stacks and vanilla result. Runs inline without a decided-action transaction or rollback on cancel. Cancellation is checked before converting edits.output and clears slot 2 without rolling back listener writes. Otherwise leave edits.output at None to keep vanilla's result and experience, or set a replacement stack and its edits.xp (any negative value falls through to vanilla's experience roll; nonnegative values set the award). An invalid replacement stack is logged and ignored, keeping vanilla's result. A panicking listener is caught and leaves vanilla's result. Server-side.
  • grindstone_take

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    GrindstoneEvent.OnTakeItem
    Summary
    The server player player (UUID) and player_entity_id took a grindstone's result at pos (GrindstoneEvent.OnTakeItem, matching NeoForge CommonHooks.onGrindstoneTake in GrindstoneMenu.java.patch): inputs lends the pre-take stacks. Runs inline after the click has taken the result, without a decided-action transaction or click rollback. edits.xp starts at the resolved experience (>= 0, from grindstone_place or vanilla's pre-rolled award); non-positive values (<= 0) spawn 0 orbs while still firing level event 1042 and replacing the inputs. Replacing each slot and finally notifying the input container each run grindstone_place. This completes before the click drops its taken stack or checks for another result. Use edits.new_top and edits.new_bottom to leave items in the input slots (invalid stacks are logged and ignored as empty slots). Set cancelled to skip experience, level event 1042 and input replacement; cancel is checked before converting remainders and does not undo the click or listener writes. A panicking listener is caught and completes the take with the initial experience and cleared inputs. Server-side.
  • gui_layer_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderGuiLayerEvent.Post
    Summary
    After the complete body of a vanilla or mod HUD layer (RenderGuiLayerEvent.Post). Fires once with the ID from gui_layer_pre, even if F1 or another condition hid the vanilla drawing, or if a wrapper omitted its previous body. Does not fire when gui_layer_pre cancels the layer. If the body schedules deferred subtitle paint, Post still fires in the HUD walk, not when that paint runs. Use event.draw to paint after the body, or gui_render_post for a foreground pass independent of any layer.
  • gui_layer_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderGuiLayerEvent.Pre
    Summary
    Before a vanilla or mod HUD layer (RenderGuiLayerEvent.Pre). Draw below the layer through event.draw, or return Flow::Cancel to skip its entire body, including side effects like the air-bubble sound, and gui_layer_post. Fires even when the layer's vanilla drawing is hidden. A wrapped or replaced layer fires this once, with the slot's original ID. To change a layer's body rather than veto the whole slot, wrap or replace it at startup in register_gui_layers.
  • gui_render_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderGuiEvent.Post
    Summary
    After the complete normal GUI batch, including screens, prompts, toasts, debug overlays, the pad cursor and IME. Fires even with F1 or a menu open; file/world loading and resource-reload overlays do not fire it. The batch is in GUI pixels. native_camera is this frame's world camera (None on the panorama). gui_hidden is the F1 setting; focused is window focus. A mod decides whether its foreground indicator respects those flags. Client only; the host is read-only. A panicking listener's drawing is discarded. API @API:gui_render_post@.
  • hanging_break

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    An item frame (minecraft:item_frame, minecraft:glow_item_frame) or a painting (minecraft:painting), kind its entity type and pos the block it hangs in, is about to break: a server player's hit (player, their state swapped in, so PlayerRef::tell answers them), a blast, or the wall it hangs on gone (player None for both). Where BlockAttachedEntity.hurtServer and its survival check would kill it, before anything drops or sounds. Set cancel and it stays, as it was. A hit that only takes the item out of a frame does not break the frame and is not asked. The game's own player's hit is not asked, nor is /kill. The listener may change the world: straight after it returns without cancelling, the game finds the frame or painting again by its entity id; if it is gone, or an empty frame being broken now holds an item, nothing breaks and nothing is removed.
  • hanging_place

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player places a hanging entity: an item frame (minecraft:item_frame, minecraft:glow_item_frame), a painting (minecraft:painting) or a leash knot (minecraft:leash_knot, when a lead is tied to a fence that has none yet), kind its entity type and pos the block it takes (the fence's for a knot). Where HangingEntityItem.useOn and LeadItem.useOn create it, once it is known to fit and before anything is placed or used up. Set cancel and nothing is placed: the item stays in the player's hand. The player's state is swapped in, so PlayerRef::tell answers them. Only for guests of a server; /summon, a dispenser and the game's own player are not heard, nor is a lead tied to a mob or a boat.
  • hears_projectile_impacts

    Side
    server
    Contract
    collect
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Whether a mod hears projectiles' impacts (native_projectile_impact): set hears. Asked once a server tick before the projectiles fly; only then does the tick keep the copy of each flying projectile that a canceled impact flies on from, so a game without such a mod pays nothing. Server-side.
  • hopper_inventory_search

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A hopper selected a container while searching for items to push or pull. Exactly one of container and entity identifies the target.
  • hopper_pickup_item

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    A hopper at pos is about to pick up count of item. Set cancel to leave the dropped stack in the world. Server-side.
  • hotbar_attack_indicator_progress

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Edit the stock hotbar's attack indicator for this draw only (Hud.extractItemHotbar). After item extraction, event.progress starts at the local player's attack strength at partial tick zero, even if the camera follows another player. This runs at full charge too: 1.0 hides the indicator, while a lower value makes it visible.
  • humanoid_setup_anim

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Once per actual HumanoidModel.setupAnim invocation, after head/walk/riding setup and before arm priority/posing. event.parts lends the live crate::HumanoidPose for this callback, not a snapshot to replace or keep. get reads a present base part's local position and rotation; set_position and set_rotation write all three components immediately on any present base part, matching HumanoidModel.setupAnim with no finiteness gate. Later listeners see edits from earlier ones. Later vanilla ITEM, attack, crouch, bob and swim animation still apply. Armor stands then replace rotations with their saved pose, preserving position edits. humanoid contains this invocation's held stacks and use state. Time is captured for its view; game_time is absent outside a level, never wall time. The Host is read-only. No frame deduplication: layers that actually animate again get another invocation; copying parent poses does not dispatch.
  • ingredient

    Side
    both
    Contract
    replace
    Host / context
    &dyn DataLoadContext
    NeoForge
    ICustomIngredient
    Summary
    Define one occurrence of a custom ingredient named by a non-minecraft: recipe entry. Return None for a kind you do not handle, or an IngredientDefinition with the ordered candidate IDs and a predicate that can capture the parsed metadata. The first enabled mod to answer, in dispatch order, owns the predicate. Returning None lets the next listener answer. If nobody answers, the recipe is refused with its file and kind.
  • input_key

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    InputEvent.Key
    Summary
    A key event after handling, the window's or the control socket's key (one press, then one release for a tap), including repeats and consumed shortcuts (InputEvent.Key). key is vanilla's name for the physical key (key.keyboard.a, key.keyboard.unknown for one it doesn't name; getKey), layout_key its name for the key the keyboard layout produced (getKeycode: AZERTY's key at QWERTY's W gives key.keyboard.z; a named key such as Enter keeps the physical name; None for a character other than one ASCII letter or digit, a dead key's accent included since it arrives as its character, and for a key vanilla doesn't name) and raw_code a code telling physical keys apart, named or not (getScanCode: the platform scan code, stable within a platform only). action is what it did, and the modifier bits the screen hooks' GLFW encoding. Not cancellable.
  • interaction_key_mapping_triggered

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    InputEvent.InteractionKeyMappingTriggered
    Summary
    An interaction mapping is about to act on the tick's crosshair target. attempt distinguishes a queued press from held use or mining. Use asks for each hand tried, main first. Cancelling the main hand ends the click. Attack and use honour swing_hand independently: it governs only the acting player's own screen. False suppresses natural local swings; true preserves natural no-swing outcomes. A cancelled use with true requests a local swing only: neither a use packet nor a swing packet is sent, so observers see no swing. An uncancelled use sends no extra client swing packet: observers see the server's success swing, regardless of this flag. Attack and mining swing packets also honour the item swing veto. Pick only vetoes its packet and never swings. Fires on the window client.
  • inventory_block_start

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player is about to open an inventory supplied by a block at pos. Set cancel to leave the inventory closed. The player's state is not swapped in.
  • inventory_move_item

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    A hopper is about to move one item between containers, a composter's bone meal included. Set cancel to leave it in its source slot. A chest boat or minecart is reported at the block it is in.
  • item_attribute_modifier

    Side
    both
    Contract
    listen
    Host / context
    —
    NeoForge
    ItemAttributeModifierEvent
    Summary
    ItemAttributeModifierEvent: the attribute modifiers stack grants (ItemStack.getAttributeModifiers), starting from its own minecraft:attribute_modifiers or its item's. Add, replace or remove entries in modifiers; what is left is what every reader of the stack's modifiers uses: the equipment of players, mobs, armor stands and the dragon when it changes, mobs' gear knockback and pickup choices, the attribute sync and the tooltip. A worn stack is asked again only when it changes (ItemStack.matches), so the answer must be the same for the same stack. Asked on the server and on a client (its tooltips). A client without this mod keeps vanilla modifiers in its tooltips; the server applies the mod's answer to attribute sync.
  • item_consumption_teleport

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityTeleportEvent.ItemConsumption
    Summary
    A server player or fox that ate chorus fruit (or another item with the teleport_randomly consume effect) is about to try a random spot (NeoForge's EntityTeleportEvent.ItemConsumption, vanilla's TeleportRandomlyConsumeEffect.apply): once per attempt (up to 16), after they stopped riding. from is their feet, target the spot drawn; a mod may move it (its y kept inside the level's height, a value that is not a number ignored), and the game still looks down from it for ground it may land on. Canceling ends the effect: no teleport and no more attempts. consumer names the living actor through its handle. consumed is the stack captured before consumption, including its count and components; it is not reread from the hand after listener writes. A player's state is swapped in (host.players().acting_player()). A fox's callback has the full server host before its living AI/movement step and before the next mob ticks. Listener writes survive; changing the consumer's item, position or eligibility refuses the captured effect instead of overwriting that write. Cancellation still finishes consumption. A consumed stack the API can't carry (a saved item whose id isn't registered) isn't heard: the listeners aren't called for that consumption and the teleport goes on as vanilla's.
  • item_crafted

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.ItemCraftedEvent
    Summary
    A player took a crafting grid's result (ResultSlot.onTake, NeoForge's PlayerEvent.ItemCraftedEvent): player is the player's uuid, recipe the recipe the grid matched (minecraft:oak_planks) and stack the result it took, with its components. inputs is the grid row by row as it was before this take used it (4 cells for an inventory's grid, 9 for a crafting table's; None for an empty cell): a shift-click that crafts several times is heard once per craft, each with the grid before that craft. It only hears: the take has already happened. It fires for the crafting grid of an inventory or a crafting table, on the integrated server and a dedicated server, guests included, and not for a stonecutter's, a smithing table's or a furnace's result. Server-side.
  • item_despawn

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A dropped item entity reached its 6000-tick lifetime and is about to be removed (Bukkit's ItemDespawnEvent).
  • item_expire

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ItemExpireEvent
    Summary
    A dropped item reaches its lifetime on the server (ItemEntity.tick, NeoForge's ItemExpireEvent). Every mod may set or add to extra_life, in ticks, which starts at zero; a positive total keeps the item that much longer, zero or less lets it expire. Extensions are capped at 32766 ticks.
  • item_fished

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    ItemFishedEvent
    Summary
    A server player player (UUID) and player_entity_id reels in a catch: ItemFishedEvent in FishingHook.retrieve, after fishing loot and its modifiers roll. fished holds the bobber's id and position; listeners may change drops and set absolute non-negative rod_damage (damageRodBy): vanilla uses 1, or 2 with the bobber on the ground. After player_fish's reel-in, before rewards. Server-side. The final list reaches fishing_rod_hooked, then each stack spawns its item, one experience orb, and its fish statistic if it belongs to #minecraft:fishes. Empty stacks are removed. A cancel removes the bobber and skips the trigger, items, experience and statistic; the rod still takes rod_damage last. An emptied list without cancel gives no items, experience or statistic; the trigger still fires with an empty list and the rod is still damaged. An invalid drops write (a stack the game refuses, such as a count over the item's maximum) discards the whole event's write-back, every listener's cancel and rod_damage included, and logs a warning naming the hook and the conversion error. Diverges: Sunrise lets a listener change the drop list itself; the reference lets a listener change the stacks but not the list.
  • item_model_property

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RegisterConditionalItemModelPropertyEvent
    Summary
    Client-side evaluation of a mod's namespaced conditional item model property. Set value only for a property your mod owns; unhandled properties stay false. The owned stack snapshot is the one being resolved, including nested bundle items. bundle_selected is the runtime bundle selection index; -1 means none.
  • item_picked_up

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ItemEntityPickupEvent.Pre
    Summary
    player touches the ground item entity item (ItemEntity.playerTouch), before its pickup delay and target are checked: it is asked on every tick the two touch, even while the item can't be taken. Leave can_pickup at Default for vanilla's rule, set True to take it despite its delay or another player's target (a full inventory still leaves it), or False to leave it there: the fork sets a vanilla eligibility delay of at least 10 ticks. The hook still runs on each touch, and a later True overrides that delay. The last mod to set it decides. The handle reads the whole stack on the ground; for the window's own player of a world it ticks itself, whose pickup pass lifts the items out of the level, it reads as unavailable. Server-side.
  • item_picked_up_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ItemEntityPickupEvent.Post
    Summary
    player picked up all or part of the stack of the ground item entity item (ItemEntity.playerTouch, right after Inventory.add took some of it), the entity item_picked_up named. original is a copy of the stack as it lay before the pickup: changing it does nothing. remaining is what the item entity still holds: None (empty) after a whole pickup, the part that did not fit after a partial one. Set a stack there to leave the entity holding it, or None to empty it: the pickup then counts original's count less what is left. The amount taken is original's count less remaining's. A mod that removes the item entity meanwhile keeps it removed: no take animation, the stat and criteria still run. Not called when item_picked_up refused the pickup or the inventory took nothing; a forced True from item_picked_up changes none of this. A creative player always takes the whole stack. Server-side.
  • item_smelted

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.ItemSmeltedEvent
    Summary
    FurnaceResultSlot.checkTakeAchievements ran for a server player at a furnace, blast furnace or smoker's result slot: player is their UUID and player_entity_id their network id; stack and amount_removed are what vanilla passes there (getSmelting, getAmountRemoved). A click or a throw passes the taken stack and its count; a shift-click passes the slot's stack as it was with the count moved, then what stayed in the slot (None once it is empty) with 0; a hotbar swap passes the taken stack with 0. Fires before furnace_extract. Server-side.
  • item_spawn

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A dropped item entity was successfully added to the server level.
  • item_stacked_on_other

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    ItemStackedOnOtherEvent
    Summary
    NeoForge's ItemStackedOnOtherEvent and vanilla's Item.overrideStackedOnOther / Item.overrideOtherStackedOnMe, fired inside a resolved pickup click (a direct left/right Pickup when no drag is active, or a one-slot left/right QuickCraft drag release; never on multi-slot or middle-button drags, active-drag resets, or creative catalogue slots), with the cursor and both stacks frozen in event.
  • item_tooltip

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ItemTooltipEvent
    Summary
    ItemTooltipEvent: the whole tooltip of stack (ItemStack.getTooltipLines), once its name, the item's own lines, the components' lines, the advanced lines and the operator warning are in lines, each with a colour as rgba packs it (u32::MAX keeps the text's own). Add, change, reorder or remove lines. player and player_entity_id are the local player's, stack borrows the stack lazily (ItemStackView::project copies components on demand), display borrows the stack's minecraft:tooltip_display, advanced (F3+H) and creative (a creative tab's own slot) are its TooltipFlag, and lines mutates the live tooltip directly with per-edit TextFormError validation so one invalid edit leaves all other lines intact. Asked when item tooltip lines are built, for the game's display or ItemResource::tooltip. Never asked for a hidden tooltip, a crossbow's loaded projectile or a query made during item tooltip line construction. Queries outside line construction can dispatch this event, but never gather images or draw. Client-side. This global event is distinct from ItemPart::tooltip, which runs at the earlier Item.appendHoverText position, before component lines. Parts' lines therefore come first; this event sees the finished list including them, for any item, even one with no attached parts. Replacements are used in memory; they are not subject to serialized component limits.
  • item_toss

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    ItemTossEvent
    Summary
    ItemTossEvent: player tosses the item entity item (Player.drop: the drop key, a menu's throw, what no longer fits in the inventory), not what scatters when they die. The entity is made, with its thrower, but has not joined the level yet: its handle reads and changes the whole stack, the pickup delay and the target, and those changes stay. Set canceled and it never joins the level; the items are already out of the inventory and are lost. A canceled toss awards no drop statistic, as vanilla awards one only when an item entity came of it. Server-side. Diverges from upstream: replaces the listen-only item_dropped, which fired for the drop key and menu throws only.
  • items

    Side
    both
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEvent
    Summary
    Declare items in code once at startup on each side, before resources load. Pass each mod_api::Item to event.register. The declaration belongs to the submitting package — in its own namespaces or in a content package it serves (served_by) — and works like data/<id>/sunrise/item/<path>.json in a content mod. A block's item is declared with its block, not here. crafting_remainder may reference items across the host and its served packages; duplicates across layers and declarations into a side = "server" package's namespace are refused. register returns a typed DeclarationError for invalid IDs or fields. The game records the refusal and stops startup even if a returning listener ignores it. A panic discards this listener's declarations and diagnostics without rejecting startup.
  • key_mapping_pre

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    InputEvent.InteractionKeyMappingTriggered, InputEvent.Key
    Summary
    A physical key or mouse button bound to the gameplay mapping mapping (key.jump, key.attack...) changes state while playing, before the game acts on it. pressed is true for a press (a key's repeat counts as one, as the game takes it) and false for a release. Cancel a press to drop it for every mapping bound to its input: the game holds nothing and acts on nothing. A release cannot be canceled, so what the game holds is always let go. Told for the keys and mouse buttons the window takes (agent control's included), after the window's own shortcuts (fullscreen, screenshot, debug keys), and only with no screen open; not for a controller, whose presses go straight to the mappings, nor for a mod's crate::VanillaKeyMappingRef::set_down or crate::VanillaKeyMappingRef::click, which do not change physical input. No NeoForge counterpart. Client-side.
  • leaves_decay

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    A non-persistent leaf block at distance 7 is about to decay at pos. Set cancel to keep it. Server-side.
  • left_click_block

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerInteractEvent.LeftClickBlock
    Summary
    A player left-clicks the block state at pos, face the face hit ([0, 1, 0] is the top): where ServerPlayerGameMode.handleBlockBreakAction takes a dig's start, after its reach, spawn protection and world border checks, before Block.attack (a note block plays) or a creative break. Set canceled to ignore the click: the block isn't attacked, dug or broken on the server, and the player's client gets it back (its own predicted crack still shows to the clicking player). Server-side, for every player of the world (the helpers read the acting one).
  • left_click_empty

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    PlayerInteractEvent.LeftClickEmpty
    Summary
    The local player left-clicks empty space, with any main-hand stack. Client-side only; the server does not receive this event.
  • level_load

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LevelEvent.Load
    Summary
    dimension's level opened on the server (NeoForge's LevelEvent.Load, posted in MinecraftServer.createLevels): before any of its chunks (chunk_load), so a mod sets up what it keeps for the level here. Before server_started, this fires in Overworld, Nether, End order, with the level in place, regardless of the saved player's dimension. The next built-in is not available until after the current notification. Built-in levels stay open until server shutdown; custom levels that close while idle fire this again when they reopen. Explicitly opened runtime levels can fire this while parked: event.dimension names the opened level, not the Host's current level. Server-side.
  • level_save

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LevelEvent.Save
    Summary
    The end of dimension's level save pass (NeoForge's LevelEvent.Save in ServerLevel.save), for autosave, /save-all, pause and shutdown. Individual record failures are reported and do not suppress this hook; a failed awaited storage flush does. Server-side.
  • level_tick_post

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    LevelTickEvent.Post
    Summary
    After a successful level tick pass on either logical side; never after a failed tick. host.server_has_time() says whether optional work still fits in the tick (LevelTickEvent.hasTime); always true on a client.
  • level_tick_pre

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    LevelTickEvent.Pre
    Summary
    Before a level's tick pass on either logical side. level identifies the level. host.server_has_time() says whether optional work still fits in the tick (LevelTickEvent.hasTime); always true on a client.
  • level_unload

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LevelEvent.Unload
    Summary
    dimension's level closed (NeoForge's LevelEvent.Unload, posted after level.close() in MinecraftServer.stopServer), after its last save: drop what the mod kept for it. A custom level closes once nobody has been in it for 300 ticks, after its chunks' unloads; built-in levels (Overworld, Nether, End) stay open until server shutdown, unloading only their unticketed chunks while idle. Every level still open closes when the server stops, before WorldCloseFinal, and when its open or its loop fails, before WorldOpenFailed or WorldCloseFailed. Once for each level_load. Don't read its blocks. Server-side.
  • lightning_strike

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server lightning bolt is about to be created. cause is weather, trident, command or mod (a native mod's strike_lightning); player is the responsible player when known. Set cancel to prevent the bolt and its effects.
  • living_breathe

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingBreatheEvent
    Summary
    An entity's breathing this tick (LivingBreatheEvent, posted from LivingEntity.baseTick every tick for a living entity with the generic air logic): entity is the player or mob. can_breathe, consume and refill come in as Sunrise does it (a mod-free game changes nothing); set them to change this tick. With can_breathe the air rises by refill, up to its maximum (entity_max_air_supply: 300 for every entity except dolphins, which have 4800); a dolphin's vanilla refill is its maximum minus its current air. Without breath, air falls by consume, and at -20 it is set to 0 and the entity takes 2 drowning damage. Negative amounts count as 0. Asked on servers for players and mobs. A water animal, axolotl or nautilus comes in with its own air logic's answer: where it breathes (water, or rain for an axolotl) can_breathe and a refill to its full air; elsewhere no breath and consume 1. Running out deals its own damage (drowning, or drying out).
  • living_change_target

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    LivingChangeTargetEvent
    Summary
    A mob is about to change its target. original_target is the target requested by the game, or none when it is clearing the target. new_target starts as that value; a listener can redirect or clear it. Set cancel to retain the mob's existing target. is_brain identifies a brain-driven target change; false identifies a goal or other mob target setter. Handles may be read through the host. During the lifted mob tick pass, the scoped view reads the ticking mob directly and peers from the tick snapshot: an already-ticked peer exposes post-turn state, and a not-yet-ticked peer pre-turn state. A mob spawned during that pass does not resolve in the scoped view until the next pass. Removed mobs do not resolve; dead-but-present mobs are distinct from removed mobs. Outside this scoped tick path, dispatch reads the entities available in the game host rather than this snapshot. A stale or invalid replacement, including a fake player, is refused. Authoritative server only. When piglins turn on a player who took guarded gold, the game reads the end of its mob list again at each step and finds each piglin again by its entity id after the hook; a piglin that is removed is skipped.
  • living_conversion_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingConversionEvent.Post
    Summary
    A mob converted into another type (NeoForge's LivingConversionEvent.Post): converted replaces entity. Fires after the finalized new mob joined the level and before the old mob is removed, for the conversions living_conversion_pre tells.
  • living_conversion_pre

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingConversionEvent.Pre
    Summary
    A mob is about to convert into another type (NeoForge's LivingConversionEvent.Pre, vanilla's Mob.convertTo): a zombie drowning, a piglin or hoglin in the Overworld, a tadpole growing, a mooshroom sheared by a dispenser, a pig or villager struck by lightning. outcome is the new type. Set cancel to keep the mob as it is; a drowning zombie starts its timers again. Not told: a mooshroom a player shears, a zombie villager's cure, a villager turned by a zombie.
  • living_damage_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn HitHost
    NeoForge
    LivingDamageEvent.Post
    Summary
    NeoForge's LivingDamageEvent.Post: entity entity of type kind has been hurt by the hit container (a read-only live DamageContainerView) describes, with its final values (health damage, the reductions, the post-attack invulnerability ticks). It fires once for every hit that passed living_incoming_damage and the invulnerability cooldown, at the end of hurtServer: after the hurt sounds and after that hit's death processing (even if vetoed) or totem protection, before the hurt caller resumes. The next hazard, poison application or rider's hit sees the preceding hit already completed. It is not delayed to the next tick or the end of a player's turn. A queued mob effect's hurt finishes before the next action; a dolphin's dry-out hurt finishes before the land hop. A bee's drowning hurt finishes before it checks stinger expiry; an expiry hurt finishes before nectar and anger bookkeeping and movement controls. A server player's landing hurt finishes before the landing's HIT_GROUND and fall reset, and before the next accepted move. A mob landing in its own tick finishes its hurt before the fall reset, movement restitution, travel's collision hurt or a later goal. This includes a BreathAir move from either selector and a dolphin following a rider. A pufferfish sting on a mob finishes the hit before applying poison or starting the next sting, and before the fish's own entity_tick_post. A projectile hit finishes before its enchantment effects, levitation or a follow-up explosion. Each mount or passenger's hurt finishes before the fall routine continues to the next hit: a horse is hurt before its riders. container.inflicted() is the amount before absorption; container.health_damage() is the amount applied to health. A hit that took no health (a shield, absorption, armor or a living_damage_pre listener took it all) fires it too, with container.health_damage() 0. container.should_cause_side_effects() carries hurtServer's fresh-hit decision (shouldCauseSideEffects): false for a stronger hit inside the cooldown unless its source bypasses it, independent of the final damage or modded invulnerability ticks. It only listens. It can't write the entity or the world's blocks: the host (HitHost) gives the hit's random and level attachments, level sounds, and the own random of the entities the hit lends.
  • living_damage_pre

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn HitHost
    NeoForge
    LivingDamageEvent.Pre
    Summary
    NeoForge's LivingDamageEvent.Pre: LivingEntity.actuallyHurt of entity entity of type kind (minecraft:player, minecraft:zombie) by source (named as native_living_incoming_damage names it) has taken armor and magic, and the absorption hearts are next: container is a live mutable borrow of the hit's damage container; it holds the damage it started with, what it is now (new_damage, which may be 0) and each reduction so far (armor, enchantments, mob effects). Change its new_damage to change what is inflicted before absorption, not what lastHurt remembers for the cooldown. Set its post-attack invulnerability ticks to change the cooldown itself, or use add_reduction_modifier for subsequent stages (such as Reduction::Absorption). The setters refuse negative damage, NaN damage and negative ticks without changing the hit. Pre fires for players, mobs and the ender dragon; a wolf whose armor takes the hit and armor stands do not fire it. The host is the hit's (HitHost): its blocks, random and own attachments, level sounds, and the own random of the entities the hit lends; the hurt entity is in the middle of its hit.
  • living_death

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingDeathEvent
    Summary
    A mob or server player is about to die (NeoForge's LivingDeathEvent, vanilla's LivingEntity.die): its health has run out, and the loot, experience and death message have not run. entity is its id and kind its type (minecraft:zombie, minecraft:player). source and weapon are the complete killing blow, as living_incoming_damage saw it, including the causing player, direct projectile and weapon components. A server player's lethal fall is heard on the landing body before its fall distance is reset. A lethal pufferfish sting is heard before the fish applies that sting's poison or stings the next mob. A projectile's killing blow is heard before on-hit follow-ups; a mount or passenger's killing blow is heard before falling on to the next rider. Cancellation skips death and loot without changing the listener's health: heal it to keep it alive; at health <= 0 its body is removed after 20 ticks. Armor stands, boats and other non-mob entities are not told.
  • living_death_message

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    living_death_message is asked for the death message a tamed mob sends its owner (TamableAnimal.die), once the message is built and only when it would be sent (owner online, show_death_messages on). message holds the text: replace it, or set it to None to tell the owner nothing. Every mod is asked in order. Server and host.
  • living_death_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A mob or server player's death has finished (Fabric's ServerLivingEntityEvents.AFTER_DEATH, vanilla's LivingEntity.die at its broadcastEntityEvent): the loot, equipment and experience dropped and the death message went out. entity is its id; damage_type names the killing blow (minecraft:player_attack) and attacker is the mob that dealt it, 0 for none or a player. It only hears. The tail of living_death, a separate moment, and not fired when that hook cancelled the death. On a server player's lethal landing this is still inside the hurt, before HIT_GROUND and the fall reset. On a pufferfish sting it is before that sting's poison and the next sting. Projectile and mounted-fall deaths likewise finish before their on-hit or next-rider follow-ups. Server-side, once per death, for every ordinary living entity. The ender dragon uses a separate death sequence and fires neither living death hook. Armor stands, boats and other non-mob entities are not told.
  • living_destroy_block

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingDestroyBlockEvent
    Summary
    A mob is about to destroy a block (NeoForge's LivingDestroyBlockEvent): a wither breaking blocks around it, a ravager breaking leaves, the ender dragon's wall check, an enderman picking a block up, a silverfish waking its friends (the infested blocks break), a zombie breaking a door or a turtle egg. entity is its entity id, kind its type (minecraft:wither), pos the block and state its state. Canceling keeps the block (an enderman then holds nothing). Asked once per block, only while a mod is loaded. Server-side.
  • living_drops

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingDropsEvent
    Summary
    Not loot_drops: that is the loot-modifier step, which edits the stacks a table rolled (blocks, shearing, a mob's table). This hook fires once after it, on the entity's whole collected drop list, and nothing is spawned until it returns. A dying mob, server player or armor stand entity of kind (player is a player's UUID) is about to drop drops, the items LivingEntity.dropAllDeathLoot collected (NeoForge's LivingDropsEvent): the loot tables' stacks (after loot_drops), the equipment that rolled to drop, a mob's own extras (an enderman's carried block, a fox's mouth item, a piglin's inventory, a copper golem's preserved equipment) and a player's inventory, each with the position, motion and pickup delay its item entity will have. Edit the list (take out, change or add drops) or set cancel for no drops at all; empty stacks don't drop. source is the killing blow (causing and direct entity ids, 0 when none or not known); a player who dies with no recorded blow gets the source living_death heard (generic_kill for /kill). recently_hit is whether a player hurt it within 100 ticks, which is what lets a mob drop its equipment. An armor stand fires it from brokenByAnything with an empty list (its stand item and its equipment pop outside the list, as in vanilla). Experience orbs are not in the list (living_experience_drop, heard just before this hook, as in NeoForge; the orbs join the level after the items); a spectator, who drops nothing, doesn't call this. Each ItemDrop also sets the item entity's thrower, target (the only player who may pick it up), no_gravity and starting age (ItemDrop::UNLIMITED_LIFETIME never despawns); a drop left as it was spawns as before. Server-side.
  • living_drown

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LoopContext
    NeoForge
    LivingDrownEvent
    Summary
    An entity that can't breathe and has no air (LivingDrownEvent, posted from LivingEntity.baseTick), with vanilla's answers as the defaults: it drowns at -20 air, for 2 damage and 8 bubbles. Change is_drowning, damage_amount or bubble_count, or cancel to skip drowning this tick. Eight bubbles are the vanilla entity event; another positive count is sent as that many bubble particles, and none sends nothing. Asked on servers, for the entities living_breathe is; a water animal, axolotl or nautilus shows no bubbles, as in vanilla. It is given the loop context of the server that ticks the entity (its registries, settings and mod list), because it fires inside the tick's own air and damage update.
  • living_entity_use_item_finish

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    LivingEntityUseItemEvent.Finish
    Summary
    NeoForge's LivingEntityUseItemEvent.Finish: entity's use of stack in hand ran its time (LivingEntity.completeUsingItem), duration the ticks left, always 0. entity is as in living_entity_use_item_start. result arrives with what finishUsingItem left in the hand (the bowl of a stew, none for the last apple; a mod's own item is kept) and may be replaced. Fired for consumables, potions, spyglasses and mods' items. Both sides, as vanilla's completeUsingItem: answer the same on both, and change the world only on the server (native_window is false there), not on a server's client. On the server it fires for every player of the world (the helpers read the acting one). On a server's client the result arrives as vanilla's client finishUsingItem leaves it: an item that is not a consumable unchanged (a spyglass), a consumable less one, and its use remainder (the bowl of the last stew) once that empties the hand; nothing is used up in creative mode. The hand holds the result, a mod's replacement included, until the server's inventory update.
  • living_entity_use_item_start

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    LivingEntityUseItemEvent.Start
    Summary
    NeoForge's LivingEntityUseItemEvent.Start: entity starts using stack in hand (LivingEntity.startUsingItem), for duration ticks (use_duration's answer). entity is a mob's Entity.getId, None for a player (host.players().acting_player() says who); a mob fires it only for LivingRef::start_using_item. Change duration (consumables, potions, spyglasses and mods' items count to it; below 0 refuses the use, and 0 runs it out on its first tick, as living_entity_use_item_tick running it out, unless the item's own is 0 already), or set canceled and the use doesn't start. Both sides, as vanilla's: on the server for every player of the world, and on a server's client for the uses it predicts. Answer the same on both, and change the world only on the server (native_window is false there), not on a server's client.
  • living_entity_use_item_stop

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    LivingEntityUseItemEvent.Stop
    Summary
    NeoForge's LivingEntityUseItemEvent.Stop: entity lets go of stack in hand before its use ran its time (LivingEntity.releaseUsingItem: the use button let go, a screen opened), duration the ticks left. Set canceled to skip the item's release (a bow doesn't shoot, a spyglass makes no sound, release_using isn't called); the use stops anyway. Not when the hand changed item, which stops the use without a release. Both sides, as living_entity_use_item_tick.
  • living_entity_use_item_tick

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    LivingEntityUseItemEvent.Tick
    Summary
    Each living tick that entity may still use stack in hand. entity is as in living_entity_use_item_start; duration replaces the remaining-ticks counter, not the original use duration. The order is the may-still-use check, this event, the per-tick effects only while the counter is above 0, then the decrement and server finish.
  • living_equipment_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingEquipmentChangeEvent
    Summary
    A mob's, an armor stand's or a player's equipment slot took a different stack (NeoForge's LivingEquipmentChangeEvent, posted in LivingEntity.collectEquipmentChanges): entity is its ID and kind its type (minecraft:zombie, minecraft:player), slot the EquipmentSlot (mainhand, offhand, feet, legs, chest, head, body, saddle), from what the slot held when this was last heard (none for empty) and to what it holds now. Once for each slot that changed, in that order, after the mobs' tick, so a mob that joins the level wearing something counts from empty on its first tick. It only hears: change the entity with its own helpers.
  • living_equipment_listened

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Whether a mod listens to the mobs' and players' living_equipment_change: a mod that hooks it hooks this one too and sets listened (HEAD, *listened = true). Without it the game does not read every mob's and connected player's equipment each tick, and neither is told (armor stands still are). A mob that ticks, or a player who is in the level, once it is set counts from empty. Asked once a tick for the mobs, after their tick, and once for the players. Server-side.
  • living_experience_drop

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingExperienceDropEvent
    Summary
    A dying mob or player entity of kind is about to drop original points of experience; the vanilla conditions have been checked. attacking_player is the player who last hurt it, if any. Change amount (0 or less drops nothing), or set cancel to drop none. A sculk catalyst that takes the experience does not call this. As in NeoForge's dropAllDeathLoot, it fires after the loot rolls and just before living_drops hears the item list. Server-side.
  • living_fall

    Side
    both
    Contract
    cancel
    Host / context
    &dyn LoopContext
    NeoForge
    LivingFallEvent
    Summary
    A living entity is about to handle a fall (LivingFallEvent). Mods may change the distance and damage multiplier, or cancel fall handling. It is given the loop context of the side that ticks the entity (its registries, settings and mod list); it fires inside the tick's own landing, before its damage and block effects, so it takes no Host.
  • living_flying_speed

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    A living entity's airborne acceleration (LivingEntity.getFlyingSpeed) is about to be used by its travel. entity is its id and kind its type; a mod may change speed. Fires on both sides, on the client's replayed ticks too, with the loop context of the side that ticks the entity (its registries, settings and mod list): register the mod on both, and keep the listener a pure function of its inputs so prediction and the server agree. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • living_get_projectile

    Side
    both
    Contract
    collect
    Host / context
    HostSide
    NeoForge
    LivingGetProjectileEvent
    Summary
    LivingEntity.getProjectile(weapon) (NeoForge's LivingGetProjectileEvent) for a player (player and name) or a mob (entity, kind): a skeleton or illusioner's shot, or the crossbow load of a pillager or piglin. projectile is the vanilla ammunition; replace it to choose another. A replaced stack is not taken from the inventory.
  • living_heal

    Side
    both
    Contract
    cancel
    Host / context
    &dyn LoopContext
    NeoForge
    LivingHealEvent
    Summary
    A living entity is about to heal. Mods may change the amount or cancel. entity identifies the affected entity. It is given the loop context of the side that ticks the entity (its registries, settings and mod list), because it fires inside the tick's own health update, where a deferred call would reorder vanilla's effects.
  • living_incoming_damage

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn HitHost
    NeoForge
    LivingIncomingDamageEvent
    Summary
    NeoForge's LivingIncomingDamageEvent: LivingEntity.hurtServer, past its guards (an invulnerable or dead entity, fire on a fire-resistant one), is about to hurt entity entity of type kind (minecraft:zombie, minecraft:player) by source: its damage type (minecraft:fall), causing entity (DamageSource.getEntity: the shooter of an arrow), direct entity (getDirectEntity: the projectile's entity id when the damage type names one, on a player, mob or ender dragon; 0 for magic() and any other source with no direct entity, even during that projectile's impact), and where it comes from (getSourcePosition). victim is where the entity stands and looks, and weapon the direct entity's weapon (getWeaponItem) when it is known. causing_weapon is the causing living entity's current main-hand weapon (getEntity().getWeaponItem), read at hit time, not a projectile's saved weapon; None for an absent, unknown or non-living cause, or once the shooter is gone. It is an addition: NeoForge's LivingIncomingDamageEvent doesn't carry it, and mods there read the source entity's main hand themselves. container is a live mutable borrow of the hit's damage container before any reduction; engine sequencing and normalization remain game-owned. Change its new_damage, the invulnerability ticks a fresh hit leaves (vanilla's 20), or install an owned reduction modifier closure with add_reduction_modifier (run in registration order when that reduction stage executes, receiving a read-only view of the live container and the preceding reduction value). Set canceled and nothing of hurtServer happens (no damage, hurt sound, knockback, cooldown, statistics or criteria); a canceled hit on the ender dragon still counts as landed (EnderDragon.hurt returns true whatever reallyHurt did). It fires on every damage route, for players, mobs and the ender dragon. The host is the hit's (HitHost): its blocks, random and own attachments, level sounds, and the own random of the entities the hit lends; the hurt entity is in the middle of its hit.
  • living_jump

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    LivingEvent.LivingJumpEvent
    Summary
    A living entity jumped (LivingEvent.LivingJumpEvent): entity of kind (minecraft:player, minecraft:cow...), and velocity, its motion in blocks per tick right after the jump. It is given the loop context of the side that ticks the entity (its registries, settings and mod list); it fires inside the tick's own jump, after the velocity write, so it takes no Host. It fires only when the jump power is above vanilla's 1.0E-5 threshold, as NeoForge's event does. Like NeoForge's event it cannot be cancelled; the velocity is read-only, and a write to event.velocity is not applied (change the jump's height with living_jump_power).
  • living_jump_power

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    A living entity's jump power (LivingEntity.getJumpPower: jump strength attribute, block jump factor and Jump Boost) is about to be used by jumpFromGround. entity is its id and kind its type; a mod may change power. The rabbit's own hop and the player, cube, panda and ordinary mob jumps all pass through it. Fires on both sides, on the client's replayed ticks too, with the loop context of the side that ticks the entity (its registries, settings and mod list): register the mod on both, and keep the listener a pure function of its inputs so prediction and the server agree. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • living_knockback

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    LivingKnockBackEvent
    Summary
    NeoForge's LivingKnockBackEvent: LivingEntity.knockback is about to push entity entity of type kind (minecraft:zombie, minecraft:player) strength away from the direction (x, z), on the raw strength, before the entity's knockback resistance takes its share and its motion changes. Vanilla's direction points at the source of a hit (the attacker's side), and the entity is pushed the other way. source is the push's DamageSource, named as native_living_incoming_damage names a hit's. attacker is the attacking entity's network id, falling back to the victim's last hurt-by mob, or 0 when unknown; attacker_main and attacker_off are what it holds (a player's selected and off-hand stacks, a mob's main hand), none when unknown. LivingRef::knockback has an unattributed minecraft:generic source: this same attacker fallback and the victim's existing kill credit still apply. The call deals no damage and creates no credit. entry is Short when the push came in through knockback(power, x, z), which only delegates to the full entry, and Full when the full entry was called directly. The hook fires once per call of the full entry either way, so a listener that wants its change applied twice for a short-entry push, as a mixin on both entries would, applies it twice when entry is Short. Change strength, x or z, or set canceled, and the push follows them: canceled, the entity's motion is left alone. A strength of 0 or less after the hook is no push, and a direction too short to tell draws a random one after it, as in vanilla. A value a mod leaves that is not a finite number is put back as it was. It fires for LivingRef::knockback and for vanilla living knockbacks: a hit's own push, a sprinting or Knockback hit, a sweep, a spear, a shield's push on its holder, a goat's ram and a mob's melee push. It does not fire for a sulfur cube with a block that a hit with a causing entity knocks back (SulfurCube.knockback does not call super there), for the pushes vanilla doesn't make with LivingEntity.knockback (the ender dragon's wings, Punch arrows, explosions, wind charges, a mace smash's area, a hoglin's throw). The level is the victim's: its blocks, random and own attachments. kill_credit is the pushed living entity's kill credit at this pre-motion moment: a remembered player takes precedence over its last hurting mob, even when that player cannot resolve (then 0, without falling back). kill_credit_main is that entity's current main-hand stack, or none. This is not the immediate damage-source attacker. Accepted-hit memories, including a tame wolf's owner, are committed before this read. Both are additions: NeoForge's LivingKnockBackEvent doesn't carry them, and mods there read the pushed entity's kill credit and its holder's main hand themselves.
  • living_shield_block

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn HitHost
    NeoForge
    LivingShieldBlockEvent
    Summary
    NeoForge's LivingShieldBlockEvent: entity entity of type kind (minecraft:player, minecraft:zombie) is hit for damage from source (its type and entities, as native_living_incoming_damage names them), and LivingEntity.applyItemBlocking is about to resolve what a raised blocks_attacks item stops. Every hit with damage asks, raised item or not: original_blocked is whether vanilla blocks (only a player raises one). Change block: blocked makes the entity block or not (a block forced on a hit vanilla lets through stops all of it), blocked_damage what is stopped (kept within 0 and damage) and shield_damage the durability a raised item loses (below 0: vanilla's itemDamage of what is stopped). Set blocked to false and nothing is blocked, as NeoForge's setBlocked(false); the event has no cancel. The host is the hit's (HitHost): its blocks, random and own attachments, level sounds, and the own random of the entities the hit lends.
  • living_speed

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    A living entity's movement speed (LivingEntity.getSpeed) is about to drive its travel on the ground and through fluids. entity is its id and kind its type; a mod may change speed. Fires on both sides, on the client's replayed ticks too, with the loop context of the side that ticks the entity (its registries, settings and mod list): register the mod on both, and keep the listener a pure function of its inputs so prediction and the server agree. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • living_travel

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    Before the server's Player.travel branch (after swim steering) or a mob's LivingEntity.travel branch. entity, kind and mode identify the body and the branch it is about to run, including species overrides. A body that doesn't travel, such as a shulker, fires no hook. Neither does a replayed player tick. A branch that calls entity_move can still meet a move veto there.
  • living_use_totem

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn HitHost
    NeoForge
    LivingUseTotemEvent
    Summary
    NeoForge's LivingUseTotemEvent: a killing blow on entity entity of type kind from source (named as native_living_incoming_damage names it) would be taken by the death_protection item item in its hand (main or off; LivingEntity.checkTotemDeathProtection). Set cancel and the entity gets no protection: it dies and the item is kept. A player or a mob holding a totem fires it; a source that bypasses invulnerability never reaches it. player_totem still hears a server player's totem that did save them, after this. The host is the hit's (HitHost): its blocks, random and own attachments, level sounds, and the own random of the entities the hit lends.
  • living_visibility

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    LivingEvent.LivingVisibilityEvent
    Summary
    How visible entity is to looking (NeoForge's LivingVisibilityEvent, last in LivingEntity.getVisibilityPercent): the range a mob's targeting check sees it from is scaled by visibility. It comes in as vanilla's percent (sneaking 0.8, invisibility by armour cover, a worn head's mob_visibility: 0.5 to its own mob type); multiply it to scale. Values below 0 count as 0, and the result is clamped to 10. Asked for any living target, by the mobs whose targeting checks scale by visibility (hostile targeting, sensors, the happy ghast's tempt). A mob target comes in without the sneaking factor, which vanilla reads through isDiscrete. Server-side.
  • loot_drops

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingDropsEvent, BlockDropsEvent
    Summary
    A block broke or a mob died, and drops are the items about to drop, in the order they drop: what the loot tables rolled (after loot_table_load's changes), and for a mob what it wore, held or carried (a fox's mouth item, an allay's, piglin's or horse's inventory), but not an enderman's carried block or a copper golem's preserved equipment, which drop after. A charged creeper's head and a fox's mouth item come before the mob's own table. A block's stacks get its block entity's data (a shulker box's items) after this. Add, change or take out stacks; empty ones don't drop (NeoForge's global loot modifiers, Fabric's LootTableEvents.MODIFY_DROPS); context says what dropped them and how, and it is called even when drops is empty. A player's use drops through it too (LootDrops::used: shears, a brush, an item frame), with that player named. Lead drops from untying or cutting a leash, and from a mob a player killed while leashed, pass through here too, with that player named. It hears blocks that a player, an explosion or a mob breaks, not other breaks (leaves decaying, a torch losing its wall, a piston, /setblock ... destroy), nor a creative break or a tool that can't harvest the block, nor experience. For deaths, context.damage_source carries the death invocation's damage type and causing/direct IDs (not remembered player credit), and context.tool is None (the entity context has no TOOL). Resolve the causing ID through host.entity and host.living to read its main hand live with living.with_hand_item(host, Hand::Main, |stack| stack.item()), including earlier listeners' changes. Use stack.project() inside the callback if you need components or an owned hand stack; projection may refuse. context.weapon_item(host) returns an owned snapshot of the recorded projectile weapon or the live melee weapon, including a player's active auto-spin stack. Block and use drops retain their tool meaning. A changed drop keeps any non-negative signed-int damage, even above its maximum durability. Server-side, for every player.
  • loot_table_load

    Side
    server
    Contract
    collect
    Host / context
    &dyn DataLoadContext
    NeoForge
    LootTableLoadEvent
    Summary
    A native mod's hook point (docs/modding/src/how-to/native-mods.md), declared in hooks/*.rs with the game's: the loot table id (minecraft:chests/simple_dungeon, minecraft:blocks/stone, minecraft:entities/zombie) as it loads, its JSON after the data packs', before anything rolls it (NeoForge's LootTableLoadEvent, Fabric's LootTableEvents.MODIFY). Add pools to table["pools"] or entries to a pool's entries, change or replace it (no pools: it drops nothing; keep its random_sequence when replacing it, as a mob's table without one drops nothing). Called once per table in id order when the server loads or reloads its data, with the DataLoadContext of that owning load (origin() is always ServerDataLoad: the client never loads loot tables, so the hook never fires there).
  • map_decoration_types

    Side
    both
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEvent
    Summary
    The map decoration types a mod adds (NeoForge's RegisterEvent for Registries.MAP_DECORATION_TYPE): call event.register(decoration) with a MapDecorationType per type. Asked once at startup on every side.
  • map_decorations

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    MapDecorationType
    Summary
    Icons a mod puts on map map each time it is drawn: held, in an item frame or on the cartography table's screen (a map's pixels are its own; nothing is saved in the map). Push MapDecorations (an atlas sprite, a position in half map pixels, a rotation, and whether it shows in a frame and on the screen like vanilla's markers do); they are drawn after the vanilla ones with the same pose, and a sprite the atlas lacks is left out. map.center, map.scale and map.dimension say which blocks the map shows, and MapDecoration::x has the formula. Vanilla's decorations are not passed in. Asked every frame a map is drawn, so keep it cheap. The client half of MapDecorationType and addDecoration: a type registered on the server and saved in the map's data is not here.
  • menu_background

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The normal menu blur request, before finite/range validation. None disables it.
  • menu_closed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerContainerEvent.Close
    Summary
    A menu a mod opened closed: the player closed it, the server or a mod opened another, or the player left. opening_hand is the hand the opener supplied, if any. For a generic owned_slots menu (without declared results), owned_slots contains the transient container's final values in slot order and those stacks are not returned or dropped automatically by the game. For a processing owned menu (declaring both owned_slots and results), the game automatically returns non-result inputs to the player's inventory (dropping overflow, or dropping on disconnect or death), discards declared results slots, and passes an empty owned_slots slice here so items cannot be duplicated. The window is already detached; a listener can use the Host to return generic owned slots or update the opening item if the player is still available.
  • menu_extra_data

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    IPlayerExtension.openMenu
    Summary
    Block block at pos opens its mod menu type menu for server player player: set data to hand the menu's screen bytes of your own (a machine's tier, mode or recipes), up to 1,048,555 bytes (vanilla's 1 MiB clientbound custom payload limit minus the 21-byte envelope header), which the client reads only from MenuScreenOpen::extra during construction (NeoForge's openMenu with an extra-data writer). Oversize data is logged and refuses the menu open. For live values use the menu's data slots (MenuScreenFrame::data on the client). The first mod to set data wins, so answer only for your blocks. The player's state is not swapped in.
  • menu_links

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Containers exposed by linked slots of server player player's open mod menu menu (namespace:path) at pos. The player's state is not swapped in. Push container positions to links, in order. The engine resolves containers and refreshes their linked slots in the same tick. Asked each server tick only for open mod menu types declaring links, and dispatched only to subscribers. With no subscribers the linked-container tick does no work and allocates nothing. Silently skips pos, duplicate positions, missing or non-lendable containers, and positions after 64 accepted containers (MAX_MENU_LINKS). First accepted occurrence wins, preserving answer order.
  • mob_despawn

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    MobDespawnEvent
    Summary
    NeoForge's MobDespawnEvent: the mob mob (of type kind, at pos) is about to run Mob.checkDespawn, which fires once per tick for every mob on the entity tick list (its chunk is entity-ticking, which player tickets give across the whole view distance), persistent ones and peaceful-mode ones included. A listed mob beyond the simulation distance is checked without being ticked; a mob in a loaded chunk that is not entity-ticking is neither checked nor told. The hook is told while the game has lent its mob list to the tick, so mob resolves through the tick's own read view (#795): the ticking mob itself, and the other present mobs in its tick snapshot, are readable through the host. The ticking mob is read directly; an already-ticked peer exposes its post-turn state and a not-yet-ticked peer its pre-turn state. A mob spawned during the pass does not resolve in this scoped view until the next pass. Removed mobs do not resolve; a dead-but-present mob is not a removed mob. This is the scoped read-host first step for #795, not an in-place ownership redesign. kind and pos stay as plain data for listeners that only need them. Set result: Allow discards the mob now, Deny keeps it this tick, and Default (the starting value) leaves vanilla's rules to decide. Anything but Default skips vanilla's checks, including the nextInt(800) draw of the idle-despawn roll, so the hook fires before that draw: a mob a mod denies does not consume it. A listener is a pure function of its inputs, because the hook fires on replayed ticks. The wither and the ender dragon override checkDespawn without super, so the event is not fired for them. Server-side. Tick-time effect: one listened branch per mob per tick with no listeners.
  • mob_effect_added

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    MobEffectEvent.Added
    Summary
    NeoForge's MobEffectEvent.Added, vanilla's MobEffect.onEffectStarted: every LivingEntity.addEffect of the content mod's effect effect, new or not, changed or not, after on_effect_added. Server-side.
  • mob_effect_applicable

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    MobEffectEvent.Applicable
    Summary
    NeoForge's MobEffectEvent.Applicable, vanilla's LivingEntity.canBeAffected: asked wherever the game checks whether the resolved EffectKey effect (minecraft:poison) can land on the living entity entity (a LivingRef, the player's own included), before addEffect accepts it. Unlike the effect hooks above this fires for every effect, vanilla's included, and only when an add is in flight. The first mod to answer decides: Allow or Deny overrides the vanilla tag check; an unanswered hook falls back to it. Server-side.
  • mob_effect_expired

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    MobEffectEvent.Expired
    Summary
    NeoForge's MobEffectEvent.Expired, vanilla LivingEntity.tickEffects: the resolved EffectKey effect (minecraft:speed, amplifier amplifier) on the living entity entity (a LivingRef, the player's own included) counted down to nothing and is about to leave. Cancel and the effect stays, kept at no ticks and asked again next tick; unanswered, the expiry runs. Fires only on the tick an effect actually expires, never per tick. Server-side.
  • mob_effect_remove

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    MobEffectEvent.Remove
    Summary
    NeoForge's MobEffectEvent.Remove, vanilla LivingEntity.removeEffect: the resolved EffectKey effect (minecraft:speed, amplifier amplifier) on the living entity entity (a LivingRef, the player's own included) is about to be removed by any path that walks the vanilla funnel: a command or milk for the player, a cure for a zombie villager, a mod's removal helper. Cancel and the effect stays. Server-side.
  • mob_killed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingDeathEvent
    Summary
    player's melee blow killed the mob entity of kind (other deaths aren't told yet). It only hears, after the blow landed. Server-side.
  • mob_spawn_placement_check

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    MobSpawnEvent.SpawnPlacementCheck
    Summary
    NeoForge's MobSpawnEvent.SpawnPlacementCheck: may the entity type kind spawn at pos in level for reason? This server hook runs after SpawnPlacements.checkSpawnRules evaluates the type's spawn predicate. default_result is the effective predicate result, including predicates composed or replaced through Registrar::register_spawn_placement. It can differ from vanilla even for a vanilla entity type. result starts as Default, which keeps that answer. Set Succeed or Fail to override it for this check. The predicates have already drawn from event.random, the caller's live stream (NeoForge's SpawnPlacementCheck.getRandom()). Each listener borrows that same stream; replacing its local reference cannot redirect later listeners. Draws advance the stream even if the result stays Default or the spawn is later refused.
  • mob_spawn_position_check

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    MobSpawnEvent.PositionCheck
    Summary
    NeoForge's MobSpawnEvent.PositionCheck: may the freshly created mob of type kind stand at pos (its position, a mob's centre) in level for reason? Vanilla's two checks are Mob.checkSpawnRules (the type's own rules) and Mob.checkSpawnObstruction (inside blocks or fluids, an ocelot's grass and sea level). result starts as Default, which runs them; Succeed or Fail answers instead and they are skipped. It runs on natural spawning, chunk generation's creature packs and spawner blocks (where a spawner with custom spawn rules skips Mob.checkSpawnRules on Default, as vanilla does). A trial spawner runs only checkSpawnObstruction, so only that is skipped. spawner is the block that asked (Spawner::Block or Spawner::Trial), None for natural spawning, chunk generation and a spawner minecart. mob is the mob itself, in no level yet: read it through the host (mob.kind(host), mob.position(host), mob.equipment(host, slot)); after the hook returns the handle answers Expired. It is the mob that spawns if the check passes, handed on rather than created again, and dropped without trace if it fails. Where the game does not create the mob fresh (chunk generation's packs, a spawner whose spawn data carries entity data) the handle answers its kind and position and Unsupported for the rest. Server-side. With no listener or Default the checks and their random draws are vanilla's (creating the mob for the listener draws nothing from the level's random); Succeed and Fail skip the checks and so their draws, and the level random's order changes only then; a listener should be a pure function of its inputs, because ticks are replayed.
  • mob_spawned

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityJoinLevelEvent, FinalizeSpawnEvent
    Summary
    A new mob of kind joined dimension at pos: natural when the world's spawning made it, false when something else did (a breed, a raid, a spawner, a conversion, /summon, and the second mob of a jockey the world spawned). One call a mob: a /summon with passengers tells each. Not told of a mob loaded with its chunk, leaving a hive or changing level. It only hears; the mob is already among the game's mobs. Server-side.
  • mob_split

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    MobSplitEvent
    Summary
    A slime, magma cube or sulfur cube is dying and about to split into smaller ones (NeoForge's MobSplitEvent, vanilla's AbstractCubeMob.remove): dimension is the level it dies in (a PendingMobSpec for a new child names it), parent its entity id, kind its type, size its size and child_size the size of the children (half of it). The children vanilla made (2 to 4 for a slime or magma cube, 2 for a sulfur cube; a primed one makes none and isn't asked) are already constructed, in order, and wait in an engine-owned list that edits.children() names and edits changes: read it with edits.len and edits.child, then edit a child (edits.set_position, edits.set_yaw, edits.set_baby, edits.set_size), replace one (edits.replace), remove one (edits.remove) or append a new one (edits.construct, then edits.append; at most 64 children). Each child is a complete mob that is in no level yet: it has no entity number, no join and nothing a player or another mod can see, and every handle (edits.children() and the children edits.child gave) is borrowed for one listener only; kept past it, or used by a later listener, it answers Expired. Set cancel (or leave the list empty) to spawn no children: the children's construction draws stay spent and the parent still dies. A panicking callback is reported and disabled for the session, and this split is cancelled. A refusal (including an explicit veto) rolls back journaled listener writes in the split's level. The accepted children are inserted once, in order, before deferred join callbacks run. If the listener invalidates the split, or the list ends up invalid, nothing spawns. Only for a parent above size 1, once its children are made. With no listener nothing is allocated for the list. On the server.
  • mod_container_viewers

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The number of players with the mod container at pos of dimension open went from previous to viewers (vanilla's ContainerOpenersCounter, as a barrel keeps it): 0 to more than 0 is onOpen, back to 0 is onClose, any change openerCountChanged, so a block can show itself open while viewers is not 0. Incremented synchronously when a non-spectator opens the menu, decremented when it closes (including disconnect), and rechecked every five ticks while open, including copper golems in range. Rechecks also report unchanged counts. Zero crossings post container_open/container_close game events: the opening or closing player is the source, none on a recheck. Server-side; open/close runs with the player's state in place.
  • mod_mismatch

    Side
    both
    Contract
    collect
    Host / context
    HostSide
    NeoForge
    ModMismatchEvent
    Summary
    A saved mod list (code and content mods) was read while opening a world. Fires when a nonempty list exists, changed or unchanged, never when the lists are absent or empty (an empty saved list counts as absent), once per open. Versions use the loader's comparison; minecraft is excluded. Newly added mods are not differences. Push a mod id converted with .into() into resolved. Dispatch assigns the first resolving listener and preserves earlier markers. When a saved mod is no longer loaded, it fires before the world opens, on the side that asks (the client in singleplayer, the dedicated server), and a resolved id is taken off the question; otherwise it fires on the opening server before world-state restoration, after preparation.
  • model_baking_completed

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ModelEvent.BakingCompleted
    Summary
    Every model of a resource load is baked and published (ModelEvent.BakingCompleted): the block and item models and the standalone ones mods asked for (standalone_models), in the store model now reads. Fires once per successful model load, after both texture_atlas_stitched calls, at the model manager's apply step on first load and reload. Listeners ordered after the model manager apply after this hook. It precedes client_setup on startup and client_resources_reloaded on later reloads. A refused prepare fires nothing, and the old handles stay valid. Resolve models once through render_assets().model and keep the ModelRefs until the next model_baking_completed, when the old ones answer ModelError::StaleModel. Use host.render_assets().baked_model(key) to borrow published geometry during this callback; it does not edit the store. Never look them up by name every frame. Client-side. A panic rolls back the callback's journaled writes; the mod is reported and its callback skipped for the session without suppressing other mods' notifications.
  • modify_custom_spawners

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    ModifyCustomSpawnersEvent
    Summary
    NeoForge's ModifyCustomSpawnersEvent: the level dimension is about to tick its custom spawners for the first time. spawners is the list ServerLevel ticks, in order, and it starts with vanilla's (WanderingTrader, Patrol, Cat, VillageSiege and Phantom, in the order Sunrise ticks them). Take a vanilla spawner out with remove and it never ticks, so its random draws are gone with it; add a spawner of the mod's own with add and a SpawnerKey the mod owns, and custom_spawner_tick runs for it every tick, after the ones before it in the list. With no listener, or one that leaves the list alone, the level ticks exactly vanilla's spawners. The phantom spawner runs after the level's mobs have ticked, as the game runs it, wherever it is in the list. It fires once per level, on the server, and listeners run on replayed ticks, so they must be pure functions of their inputs. Not cancellable.
  • modify_default_components

    Side
    both
    Contract
    collect
    Host / context
    &dyn DataLoadContext
    NeoForge
    ModifyDefaultComponentsEvent
    Summary
    NeoForge 26.3's ModifyDefaultComponentsEvent: set or remove entries in components, the default component map for item, including vanilla items. Asked once per item after registries freeze, before the owning load publishes immutable defaults. Receives a read-only DataLoadContext with the actual ServerDataLoad or ClientPreload origin, frozen registry names, settings captured once for loaded packages at this load boundary, and the shared LoadedMods view. Readers and datapack reloads do not replay this event. No runtime Host, world handles or transaction access.
  • moisture_change

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    Farmland at pos is about to change moisture from from to to. Set cancel to keep its old moisture. Server-side.
  • mouse_button_post

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    InputEvent.MouseButton.Post
    Summary
    An accepted raw button event finished dispatch, including a screen handler's early return.
  • mouse_button_pre

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    InputEvent.MouseButton.Pre
    Summary
    Raw mouse button input on any screen, before dispatch; cancel skips dispatch and Post. Button/modifiers use the same GLFW encoding as screen hooks. Synthetic clicks skip it.
  • mouse_scrolling

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    InputEvent.MouseScrollingEvent
    Summary
    Gameplay scrolling after accumulation, before hotbar/spectator handling. scroll is scaled x/y, accumulated whole x/y steps, buttons left/middle/right, and cursor the GUI position. Cancel skips gameplay scrolling.
  • movement_input_update

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    MovementInputUpdateEvent
    Summary
    Lends the local player's sampled MovementInput after sampling, before auto-jump and sprint decisions. Every listener sees the preceding listeners' edits.
  • music

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    SelectMusicEvent
    Summary
    Choose this client's music, once a client tick: music and volume hold what vanilla chose (Minecraft.getSituationalMusic and getMusicVolume: the biome's track, the creative or underwater one, a boss's, the menu's; None for silence). Set music to a track of your own, a sound event of your content mod's sounds.json such as Music::new("mymod:music.spring", 1200, 6000, false) (the delays in ticks between songs, and whether it cuts off a different song playing), None to keep vanilla's quiet, or change volume (0 to 1) to fade it.
  • music_layers

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The tracks to play over (or instead of) the music on this client, asked once a client tick: push a MusicLayer (a sound event, looped, and its volume, 0 to 1) for each. A layer eases to a new volume over up to two seconds, and one left out fades out and stops; layers that first appear in the same tick start together, so list every stem of a piece from the start, the silent ones at volume 0, and raise them (a fuller arrangement as a village grows). Their sound events should be stream: true in sounds.json.
  • neighbor_notify

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    BlockEvent.NeighborNotifyEvent
    Summary
    The block at pos (state) is about to tell its neighbours it changed (NeoForge's BlockEvent.NeighborNotifyEvent): at ServerLevel.updateNeighborsAt, which notifies all six sides (skipped_side is None), and updateNeighborsAtExceptFromFacing, which notifies all but skipped_side. Set cancel and no neighbour hears, on both paths. Asked for every such update, redstone included: answer fast. Server-side.
  • note_block_change

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    NoteBlockEvent.Change
    Summary
    A player is tuning a note block on the authoritative server, not in client prediction. context gives its dimension, position, instrument and old note; new_note starts as vanilla's cycled note. Set it to 0 through 24; an out-of-range value keeps vanilla's. Cancel to leave the note unchanged and prevent playback.
  • note_block_play

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    NoteBlockEvent.Play
    Summary
    The note block at pos is about to play (NeoForge's NoteBlockEvent.Play, in NoteBlock.playNote), once a block above no longer mutes it. player and player_entity_id name the player who tuned or punched it, and are None for redstone. instrument is its instrument and note its note, 0 to 24; change either to play another (a note out of range keeps the block's own). Set cancel and it doesn't play: no sound, no particle, no note_block_play game event. Server-side.
  • on_effect_added

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    MobEffect.onEffectAdded: LivingEntity.addEffect gave entity the content mod's effect effect, which it didn't have. Server-side.
  • on_equip

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player's equipment slot slot (head, chest, legs, feet, offhand, and mainhand on a swap of the hands or /item) took a different item, new (none when it was emptied): LivingEntity.onEquipItem, before the equip sound. It only hears. Never for a spectator. Server-side, for every player of the world (the helpers read the acting one).
  • panel_event

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    event happened on mod mod_id's panel (native_panel_items): the player's click, key or edit, or (Search, since version 2) the owner's own panel_search reaching its box, on the first frame that draws it, with no player edit. Since version 3 a left click on an item with nothing carried comes as Clicked when the button comes up without a drag, and a drag off the list ends as Dropped. Act on it when it is yours.
  • permissions_changed

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PermissionsChangedEvent
    Summary
    NeoForge's PermissionsChangedEvent: the operator list is about to give player player (name) the permission level new in place of old, through PlayerList.op (/op, the console's op, the management API's operators/add and operators/set) or PlayerList.deop (/deop and the same on the console and the management API; new is then All). Set cancel and the list keeps the old level. The player need not be online: player_entity_id is their server entity id when they are. Clearing the list (operators/clear) is not a call to either, as in vanilla. Dedicated servers only; a single-player world has no operator list. Server-side.
  • pickup_xp

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerXpEvent.PickupXp
    Summary
    Before player picks up orb orb in dimension. Mutations to value and count take effect only when not canceled; value is clamped to 1..=i32::MAX and count to at least one. Canceling leaves the orb and pickup delay unchanged. Server-side. Diverges from upstream: renamed from experience_orb_pickup, to NeoForge's PlayerXpEvent.PickupXp.
  • piston_post

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    PistonEvent.Post
    Summary
    On an authoritative server, the piston at piston pushed the blocks at push one step direction ([0, 1, 0] is up; pulling when it retracts, extending false) and destroyed those at destroy (NeoForge's PistonEvent.Post, at the end of PistonBaseBlock.moveBlocks, after the neighbour updates). It only hears; piston_pre is the veto. Server-side. Diverges from upstream: piston_move is split into piston_pre and piston_post.
  • piston_pre

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    PistonEvent.Pre
    Summary
    On an authoritative server, the piston at piston is about to push the blocks at push one step direction ([0, 1, 0] is up; pulling when it retracts, extending false) and destroy those at destroy (NeoForge's PistonEvent.Pre, in PistonBaseBlock.moveBlocks, once its structure resolved). Set canceled and nothing moves, as when the structure can't; a sticky piston then retracts without its block, and clients are sent the blocks rather than the retraction to replay. Diverges from upstream: piston_move is renamed to piston_pre, and piston_post is new.
  • play_level_sound_at_entity

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    PlayLevelSoundEvent.AtEntity
    Summary
    A sound bound to entity is about to play (NeoForge's PlayLevelSoundEvent.AtEntity, in Level.playSeededSound's entity overload, playSound(except, sourceEntity, ...)): a goat horn, a frog's tongue, eating and spawn, an animal eating (frog, goat, sniffer), a long jump, a goat's ram, a breeze's charge and deflection, shearing (sheep, mooshroom, snow golem, bogged, copper golem), dye on a sheep, an axe on a copper golem, an allay's item and duplication, a ghastling hatching, a trident thrown (the trident) or riptide (the player), and a mod's sound bound to an entity. Queued server sounds are asked as they go out. For a transactional server request, the hook runs synchronously at the call; only the resolved effect is deferred. Sounds emitted by a level-sound listener are not re-dispatched to level-sound listeners. The fields and their rules are play_level_sound_at_position's. Client entity-sound packets ask before playback and keep following their emitter; an absent emitter plays nothing. LocalPlayer.playSound also asks this hook, including steps, falls, hurt, bundle clicks and consumption; these remain positional sounds, not following sounds. Both sides, distinguished by HostSide.
  • play_level_sound_at_position

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    PlayLevelSoundEvent.AtPosition
    Summary
    A sound is about to play at position in level (NeoForge's PlayLevelSoundEvent.AtPosition, in Level.playSeededSound): every server sound not bound to an entity, mobs' own sounds included (Entity.playSound plays at the entity's position). A mod may change sound, source, volume and pitch, or set cancel and no player hears it; original_volume and original_pitch are as asked. A sound left unplayable (a volume or pitch that isn't finite and at least 0) is dropped. Sounds the server's level plays during the tick are asked as they go out, at the end of the tick, with the state then. /playsound sends its packet directly and isn't asked, as in vanilla on the server. On the client, incoming sound packets ask before playback, including /playsound; client-predicted and game-event level requests ask here too. Canceling a sound does not cancel its action or prediction. Server and client requests are separate: HostSide identifies which one is being edited. UI and sound-engine-only playback do not ask this hook. For a transactional server request, the hook runs synchronously at the call; only the resolved effect is deferred. Sounds emitted by a level-sound listener are not re-dispatched to level-sound listeners. Both sides.
  • play_sound

    Side
    client
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    PlaySoundEvent
    Summary
    starting is true for starts and loop replays, false for a live channel refresh. A ticking sound's live refresh applies volume, pitch and effects transiently; a refresh for a category volume change applies volume and pitch. None stops the channel. Invalid edited numeric values refuse that refresh, effects by SoundEffects::valid. A sound is about to play (PlaySoundEvent, vanilla's SoundEngine.play): original is the sound as asked for, sound starts as a copy of it. Edit sound (its volume, pitch, source, position, identifier, looping, delay, attenuation, relativeness or effects) to change what plays, or set it to None to play nothing. effects (SoundEffects) is the mixer's DSP for this one sound: its gain, a low-pass and a high-pass on the direct sound and sends to the shared room, hall and cavern reverbs, each in a fixed range (SoundEffects::valid: a value out of range, NaN or an infinity refuses the play, never clamped). A sound that doesn't tick keeps the effects it started with. It is asked before the engine's own checks (output open, sound resolved, volume, channel pool), for every sound the client plays, so answer fast; later mods see earlier mods' edits in sound and the sound as asked for in original. A new identifier is resolved again, with its own weighted pick. context is the client's LoopContext: no game is at hand inside the sound engine. Client-side only; a server has no sound. instance is an engine-local sound instance id, unchanged across its live updates.
  • play_sound_source

    Side
    client
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    PlaySoundSourceEvent
    Summary
    A sound that is not streamed has started on channel (PlaySoundSourceEvent), after the engine set its pitch, volume, attenuation, looping and position: sound is what is playing, after play_sound's edits. A notice: the channel is an id only and gives no control. Streamed sounds (music, records) fire play_streaming_source instead. Client-side only.
  • play_streaming_source

    Side
    client
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    PlayStreamingSourceEvent
    Summary
    A streamed sound (music, a record) has started on channel (PlayStreamingSourceEvent): sound is what is playing, after play_sound's edits. A notice: the channel is an id only and gives no control. Other sounds fire play_sound_source instead. Client-side only.
  • player_advancement_done

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    AdvancementEvent.AdvancementEarnEvent
    Summary
    A server player completed an advancement, after progress was recorded.
  • player_advancement_progress

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    AdvancementEvent.AdvancementProgressEvent
    Summary
    A criterion of a server player's advancement was granted or revoked, after its progress changed and before any completion rewards. A grant or revoke that changes nothing is not heard. progress is an owned snapshot of every criterion (including its stored grant date), the requirement groups and their completion at this exact mutation. It belongs to the mutated progress, including first-tick and reload grants queued by the server hub. During a nested player turn, a suspended player's hub record may contain displaced progress. A listener may retain a clone; later mutations do not change the snapshot.
  • player_arm_swing

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest's arm swing was handled by the server. hand is mainhand. Server-side.
  • player_attack_cooldown_reset

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player reset their attack strength by swinging (handlePunch). The swing and reset have already happened. The player's state is not swapped in. Server-side.
  • player_bed_enter

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player is about to enter a bed after the sleep checks pass. Set cancel to keep them out. The player's state is swapped in.
  • player_bed_leave

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerWakeUpEvent
    Summary
    PlayerWakeUpEvent: a server player is getting out of the bed at pos (Player.stopSleepInBed), heard first, while they still read as sleeping there. wake_immediately is vanilla's flag for skipping the wake-up fade: generic stop-sleeping, death and bed-missing wakes pass true; morning, explicit leave and bed-rule refusal pass false. update_level is false for morning, true for those individual wakes.
  • player_break_speed

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    PlayerEvent.BreakSpeed
    Summary
    A player's destroy speed for the block at pos may be changed or canceled. A client without this mod predicts vanilla destroy speed; the server remains authoritative and corrects the resulting block-breaking progress.
  • player_brewed_potion

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerBrewedPotionEvent
    Summary
    A server player took stack from a brewing stand bottle slot (BrewingStandMenu.PotionSlot.onTake): player is their UUID and player_entity_id their network id.
  • player_bucket_entity

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player caught a mob in a bucket, after it was removed and the filled bucket was given. Server-side.
  • player_bundle_item_select

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player selected a bundle item in slot at index. The guest's state is not swapped in during packet handling.
  • player_change_beacon_effect

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player changed a beacon's selected effects, after they were stored. Each selected effect is an Option<EffectKey>; None means no effect. Server-side.
  • player_changed_dimension

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.PlayerChangedDimensionEvent
    Summary
    player (name) changed dimension (NeoForge's PlayerChangedDimensionEvent): from and to are dimension ids (minecraft:overworld, minecraft:the_nether, minecraft:the_end). Fires once a cross-dimension teleport lands: a Nether or End portal (including travel on a vehicle and later End portal exits), or a command such as /execute in ... run tp. The destination level is in place and the player's state is swapped in, so host.players().acting_player() and PlayerRef::tell reach them. Runs on the logical server, not the client. Does not fire for a move within a level, a player who leaves before arrival, or a replacement created by respawn, even in another level. Use player_respawned for respawns after death or after the End credits.
  • player_client_loaded_world

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player finished loading the world around them after joining, respawning or changing dimension. The guest's state is not swapped in. Server-side.
  • player_clone

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.Clone (not cancellable)
    Summary
    A player's data was copied to their new player (NeoForge's PlayerEvent.Clone, from ServerPlayer.restoreFrom): was_death is true after a death, false when they left the End after the credits (respawn with keepAllPlayerData). original is a direct, callback-scoped loan (OriginalPlayer) of the retained original player, enforced at compile time so it cannot outlive the hook. It supports attachment reads on the old player without default insertion. Saved values decode once, and cache writes, explicit writes and removals are journaled to host.transaction without touching the replacement. It also provides with_inventory over the 43-slot vanilla inventory, persistent_data, health, experience, active effects, position, source dimension and source level. player is the replacement's UUID, already assigned its final level, including any player_respawn_position redirect. Heard after removal of the old player's menus and after the data copy, before placement or bulk attachment publication. Old bulk tokens are stale. Not cancellable.
  • player_command

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    CommandEvent
    Summary
    A command a player typed (NeoForge's CommandEvent, before Commands.performCommand runs it), without its slash: any command, vanilla's and the mods' own, also one the player may not run. Set canceled to stop it: nothing runs and nothing is answered but the lines pushed to replies, which go to the player as system chat. No player's state is swapped in and the server's player list is busy with this one, so PlayerRef::tell and the other player helpers reach nobody here: answer through replies. Once for each command a player sends, on a server, and for each line of a quiet command batch (sunrise:quiet_commands, whose replies are dropped). A command the server refuses before reading it (unsigned chat arguments, the chat rate limit) never reaches it.
  • player_commands_sent

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The command tree a server sends a player (NeoForge's and Paper's "commands sent to a player" stage): when they join and when their level changes (/op, /deop, the LAN settings). names are the root commands their client would get, vanilla's they may use and the mods'; take a name out and that client gets the tree without it (and without what it leads to), so it neither completes nor highlights it. This hides the command from the client only: the server still runs a typed one, player_command stops it. For a player who is already on, their state is swapped in and the helpers (PlayerRef::tell...) work; for one who is joining it is not, and their client has no world to tell yet. The tree the hub sends again by itself (after a respawn or a change of level) keeps the last answer and does not ask again; the integrated server's owner is not asked when the world's cheats are switched.
  • player_container_close

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerContainerEvent.Close
    Summary
    player (name) closed the menu_type that player_container_open told of (NeoForge's PlayerContainerEvent.Close, posted in ServerPlayer.doCloseContainer after the menu's removed): they closed it, walked out of reach, died, changed level, or another menu opened. A player who leaves closes it before player_logged_out (vanilla posts nothing for a disconnect; Sunrise does, so each open has its close). Once for each open; not told when the server stops. The menu's items are where it left them: the block's, and the cursor stack back in the inventory. State swapped in, when the player has a body. Server-side.
  • player_container_open

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerContainerEvent.Open
    Summary
    player (name) opened a menu (NeoForge's PlayerContainerEvent.Open, posted when ServerPlayer.openMenu sets the new containerMenu): any menu, vanilla or a mod's. menu_type is the menu type's name (minecraft:generic_9x3, minecraft:furnace, minecraft:merchant, minecraft:crafting, minecraft:lectern, a mod's own), pos the block it is of in dimension (none for a trade, a vehicle's, a mod's native menu or a mount's inventory, which has no menu type in vanilla and is told as sunrise:mount_inventory). The player's own inventory is not one, nor is failed construction. Heard synchronously after construction, the open packet is queued and full contents sent, with the new menu already current. Replacing a menu follows its close; even inside one tick, open precedes player_container_close. menu is the current menu handle, valid during this call, as returned by PlayerRef::container_menu. It is None for unsupported menus such as crafting tables, merchants, workstations, lecterns and mount inventories. A supported menu keeps its handle when backing indices are permanently excluded; its slot methods still refuse those indices. The player's state is swapped in. Server-side.
  • player_deep_sleep

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player has slept for 100 ticks in a bed and now counts as deeply asleep for the night-skip check.
  • player_destroy_item

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    PlayerDestroyItemEvent
    Summary
    The player's item was used up or broke. original is the complete stack before the use or durability loss, including count, damage and components. hand is the hand it was in, or None for worn equipment and ammunition consumed from the inventory. player and player_entity_id identify the acting player, including the local host. Listen only, after consumption or the break has applied and before a use remainder is installed. A mining break notifies after block drops. Both sides hear their own actions; the client does not report a break inferred from an equipment status packet. Partial consumption, refused actions and creative use that preserves the stack do not fire.
  • player_destroyed_block

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player's break removed the block state from pos: the Block.destroy(level, pos, state) call ServerPlayerGameMode.destroyBlock makes only after Level.removeBlock succeeded, before a creative player's return and playerDestroy's drops. state is the block the removal took out, read just before it: what playerWillDestroy left there (a cracked decorated pot; a disarmed tripwire, where vanilla passes Block.destroy the armed one) or what a break_block listener put there. block_entity is the saved data of the block entity that stood at pos (BlockEntity.saveWithoutMetadata, read with state), none for a block without one; the entity itself is gone from the level by now, so a live handle would be stale. The level is writable. Server-side, for every player of the world: the helpers read the acting one. Not heard for a break break_block canceled, nor for a break the level makes (a piston, water, an explosion).
  • player_died

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingDeathEvent
    Summary
    player died: where ServerPlayer.die starts, with the death message's key when the game knows it (death.attack.lava; none for a message it builds from the combat). A lethal landing is still in progress when this fires. It only hears. Server-side, for every player of the world, whether death messages are shown or not.
  • player_edit_book

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's book edit or signing packet is about to be applied. pages is its page count; signing means the packet has a title. Set cancel to drop the edit.
  • player_egg_throw

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player threw an egg, after its projectile was launched and the use was applied. Server-side.
  • player_elytra_boost

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player used a firework rocket to boost while gliding, after the rocket was launched and consumed. Server-side.
  • player_enchant_item

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEnchantItemEvent
    Summary
    A server player enchanted item at an enchanting table (EnchantmentMenu.clickMenuButton): enchantments are the ones it was given, in order, as (id, level). item is the enchanted stack (an enchanted book for a book). Fires after the levels are paid, before enchant_item. Server-side.
  • player_exp_cooldown_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's XP orb pickup cooldown changed to ticks. It is reported after the value changes. Server-side.
  • player_fish

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's fishing rod, with state: 0 the cast (FishingRodItem.use throwing the bobber), 1 a fish biting (FishingHook.catchingFish), 2 the reel-in of a bite, which gives the catch, 3 the reel-in with nothing on the line, 4 the reel-in of a bobber hooked to an entity or item (like Bukkit's PlayerFishEvent; NeoForge's ItemFishedEvent is later, in FishingHook.retrieve). Set cancel on the cast and nothing is thrown; on a bite the fish gets away and the wait starts over; on a reel-in (2 to 4) nothing happens, the bobber stays out and the rod takes no wear. The bobber ending by itself (too far, the rod put away, the owner dying), nor the host of a LAN world's rod. The player's state is swapped in, so host.players().acting_player(), PlayerRef::tell and the item helpers reach them. Once for each cast, bite and reel-in, on a server.
  • player_flower_pot_manipulate

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player put a plant into a flower pot, after the potted block state was stored and the item consumed. plant is the item id and pos the pot position. Server-side.
  • player_flyable_fall

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerFlyableFallEvent
    Summary
    NeoForge's PlayerFlyableFallEvent: server player player (name) landed after falling distance blocks at damage multiplier multiplier while allowed to fly (a creative or spectator player walking), so Player.causeFallDamage returned early and nothing was hurt. Listen only. Once for each landing, after the fall's block reaction. The player's state is swapped in. Server-side.
  • player_game_mode_changed

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.PlayerChangeGameModeEvent
    Summary
    A server player's game mode is about to change (NeoForge's PlayerChangeGameModeEvent): from from to to, both the shared GameMode used by commands and PlayerRef. player is the UUID and name the name. Heard for the /gamemode command, the F3+F4 switcher's packet and a hardcore world's respawn into spectator, once for each change to a different mode; not for the world's default mode a player joins with. Set to to send the player to another mode instead: listeners run in order and each sees the mode the one before left. Return Flow::Cancel, or leave to at the player's current mode, and the player keeps their mode (nothing is sent, the command counts it as no change); the command's message names the mode it asked for, as vanilla's does. For a change the game makes inside a player's turn their state is swapped in; for the hardcore respawn it is not.
  • player_handshake

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A login or allowed transfer reached the server, after the transfer and network protocol checks and before the login hello, authentication, or admission. Runs once on the server thread. There is no player or profile yet.
  • player_harvest_check

    Side
    both
    Contract
    collect
    Host / context
    HostSide
    NeoForge
    PlayerEvent.HarvestCheck
    Summary
    A player's ability to harvest the block at pos may be changed.
  • player_heart_type

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    PlayerHeartTypeEvent
    Summary
    Which hearts the local player's health bar draws this frame (NeoForge's PlayerHeartTypeEvent, from Hud.HeartType.forPlayer): kind comes in as vanilla's pick (poisoned, else withered, else frozen when fully frozen, else normal); set it to draw another kind. This runs inside the vanilla minecraft:player_health body, after gui_layer_pre. A canceled or replaced layer does not fire this hook, and a wrapper fires it only by drawing the vanilla body. Only the heart sprites change, not the layout or the separate armour, food, vehicle-health or air layers. Client-side.
  • player_input

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest sent the server's current PlayerInput flags, after they were applied to the hub. The guest's state is swapped in. Server-side.
  • player_insert_lectern_book

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player inserted a book into a lectern, after the block entity and inventory changed. book is the item id. Server-side.
  • player_inventory_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    player_inventory_changed(player, stacks): a server player's inventory changed, at the moment vanilla's InventoryChangeTrigger is checked (the per-tick check found another item or count in a slot), heard before any criterion and whether or not the tree has inventory_changed advancements. stacks are the 41 slots in Inventory numbering: 0..36 the main inventory (0..9 the hotbar), 36..40 the armour (feet, legs, chest, head), 40 the off hand. It also fires at a player's first check after joining, so a mod sees what they log in with. The player's state is swapped in, so the helpers read that player. Single player, LAN guests and a dedicated server's players; never on a client of a remote server. Quest, collection and 'obtain an item' mods need it instead of polling every inventory. Bundles need "hooks": @API:player_inventory_changed@.
  • player_item_cooldown

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    An item cooldown is about to start for a server player. item is the item id and ticks its duration. The player's state is not swapped in. Set cancel to skip starting the cooldown. Server-side.
  • player_item_frame_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player changed an item frame after its contents or rotation changed. action is put, rotate, remove_item or break; item is empty when no item remains, and rotation is the resulting step. Server-side.
  • player_item_mend

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Mending repaired a server player's item with experience from an orb. repair is durability restored and experience is the orb's value. Server-side.
  • player_item_smithed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.ItemSmithedEvent
    Summary
    PlayerEvent.ItemSmithedEvent: a server player took result from a smithing table (SmithingMenu.onTake, or onQuickCraft for a shift-click): player is their UUID and player_entity_id their network id, inputs the template, base and addition as they were before the take used them (None for an empty slot). It comes once the click is done, so the menu already holds the used inputs, but before the table sounds. Server-side.
  • player_jump

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest's accepted movement made the server jump them from the ground. Server-side.
  • player_kicked

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A network or fake guest was kicked, after the hub recorded the rendered reason. The guest's state is swapped in unless they were already removed in the same poll.
  • player_launch_projectile

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player launched a projectile item, after it was created. item is the projectile's held item.
  • player_lectern_page_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player changed the page of a lectern, after its page and redstone pulse changed. page is the zero-based new page. Server-side.
  • player_level_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's experience level changed, after the new level was applied.
  • player_load_from_file

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.LoadFromFile (not cancellable)
    Summary
    A player was loaded from the world's save (NeoForge's PlayerEvent.LoadFromFile, PlayerList.loadPlayerData): their .dat has been read and applied, and they are not placed in a level yet. directory is the world's player directory (players/data): a mod reads its own file there, named <uuid>.<suffix> as getPlayerFile(suffix) names it. Heard once for each join, for the owner of an integrated server as for anyone else, on a server, with no player's state swapped in. Not cancellable.
  • player_logged_in

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.PlayerLoggedInEvent
    Summary
    player (name) joined the game (NeoForge's PlayerLoggedInEvent): placed in the world and listed in host.players().server_players(), so PlayerRef::send_payload reaches them. Once a join, with no player's state swapped in. Server-side.
  • player_logged_out

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.PlayerLoggedOutEvent
    Summary
    player (name) left the game (NeoForge's PlayerLoggedOutEvent), by any path: a lost connection, a kick, the server stopping or failing. Once for each player player_logged_in told of, and also for a kicked fake player without a preceding login. Silent remove_fake sends no logout. The player is still in host.players().server_players() when the hook fires. A listener's edits persist only on leaves this server saves. A completed proxy hand-over or a crash writes no logout save. Only when the server stops can a player still get a last message. A kicked fake has already left the list and is not saved. Server-side.
  • player_login

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player whose login the server has accepted (NeoForge's PlayerNegotiationEvent stage): the name, whitelist, ban and server-full checks have passed and the player holds a place, but their saved state is not loaded and they are not placed in a level yet. Set cancel to refuse them: they are disconnected with reason (a plain "Disconnected" if it is left unset) and nothing else of the join (the join message, player_logged_in) happens. Once for each player who joins, on a server. The player is not placed yet and their client has no world to show a message in, so no player's state is swapped in and PlayerRef::tell reaches nobody: the refusal reason is the answer. The checks that need no mod (name, whitelist, bans, a full server, the proxy's forwarding) refuse earlier, on the connection, and this hook does not hear those players.
  • player_login_profile

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The properties of an admitted login's profile, before LoginFinished sends them (ServerLoginPacketListenerImpl.finishLoginAndWaitForClient): the name, ban, whitelist, capacity and duplicate-player checks have passed; configuration and player_login come after. properties starts with the login's own, signed textures included when there are some, and none for an ordinary offline login; each mod gets the list the mods before it left, and the final list goes to login success and to the player's profile in the player list. The UUID and name are read-only, the login can't be refused here, and the hook can't wait for a profile lookup.
  • player_loom_pattern_select

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player selected a loom pattern, after the loom menu accepted the button. pattern is the zero-based button index. Server-side.
  • player_map_filled

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player filled an empty map, after the filled map and its saved data were created. Server-side.
  • player_move

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player's movement report is about to be applied: they would move from from to to, or turn from from_rotation to to_rotation ([yaw, pitch]). Heard once for each validated report whose position or rotation differs from the player's last reported location, after the server's own validation and before the report is committed. That location is kept on the player's connection, apart from the accepted position: it is the position given to the listener before it runs, and the destination of every server-side teleport (a join, a teleport in the level, a level change, a respawn, the resend of an unconfirmed teleport, and the correction after a veto). from is that location. Set cancel for a real veto and not a rollback: the report is not applied and its bookkeeping is skipped, and the client is corrected to the accepted position and rotation through the existing teleport correction. The report was already seen by the server's own checks before the hook, and what a violation of those would have done still happens. The values are the exact ones: there is no once-per-tick accumulation and no threshold in the engine, so the mod filters (if (to - from).length() < 1.0 / 16.0 { return; } skips anything under 1/16 of a block). Their state is swapped in (host.players().acting_player(), PlayerRef::tell).
  • player_name_entity

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player named a mob with a name tag, after its name and persistence changed and the tag was consumed. Server-side.
  • player_name_format

    Side
    both
    Contract
    collect
    Host / context
    &dyn LoopContext
    NeoForge
    PlayerEvent.NameFormat
    Summary
    A player's display name was formatted. Replace displayname to change it. Both sides: context.side() says which. It runs wherever vanilla asks Player.getDisplayName(): when a chat line, a join or leave line, a command's feedback, a death message or an advancement message is built, and for the name tag over a player (every frame it shows, so it is not asked when no mod listens). Answer from the arguments and context alone, and fast: context holds the side, the registries and the settings of the resource generation, and a /reload builds the next one. A name the API can't carry (a component tree deeper than the text limit) skips the listeners for that call; a displayname the engine can't take back is dropped, and the name stays as it was.
  • player_open_sign

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player opened a sign for editing, after the editor state was made. front selects the front or back side. Server-side.
  • player_passage_cross

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    player's client crossed passage (#3775), one of the player's level's, from from (its feet before), and the server is about to follow: the move to from passed the move checks and both ends are tracked for the player, and the server has not yet worked out where the player comes out. Set cancel and the server refuses the crossing (PassageCrossRefusal::Vetoed) and puts the player back at from, as a portal Immersive Portals' canTeleportEntity turns down does. A listener that removes the passage or teleports the player refuses it too. Server-side. Diverges from upstream: new hook.
  • player_pick_item

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player picked an item from a block or entity, before it enters the hotbar. pos is zero for an entity; entity_id is zero for a block. The player's state is swapped in. Set cancel to leave the inventory and client unchanged.
  • player_pickup_arrow

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player picked up an arrow after it was removed and its pickup was applied. item is the arrow's pickup item id. Server-side.
  • player_pong

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A connected player sent a play-phase pong (ServerCommonPacketListenerImpl.handlePong). Runs on the server thread at the packet's turn in that connection's inbox. name is the player's profile name; id is the signed 32-bit value the client sent. Unsolicited and repeated IDs are reported as-is: an ID does not prove the client answered a particular PlayerRef::send_ping. This notice is not cancellable and does not affect keep-alive latency. Configuration and status traffic do not fire it. Each listener gets its own event.
  • player_ready_arrow

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player released a drawn bow with arrow selected, by the use-item key or a mod's LivingRef::release_using_item. The player's state is swapped in.
  • player_recipe_book_click

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's recipe book requested a known recipe be placed in their crafting grid. recipe is the recipe id; all is the shift click form. Server-side.
  • player_recipe_book_settings_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's authoritative recipe book pair changed. book is a typed RecipeBookIdentity, never a custom vanilla ordinal. Rejected and unchanged custom requests do not notify. The guest is not swapped in.
  • player_recipe_discovered

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A recipe is about to be unlocked for a server player. Set cancel to keep it locked. The player's state is not swapped in. Server-side.
  • player_respawn_position

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerRespawnPositionEvent
    Summary
    PlayerRespawnPositionEvent: where player respawns, once the server has found it: the bed or anchor they stand up at (facing it), or the world spawn's free column. original_level and original_position are that point; missing_respawn_block says the bed or anchor was gone, so the player came back at the world spawn. Change level, position, yaw and pitch to choose their final destination; no preliminary placement is made. copy_original_spawn_position (default: the block wasn't missing) says whether they keep their respawn point. Runs on the removed original player, before player_clone and placement. To change the point copied for future respawns, call event.player.set_respawn_config(host, ...) here, even on death, and set copy_original_spawn_position to true. This does not change the current destination. from_end_fight is true for the respawn after the End credits, false for death. An ordinary End portal teleport does not run this hook. Server-side.
  • player_respawned

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.PlayerRespawnEvent
    Summary
    player (name) respawned (NeoForge's PlayerRespawnEvent): at the end of PlayerList.respawn, after placement and initial synchronization, with the replacement in scope. end_conquered is true after the End credits (the player keeps health, food and experience), false after death. An ordinary End portal teleport does not fire this hook. Server-side.
  • player_riptide

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player launched with a riptide trident, after the velocity, spin attack and grounded lift have been applied. The player's state is swapped in. No reply is needed.
  • player_save_to_file

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.SaveToFile (not cancellable)
    Summary
    A player was saved to the world's store (NeoForge's PlayerEvent.SaveToFile, PlayerList.save): when they leave or the world closes, when a dedicated or integrated server saves its guests, and for an integrated server's owner when the world saves them. Once for each save. directory is the world's player directory (players/data): write your own file there, named <uuid>.<suffix>, never the player's .dat. The player may be leaving, so no player's state is swapped in. Not cancellable. Autosave snapshots are written asynchronously: this notification runs on a later server tick after a successful write, possibly after WorldSaved. Live state may have advanced beyond the saved snapshot; a process exit before completions are drained can prevent notification delivery.
  • player_set_spawn

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerSetSpawnEvent
    Summary
    NeoForge's PlayerSetSpawnEvent: a server player's respawn point is about to be set (ServerPlayer.setRespawnPosition), once for each call vanilla makes: every sleep in a bed (the same bed too, which refreshes its angle), an anchor that is a new point, /spawnpoint, and the copy to the replacement after player_clone when player_respawn_position allows copying (by default unless the saved block was missing). pos is the block position and dimension its level; pos is none when no point is set. forced is /spawnpoint's flag. Cancel to keep the current point, including a point already set on the replacement by a clone listener. player_entity_id is the server's entity id for the player. Server-side.
  • player_shear_entity

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player shearing a mob is about to do so. Set cancel to leave the mob and shears unchanged. The guest's state is swapped in. The listener may change the world: straight after it returns without cancelling, the game finds the mob again by its entity id and checks that it still exists, is not removed, and that the held stack keeps its item and count; if not, the click is spent and nothing is sheared.
  • player_shield_disable

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's shield was disabled by a blocked melee hit. The shield cooldown is set immediately after this call. Server-side.
  • player_spawn_phantoms

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerSpawnPhantomsEvent
    Summary
    PlayerSpawnPhantomsEvent: the phantom spawner is about to decide whether to try a spawn near a non-spectator server player, before its difficulty and rest rolls. result starts empty, meaning Default (skylight and sea level check); Allow skips that check and Deny stops the attempt. phantoms starts with a randomly drawn group size; set it to override the count. Without mods the original draw order is kept.
  • player_sprint

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's sprint started or stopped: their client sent START_SPRINTING or STOP_SPRINTING (the sprint key, a double tap forward, or letting go) and the server's player is now sprinting (vanilla's setSprinting in handlePlayerCommand). Heard only when it changes. It cannot be stopped, and it hears what the client asks, not what the server does: a sprint that ends by itself (a hit's knockback, hunger, a wall) is not reported. The player's state is swapped in, so the helpers and PlayerRef::tell work. Once for each change, on a server.
  • player_start_spectating_entity

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player started spectating entity_id, after their camera moved to it (ServerPlayer.setCamera with a new target: a spectator's click or /spectate) and their client was told. Heard once per change of target, not again while the camera follows it. The mirror of player_stop_spectating_entity.
  • player_start_tracking

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.StartTracking
    Summary
    A client started tracking an entity (NeoForge's PlayerEvent.StartTracking, posted at the end of ServerEntity.addPairing): player (name) has just been sent the spawn bundle of entity (its ID, uuid its UUID, kind its type, minecraft:zombie) and counts as tracking it. It came into range, its client's chunks reached it, or it was put in the level; another player is an entity too, and a player never tracks their own. The entity is still in the level. What a listener sends the player (PlayerRef::send_payload) reaches it right after that bundle, before the entity's next changes. Heard in the tick's tracking pass, after the pass has built every player's packets: the player already counts as tracking the other entities the same pass paired. The engine is still walking its tracker: read the game and send payloads, but don't spawn, remove or teleport entities from here. No player's state is swapped in. Server-side.
  • player_stat_award

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    StatAwardEvent
    Summary
    A statistic is about to be awarded to a server player, before its count and scoreboard criteria change. stat_type and stat are ids such as minecraft:mined and minecraft:stone, and value the amount. All three may be rewritten; ids must use their canonical namespaced spelling. Unknown types or entries, noncanonical ids and negative amounts are refused together, warning once and keeping the entire original award. Set cancel to award nothing. Server-side. Ordinary interactions fire at vanilla's award point; inside a transaction, the award and this hook wait until the outermost successful commit, after tentative world and inventory writes.
  • player_stays_on_ground_surface

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    The player's crouch edge backoff (Player.maybeBackOffFromEdge) asks whether the player is staying on the ground surface (Player.isStayingOnGroundSurface, vanilla: the shift key is down). entity is the player's id; a mod may change staying, so a mod can make the player hold to an edge without crouching, or walk off while crouching. Fires on both sides, on the client's replayed ticks too, with the loop context of the side that ticks the player (its registries, settings and mod list): register the mod on both, and keep the listener a pure function of its inputs so prediction and the server agree. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • player_stonecutter_recipe_select

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player selected a stonecutter recipe, after the menu accepted its button. recipe is the zero-based button index. Server-side.
  • player_stop_spectating_entity

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player stopped spectating entity_id, after their camera returned to the player.
  • player_stop_tracking

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerEvent.StopTracking
    Summary
    A client stopped tracking an entity (NeoForge's PlayerEvent.StopTracking, posted at the end of ServerEntity.removePairing): entity went out of range, left the level or died, or player (name) left, changed level or respawned, which stops everything they tracked. entity, uuid and kind are as player_start_tracking told, once for each start; the player no longer counts as tracking it. A stop of the tracking pass is heard right after the removal packet, and what a listener sends the player reaches it after that removal. A leaving player's stops come after player_logged_out; those of a respawn or a level change, which send their own removals, at the next tracking pass. The entity is not necessarily still there, and a player who left is gone. As in player_start_tracking, the engine is walking its tracker: don't spawn, remove or teleport entities from here. No player's state is swapped in. Server-side.
  • player_stop_using_item

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player released the use-item key, or a mod's LivingRef::release_using_item did, before the item finished being used. The player's state is swapped in.
  • player_swap_hands

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    LivingSwapItemsEvent.Hands
    Summary
    Heard before a non-spectator player's swap-hands action. The two mutable stacks start as the off-hand and main-hand stacks; the hands receive the listener's outputs unless it cancels. slots. Set cancel to keep the items where they are: the player's client is sent both slots again. The player's state is swapped in, so host.players().acting_player(), PlayerRef::tell and the item helpers reach them. Once for each press, on a server: a LAN or dedicated server's players, the single-player owner and a LAN host. Not heard: the same swap made in an open inventory (hovering a slot and pressing the key, a menu click).
  • player_swap_with_equipment_slot

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player swapped their main and off hands, after both inventory slots changed. Server-side.
  • player_switch_hotbar_slot_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerSwitchHotbarSlotEvent.Post
    Summary
    PlayerSwitchHotbarSlotEvent.Post: a server player switched from hotbar slot old_slot to new_slot (0 to 8), after the selected slot changed and a main-hand item use stopped. Fired only when the slot differs and player_switch_hotbar_slot_pre didn't cancel it. The player's state is not swapped in.
  • player_switch_hotbar_slot_pre

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerSwitchHotbarSlotEvent.Pre
    Summary
    PlayerSwitchHotbarSlotEvent.Pre: a server player is switching from hotbar slot old_slot to new_slot (0 to 8), after the slot range check and before the selected slot changes. Fired only when the slot differs. The player's state is not swapped in. Set cancel to keep the old slot; the client is sent that slot again, and player_switch_hotbar_slot_post doesn't fire.
  • player_tab_list_name_format

    Side
    server
    Contract
    collect
    Host / context
    &dyn LoopContext
    NeoForge
    PlayerEvent.TabListNameFormat
    Summary
    ServerPlayer.getTabListDisplayName: the name the Tab list shows for player, None to let the client choose it. Replace display_name to change it. It runs while the Tab list is built. Answer from the arguments and context alone, and fast: context holds the side, the registries and the settings of the resource generation, and a /reload builds the next one. A name the API can't carry skips the listeners for that call; a display_name the engine can't take back is dropped, and the name stays as it was.
  • player_take_lectern_book

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player took the book from a lectern, after the menu and block entity changed. book is the removed item id. Server-side.
  • player_teleport_end_gateway

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player is about to travel through an End gateway at gateway. Set cancel to leave them at the entrance; the gateway is not consumed and its cooldown does not start. Server-side.
  • player_teleported

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player a command teleported (NeoForge's EntityTeleportEvent, for a player): /tp and /teleport, inside their level or into another one. from and to are their feet before and after, dimension the level they are in now. Heard after the move has reached the player's state and their client (an inter-level teleport: when the new level is entered, before it has loaded around them), so it cannot stop it. The player's state is swapped in, so the helpers that read the acting player and PlayerRef::tell work. Once for each teleported player, on a server. Ender pearls and chorus fruit have their own hooks; a spectator's teleport menu is not heard yet; portals and respawns are not teleports here.
  • player_tick_post

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    PlayerTickEvent.Post
    Summary
    After a player's tick on both logical sides (NeoForge 26.3 PlayerTickEvent.Post). Non-cancellable. On the client, fires through death tick 20, but not after the local player is removed. player is the same identity as in player_tick_pre; on the server their state is acting. Runs after body work and server-side item, arrow and XP pickups, so reads see the completed tick. Client reads see only the state available to that client, not future server updates. On the server, neither player tick hook fires for a spectator whose bounds touch an unloaded chunk; that player's body tick is skipped.
  • player_tick_pre

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    PlayerTickEvent.Pre
    Summary
    Before a player's tick on both logical sides (NeoForge 26.3 PlayerTickEvent.Pre). Non-cancellable. On the client, fires through death tick 20, but not after the local player is removed. player identifies the ticked player; on the server their state is acting. Fires before sleep, cooldowns and body work. Players still tick under /tick freeze, but not while the level is paused. On the server, neither player tick hook fires for a spectator whose bounds touch an unloaded chunk; that player's body tick is skipped.
  • player_toggle_entity_age_lock

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player toggled an ageable mob's age lock with a golden dandelion, after the lock and item use changed.
  • player_toggle_flight

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player's client started (flying) or stopped flying (vanilla's handlePlayerAbilities, which honours it only for a player who may fly: creative or spectator), heard once for each change, on a server, with the player's state swapped in, so PlayerRef::tell and the other helpers reach them. The player is already flying or not as asked, as vanilla leaves them; set cancel to refuse it: they keep the state they had and the server sends their abilities back, as vanilla does for what it refuses, so the client lands or flies again. Only what a client asks for is heard: not the flight a game-mode change starts or ends (/gamemode), and not a LAN host's own player.
  • player_toggle_sneak

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest's client changed sneaking in its player input packet, after the hub applied the new state. The guest's state is swapped in. Server-side.
  • player_totem

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A totem of undying saved the server player player (name): their hurt would have killed them and the totem held in either hand fired (LivingEntity.checkTotemDeathProtection; Bukkit's EntityResurrectEvent), heard just before it is used up and its effects apply. Listen only: whether the totem saves is decided inside the health state machine, before a mod is asked, so a mod cannot veto it from here. The player's state is swapped in, so host.players().acting_player(), PlayerRef::tell and the item helpers reach them. When a fall triggered the totem, the same landing is still in progress. Once for each totem, on a server; the host of a LAN world's totem is not heard.
  • player_trade

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player completed a villager or wandering trader trade. entity_id is the merchant network id. Server-side.
  • player_unleash_entity

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player removed an entity's leash, after it was cleared.
  • player_velocity

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server applied velocity to a player, when syncing changed motion to that player's client.
  • player_xp_change

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerXpEvent.XpChange
    Summary
    A server player's experience points are about to change through Player.giveExperiencePoints (NeoForge's PlayerXpEvent.XpChange): an orb pickup after mending, an advancement reward, or /xp add ... points. Change the signed amount (in points) or set cancel to give nothing. Experience bottles and furnaces make orbs, so they come through the orb path. Server-side.
  • player_xp_level_change

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PlayerXpEvent.LevelChange
    Summary
    A server player's level is about to change through Player.giveExperienceLevels: once per level gained or lost by points, and for the anvil, /experience add ... levels and PlayerRef::give_levels. Change levels, or set cancel to leave the level unchanged. The player's state is swapped in, so host.players().acting_player(), PlayerRef::tell and the item helpers reach them. Server-side.
  • portal_create

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A Nether portal was built for a dimension travel, or an End platform was made for an arrival. pos is the lower corner of the Nether portal rectangle or the End platform origin. The completed blocks are already in the world.
  • portal_spawn

    Side
    server
    Contract
    cancel
    Host / context
    &dyn LevelHost
    NeoForge
    BlockEvent.PortalSpawnEvent
    Summary
    A fire placed at pos (state) found an empty obsidian frame, shape, and is about to fill it with a nether portal (BlockEvent.PortalSpawnEvent, in BaseFireBlock.onPlace), in the Overworld or the Nether. Set cancel and no portal forms: the fire stays where it can survive, as without a frame. Server-side.
  • potential_spawns

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    LevelEvent.PotentialSpawns
    Summary
    Possible natural spawns at a server position (NeoForge's LevelEvent.PotentialSpawns, NaturalSpawner.mobsAt). Mods may add or remove entries, or cancel to make the list empty. Mods can read the world, but cannot write it during the spawn pass.
  • potion_brew_post

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    PotionBrewEvent.Post
    Summary
    A brewing stand at pos brewed (PotionBrewEvent.Post, at the end of BrewingStandBlockEntity.doBrew), or potion_brew_pre was cancelled: stacks holds its five slots after the brew (or as the cancelling mods left them), and what the mods leave there is the stand's. Fires last, as doBrew ends: after brewing_complete, the brew sound and the ingredient's remainder dropping. Server-side.
  • potion_brew_pre

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    PotionBrewEvent.Pre
    Summary
    A brewing stand at pos is about to brew (PotionBrewEvent.Pre, in BrewingStandBlockEntity.doBrew): stacks is a copy of its five slots (three bottles, the ingredient, the fuel). Set cancel to skip vanilla's brew: the stand then takes stacks as the mods left them, uses no ingredient and plays no brew sound, and potion_brew_post fires with those slots; brewing_complete doesn't, as nothing was brewed. Uncancelled, changes to stacks are dropped. Server-side.
  • potion_splash

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A thrown splash or lingering potion applied its hit effects.
  • prepare_hopper_transfer

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A hopper at pos began an item transfer attempt. This runs after its cooldown and enabled checks, before pushing or pulling any items. Server-side, including the single-player server.
  • prepare_item_craft

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A crafting-grid result was prepared for a server player; pos is the crafting table, or None for the inventory grid. Change result before it is sent. An accepted result retains valid damage even when it exceeds that stack's maximum durability.
  • prepare_item_enchant

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Enchanting offers were calculated for a server player at pos. Change costs before they are sent to the menu.
  • prepare_smithing

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A smithing result was prepared for a server player at pos. Change it before it is sent.
  • projectile_impact

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    ProjectileImpactEvent
    Summary
    A projectile hit something (NeoForge's ProjectileImpactEvent, posted where vanilla's projectile has found what it meets, before the hit acts): projectile (its entity id) of type kind (minecraft:arrow), shot by owner (a mob's or a player's entity id, 0 for none) in the level dimension. It hit the entity entity of type entity_kind (a player is minecraft:player; a dragon's part is minecraft:ender_dragon), or, with entity None, the block at block on its face (the face's normal, [0, 1, 0] for the top), at the point at. Set canceled and the impact does not happen: no damage, no knockback, no sound, no block reaction, the arrow does not stick, a pearl does not teleport, a potion or a fireball does not burst. Cancellation alone leaves the projectile alive. Resolve the live owner with host.entity(event.projectile) and call EntityRef::discard to consume it instead. Removal suppresses the hit even if the event is not canceled. A decision invalidated by listener writes is not recomputed. A flying bobber skips hooking and redirection to the hit point, but its ordinary move still stops against solid blocks. Water is not an impact. Bobbers notify before vanilla's entity deflection and world-border bounce; rockets notify after deflection and cancellation skips their impact explosion only. Covers arrows, tridents, thrown items, fireballs, wither skulls, wind charges, llama spit, shulker bullets, bobbers and rockets. Other families skip breeze deflections and hits on wind charges. A dragon part or End crystal is told by the id of the dragon or crystal. Heard only when a mod also sets hears_projectile_impacts. Server-side. Version 2 adds bobbers and rockets; listeners retaining the earlier family set filter out minecraft:fishing_bobber and minecraft:firework_rocket.
  • projectile_launch

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server projectile was added to the level. player is set only for a player launch; other sources have an empty name.
  • raid_spawn_wave

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A raid wave has been spawned at pos; wave is its one-based wave number and raiders counts the raiders, not the mobs they ride.
  • raid_state_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server raid at pos changed to state (triggered, victory, loss or stopped). raid identifies its owning level, including a parked level. A terminal raid already removed from storage cannot be read.
  • recipe_book_categories

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    —
    Summary
    Supply categories and vanilla-shaped displays for custom recipe types. Asked lazily once per recipe table. Use the Host's recipe table to build RecipeBookCategory::displays from the type's own opaque recipe JSON. Each category names its menu, book identity and per-book search group. The display/index load boundary returns typed errors; screen integration is separate. This declaration does not register a settings book.
  • recipe_property_sets

    Side
    both
    Contract
    collect
    Host / context
    &dyn DataLoadContext
    NeoForge
    RegisterRecipePropertiesEvent
    Summary
    Items a mod's own recipe type takes in a station slot, added to the recipe property sets (RecipeManager.RECIPE_PROPERTY_SETS): what a furnace, blast furnace, smoker, campfire, smithing table slot or brewing stand slot accepts, and what a client predicts it accepts. Push one RecipePropertyAddition per set to add to; the vanilla recipes' own items stay in. Called once per load, after the recipes are resolved, with the DataLoadContext of the load that owns them (origin() ServerDataLoad on a server, ClientPreload on a client's own load), and again after /reload. A new namespaced key creates a set when its namespace belongs to the listener's manifest (its ID or namespaces) or to a content package it serves (served_by). Later listeners may extend existing sets. Invalid or foreign new keys, unknown vanilla keys, and air are logged and skipped; unknown items are ignored. Custom sets are synced to clients alongside vanilla sets. The answer must be the same every time. A client without this mod predicts vanilla here; the server corrects it.
  • recipe_sources

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Additional ingredient containers for server player player placing or checking a recipe in the mod crafting menu menu (namespace:path) at pos. The player's state is not swapped in. Push block positions to sources; containers are used after the player's inventory, in mod order and then push order. The engine silently skips pos, duplicates (first wins), unavailable or non-lendable containers, and all containers after the first 64 accepted sources, without per-call logging. Chest-like block entities and mod containers with declared slots are lendable. No answer preserves vanilla placement. The engine takes ingredients and writes changed containers back, firing container_changed; this hook only names sources. Asked once per recipe-book placement/apply or server transfer check, not per tick.
  • recipes_received

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    RecipesReceivedEvent
    Summary
    The server's recipes of recipe_types arrived (NeoForge's RecipesReceivedEvent): from now on the recipe helpers (native_recipes, native_recipes_of_type) give the server's recipes of those types in place of the window's own, so rebuild what you made of them. Vanilla serializers expose resolved candidates, not native ingredient predicates; matching on the server remains authoritative. The window retains the resolved recipes of the types not sent. It comes after a join, once the window has its player, and after every /reload, on a server whose mods asked for them (native_datapack_sync), single player included; with no types when the server stopped sending them and the window is back on its own recipes. A recipe's recipe book ids are not part of what arrives: recipe_book_ids answers them. Client-side.
  • register_block_state_models

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterBlockStateModels
    Summary
    Register the block-state definition types a mod adds (NeoForge's RegisterBlockStateModels, its registerDefinition). Asked once at start on the client, before resources load. Use RegisterBlockStateModelsEvent::register to bind each type identifier to its provider callback; a blockstate file whose neoforge:definition_type names a registered id invokes that provider directly on every load and reload. Any valid <namespace>:<path> identifier is accepted; a later registration for the same id replaces the earlier one.
  • register_block_tint_sources

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterColorHandlersEvent.BlockTintSources
    Summary
    The tint sources of blocks (NeoForge's RegisterColorHandlersEvent.BlockTintSources, vanilla's BlockColors.register): register(layers, blocks), and a model face with tintindex i is multiplied by layer i of its block's list; a face past the list is not tinted. A layer is one of vanilla's sources (VanillaTint) or the mod's own BlockTintSource. Blocks are ids, a mod's or vanilla's, and a later registration for a block replaces the earlier one, vanilla's own colours included. Asked once at start on the client, before resources load; every resource load, a pack reload included, applies the registrations again. An id no block has is logged and skipped. If this listener panics or a phase call is refused, none of its registrations take effect.
  • register_cauldron_fluid_content

    Side
    server
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterCauldronFluidContentEvent
    Summary
    Say which fluid, and how much, one of your cauldron blocks holds (NeoForge RegisterCauldronFluidContentEvent), so the fluid capability (FLUIDS) fills and drains it as it does vanilla's water and lava cauldrons. Asked once the block registry is resolved, before any world opens, and again on a resource reload. Give event.contents.register(block, fluid, total, level) the block and fluid keys your register hook requested, the millibuckets the cauldron holds when full, and the name of its integer level property, or none for a cauldron only ever full. The engine refuses, with one logged warning naming both sides, a block that already has a content, a fluid that already has a cauldron, an unknown block or fluid, a level property the block lacks or that isn't an integer, and a total of 0 or one that doesn't divide evenly by the levels; the rest of a mod's contents still apply. If this listener panics or a phase call is refused, none of its registrations take effect.
  • register_cauldron_interaction

    Side
    both
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterCauldronInteractionEvent
    Summary
    Register cauldron item interactions, by exact item or by item tag, on both sides before snapshot publication. Vanilla dye tags take precedence, then item tags in registration order, then exact items; registering the same key again overwrites the entry in place. Registered callbacks run on the server through Interaction::interact. A panic or phase refusal discards that listener's entries, including queued registrations to all dispatchers, before the next listener runs.
  • register_client_commands

    Side
    client
    Contract
    collect
    Host / context
    &mut dyn ClientHost
    NeoForge
    RegisterClientCommandsEvent
    Summary
    The client's own commands (NeoForge's RegisterClientCommandsEvent), which command runs: push a Command per usage (x <mode:word>). Asked when a connection starts and again when the server sends its own tree, so the chat box colours, completes and lists them as the game's own; a name the game already has keeps that command's behaviour. A client command has no operator level: one with a nonzero level is left out.
  • register_client_item_extensions

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterClientExtensionsEvent
    Summary
    Register this load's worn equipment models, textures and item providers together. Registration is client-only and repeats on every resource load, before any reload listener applies. The validated bindings are installed with the candidate models. Models are baked once and may use any namespace owned by the registering mod (its manifest namespaces or a content package it serves via served_by); frame callbacks choose references, never geometry. A duplicate item provider or an unknown texture returned by a completed listener refuses preparation with a named diagnostic. A panic or phase refusal discards that listener's models, textures and item providers together. Do not retain references from a discarded registration. Server-only packages cannot listen.
  • register_client_tooltip_component_factories

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterClientTooltipComponentFactoriesEvent
    Summary
    Register client tooltip component factories for custom TooltipComponentData types (NeoForge's RegisterClientTooltipComponentFactoriesEvent). Asked once at client startup. Call event.factories.register::<MyData, MyClientComponent>(|data| ...) to map each custom TooltipComponent produced by ItemPart::tooltip_image or render_tooltip_gather_components into a ClientTooltipComponent that measures and draws itself. A later registration for the same type replaces the earlier one. A listener that panics leaves all previously registered factories in place and publishes none of its own.
  • register_color_resolvers

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterColorHandlersEvent.ColorResolvers
    Summary
    The colour resolvers block tints blend over the biomes around a block (NeoForge's RegisterColorHandlersEvent.ColorResolvers): register(resolver) adds the mod's own BiomeColorResolver and returns the ColorResolver to pass to ClientHost::biome_tint or BlockAndTintGetter::block_tint. The game blends a mod's resolver over the biome blend radius and caches it per section while it meshes, as it does vanilla's grass, foliage and water. Asked once at start on the client, before register_block_tint_sources and before resources load. If this listener panics or a phase call is refused, none of its registrations take effect.
  • register_commands

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    RegisterCommandsEvent
    Summary
    The commands native mods add to the server's command tree: push each usage with its executor attached by Command::executes. Asked whenever the server builds its command tree, as the reference loader's Commands does: when a world opens (a dedicated server, a LAN host, single player's server thread), before its functions load, so a function line may name your command; on each /reload and data pack change, so a command you stop pushing is refused by the next functions loaded; and after a mod calls host.commands().refresh_commands(). Every player's chat box completes them as vanilla's, within their level. A usage under a root vanilla owns merges into it, as RegisterCommandsEvent registers into vanilla's CommandDispatcher (Brigadier's CommandNode.addChild): vanilla's usages and permissions stay, the mod's children are added beside them, and an executor at a vanilla node replaces vanilla's (see Command). A lower-level child opens traversal through a prefix without changing that prefix's own execution permission. When accepted usages execute at the same node (including optional prefixes), each later accepted registration overwrites that node's executor (matching Brigadier's CommandNode.addChild, which sets child.command = node.getCommand()) together with Sunrise's paired execution permission level for that node. Only that node's executor runs, attributed to its mod; if the owner is disabled, execution is refused rather than handed to another mod. Clients get the command tree, not executors. An argument's kind is one of word, text, integer, integer(min,max), long, long(min,max), number, boolean, player, item, block_pos and vec3, or a command argument type a mod registered (Registrar::register_command_argument), named by its namespaced id.
  • register_configs

    Side
    both
    Contract
    collect
    Host / context
    &dyn ConfigContext
    NeoForge
    ModContainer.registerConfig
    Summary
    The config files native mods keep (NeoForge's registerConfig): push yours, each of a kind, with the text written to config/ when the file is missing. Asked by the window when the game starts (its Client and Common configs), by a dedicated server when it starts (Common and Server) and by a server before each world it opens (Server); a game reads only its own kinds, so push them all every time. Receives a ConfigContext with settings reads and the scoped ConfigFiles service. A file outside config/, or one already registered, is skipped.
  • register_configuration_tasks

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    RegisterConfigurationTasksEvent
    Summary
    Append tasks for this connecting profile, on the server thread after the built-in configuration steps. Runs for every peer, including vanilla. The profile has no player handle yet. Use event.connection.has_channel to check what the peer negotiated and event.register(task) to give this connection an owned task. Tasks start in registration order, including tasks of the same type, and can finish, wait or fail this peer. A panic while reading a task's type refuses admission and disables that task implementation for its mod. If a registration listener itself panics, only its staged tasks, diagnostic and journaled writes are discarded. Other listeners still configure the same peer, and the panicking registration listener is skipped for later peers. Delayed tasks complete via IPayloadContext::finish_configuration_task with their task type from either a server main-thread or network-thread configuration payload handler. There is no task timeout: answering keep-alives can hold configuration indefinitely. A silent or disconnected connection still ends normally.
  • register_debug_entries

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterDebugEntriesEvent
    Summary
    Register F3 debug entries once at client startup (NeoForge's RegisterDebugEntriesEvent). Each mod receives an empty batch. Push DebugEntry::text with its line callback or DebugEntry::renderer for a renderer toggle. Call DebugEntry::with_reduced_debug_info to opt an entry into showing under reduced debug info (default false, matching vanilla's DebugScreenEntry.isAllowed). Text callbacks run only while their entry is visible. Malformed or duplicate IDs (including built-in vanilla entry IDs) are logged and left out.
  • register_debug_renderers

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterDebugRenderersEvent
    Summary
    Collect world-space debug renderers at each client renderer-list refresh (NeoForge's RegisterDebugRenderersEvent). Push DebugRenderer::new(draw) for each renderer that should run until the next refresh. Use event.is_debug_entry_enabled(id) to gate a renderer on a vanilla or startup DebugEntry switch, or push unconditionally.
  • register_dimension_transition_screen

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterDimensionTransitionScreenEvent
    Summary
    Register loading-screen factories once at client startup (NeoForge's RegisterDimensionTransitionScreenEvent). Each mod receives an empty batch. Conditional pairs take priority over incoming, then outgoing. The first valid factory for a key wins. Unmatched travel, login and death use vanilla for a new screen. The client keeps whichever presentation is already open on an in-place load update.
  • register_enchantment_damage_effects

    Side
    server
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEvent
    Summary
    Register namespaced enchantment damage value effects once before content loads. Custom nodes in minecraft:damage, including nested minecraft:all_of, resolve to these callbacks at load. Unknown identifiers reject the enchantment with a diagnostic. Callbacks receive a read-only ServerHost, actual attacker and victim handles and the pre-hit weapon snapshot. Vanilla nodes and requirements retain their traversal and RNG order. This is vanilla EnchantmentHelper.modifyDamage, not an incoming-damage event. If this listener panics or a phase call is refused, none of its registrations take effect.
  • register_entity_layers

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    EntityRenderersEvent.AddLayers
    Summary
    The layers a mod adds to living entity renderers (NeoForge's EntityRenderersEvent.AddLayers): add(target, layer), and every living entity of the type, or every player of the player model, in view draws EntityRenderLayer::submit after its model and the layers added before. The final body model is borrowed for submit; it is None when no body was posed, as after a successful replacement renderer. entity_types, is_living, player_models and has_mod_renderer tell what renderers this load built. A target that is no living entity type is refused by name. Asked on the client on every resource load, the first one and each reload, after the renderers resolve (register_entity_renderers): layers don't carry over from one load to the next, so add them again each time. In the ordered body pass, layers submit in level join order, interleaved with general entity renderer submissions. If this listener panics, none of its registrations take effect; later listeners still register in the same order.
  • register_entity_renderers

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    EntityRenderersEvent.RegisterRenderers
    Summary
    The code-defined renderers of entity types (NeoForge's EntityRenderersEvent.RegisterRenderers, registerEntityRenderer): register(type, renderer), and every entity of the type type (mymod:bolt) in view is drawn by EntityRenderer::submit in place of the type's own drawing. A later registration for a type replaces the earlier one; a type the game does not know is logged with its id and draws nothing new. Asked once at start on the client, before resources load; the game resolves each type's renderer on every resource load. This build draws the registered renderers of content mods' thrown types, of the living types drawn as mobs (in place of the model and its vanilla layers), of primed TNT (in place of the flashing cube), of experience orbs (in place of the billboarded orb quad) and of paintings (in place of the painting's quads) and of item frames and glow item frames (in place of the frame model and the item or map on its face); general entity types draw only through their renderer, if registered. That renderer reads the published generation of synced attachments through EntityRenderState::attachments. Other entity families keep their own drawing, including the dragon and end crystals. General, living, primed TNT and experience orb renderers submit at each entity's slot in level join order. If this listener panics, none of its registrations take effect.
  • register_entity_spectator_shaders

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEntitySpectatorShadersEvent
    Summary
    Register the screen effect spectating an entity type puts on, once at client startup (NeoForge's RegisterEntitySpectatorShadersEvent), as vanilla's creeper, spider and enderman do. Pass each EntitySpectatorShader to event.register(shader). The first registration for an entity type wins, vanilla's own counting as first, so a mod can't change what the vanilla mobs show; a skipped or malformed registration is logged. The effect applies while the first-person view follows that entity, and the third-person view or leaving it clears it.
  • register_fluid_models

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterFluidModelsEvent
    Summary
    The models of your world fluids (NeoForge's RegisterFluidModelsEvent): call event.register(model) with a FluidModel per fluid whose look doesn't say all of it. Its sprites are block atlas textures, baked at every resource load from that pack's files; the tint stays the look's. A fluid without one draws its look's sprite on every surface, or water's textures when it has none. Asked at startup and on resource reload before baking, and only on the client.
  • register_game_tests

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    RegisterGameTestsEvent
    Summary
    Register namespaced test functions before the world's test definitions load. Each function runs with a ServerHost once per attempt in the real test level. The runner retains ownership of retries, timeout and completion. A listener that panics or incurs a phase refusal publishes neither its definitions nor its functions.
  • register_gui_layers

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterGuiLayersEvent
    Summary
    Register, wrap or replace a HUD layer with an owned draw callback (NeoForge's RegisterGuiLayersEvent). Asked once at client startup. The installed body runs between gui_layer_pre and gui_layer_post unless Pre cancels it. Use event.layers.register(id, placement, Box::new(draw)) to insert a new slot, or replace_layer and wrap_layer to change an existing slot's body. minecraft:player_health is the heart slot only. Use minecraft:air_level as the Above anchor to place a layer above all status rows. A status replacement or wrapper runs even when the original body would not draw, including under F1. A listener sees its pending edits; they publish only after a successful return. A panic during registration, including while dropping a superseded staged body, disables that listener for the session and reports its mod in the log and client error toast.
  • register_item_models

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterItemModelsEvent
    Summary
    Register the item model node types a mod adds (NeoForge's RegisterItemModelsEvent). Asked once at start on the client, before resources load. Use RegisterItemModelsEvent::register to bind each type identifier directly to its decode-time factory, which parses the node's JSON object through ItemModelConfig once on each load/reload, declares any nested child item models through ItemModelChildren, and returns the per-stack callback that pushes ItemModelLayer choices referencing those child keys. Any valid Identifier (including minecraft:) is accepted; a later registration for the same id replaces the earlier one (last-writer-wins), and registering a built-in vanilla or engine item model type id overrides that built-in when decoding item definitions.
  • register_item_tint_sources

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterColorHandlersEvent.ItemTintSources
    Summary
    Register the item tint sources a mod adds (NeoForge's RegisterColorHandlersEvent.ItemTintSources). Asked once at start on the client, before resources load. Use RegisterItemTintSourcesEvent::register to bind each tint source identifier directly to its decode-time factory, which parses the tint entry's JSON object once on each load/reload and returns the per-stack ARGB colour callback. Any valid <namespace>:<path> identifier (including minecraft:) is accepted; a later registration for the same id replaces the earlier one (last-writer-wins), and registering a built-in vanilla tint source id overrides that built-in when decoding item definitions.
  • register_json_animation_types

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterJsonAnimationTypesEvent
    Summary
    Register the custom animation targets and interpolations a mod adds for keyframe animation files to name (NeoForge's RegisterJsonAnimationTypesEvent). Asked once at start on the client, before resources load. Use RegisterJsonAnimationTypesEvent::register_target and RegisterJsonAnimationTypesEvent::register_interpolation to bind each identifier directly to its callbacks. Any valid <namespace>:<path> identifier (including minecraft:) is accepted; duplicates and collisions with the built-in targets (minecraft:position, minecraft:rotation, minecraft:scale) or built-in interpolations (minecraft:linear, minecraft:catmullrom) are rejected as registration errors.
  • register_layer_definitions

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    EntityRenderersEvent.RegisterLayerDefinitions
    Summary
    Register suppliers for entity model layers (NeoForge's EntityRenderersEvent.RegisterLayerDefinitions). Called once at client startup. Use RegisterLayerDefinitionsEvent::register to bind each layer ID to its supplier; accepted suppliers run once when the layer table is frozen. Bake the realized definitions through ClientHost::bake_layer. API @API:model_layers@.
  • register_load_conditions

    Side
    server
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEvent
    Summary
    Register named conditions once at mod load, before server data admission. Each handler is a raw-JSON handler: it reads the condition's JSON value. IDs may use any namespace, but a listener that completes with a built-in or duplicate ID error refuses mod load, even if it ignored the returned error. A listener that panics or incurs a phase refusal publishes neither handlers nor preparation errors. Whether an unknown ID refuses a load or skips a file is determined by the loader, not the namespace.
  • register_model_loaders

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    ModelEvent.RegisterLoaders
    Summary
    Register the model loaders a mod adds (NeoForge's ModelEvent.RegisterLoaders). Asked once at start on the client, before resources load. Use RegisterModelLoadersEvent::register to bind each loader identifier to its schema and bake callback. Each model and set of resolved texture slots invokes that callback once per load or reload. The callback's quads replace the cuboid geometry unless the loader explicitly delegates to the cuboid decoder. An absent required loader rejects its declaring model file. A reference to that file uses the missing model at that link without discarding a descendant's own geometry. Duplicates and collisions with built-ins (neoforge:composite, neoforge:obj, fusion:model) are registration errors.
  • register_particle_groups

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterParticleGroupsEvent
    Summary
    Register the render groups a mod's particles draw in (NeoForge's RegisterParticleGroupsEvent). Called once at client startup. Use RegisterParticleGroupsEvent::register to bind an ID to a factory run once per particle engine construction. Sprite loads and reloads only resolve each particle type against the constructed groups.
  • register_particle_providers

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterParticleProvidersEvent
    Summary
    Binds a logical client's sprite-set providers to already registered ParticleTypes (NeoForge's RegisterParticleProvidersEvent). Each provider creates particles from typed options, ticks its live particles in one batch, and extracts quads for visible particles. Later registration for the same type replaces the previous provider. Registration runs once before resources load; each reload rebinds the sprite sets and discards live provider particles. If this listener panics or a phase call is refused, none of its registrations take effect.
  • register_preset_editors

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterPresetEditorsEvent
    Summary
    Register client editor factories for world-preset keys once at startup (NeoForge's RegisterPresetEditorsEvent). Use RegisterPresetEditorsEvent::register to bind each preset identifier directly to its factory. Any valid <namespace>:<path> identifier (including minecraft:) is accepted; a later registration for the same preset replaces the earlier one (last-writer-wins), and registering a vanilla preset (minecraft:flat, minecraft:single_biome_surface) overrides its built-in editor. Unregistered presets retain their built-in editor, or their disabled Customize button.
  • register_range_select_item_model_property

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterRangeSelectItemModelPropertyEvent
    Summary
    Register the numeric minecraft:range_dispatch item model properties a mod adds (NeoForge's RegisterRangeSelectItemModelPropertyEvent). Asked once at start on the client, before resources load. Use RegisterRangeSelectItemModelPropertyEvent::register to bind each property identifier directly to its decode-time factory, which parses the range_dispatch node's JSON object once on each load/reload and returns the per-stack numeric callback. Any valid <namespace>:<path> identifier (including minecraft:) is accepted; a later registration for the same id replaces the earlier one (last-writer-wins), and registering a built-in vanilla property id overrides that built-in when decoding item definitions.
  • register_render_pipelines

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterRenderPipelinesEvent
    Summary
    Register the mod's own render pipelines, once at client startup (NeoForge's RegisterRenderPipelinesEvent; 1.21.1 mods used RegisterShadersEvent): call event.register(pipeline) with each RenderPipeline. The game builds them with its own at startup and again on every resource reload. An id outside the mod's own or served (served_by) namespaces, or one already registered, is logged with the mod and dropped. A required pipeline whose shader is missing or doesn't build fails the load: the game does not start, and a reload fails and keeps the previous resources. An optional) one is logged and resolves to RenderPipelineError::Invalid.
  • register_select_item_model_property

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterSelectItemModelPropertyEvent
    Summary
    Register the categorical minecraft:select item model properties a mod adds (NeoForge's RegisterSelectItemModelPropertyEvent). Asked once at start on the client, before resources load. Use RegisterSelectItemModelPropertyEvent::register to bind each property identifier directly to its decode-time factory, which parses the select node's JSON object once on each load/reload and returns both the per-case when value decoder (&Tag -> Result<T, String>) and the per-stack categorical callback (-> Option<T>). Any valid Identifier (including minecraft:) is accepted; a later registration for the same id replaces the earlier one (last-writer-wins), and registering a built-in vanilla property id overrides that built-in when decoding item definitions.
  • register_special_model_renderer

    Side
    client
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterSpecialModelRendererEvent
    Summary
    Register factories for special item model types (NeoForge's RegisterSpecialModelRendererEvent). Called once at client startup, before resources load. The last registration of a type wins, including for vanilla's types. Each minecraft:special node is decoded and baked afresh on resource reload; the baked renderer submits to a scoped collector when the item is drawn. A listener that panics or incurs a phase refusal leaves the previous factories and replacement reports unchanged.
  • register_sprite_sources

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterSpriteSourcesEvent
    Summary
    Register the atlas sprite source types a mod adds (NeoForge's RegisterSpriteSourcesEvent). Asked once at start on the client, before resources load. Use RegisterSpriteSourcesEvent::register to bind each type identifier directly to its provider callback; an entry of an atlas definition's sources whose type is a registered id invokes that provider at its place in the list, on every load and reload. Any valid <namespace>:<path> identifier (including minecraft:) is accepted; a later registration for the same id replaces the earlier one, and registering a built-in vanilla source id overrides that built-in when decoding atlas definitions.
  • register_texture_atlases

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    RegisterTextureAtlasesEvent
    Summary
    Declare atlases beside the game's (RegisterTextureAtlasesEvent). Call event.register(atlas) with each TextureAtlasRegistration, which names the atlas definition that lists its sprites. Called at first client load and every resource reload, before textures are stitched.
  • register_villager_professions

    Side
    server
    Contract
    listen
    Host / context
    &RegistrationContext
    NeoForge
    RegisterEvent
    Summary
    Declare villager professions once per mod load, before world admission. The engine resolves every reference atomically with the owning resource tables. Vanilla replacement and overlapping custom acquisition POIs are refused. NeoForge adds a profession through RegisterEvent on Registries.VILLAGER_PROFESSION; this hook declares it as data, so only the registration moment corresponds. If this listener panics or a phase call is refused, none of its registrations take effect.
  • render_arm

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderArmEvent
    Summary
    Before this window's player's first-person left or right arm is drawn (RenderArmEvent, in renderPlayerArm and renderMapHand): the empty main hand's arm, and the arms under a held map, never while the player is invisible. player and player_entity_id are the local player's UUID and entity id. draw's pose stack starts at the arm model's origin, in blocks, posed as vanilla's arm is (with any render_hand), lit with the light at the eyes; add geometry with native_draw_cube, native_draw_quad, native_draw_block and native_draw_item. Set canceled to leave out vanilla's arm; what the mods drew stays. Client-side.
  • render_fog

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ViewportEvent.RenderFog
    Summary
    Final world fog, after the computed color hook, ordinary calculations and Sunrise's fog option, before upload. Title panoramas skip it. Invalid color or distance values retain the original whole fog.
  • render_frame_post

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    RenderFrameEvent.Post
    Summary
    Once a frame, in a world or not, right after the frame was rendered (NeoForge's RenderFrameEvent.Post). elapsed is the frame's time. It fires for a frame that was skipped too; flip_frame is the moment a frame was presented. world_partial_tick is the interpolation used by that frame, held while paused or frozen; partial_tick is the advancing window clock. Outside a world both use the window clock. Neither is recomputed after listeners run. Client-side.
  • render_frame_pre

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    RenderFrameEvent.Pre
    Summary
    Once a frame, in a world or not, after Sunrise's extras and just before the frame is rendered (NeoForge's RenderFrameEvent.Pre). elapsed is the frame's time. world_partial_tick is the interpolation about to be drawn, held while paused or frozen; partial_tick is the window clock, which keeps advancing. Outside a world both use the window clock. Listener writes do not change this frame's captured interpolation. Client-side.
  • render_gui_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderGuiEvent.Post
    Summary
    After the complete in-world HUD layer walk (NeoForge's RenderGuiEvent.Post), including under F1, and before the open screen draws. Place a box with event.corners.place (boxes stack away from their edge) and draw with event.draw. Use ClientHost::debug_overlay_visible() to avoid drawing over the debug overlay. Not heard when a mod canceled render_gui_pre. A panicking listener's drawing and corner placement are both discarded. Client-side.
  • render_gui_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderGuiEvent.Pre
    Summary
    Before the in-world HUD layer walk (NeoForge's RenderGuiEvent.Pre), including under F1. Return Flow::Cancel to skip the walk (including layer Pre and Post), render_gui_post and the HUD chat layer. Focused chat is drawn by its screen, not the layer walk. Toasts draw after the active screen or overlay and are outside this veto. F1 hides ordinary toasts and audio stream failure notices, but not other callback error toasts. Does not fire when a server dialog or the connection screen covers the world HUD. Client-side.
  • render_hand

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderHandEvent
    Summary
    Before one first-person hand of this window's player is drawn (RenderHandEvent, client): a hand that holds an item or a map, the empty main hand's arm, and the empty off hand, where vanilla draws nothing. Adjust render's pose, draw in the hand with draw, or cancel the default geometry; what the mods drew stays. Equip progress includes the item's swap scale. draw's pose stack starts in the hands' view space, in blocks, +x right, +y up, -z into the screen, under the hand sway and before vanilla's per-item transforms; both hands share it, and render.hand says which one is asked. It is lit with the light at the eyes. HandDrawContext::render_arm submits either physical arm with the local avatar's skin, sleeve and model width, at the current draw pose and light. It joins the hand's own vertices, ahead of vanilla's: the hand's field of view, the view bob, a shader pack's hand pass and hand_drawn see it as they see vanilla's hand. Unlike NeoForge, the pose stack is draw's own: turning it moves what you draw, render's pose moves the default geometry, and player render state is not exposed.
  • render_item_in_frame

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderItemInFrameEvent
    Summary
    Before a visible item frame's item or map is drawn. Cancel hides the item, not the frame.
  • render_level_stage

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderLevelStageEvent
    Summary
    Draw world geometry at one stage of a world view (NeoForge 26.3's RenderLevelStageEvent), asked for each RenderLevelStage in frame order. draw is the view's WorldDrawContext and shares its limits with submit_custom_geometry; its lines and quads draw at stage, its name_tag labels with the world's name tags. Client-only, noncancellable.
  • render_living_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderLivingEvent.Post
    Summary
    After a living entity is drawn (NeoForge's RenderLivingEvent.Post): once a frame for each mob and player in view whose render_living_pre wasn't canceled, after its model, its vanilla layers and the mods' layers. entity is its render state, as render_living_pre has it; draw is posed at its feet, turned with its body, and what it draws is kept. event.model borrows the final crate::FrameModel the entity's layers saw, including custom pack models and the pose under layers-only draws. It is read-only and scoped to this callback. Use part(name) or the hierarchy to read a part's local pose() and effective visible flag after animation and Pre edits. A successful replacement renderer or other draw without a body pose supplies None. The order today: before this hook its model, its vanilla layers and the mods' layers are drawn; after it, the frame's later passes draw its name tag, its leash, and the flames of a burning entity and its shadow, each as its own pass. This hook neither sees nor replaces the flames and the shadow, and a canceled render_living_pre doesn't stop them. A type with a mod's registered renderer (register_entity_renderers) has the same later passes, the renderer in the model's place. The reference draws the leash and the name tag before this hook: that move is the follow-up in #1285. For a player, its render_player_post follows. In the ordered body pass, each entity's hooks finish before the next entity's submission begins, including any general entity renderer at its own level join slot.
  • render_living_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderLivingEvent.Pre
    Summary
    Before a living entity is drawn (NeoForge's RenderLivingEvent.Pre): once a frame for each mob and player in view (one the frame culls is not asked), before its pose, model and layers. entity is its render state (its id, kind, custom name, the frame's partial tick, its body and head turns and walk cycle, LivingEntityRenderState). draw is posed at its feet, turned with its body: +z the way it faces, +x its left, +y up, in blocks, with the helpers block entities draw with (cube, quad, block, item, model_part); what it draws is kept. Set canceled to skip all of the entity's drawing this frame: its model, armour, held items and layers, the mods' layers, its name tag, leash and glowing outline, and render_living_post, and the renderer a mod registered for its type (register_entity_renderers), which draws in the model's place; a mod drawing a model of its own draws it here and cancels. The flames of a burning entity and its shadow, which the frame queues after the entity's drawing, still draw. A player's render_player_pre comes first and edits the same event.model; a cancel here still calls render_player_post with model: None. event.model lends the selected body's baked hierarchy and bind pose as a crate::FrameModelEdit. Use model.part("nose") to get a villager's nose index, then model.hide(index) to leave it and its descendants out of the body and layers drawn on that model (such as a spider's eyes). Armour, held items and independent layers are unaffected. Missing names return None; invalid indices return false without an edit. Edits last for this draw only; draw.keep() does nothing here. In the ordered body pass, this hook follows level join order, including this window's player at its own slot, interleaved with general entity renderer submissions.
  • render_name_tag

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderNameTagEvent
    Summary
    Name tag visibility and optional replacement text.
  • render_player_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderPlayerEvent.Post
    Summary
    After a player is drawn (NeoForge's RenderPlayerEvent.Post): once a frame for each player whose render_player_pre wasn't canceled, after its render_living_post, or right after its render_living_pre when only that one was canceled. player, who and draw are as render_player_pre has them, and what it draws is kept. event.model borrows the same final crate::FrameModel as render_living_post, read-only for the callback. Its poses and effective visibility include this draw's animation, Skin Customization and Pre edits. It is None if no body pose was produced, including when only Living Pre canceled. The player's name tag, leash, and the flames of a burning player and its shadow are each drawn in a later pass of the same frame, as in render_living_post. A canceled pre hook doesn't stop the flames or the shadow. In the ordered body pass, this player's pair finishes at its slot in level join order, before the next body submits, including bodies drawn by a general entity renderer.
  • render_player_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderPlayerEvent.Pre
    Summary
    Before a player is drawn (NeoForge's RenderPlayerEvent.Pre): once a frame for each other player in view and for this window's player in third person (including front view) when it holds the camera, before its render_living_pre. player is its render state, who its profile name and whether it is this window's own player, and draw the frame render_living_pre gets. Set canceled to skip the player's own drawing this frame, render_living_pre, render_living_post and render_player_post included. Canceling only render_living_pre skips Living Post but still calls Player Post with model: None. Either cancel leaves eligible flames and shadows to the frame; a replacement body should not submit them again. event.model borrows the selected player's hierarchy and bind pose as a crate::FrameModelEdit. Look up model.part("head") and call model.hide(index) if it exists. That leaves the head and its children out for this draw after Skin Customization. Living Pre sees the same draw-local edits. Armour, held items and other independent layers, including the cape, are unaffected. In the ordered body pass, the pair wraps this player's living hooks at its slot in level join order, interleaved with general entity renderer submissions, for local and remote players alike.
  • render_tooltip_gather_components

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderTooltipEvent.GatherComponents
    Summary
    RenderTooltipEvent.GatherComponents: the elements of stack's tooltip (ItemStack.getTooltipLines as TooltipElement::Text lines, plus any TooltipElement::Component(TooltipComponent) supplied by the built-in bundle tooltip or the item's ItemPart::tooltip_image), once item_tooltip has run and before any wrapping, factory preparation, or measuring. Add, change, reorder or remove elements; each element is then prepared into a PreparedTooltipComponent (custom components via factories registered in register_client_tooltip_component_factories) before render_tooltip_pre runs. Gather wraps logical text in the item's tooltip font when it cannot fit on either side of the cursor. Assign a positive GUI-pixel width to event.max_width to further constrain wrapping (-1 by default). Return Flow::Cancel and nothing is drawn; neither render_tooltip_pre nor render_tooltip_texture is asked. A panicking destructor of custom data published here disables this listener for the session without disabling other listeners. Asked each frame the tooltip shows, never for one the stack hides. An input conversion refusal skips Gather and preserves the unwrapped engine tooltip. Text is used in memory without serialized component limits. Client-side.
  • render_tooltip_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    RenderTooltipEvent.Pre
    Summary
    RenderTooltipEvent.Pre: a tooltip whose components have been prepared and are about to be measured, positioned and drawn. stack is the item the tooltip describes, or None for a non-item tooltip. components are the read-only prepared components (PreparedTooltipComponent, in display order, built-in and custom alike) as render_tooltip_gather_components and component preparation left them; measure them with a font borrowed via draw.with_tooltip_font(font, ...) or inspect them with as_text, as_bundle, and downcast_ref. place holds the anchor point in GUI pixels before positioner adds its offset and keeps the box on screen; cursor anchors truncate to whole GUI pixels, and a widget positioner may ignore the anchor. screen is [screen_width, screen_height] in GUI pixels. positioner is the active ClientTooltipPositioner that places the tooltip box once measured. Text lines are wrapped only where render_tooltip_gather_components ran: with no Gather listener, each line arrives whole, as vanilla passes it. A stack that can't be converted skips Gather and Pre, and the engine's prepared tooltip is drawn as it is. font is the font identifier used for measurement and drawing (minecraft:default, or the item font, queried again before Pre); change it to measure and draw with a replacement font without rewrapping the lines. A prepared component's width and height return None on failure, distinct from a valid size of zero. A failed component measurement or draw aborts the whole tooltip. draw is the tooltip's GUI drawing context; paint from Pre stays visible on cancellation or failure. Return Flow::Cancel and the tooltip box and components are not drawn and render_tooltip_texture is not asked. Asked each frame a tooltip shows, only while a mod listens. An input conversion refusal skips Pre and leaves the prepared tooltip intact. Client-side.
  • render_tooltip_texture

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    RenderTooltipEvent.Texture
    Summary
    RenderTooltipEvent.Texture: the look of a tooltip box about to be drawn. Set texture to a tooltip style (<namespace>:<name>) and the box draws as vanilla draws a tooltip_style: the GUI sprites <namespace>:tooltip/<name>_background and <namespace>:tooltip/<name>_frame from the resource packs, each nine-sliced as its gui.scaling says or stretched without one. A style whose background or frame no pack has keeps the fills, where vanilla draws the missing texture. Left None, the box is Sunrise's solid fills, in background and the border_top to border_bottom gradient, as ARGB. stack is the item the tooltip describes, None for a text tooltip. Asked each frame a tooltip shows, only while a mod listens. Client-side.
  • resolve_player_skin

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Select the local player's skin texture and model together, at vanilla's AbstractClientPlayer.getSkin moment. Asked once per frame with a local avatar, before the third-person body and skin layers, first-person arms and inventory previews are extracted. Client-side, with a read-only host; it does not change the player's profile, cape, tab-list entry or what other clients see.
  • resource_pack_status

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player's client answered a resource pack in play (vanilla's ServerboundResourcePackPacket): status is Action's number, 0 successfully loaded, 1 declined, 2 failed download, 3 accepted, 4 downloaded, 5 invalid URL, 6 failed reload, 7 discarded. Heard when the packet arrives, after the server has handled it; it cannot be stopped. The player's state is swapped in, so the helpers and PlayerRef::tell work. The pack a dedicated server offers in the configuration (resource-pack in server.properties) is answered before the player has joined, and those answers are not heard. Once for each answer, on a server.
  • right_click_block

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    PlayerInteractEvent.RightClickBlock
    Summary
    A player right clicks a block (NeoForge's PlayerInteractEvent.RightClickBlock): once per hand, where useItemOn starts, on the clicking client and on the server (click says which, with the block, the hit, the hand and its stack, and the player), for a spectator too (the server then only lets one open a menu). Before the block's own use (a chest, a door, a lever) and the item's (Item.useOn, native_use_on).
  • right_click_empty

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    PlayerInteractEvent.RightClickEmpty
    Summary
    The local player right-clicks empty space with an empty hand. Client-side only; the server does not receive this event.
  • right_click_item

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    PlayerInteractEvent.RightClickItem
    Summary
    PlayerInteractEvent.RightClickItem, immediately before Item.use. Cancel skips its Part and vanilla behaviour; its result defaults to Pass. Success, SuccessServer and Consume end the client's hand loop. Success swings on the client, SuccessServer on the server, and Consume has no swing. A client without this mod predicts vanilla here; the server corrects it.
  • screen_char_typed_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.CharacterTyped.Post
    Summary
    A typed character that neither the receiving screen nor its mounted widgets took (ScreenEvent.CharacterTyped.Post, vanilla's Screen.charTyped returning false), once per printable character that screen_char_typed_pre let through: c and modifiers as there. Not cancellable (matching NeoForge's ScreenEvent.CharacterTyped.Post, which is an unhandled post-dispatch notice). Window characters (including IME commits and text without a physical key) and the control socket's type fire it on the receiving screen when the matching Pre did not cancel. A held edit modifier makes a physical key a shortcut instead of text; a controller's keyboard does not synthesize this hook.
  • screen_char_typed_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.CharacterTyped.Pre
    Summary
    A character was typed at the open screen (ScreenEvent.CharacterTyped.Pre, vanilla's Screen.charTyped): screen is the screen it is, c the character, modifiers GLFW's bits (shift 1, control 2, alt 4, super 8), and field a copy of the focused text box. Set canceled and that one character never reaches the focused child or text box.
  • screen_closing

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Closing
    Summary
    The screen that was open is being replaced (ScreenEvent.Closing), after screen_opening let it.
  • screen_exclusion_areas

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The hook native_screen_exclusion asks: a mod adds the rectangles it draws over screen (a side panel, a button column) to areas, in GUI pixels, [x, y, width, height]. NeoForge has no counterpart in the game; recipe viewers ask for it through their own API (EmiExclusionArea, JEI's IGuiContainerHandler.getGuiExtraAreas). Client-side.
  • screen_init_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Init.Post
    Summary
    A screen initialized or rebuilt its children (ScreenEvent.Init.Post, vanilla's Screen.init / Screen.rebuildWidgets). Use event.widgets to list and remove children or mount buttons, text fields, and custom widgets. A layout-only resize keeps the existing children and focus and does not fire this hook. A panicking listener publishes no edits.
  • screen_key_pressed_post

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.KeyPressed.Post
    Summary
    A key press that neither the receiving screen nor its mounted widgets took (ScreenEvent.KeyPressed.Post, vanilla's Screen.keyPressed returning false): key, repeat and modifiers as in screen_key_pressed_pre. If the mod browser's search editor declines, the container still handles raw bindings (including rebound inventory close and sort) before this hook can fire. Slot swap, pick and drop can act before an unhandled result; a translated mapping reached after Post cannot sort the container. Set canceled to keep the game's own key handling (bindings, hotbar and toggles) from seeing it. A key that has no vanilla name fires nothing. Fires for window key presses and the control socket's key ... down, key ... repeat, and the press phase of key ... tap, on the receiving screen and only when the matching Pre did not cancel it. A controller does not synthesize this hook.
  • screen_key_pressed_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.KeyPressed.Pre
    Summary
    A key went down over the open screen (ScreenEvent.KeyPressed.Pre, vanilla's Screen.keyPressed): screen is the screen it is, key vanilla's name for the key (key.keyboard.e) — a key with no name fires nothing — repeat whether it is the keyboard's auto-repeat of a held press (Sunrise's extra; NeoForge folds repeats into the event), and modifiers GLFW's bits (shift 1, control 2, alt 4, super 8). Set canceled and the press goes no further: no focus move, no Escape-close, no inventory or hotbar key, no typing by the key itself.
  • screen_key_released_post

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.KeyReleased.Post
    Summary
    A key release that neither the receiving screen nor its mounted widgets took (ScreenEvent.KeyReleased.Post, vanilla's Screen.keyReleased returning false): key and modifiers as in screen_key_released_pre. Set canceled and the release counts as handled: the game's own key handling never sees it, so a held mapping stays down; cancel a release only when you cancelled the press it ends. Fires for window key releases and the control socket's key ... up and release phase of key ... tap, on the receiving screen and only when the matching Pre did not cancel it. A controller does not synthesize this hook.
  • screen_key_released_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.KeyReleased.Pre
    Summary
    Before the currently open screen handles a named key's release. Window releases, control-socket key ... up, and the release phase of key ... tap reach the current receiving screen, even if it did not see the press. Cancel skips the screen handler and Post. A cancelled window Pre still releases the device key and applies mapped keyboard release cleanup. A cancelled socket Pre skips the ordinary control-key release; a held mapping can stay down. Cancelling an unhandled release in Post instead skips normal mapped release on either route, after the screen has declined.
  • screen_mouse_button_pressed_post

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseButtonPressed.Post
    Summary
    A mouse press after the receiving screen handled or declined it (ScreenEvent.MouseButtonPressed.Post). The matching Pre must not have cancelled. screen, button, modifiers and double_click are the press Pre values, even if the press closed or replaced that screen. Every listener sees was_click_handled, the receiving handler's original answer. A hit on the first child counts as handled even when that child declines and does not take focus.
  • screen_mouse_button_pressed_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseButtonPressed.Pre
    Summary
    A press about to go to Screen.mouseClicked (ScreenEvent.MouseButtonPressed.Pre). screen is the receiving screen and screen.mouse is the pointer position. button is the GLFW index (0 left, 1 right, 2 middle, 3 back, 4 forward; beyond those, the platform's own number). modifiers are GLFW bits (shift 1, control 2, alt 4, super 8). The receiver and press Post get the same double_click: true for a real press when the last handled real press was of this button on this screen instance less than 250 ms ago. Cancel to skip the screen handler, Post and gameplay mappings; a cancelled real press still counts as handled for double-click detection.
  • screen_mouse_button_released_post

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseButtonReleased.Post
    Summary
    A mouse release after the receiving screen handled or declined it (ScreenEvent.MouseButtonReleased.Post). The matching Pre must not have cancelled. screen, button and modifiers come from the release's Pre, not the earlier press or a screen the release opened. Every listener sees was_release_handled, the original answer from the receiving handler. Completing quick-craft is not itself a handled release: the child still answers. An early swallowed container release is handled.
  • screen_mouse_button_released_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseButtonReleased.Pre
    Summary
    A mouse button went up over the open screen (ScreenEvent.MouseButtonReleased.Pre, vanilla's Screen.mouseReleased), with the same screen, button and modifiers as screen_mouse_button_pressed_pre and fired at the same point. Set canceled and the release goes no further: a pressed slot keeps what it took and no drag, slider or scrollbar lets go.
  • screen_mouse_dragged_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseDragged.Post
    Summary
    A held-button pointer movement that the receiving screen (and its mounted widgets) did not handle (ScreenEvent.MouseDragged.Post, vanilla's Screen.mouseDragged returning false): button, delta (GUI pixels, screen.mouse the new position) and modifiers as in screen_mouse_dragged_pre. Not cancellable. Fires on the receiving screen only when unhandled and when the matching Pre did not cancel it, on the window only, for real mouse input and not a pad's or keyboard focus's.
  • screen_mouse_dragged_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseDragged.Pre
    Summary
    Before a real held-button movement reaches screen drag handlers. screen.mouse is the current GUI position; delta is its GUI-space movement. Cancel keeps the new cursor position but skips all screen drag handlers. Same receiving screens as screen_mouse_button_pressed_pre, including dialogs, confirmation prompts, books, lecterns and sign editors.
  • screen_mouse_scrolled_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseScrolled.Post
    Summary
    A mouse wheel scroll that the receiving screen (and its mounted widgets) did not handle (ScreenEvent.MouseScrolled.Post, vanilla's Screen.mouseScrolled returning false): scroll and modifiers as in screen_mouse_scrolled_pre. Not cancellable. Fires on the receiving screen only when unhandled and when the matching Pre did not cancel it, on the window only, for real mouse input and not a pad's or keyboard focus's.
  • screen_mouse_scrolled_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.MouseScrolled.Pre
    Summary
    The wheel turned over the open screen (ScreenEvent.MouseScrolled.Pre, vanilla's Screen.mouseScrolled): screen is the screen it is, screen.mouse where the pointer is (so there is no position of its own), scroll the wheel's movement in x and y as the game's own scroll handler scales it (a line times the wheel sensitivity: with Discrete Scrolling on, a notch is ±1, its sign only; a touchpad's pixels are divided by 30), and modifiers GLFW's bits (shift 1, control 2, alt 4, super 8). Set canceled and nothing the screen would scroll moves: not the bundle under the pointer, nor a list, slider, scrollbar or map. Nothing else reads the wheel while a screen of the game's is open, so no hotbar slot changes either.
  • screen_opening

    Side
    client
    Contract
    replace
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Opening
    Summary
    Gui.setScreen is about to replace the current screen with new (ScreenEvent.Opening; the screen playing is none: vanilla's null). Answer ScreenOpening::Cancel to keep the current one, ScreenOpening::ModScreen to open a mod's own screen instead, or ScreenOpening::Vanilla to open another vanilla screen instead. The waiting screen and a warning's live return dialog can replace a receiver with the same dialog id. Cancel keeps its mounted widgets and focus, without emitting Closing or the replacement's Init.Post. A server's container close that leaves no screen fires no Opening and can't be cancelled; screen_closing still gets the screen it closes. One that opens the title or the death screen fires Opening for it.
  • screen_preedit_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Preedit.Post
    Summary
    After a screen's preedit handler (ScreenEvent.Preedit.Post) and only when no text field took the composition (the handler returned false: vanilla's focused field takes it, so this is a preedit no field wanted) and screen_preedit_pre did not cancel. Reports the receiver captured at Pre. A built-in mounted TextField can consume preedit; a custom ScreenWidget does not. Same arguments as Pre.
  • screen_preedit_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Preedit.Pre
    Summary
    Before a screen's preedit handler (ScreenEvent.Preedit.Pre, vanilla's GuiEventListener.preeditUpdated): the input method is composing full_text (empty when the composition ended), with the caret at byte caret_position, split into blocks of which focused_block is the one being converted. Set canceled and no text field sees it, and screen_preedit_post does not fire. Fires on the window while a screen is open, even when no text field is focused.
  • screen_render_background

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Render.Background
    Summary
    The open screen is about to draw its contents (ScreenEvent.Render.Background, after vanilla's renderBackground and before render): draw here for what must sit under the screen's widgets, items and tooltips. Not cancellable. The screen has drawn its background panel; its widgets, slots and items draw over this hook. Screens without a panel, such as the title and chat, fire it before their contents. It does not fire when screen_render_pre cancelled. Fires once a frame on the window, for the screens screen_render_post covers: a screen of the game's, the title's own screens, Win and Options. Not while playing with no screen, nor for a server dialog, the server pack, link and code-of-conduct prompts, a book or a sign editor drawn over gameplay. Draw with native_fill, native_sprite and native_text; screen.rect is the screen's container panel (or the whole window).
  • screen_render_foreground

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Render.Foreground
    Summary
    The open screen has drawn its contents (ScreenEvent.Render.Foreground, vanilla's point before the deferred tooltips and the preedit overlay). Not cancellable. Tooltips, the dragged stack and the preedit overlay draw over this hook; use screen_render_post for drawing over the screen's tooltips. It does not fire when screen_render_pre cancelled. Fires once a frame on the window, for the screens screen_render_post covers: a screen of the game's, the title's own screens, Win and Options. Not while playing with no screen, nor for a server dialog, the server pack, link and code-of-conduct prompts, a book or a sign editor drawn over gameplay. Draw with native_fill, native_sprite and native_text; screen.rect is the screen's container panel (or the whole window).
  • screen_render_inventory_mob_effects

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.RenderInventoryMobEffects
    Summary
    Ahead of the effect panels beside the survival and creative inventories (ScreenEvent.RenderInventoryMobEffects, vanilla's EffectsInInventory.extractRenderState): available_space is the width in GUI pixels right of the container, at least 32 (with no effect to show, or less room, vanilla draws nothing and this does not fire). compact picks icons over full panels (vanilla's choice is compact under 120) and horizontal_offset shifts the stack right (negative left). Set canceled and the panels are not drawn: draw your own with screen_render_post. Once a frame while the screen draws them, on the window only; if the effects space changes within a frame (the recipe book opening between two layout builds), it is asked again for the new space. The exclusion areas follow this choice in the same frame.
  • screen_render_post

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Render.Post
    Summary
    The open screen has drawn itself and its tooltips (Screen.render, the point of ScreenEvent.Render.Post): draw over it with native_fill, native_sprite and native_text, screen.rect being its container panel (or the whole window) and screen.id the screen it is. Once a frame on the window, never while playing with no screen; &self, so it reads and draws only. The Win and Options screens call it on their own path, after their drawing.
  • screen_render_pre

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Render.Pre
    Summary
    Before the open screen draws itself (ScreenEvent.Render.Pre, vanilla's Screen.renderWithTooltips): draw to put something under it, or set canceled and the screen is not drawn, and neither is its screen_render_background or screen_render_foreground. The world, the HUD layers and the toasts still draw, and screen_render_post still fires. Fires once a frame on the window, for the screens screen_render_post covers: a screen of the game's, the title's own screens, Win and Options. Not while playing with no screen, nor for a server dialog, the server pack, link and code-of-conduct prompts, a book or a sign editor drawn over gameplay. Draw with native_fill, native_sprite and native_text; screen.rect is the screen's container panel (or the whole window).
  • screen_room

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Room for a mod's own panel right of the open container screen's window, in GUI pixels: right starts at 0; raise it to the width your panel takes beside the window, its gap included, and leave it be otherwise. Later mods see earlier mods' answers: keep the larger (event.right = event.right.max(mine)). When the window, the recipe book open beside it and that room all fit across the screen, the window and the book move left by half the room (rounded down), so the three stay centred as vanilla's recipe book moves the window right to make room for itself (RecipeBookComponent.updateScreenPosition); when they don't fit, nothing moves. This API is right-only: mod panels reserve the right while the existing recipe book occupies the left; left reservations are not part of this hook. The query's ScreenView::rect is pre-reservation. Later draw/input views expose the shifted window; check that rectangle's right edge plus the room against the viewport. Keep this query pure and cheap. Its answer is memoized for the frame and screen; recursive queries during dispatch see zero. Asked once a frame while the player's inventory, a container or a mod's menu screen is open, not for the creative inventory, a merchant's or a beacon's screen, nor while the recipe book covers the window of a narrow screen; an answer that changes geometry builds the layout again in the same frame (slots, book and effect panels move with the window). Not finite or below 0 counts as 0. Beyond NeoForge: a mod there reads the container screen's leftPos but has no event to move it, so it draws in the space that's left.
  • screen_transparent_background

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ScreenEvent.Render.Pre (transparent background)
    Summary
    Screen.renderTransparentBackground: draws the translucent dark background behind an in-game screen (inventory, container, creative, book, sign, editor). Set canceled (or return Flow::Cancel) to suppress the vanilla dark gradient, allowing a mod to draw its own background or apply menu background blur via Host::apply_screen_blur. API @API:screen_transparent_background@.
  • screenshot

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    ScreenshotEvent
    Summary
    An F2 screenshot has been read back, before either PNG is written (ScreenshotEvent). Runs on the client thread with a ClientHost. image is the in-memory frame (getImage): RGBA8, top to bottom, width * height * 4 bytes. Change it and the normal PNG is that image. A length other than width * height * 4 writes nothing and reports screenshot failure. The HDR copy is not this image. Change file_name, a relative path inside the player's screenshots folder, or set message to replace the success chat line. None uses the normal translated, clickable line for the final file name. Return Flow::Cancel to write no files and post message, or the translated cancellation line when message is None. Invalid paths (including symlinks) report screenshot failure; parent folders are created. HDR copies follow the final name with -hdr.png. Agent captures and world icons do not fire this hook.
  • sculk_bloom

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A sculk catalyst at pos has begun blooming after taking experience. The catalyst block state has changed. Server-side.
  • section_visibility

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    A chunk section in the player's current level is about to mesh: return one SectionVisibility or None. input is the raw section with its one-block border, read before any mod hid a state. SectionCell::State gives the canonical BlockState. Asked on the client world thread before the section goes to a meshing worker, including remeshes after a neighbouring column arrives or unloads, a resource reload, or ClientHost::refresh_render_visibility. A first all-air compile is skipped if no mod contributes section geometry. Other levels drawn through level views do not call this hook. Answers only take away, and every mod's are combined, so no mod brings back what another hid. An answer that breaks a bound is refused whole, logged once, and the section draws without it. With no mod listening, the mesher pays nothing.
  • server_about_to_start

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerAboutToStartEvent
    Summary
    The server is about to open its worlds: nothing of the world is loaded yet (NeoForge's ServerAboutToStartEvent, "called before the server begins loading anything"). Vanilla's MinecraftServer.loadLevel start. Server-side: the single player server thread once Play is pressed, a dedicated server once its settings are read. Each is followed by server_started or world_lifecycle's WorldOpenFailed. dedicated tells a dedicated server from the single player one.
  • server_chat

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerChatEvent
    Summary
    NeoForge's ServerChatEvent: a player's chat message, through their chain, is about to be broadcast. player_id is the server's entity id for the player, player their UUID, username their name and raw_text what they typed. message starts as that text; replace it and players see the new message (withUnsignedContent: a signed message keeps its signature), and the log shows it. Set cancel and nobody sees it, and it doesn't count toward the chat spam limit. Commands (/say, /msg...) are not chat here. Server-side, with no player's state swapped in. A component deeper than 512 nodes refuses capture or the whole writeback; no event field is applied if any Text field fails conversion.
  • server_started

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerStartedEvent
    Summary
    The server has opened its worlds and is about to run its tick loop (NeoForge's ServerStartedEvent): every level is loaded, no player has joined, and the first tick has not run. Fired where WorldOpenReady was, on the single player server thread and on a dedicated server, once per open that succeeds (a failed open fires WorldOpenFailed instead). dedicated tells a dedicated server from the single player one.
  • server_starting

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerStartingEvent
    Summary
    Fired once before the server accepts play. On a dedicated server this follows world and data loading, and the adopted packs' English is available. On an integrated server it follows server_about_to_start immediately, where text uses the client's active language. A failed startup still reaches server_stopped.
  • server_stopped

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerStoppedEvent
    Summary
    Fired once at the end of server teardown, after server_stopping and the final save attempt and storage release. Also fired when startup or teardown fails after startup began, including when a shutdown listener panics, on integrated and dedicated servers. Failed opens save only worlds already adopted by the server (the prepared level is installed; the session lock alone is not adoption). A failed save still reaches this hook, but does not emit WorldCloseFinal.
  • server_stopping

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerStoppingEvent
    Summary
    The server begins teardown (NeoForge's ServerStoppingEvent), including after startup or the tick loop failed: the start of vanilla's MinecraftServer.stopServer, with the worlds still loaded and the players still connected and not yet saved, so a mod can save its own data or tell them. world_lifecycle's WorldCloseFinal follows once the worlds are saved. A server whose loop fails still fires this before the final save attempt and server_stopped.
  • server_tick

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerTickEvent.Pre, ServerTickEvent.Post
    Summary
    The authoritative server tick's phases: ServerTickStart before any level is ticked (NeoForge's ServerTickEvent.Pre), ServerTickEnd after the last (.Post). Read blocks with native_server_block, by dimension: which level self.world holds here is not defined. A paused pass fires nothing; a frozen world carries world_running false except during a requested step. host.server_has_time() says whether optional work still fits before the next tick is due (ServerTickEvent.hasTime).
  • server_tick_rate_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    /tick rate set the server's rate, or a /tick sprint ended (MinecraftServer.onTickRateChanged, before its autosave wait is adjusted). Vanilla calls this for every /tick rate, the rate it already had included, and at each end of a sprint: on its own, by /tick sprint stop or by /tick freeze, the rate then being what it was. host.tick_stats() reads the rate. A client told the server's rate is not a server: nothing fires there. Server-side. Beyond NeoForge: there is no counterpart.
  • setting_changed

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    ModConfigEvent.Reloading (a ModConfigSpec value set on the config screen)
    Summary
    The player changed setting key of mod mod_id on its page in Options > Mods (Registrar::register_setting); the new value is kept already, so read it with setting_bool and its siblings. Only mod mod_id hears it: a mod is told of its own settings, never another's.
  • shader_params

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The values native mods hand their shader packs in this frame, partial ticks past the last tick (0 to 1): a pack's WGSL reads them as frame.mods (eight vec4<f32>). Write the slots your own pack reads; a mod that bundles its pack as native-<mod id> is the one that pack is for. Asked once a frame while a pack is on; a value that isn't finite reads as 0 (native_shader_params_now).
  • sign_changed

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player finished editing a sign: ServerGamePacketListenerImpl.updateSignText has taken their update packet and every check has passed (they were editing that sign, within reach, the sign is not waxed), right before the lines go on the sign. pos in dimension, the front or back side, and the four lines as written, plain text with the formatting codes still in (vanilla strips them afterwards). Rewrite lines (made four lines again) and that is what the sign gets, or set cancel and the sign keeps its old text. With the player's state swapped in, so PlayerRef::tell and the helpers that act on the player reach them. Once for each update a player sends on a server. Not told: the host's own editing of a sign on a LAN or single-player world (the editor writes into their world directly), and the sign changes that are no edit of the text (dyeing, glow ink, waxing, /data, /setblock, mods' native_with_mod_block_entity).
  • sleep_finished_time

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    SleepFinishedTimeEvent
    Summary
    Enough players have slept through the night in level dimension and the clock is about to move to the morning (NeoForge's SleepFinishedTimeEvent, vanilla's ServerLevel.tick when it moves the clock to wake_up_from_sleep). adjustment says where the clock goes and may be changed: it comes in as Marker(minecraft:wake_up_from_sleep), vanilla's own, and a mod may set Absolute, Relative (from current, the day time now) or another Marker; a later mod reads what an earlier one left. new_time is the morning vanilla resolved, read only, for a mod that computes from it. Contract version 2: in version 1, new_time was the value a mod wrote; a time is now written as Absolute. current and the result are times of the level's own clock (its dimension type's default clock, else the Overworld's). The game resolves adjustment once after every mod: a time before current, a time past i64::MAX, or a marker the level's clock does not define is refused, as setTimeAddition refuses one, and the clock moves to the morning. Only the Overworld's clock defines markers today, so on any other clock every Marker, vanilla's included, falls back to the morning. When even the morning is past i64::MAX, new_time is current and the clock stays. On the server, only when the advance_time rule is on; time_skip then hears the jump to the resolved time and may still cancel it. The players wake and the weather resets as usual either way. Set canceled and the clock is left where it is, as NeoForge's cancel leaves it: time_skip is not asked either.
  • sound_engine_load

    Side
    client
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    SoundEngineLoadEvent
    Summary
    The sound engine opened its output (SoundEngineLoadEvent): once at window start, after each resource reload (with the context of the new resource generation) and when the output device changes. Nothing fires with no sound output (no device, or audio turned off). Client-side only.
  • spawn_change

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The world's spawn point changed to pos in level dimension, facing angle.
  • sponge_absorb

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    A sponge at pos absorbed water and became wet. Server-side.
  • spread_players_teleport

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityTeleportEvent.SpreadPlayersCommand
    Summary
    A server entity is about to be placed by /spreadplayers (NeoForge's EntityTeleportEvent.SpreadPlayersCommand, vanilla's SpreadPlayersCommand.setPlayerPositions): once per entity, after the spread worked out its spot. entity is its network id, player its UUID (None for a non-player), from where it stands and target the spot. A mod may move target (a value that is not a number is ignored). Canceling leaves the entity where it is; the spread's other entities, its random draws and its feedback are unchanged.
  • standalone_models

    Side
    client
    Contract
    collect
    Host / context
    &RegistrationContext
    NeoForge
    ModelEvent.RegisterStandalone
    Summary
    Models no blockstate names, registered once on the client before resources load. Use StandaloneModelsEvent::register_model for plain files or StandaloneModelsEvent::register to bind a baker and its file dependencies. Every resource load rebakes both from the active pack files. Failed bakes publish no model and log the registering mod. Look up results through RenderAssets::model in or after model_baking_completed.
  • submit_custom_geometry

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    SubmitCustomGeometryEvent
    Summary
    Submit unlit geometry after particle submission, before opaque rendering (NeoForge 26.3 SubmitCustomGeometryEvent, vanilla LevelRenderer.submitFeatures). Client-only, noncancellable. view holds only camera, partial tick and game time, not full extracted level state or visible sections. Submit from extracted state.
  • substitute_inline_images

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Propose inline images for one nonempty, translated text run in chat history or on either face of a sign, after legacy formatting and before wrapping, measuring and bidi reordering. Existing inline objects are not passed to the hook. The run is one resolved style span; ranges cannot cross spans or line breaks. Push UTF-8 byte ranges into images, in priority order. The first valid, nonoverlapping proposal wins in hook dispatch order. Missing sprites and invalid ranges are ignored, leaving the original characters available to later proposals.
  • sweep_attack

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    SweepAttackEvent
    Summary
    NeoForge's SweepAttackEvent: a player's damaging melee hit on a target (minecraft:zombie, minecraft:oak_boat) is about to sweep or not, after critical_hit. vanilla_sweep is Player.isSweepAttack (a charged, grounded, not critical sword hit below the speed limit); sweeping starts as it and may force or stop the sweep; canceled skips the later mods and keeps sweeping as it is (a mod doing its own sweep cancels with sweeping false). A critical hit that sweeps has both sounds. Fires on the Game that runs the attack, and on the attacking client, which only asks.
  • tab_complete

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A guest asked to complete command; owned API Suggestion records may be added to or filtered from suggestions. range is the replaced byte range. The game snapshots completions only when a listener subscribes.
  • tags_updated

    Side
    both
    Contract
    listen
    Host / context
    &dyn ReloadContext
    NeoForge
    TagsUpdatedEvent
    Summary
    Tags changed, and what depends on them should be rebuilt (NeoForge's TagsUpdatedEvent); cause says how. The place to drop caches derived from the data and to rebind what depends on it.
  • target_hit

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A projectile hit the target block at pos, which now has strength output power. Server-side.
  • teleport_command

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    EntityTeleportEvent.TeleportCommand
    Summary
    A server entity is about to be teleported by /tp or /teleport (NeoForge's EntityTeleportEvent.TeleportCommand, in TeleportCommand.performTeleport, once per teleported entity): dimension is the level it arrives in, entity its network id, from its feet now and to where the command sends it. A mod may move to (a value that is not a number is ignored). Canceling leaves the entity where it is; the command still reports success. entity_teleport and player_teleported hear it after. Server-side. Diverges from upstream: new hook.
  • texture_atlas_stitched

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    TextureAtlasStitchedEvent
    Summary
    An atlas was stitched and published (TextureAtlasStitchedEvent): atlas names it. Fires once per atlas, the blocks' first and then the GUI's, during atlas publication before the model manager applies. Model lookups still see the previous generation (none at startup). It precedes client_setup on startup and client_resources_reloaded on later reloads. Listeners ordered after the model manager apply after both stitches. A refused prepare fires nothing. Look the sprites a mod draws up here, once, and keep what it finds until the next stitch of that atlas: texture_sprites for TextureAtlas::Blocks, gui_sprite for TextureAtlas::Gui. Never look them up by name every frame. Client-side. A panic rolls back the callback's journaled writes; the mod is reported and its callback skipped for the session without suppressing other mods' notifications.
  • thunder_change

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The server changed its thunder state through /weather. Set cancel to keep the previous thunder state and timer. Server-side.
  • tick_target_millis

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    How many milliseconds a client tick lasts (Minecraft.getTickTargetMillis, the target the window's DeltaTracker.Timer divides the frame's time by): millis comes in as vanilla's (50 at 20 ticks a second, longer when the server's /tick rate is slower); set it to speed up or slow down the client's fixed-step clock, a "timer". Asked once a frame, in menus too, before the frame's client ticks run (at most ten a frame). An answer that is not a finite number above zero keeps vanilla's. Only the window's clock changes: a server still ticks at its own rate. Client-side. Beyond NeoForge: there is no counterpart. Diverges from upstream: new hook.
  • time_skip

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The overworld clock is about to jump, from sleep or /time. Set cancel to keep from.
  • tnt_primed

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    TNT at pos is about to be lit (primed): a flint and steel or a fire charge on it, fire burning it, a redstone signal, an arrow, or a dispenser's flint and steel or TNT item. player is the server player whose click lit it, with their state swapped in (so PlayerRef::tell answers them), None when no player is behind it (fire, redstone, an arrow, a dispenser). Set cancel and it is not primed: a TNT block stays where it is (one that fire or a signal had already taken out is put back, without a block update), a dispenser's TNT item stays in it. Not asked: TNT set off by a blast (explosion_detonate spares blocks), a TNT minecart and a sulfur cube. Server-side and in single player.
  • toast_add

    Side
    client
    Contract
    cancel
    Host / context
    &dyn ClientHost
    NeoForge
    ToastAddEvent
    Summary
    A client toast is about to enter its queue (ToastAddEvent). Return Flow::Cancel to discard only this candidate, before slot allocation, animation or sound. kind identifies its family; music is Other. Replace title and description to change the displayed components. For advancements the title is the frame label and the description is the advancement name. Existing recipe/system toasts updated in place do not fire another add event. Requests from ClientHost::add_toast enter as ToastKind::Mod, including requests that would replace an existing mod toast. Integrated-server error notices are new system toast candidates on the owning client, not on the server or its guests. Pending chunk I/O reports stay with that window when the world closes. Client-lib and title producers prepare candidates for the game to admit with a ClientHost before applying. Diagnostics naming a mod's panicking callback are not candidates for this hook and cannot be edited or cancelled.
  • trade_select

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server player selected trade index from villager in the trading menu.
  • trade_with_villager

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    TradeWithVillagerEvent
    Summary
    A server player's take from a villager or wandering trader, once per trade, after its statistic and villager_trade criterion. merchant is the trader's entity id, kind its type, and offer the post-take snapshot: the use is counted and the result is what that iteration took. host.players().acting_player() names the player.
  • use_item_on_block

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    UseItemOnBlockEvent
    Summary
    UseItemOnBlockEvent: after a phase was chosen, before its Part or vanilla behaviour. Cancel skips that behaviour and returns cancellation_result (initially TryWithEmptyHand). In ItemBeforeBlock, Pass continues to the block, skipping the item's on_item_use_first Part; any result other than Pass ends the block interaction. A block-phase TryWithEmptyHand can still try the empty-hand behaviour. On a server-registered cauldron click, the client waits for block fallthrough before ItemAfterBlock; a consuming server item result doesn't skip this local phase. Other clicks can predict vanilla on a client without the mod; the server corrects it.
  • validate_tickets

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    LoadingValidationCallback
    Summary
    dimension's level has loaded the saved chunk tickets of controller (NeoForge's LoadingValidationCallback.validateTickets), before its first tick and after level_load, once for each open and each controller registered with a validator that has tickets in the level. At startup all built-in levels are available before validation begins. validation holds that controller's tickets, block owners and entity owners apart; the mod that owns the controller removes the ones that no longer hold (a machine that is gone), and they stop forcing their chunks. A callback's removals are visible to that callback immediately, but are discarded if it panics or incurs a phase refusal. Server-side.
  • vanilla_game_event

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    VanillaGameEvent
    Summary
    A vanilla game event is about to reach its listeners (NeoForge's VanillaGameEvent, vanilla's Level.gameEvent): every event, in dimension. event is its id (minecraft:step), pos where it happened and cause the network id of the entity that caused it (None for none). affected_state is the block state the event touched (GameEvent.Context.affectedState, with cause its sourceEntity): the block a player broke or placed, the block a mob stepped on; None where vanilla passes none (Context.of(entity)). Canceling keeps the sculk sensors, wardens and allays from hearing it. A dispenser fluid transfer with no open transaction in its level publishes before overflow insertion or preparation. With a caller-owned transaction in that level, publication waits for the outermost commit. Server-side.
  • vault_change_state

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A vault at pos changed to state. Its block state is updated. Server-side.
  • vault_loot

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A vault at pos is about to eject a loot item.
  • vehicle_create

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A boat or minecart was created at pos, after it joined the level. kind is the vehicle type. Server-side.
  • vehicle_damage

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A vehicle is about to take damage from a player's attack. kind is boat or the minecart type; mods may change damage or set cancel to leave its damage and wobble unchanged. The attack itself still completes. Server-side.
  • vehicle_destroy

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A boat or minecart is about to be destroyed at pos. TNT minecarts that prime instead of breaking are not heard. Server-side.
  • vehicle_moved

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A boat or minecart (kind, minecraft:oak_boat) moved since the last tick (VehicleMoveEvent): from and to are its positions, heard after the tick moved it. Once a tick for each vehicle that carries a server player, whose state is then swapped in (host.players().acting_player(), PlayerRef::tell and the item helpers reach them; player is their UUID), and for one a server player rode and left, until it has stood still for ten seconds (player is none, nobody is swapped in). It only hears. Cheap when nothing moves: one position compare a tick for each watched vehicle. Not heard: a vehicle moved before anyone rode it, a mount (horse, pig...) or a vehicle carrying only a mob. Server-side, in the level the vehicle is in.
  • viewed_level_sound

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    A sound of a level the server opened for viewing (#3716) reached this client, and the client asks where in the player's own level to play it. level is the viewed level's handle (what host.level gives for it) and position the sound's position there; sound, source and seed are the server's. play_at starts as None, and a sound left None is not played. Set it to a position in the player's level and the sound plays there, as the player's own level plays a sound packet (no distance delay), with the volume and pitch the listeners leave and the same seed. A play_at that is not finite, or a volume or pitch that is not finite and at least 0, plays nothing. Only a server of sunrise:levels revision 3 sends these. A sound bound to an entity of the viewed level has that entity's position there, and plays at play_at without following it. Sounds of the player's own level ask play_level_sound_at_position and play_level_sound_at_entity, never this hook. With no listener the sound is dropped after one check, with nothing decoded or allocated. Client-side. Diverges from upstream: new hook, a Sunrise addition with no NeoForge counterpart.
  • village_siege

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    VillageSiegeEvent
    Summary
    A village siege found a spawn position on the server. Set canceled to stop the siege. There is one siege per dimension.
  • visuals

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The world frame's local, world-space rim and colored-light sources. Push requests; Sunrise validates and limits them before rendering. Called only while a world is visible.
  • weather_change

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The server changed its weather parameters. raining and thundering are the requested final states. Set cancel to keep the previous weather parameters. Server-side.
  • whitelist_state_update

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The dedicated server's whitelist changed to enabled.
  • wind_burst

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Before a wind burst interacts with blocks, wind_burst(dimension, center, blocks) receives the shuffled candidate positions. Remove positions to spare those blocks; entity knockback and the shuffle's random draws are unchanged. Not called when mob_griefing prevents a breeze from interacting with blocks. Bundles need "hooks": @API:wind_burst@.
  • window_resize

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    WindowResizeEvent
    Summary
    After a window resize or applying a changed GUI scale, fullscreen, or Unicode font setting. width and height are physical pixels; gui_width and gui_height are scaled GUI pixels. Fires only when physical or scaled dimensions change.
  • world_border_bounds_change_finish

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A timed world-border size change finished on the server, after its final size was applied. Server-side, including the single-player server.
  • world_border_bounds_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The server world's border bounds changed, either immediately or when its timed size change was requested.
  • world_border_center_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The server world's border center changed.
  • world_lifecycle

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    ServerStartingEvent, ServerStartedEvent, ServerStoppingEvent, ServerStoppedEvent
    Summary
    The world's phases, read-only; error_text carries the engine's error text for WorldOpenFailed and WorldCloseFailed, empty otherwise. Server-side. A server loop or final save failure fires WorldCloseFailed. A normal stop with only individually reported record failures still fires WorldCloseFinal.
  • world_saved

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The server completed a world save cycle. wait says chunk writes were flushed before returning.
  • xp_orb_targeting

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    XpOrbTargetingEvent
    Summary
    An experience orb looks for a player to follow (NeoForge's XpOrbTargetingEvent, ExperienceOrb.followNearbyPlayer), on a server. following starts as the default: the nearest living player within scan_distance (8) blocks who isn't a spectator, or None. Set another player, or None to follow no one. The orb only goes for a living player who isn't a spectator, in its level, and only moves once they are within 8 blocks. Sunrise looks again on every orb tick (vanilla keeps the player it follows while they stay within 8 blocks), so this is asked every tick for each orb: answer fast.
  • zoom

    Side
    client
    Contract
    replace
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The zoom a native mod asks for, applied while playing (the spyglass's own view wins): set zoom when it is none yet.

Part hooks

BlockEntityPart

  • block_entity

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    Initial saved data for a declared block entity (EntityBlock.newBlockEntity), fired inside the write that creates it (LevelChunk.setBlockState), on a server and on a client of one. state is the actual placed state for a block declared through stateful_block_entity; its properties are available through the Host's state registry. The declaration owns the type id. No answer creates no entity for a state-aware factory; other declared types start with an empty compound. The level is read-only, as newBlockEntity gets no level.
  • block_entity_client_tick

    Side
    client
    Contract
    listen
    Host / context
    —
    NeoForge
    —
    Summary
    A client tick of this client's copy of the mod block entity (ClientLevel.tickBlockEntities), when its type is yours and its block's state ticks on the client (block_entity_client_ticks): once per client tick while the level runs, in vanilla's ticker order among the others, whether or not the copy is drawn. event.subject is a BlockEntityClientScope: borrow a read-only BlockEntityReadView through with_view for the resident copy's handle, position, level, block state, data slots, item slots and merged NBT (block_entity_update_tag), and borrow ClientHost sequentially through host() to start, stop and fade sounds or add particles. Never called on a server, and never again for a copy removed or whose chunk unloaded.
  • block_entity_client_ticks

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Whether block block's block entity ticks on the client (EntityBlock.getTicker asked with the client level): set ticks when it is yours, and block_entity_client_tick runs for it once per client tick. Asked once for each mod block, for all of its states, when the client level initializes its ticker table (before the first column's block entities or the first ticker pass), if a part has a client tick. Set ticks to true to make it tick, and never clear a value an earlier mod or mixin set.
  • block_entity_data_received

    Side
    client
    Contract
    listen
    Host / context
    —
    NeoForge
    —
    Summary
    The synchronized tag has been merged into this client's block entity. source distinguishes chunk data from a later update packet. Empty chunk compounds send no notice; empty update-packet compounds do. Absent tags send no notice. Called once for each accepted tag, only for a matching mod block entity that the client created. event.subject is a BlockEntityClientReadScope: with_view lends a read-only view of the resident block entity with the merged data already applied, and host() borrows &dyn ClientHost. This notice cannot change the received tag. Missing tags and vanilla block entities call nothing. Related NeoForge receive paths IBlockEntityExtension.onDataPacket and handleUpdateTag perform loading; they are not counterparts of this notice, which runs after the merge.
  • block_entity_load_additional

    Side
    server
    Contract
    listen
    Host / context
    —
    NeoForge
    —
    Summary
    The engine applied saved data to this mod block entity on the logical server (BlockEntity.loadAdditional). tag is the applied mod payload, and event.subject is a BlockEntityLevelReadScope: with_view lends a read-only BlockEntityReadView carrying the instance's handle, worldPosition, level, block state and updated data, and host() borrows &dyn LevelHost, so a listener can store the applied data under its dimension and position, also after a later /data merge. The notice cannot change the tag or write to the world. On a holder without declared inventory slots, tag includes any saved Items field as mod-owned NBT, even rows that look like canonical item stacks. Lists keep their saved order. For a declared inventory, modeled stacks remain separate from the mod payload.
  • block_entity_on_load

    Side
    both
    Contract
    listen
    Host / context
    —
    NeoForge
    IBlockEntityExtension.onLoad
    Summary
    The mod block entity has been added to its level, with saved data already applied, before its first tick (IBlockEntityExtension.onLoad). Fires once for each instance on both logical sides, including placement. A chunk loaded again creates new instances and calls this hook again. On a server, block_entity_load_additional reports the saved-data application first. event.subject is a BlockEntitySideScope: Server(scope) lends a mutable BlockEntityView and &mut dyn ServerHost sequentially, while Client(scope) lends a read-only BlockEntityReadView and &mut dyn ClientHost sequentially. block_entity_save_additional is the separate server-side serialization hook.
  • block_entity_render_bounding_box

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    IBlockEntityRendererExtension.getRenderBoundingBox
    Summary
    Where the mod block entity at pos draws, for culling (NeoForge's getRenderBoundingBox): bounds is min x, y, z then max x, y, z, in blocks from the block's lower north-west corner. It starts as the block with a block of margin around it; widen it when your block_entity_submit draws further (a tall shaft, a beam), or set an infinite value for one never culled. Asked once a frame for each within its view distance (block_entity_view_distance) whose chunk is drawn.
  • block_entity_save_additional

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    Write live mod state into tag, a copy of the instance's stored payload (BlockEntity.saveAdditional). Edits affect only the output; the entity, its inventory, identity, position, and engine-managed attachments and shapes are not changed. Parts of the entity's type run in dispatch order. For a holder without declared inventory slots, tag holds any persisted Items as mod-owned NBT. Canonical-looking item rows keep their saved list order; they are not reconstructed in slot order. The listener may replace or remove this field. Declared slots remain engine-owned inventory, serialized by the engine after the listeners run. event.pos and event.level are the instance's own worldPosition and level, read-only and filled by the engine, so a listener can find its live state by dimension and position, including during unload or a removed block's loot roll. Every call has a level: the hook is not asked without one. Malformed payloads, including overlong modified-UTF-8 names and strings, fall back to the stored payload before any output is used. If the region writer cannot encode or admit the complete chunk record, it retries that snapshot with stored block-entity payloads instead of listener edits.
  • block_entity_submit

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    EntityRenderersEvent.RegisterRenderers
    Summary
    Draw the mod block entity at pos, of block block (mymod:machine), on this client: once a frame while it is in view (vanilla's BlockEntityRenderer.submit: within its view distance, 64 blocks unless block_entity_view_distance says otherwise, its chunk faded in, and its bounds, block_entity_render_bounding_box, in the frustum), when its id is yours. state is the block's state (blockEntity.getBlockState(): read its facing with native_block_state_property), entity holds what the server sent (block_entity_update_tag). Add geometry with native_draw_quad, native_draw_cube, native_draw_block and native_draw_item under draw's pose stack, which starts at the block's lower north-west corner, in blocks; draw also has the partial tick, the game time and the block's light. When DrawContext::draw_scene reuses this renderer, entity is supplied by the scene, the draw is full bright, and pos is scene-local, not a position to look up in the client level.
  • block_entity_tick

    Side
    server
    Contract
    listen
    Host / context
    —
    NeoForge
    —
    Summary
    A server tick of a resident mod block entity of your registered kind. The game skips the callback if the current block does not support that entity type, as in LevelChunk.BoundTickingBlockEntity.tick. The first invalid visit logs a warning; a valid tick clears it for the next episode. event.subject.with_view lends its live storage. To reach the level or another object, return from the loan and call event.subject.host(). Ask for another loan afterwards; it returns None if the level, chunk load, generation or block-entity type validity (BlockEntityType.isValid for the live block state) no longer matches. In-place block-state updates to another valid state remain borrowable with the live state. For a Part-state edit, first get the handle with event.subject.with_view(|view| view.handle()), then borrow event.subject.host() to call edit_state. Keep a handle only to use across calls.
  • block_entity_ticks

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Whether block block's block entity ticks (EntityBlock.getTicker): set ticks when it is yours. Asked for each of the block's states when a world opens. Set ticks to true to make it tick, and never clear a value an earlier mod or mixin set.
  • block_entity_update_tag

    Side
    server
    Contract
    replace
    Host / context
    —
    NeoForge
    —
    Summary
    What clients get of the block entity at pos when its id is yours (BlockEntity.getUpdateTag): set tag to it, read from entity alone. Asked on the server whenever a chunk holding it is sent and whenever its block changes, on the server thread; a client's copy of the block entity (made by block_entity there) merges it into its nbt. Leave it unset to send no tag of yours. A block change puts the one-shot fields of BlockEntityView::set_client_update_fields over it, and sends them alone when it is unset.
  • block_entity_view_distance

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    How far from the camera the mod block entity of block block draws, in blocks (vanilla's BlockEntityRenderer.getViewDistance): 64 unless a part answers. Set distance for your own block: further for something seen from afar (a beacon-like beam, a large display), nearer for small detail. It is asked once for each mod block, the first time this client draws block entities, and kept: never per frame. A value that isn't finite and above 0 is ignored. Beyond NeoForge: the renderer's own method, no event.
  • can_place_item

    Side
    server
    Contract
    replace
    Host / context
    —
    NeoForge
    —
    Summary
    Container.canPlaceItem: whether slot of this mod block entity's container admits the offered nonempty stack. Some(true) or Some(false) replaces the declared ModContainer::insert_rules answer; None keeps it. A subscribed slot refuses insertion if the entity snapshot, block state or offered stack cannot be represented. Face, input-slot and stack limits still apply.
  • menu_quick_move

    Side
    server
    Contract
    cancel
    Host / context
    —
    NeoForge
    —
    Summary
    A player shift-clicked slot slot of the menu of the mod block entity (AbstractContainerMenu.quickMoveStack, the method a Java menu overrides), on the server, before the game's own routing: move the stack where your block wants it. subject lends sequential access to the live resident block entity (subject.with_view(...)), the server Host (subject.host()), and atomic transactions (subject.transaction(...)); with_view returns None if the block entity was removed or replaced during the call. slot is the menu's index: below container_slots it is a container slot (the block's own, a linked slot, or a crafting result); from there on the player's inventory (27 main slots, then the hotbar). After the live slot allows pickup, stack copies what it holds. Take what you move out of stack and return Flow::Cancel. The same source keeps the remainder (None empties it) and the client gets the menu again. A result handler consumes its own inputs; the remainder stays available for the inputs it leaves until the grid changes. Left unhandled, the game undoes the listener's journaled writes before routing the same menu click without a second pickup check. A later Part sees accepted proposals.
  • on_chunk_unloaded

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    IBlockEntityExtension.onChunkUnloaded
    Summary
    The chunk holding this mod block entity is unloading (IBlockEntityExtension.onChunkUnloaded): told once for each of its mod block entities, on each side that holds a copy of it, before the copy is dropped. pos is where it stands, block_entity its handle (the one host.block_entity gave while it was loaded) and entity its data. Release what your mod keeps for it here. On a server its chunk may have left the level already, so don't count on the handle's reads. As with chunk_unload, changes made in it aren't saved: the chunk was saved before it unloads. Not told when the world closes, or on a client when its level goes (a respawn, a dimension change, leaving).
  • pre_remove_side_effects

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    —
    Summary
    BlockEntity.preRemoveSideEffects of a mod's block entity: an authoritative server is removing entity from pos, where the block state stood, and its updates may have side effects (not under flag 256, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS). Put in drops the stacks it held that the game doesn't: they scatter as Containers.dropItemStack scatters them, after the block entity's own container. The block entity is still in place, so its attachments read as they were. Answered from inside the level's write: don't change the world here. This also runs when a menu button callback removes the backing block through the Host. Set keep_contents to skip the base container slots. Each drops entry is a slot: None draws the empty slot's scatter position but spawns nothing. Then spawns creates each (stack, position) with default pickup delay, and experience awards each (amount, position) as experience orbs. Each output list accepts at most 1024 entries; invalid positions or stacks refuse the outputs. Positions must be finite. Default outputs draw nothing.
  • stateful_block_entity

    Side
    both
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Opt a block with a registered block entity type into state-aware creation. Asked once per block when a level's immutable factory ownership table is built. Set true and never clear an earlier answer. For these blocks, block_entity receives the actual state and no answer creates no entity. Existing entities survive property changes within the same block.

BlockPart

  • add_destroy_effects

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    IClientBlockExtensions.addDestroyEffects
    Summary
    Asked on the client before a non-air state's destruction debris. state is the destroyed state, not what the client now sees at pos; an invisible state can still be asked. Return Flow::Cancel to replace or omit the burst, or Flow::Continue for the normal burst (even if the state normally suppresses terrain particles). The break sound is independent. random is the client level's random.
  • add_hit_effects

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    IClientBlockExtensions.addHitEffects
    Summary
    Asked on the client for the non-air, visible block being hit, after its optional hit sound and before any outline sampling. Return Flow::Cancel to replace or omit the crumb, or Flow::Continue for the normal crumb (even if the state normally suppresses terrain particles). The supplied face is the one being hit. random is the level's random, also used by a call to LevelRef::add_breaking_particles during this callback.
  • adjacent_block_path_type

    Side
    server
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.getAdjacentBlockPathType
    Summary
    The optional contribution of the neighbour event.state at event.pos (IBlockExtension.getAdjacentBlockPathType). event.path_type is that neighbour's own classified type, not the node's type. The readonly host reads the owning level. Some immediately becomes the node's type and ends the scan, even if equal to its current type; None keeps that neighbour's fluid and vanilla fallback, never suppressing it. Vanilla water contributes through its classified path type: a solid waterlogged block remains Blocked. Custom fluids default to WaterBorder. Neighbours are visited x, then y, then z, each from -1 to 1, excluding the node's own column. No mob is supplied. These answers run after static classification; per-search evaluator caches remain. Diverges from upstream: new hook.
  • affect_neighbors_after_removal

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    Block.affectNeighborsAfterRemoval for a mod's block: an authoritative server removed the block state from pos (moved: a piston pushed it) and has run its template class's own updates. Push onto updates the neighbour updates it wants, in order: OutputSignal (updateNeighbourForOutputSignal), Neighbours (updateNeighborsAt) and NeighboursExcept(direction) (updateNeighborsAtExceptFromFacing); the level runs each at once, as the block's own override would. Answered from inside the level's write: it reads, and cannot write blocks or spawn entities.
  • analog_output

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    —
    Summary
    BlockState.getAnalogOutputSignal: the signal a comparator reads from the block state at pos, face the side that touches the comparator (or the conductor in front of it). output holds vanilla's answer: change it when the block is yours (0 to 15; anything else is clamped). Asked only for blocks has_analog_output answered for, from inside the level's update: don't change the world here. When the answer changes without the block's state changing, call level.update_neighbors(host, pos, state, NeighbourUpdate::OutputSignal); a change of state through native_set_block or native_set_block_property (neighbour updates on) tells the comparators itself, as vanilla's Level.setBlock does. Authoritative servers only. Version 2 supplies &mut dyn LevelRandomHost: use container_signal for vanilla's comparator read, which may unpack unopened loot. The level's random stream remains in vanilla order. Other world edits stay forbidden.
  • animate_tick

    Side
    client
    Contract
    listen
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    A client's random display tick of the block state at pos (Block.animateTick): ClientLevel.animateTick picked pos among the 667 random positions within 16 and the 667 within 32 blocks of the player it samples each client tick. Add particles with host.add_particle and play sounds with host.play_local_sound: a torch's smoke, a furnace's flames, redstone ore's dust. level is the client's level, random its random (ClientLevel.random, the one vanilla lends animateTick), so a port keeps Java's odds: random.next_float() < 0.04 as random.nextFloat() < 0.04f. Only parts on the picked state's block are called, inside the pick: after the block's own vanilla effects, before its fluid's and the next pick. A block with no part answering costs the sampler one table lookup. Never called on a server, nor for a screen's scene. A resource pack's Polytone disable_particles on the block stops the part's call too, as it stops the block's own.
  • beacon_color_multiplier

    Side
    both
    Contract
    collect
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.getBeaconColorMultiplier, IBlockStateExtension.getBeaconColorMultiplier
    Summary
    The colour the block state at pos gives the beam of the beacon at beacon_pos (IBlockExtension.getBeaconColorMultiplier), asked as the beacon builds its beam sections one block at a time. color starts at the block's own answer: the beacon's white and a stained glass block's or pane's dye colour, empty for the rest. Set Some(rgb) to tint the beam as stained glass does (a colour unlike the section below starts a new section mixed half and half with it), or None to let the beam pass untinted, or stop at an opaque block other than bedrock, as vanilla does. The beam takes the red, green and blue channels; alpha is ignored. Asked on both sides, since a client builds the beam it draws from the blocks it has, with the level read-only: register the mod on both and answer the same on each. With no part attached to the state, the game checks the hook subscription and the block key before any event conversion, so the cost is one table lookup per block above a beacon. Diverges from upstream: new hook.
  • block_jump_factor

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    The jump factor of a block state this part is attached to (Block.getJumpFactor, which Entity.getBlockJumpFactor reads for the player, the cube, the panda, the rabbit and every other living jumper) is being read; vanilla's values are 0.5 for honey and 1.0 for the rest. A part may change factor (event.factor). The entity reads the block at its feet and, when that gives 1.0, the block below it, so a changed factor takes part in that choice exactly as the block's own would. It runs for each read, on both sides and on the client's replayed ticks, so register the mod on both and keep the listener a pure function of its inputs. It is given the loop context of the side that ticks the entity, and takes no Host. NeoForge's counterpart Block.getJumpFactor() is a method of the block, with no bus event, so this is a part method only; a mod reacting to its own blocks uses this part. Diverges from upstream: new hook.
  • block_path_type

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.getBlockPathType
    Summary
    The optional classification of event.state at event.pos (IBlockExtension.getBlockPathType). Asked before every vanilla rule, including air and is_pathfindable. Some replaces the whole static classification; None declines to vanilla. The read-only level host is the level that owns pos, so the same state may answer differently at different positions. No mob is supplied: engine callers in NeoForge pass null. The server's 4096-slot positional cache stores the final static classification, including Open, until a matching block-updated notification or slot collision. It survives time, reload and chunk lifetime. Ordinary writes clear only on actual change with UPDATE_CLIENTS and full status at least BLOCK_TICKING; direct block-entity notifications clear even unchanged state. Neighbour and mob-specific adjustments run afterwards, outside that cache. Diverges from upstream: new hook.
  • block_render_visibility

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Hides a block state from the mesher: set event.hidden and the state draws nothing, as if its blocks were air. Its neighbours' faces toward it show, it no longer hides what is behind it, and its fluid layer and block entity are not drawn; light, collision and the server are untouched. The answer depends on the state alone and is resolved at mesh time, never per frame: the game asks once for every state when the client joins a world, and again for every state each time a mod calls ClientHost::refresh_render_visibility (a toggle, an ore scanner). Attach the part to vanilla blocks with block_part_tag. With no mod answering, the mesher pays nothing.
  • block_signal

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    The redstone signal the block state at pos gives on its face, the side that touches the block reading it: BlockState.getDirectSignal when direct (what passes through a block it touches, as a lever's does), else getSignal. signal holds vanilla's answer: change it when the block is yours (0 to 15; anything else is clamped). Asked very often, from inside the level's update, so answer from your own state: check the block first, and don't read or change the world here. When the answer changes, and once the block is placed, call level.update_neighbors(host, pos, state, NeighbourUpdate::Neighbours). Authoritative servers only.
  • block_speed_factor

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    The speed factor of a block state this part is attached to (Block.getSpeedFactor, which Entity.getBlockSpeedFactor reads for the player, mobs, boats and minecarts where vanilla reads it) is being read; vanilla's values are 0.4 for honey and soul sand and 1.0 for the rest. A part may change factor (event.factor). The entity reads the block at its feet and, when that is not water or a bubble column and gives 1.0, the block below it, so a changed factor takes part in that choice exactly as the block's own would. It runs for each read, on both sides and on the client's replayed ticks, so register the mod on both and keep the listener a pure function of its inputs. It is given the loop context of the side that ticks the entity, and takes no Host. NeoForge's counterpart Block.getSpeedFactor() is a method of the block, with no bus event, so this is a part method only; a mod reacting to its own blocks uses this part. Diverges from upstream: new hook.
  • bounce_on

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    —
    Summary
    An entity bounced off a block state this part is attached to (Block.bounceOn). event.fall_distance is the distance stored after fall handling, so a grounded boat can report zero. It fires only when the entity bounced, just before vanilla sets its movement. event.movement is the movement the bounce leaves it (x, y, z): change it to change what the entity keeps. It runs inside the entity's move, on the level random host: it reads blocks and draws the level's random in vanilla's order, but writes nothing. Runs on the server for players, mobs and other bodies that bounce in the base move.
  • bounce_restitution

    Side
    both
    Contract
    collect
    Host / context
    LevelSide
    NeoForge
    IBlockExtension.getBounceRestitution
    Summary
    A simulating entity's downward block collision asks for the contacted state's restitution (IBlockExtension.getBounceRestitution, through IEntityExtension.getBlockBounciness). event.state and event.pos are the pair selected by Entity.move at getOnPosLegacy. That position uses the supporting block's column but need not be the supporting cell. event.entity is the entity's id and event.kind is its type.
  • break_progress_positions

    Side
    client
    Contract
    collect
    Host / context
    &mut dyn ClientHost
    NeoForge
    —
    Summary
    When a crack is set or changes stage, supply additional positions drawn at that same stage. Only parts on the cracked state are called, for both the local player's predicted crack and other players' cracks. positions starts empty; the original pos is always drawn separately. Answers are stored with the crack, not requested during rendering, and disappear when the crack clears, expires or its client level closes.
  • can_be_connected_to

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.canBeConnectedTo
    Summary
    On an authoritative server, whether the block state at pos lets the fence, wall, or iron bars or pane connector beside it connect to it (IBlockExtension.canBeConnectedTo): the block being connected to answers, not the connecting one. kind names the connector's vanilla rule, direction points from the block toward the connector and face_solid is whether the block's face toward it is sturdy. Asked once the connector's vanilla rule answered, each time the connector is placed or settles its shape toward the block. Some(true) connects, Some(false) refuses and None keeps vanilla's rule. The connector's own connects_to is asked after, starting from this answer, and has the last word. A panicking part is contained and vanilla's answer is used. The level is read-only. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • can_be_hydrated

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.canBeHydrated
    Summary
    Whether fluid at fluid_pos waters the farmland this part is attached to, the block state at pos (IBlockExtension.canBeHydrated): set hydrates to Some(true) or Some(false), or leave it None for vanilla's rule, a fluid in #minecraft:water. FarmlandBlock.randomTick scans the 9×2×9 box from pos (x and z from −4 to 4, y 0 and 1) and asks only where the fluid is not empty, in x, then y, then z order; the first position that hydrates ends the scan, and the farmland goes to moisture 7. A session water ticket waters the farmland without scanning. Asked on an authoritative server; the level is read-only. With no Part attached to the farmland, the scan is vanilla's.
  • can_drop_from_explosion

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.canDropFromExplosion
    Summary
    On an authoritative server, whether the block state at pos, destroyed by explosion, drops (IBlockExtension.canDropFromExplosion), asked where BlockBehaviour.onExplosionHit asks Block.dropFromExplosion. Some(false) skips what the drop runs: the block's spawnAfterBreak (an infested block's silverfish, an ore's experience) and its loot; Some(true) runs them, even for TNT; None keeps vanilla's answer, where only TNT drops nothing. The block is removed either way, and a TNT still primes (TntBlock.wasExploded is not part of the answer). A panicking part is contained and vanilla's answer is used. The level is read-only. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • can_entity_destroy

    Side
    server
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.canEntityDestroy
    Summary
    On an authoritative server, whether entity may destroy the block state at pos (IBlockExtension.canEntityDestroy), asked where vanilla asks its per-block rule: the wither's block break (WitherBoss.canDestroy: not #wither_immune), a dangerous wither skull's blast (the entity is the skull, readable during the blast; only a block it may destroy has its resistance capped at 0.8), the dragon's checkWalls (a #dragon_transparent block is skipped before the part is asked, and a #dragon_immune block stays even on a yes), a zombie's door breaking (asked as the goal starts) and the turtle-egg RemoveBlockGoal's target choice. Some(true) makes a block vanilla spares destroyable for that entity, Some(false) spares one it would break (the dragon is then in a wall), and None keeps vanilla's rule. The griefing gate (entity_mob_griefing) runs first, so with griefing off nothing breaks whatever the part says, and living_destroy_block can still keep a block the part allowed (the egg goal's target choice fires no such event). Ravager: griefing event only. A panicking part is contained and vanilla's rule is used. Asked every tick for each block in the dragon's head, neck and body: answer fast, from the inputs. The host is read-only. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • can_harvest_block

    Side
    both
    Contract
    collect
    Host / context
    HostSide
    NeoForge
    IBlockExtension.canHarvestBlock
    Summary
    Whether the player player's tool harvests the block state at pos (IBlockExtension.canHarvestBlock, what Player.hasCorrectToolForDrops asks of the block). can_harvest starts with vanilla's answer: false for a block that needs a tool the player's held item is not, true otherwise. Set it for your own block; false breaks the block and drops nothing, and the dig is slowed as vanilla slows a wrong tool. The part answers first and the global player_harvest_check hears the result, so a mod reacting to every block still has the last word. Asked wherever the harvest rule is: the dig's progress (both sides, so a client predicts it), the break and a door's break.
  • can_place_liquid

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    LiquidBlockContainer.canPlaceLiquid: may the block at pos take fluid? The first answering BlockPart returns Some(true) to accept as a container on any template, or Some(false) to refuse as a container. None leaves it to the next part, then to the template. A bucket may still replace a replaceable block, or try the block beside the hit.
  • can_stick_to

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.canStickTo
    Summary
    Whether the block state this part is attached to sticks to other, the state beside it (IBlockExtension.canStickTo): set sticks to decide. sticks starts with vanilla's answer: false for honey beside slime (as is_slime_block tells slime), otherwise true when either state is sticky (is_sticky_block). Two blocks stick when each says it sticks to the other, as PistonStructureResolver asks (NeoForge's canStickToEachOther), so a part that answers false for one neighbour is enough to let go of it and a part cannot make a block stick to one that refuses. The pair is asked from both sides, and the other block's part, if it has one, answers its own side. Asked on an authoritative server while a piston resolves its structure: answer from the two states, without touching the world. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • can_survive

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    BlockState.canSurvive for state at pos (BlockBehaviour.canSurvive), before the block answers it: as it is placed (BlockItem.canPlace), from a shape update of a block whose template checks it (a plant, a torch, a sign: false breaks the block with its drops), and wherever else vanilla asks. state may not be in the world yet, so decide from state. Answer only for your own blocks: Some(false) refuses the spot, Some(true) allows it, and the block's own rule doesn't run. The level is read-only. Asked on every shape update of such a block: keep it short. Asked on both sides, as vanilla asks it: a client asks it from its placement prediction and its own shape updates, with its loaded copy of the level (match LevelSide). Reads a client can't answer, tag tests among them, are None there, and BlockEntityPartState::state_in gives its default: never answer from those as if they were the server's. Answer None on a client where only a server can decide: the template's rule then predicts, and the server still decides. Version 2 is catalog metadata; rebuild for the LevelSide signature. A disabled owner's subscribed rule keeps that block type where it is already present or settling after a piston move or fall, but refuses a new placement.
  • can_sustain_plant

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    IBlockExtension.canSustainPlant
    Summary
    IBlockExtension.canSustainPlant for the soil ground at ground_pos and the plant state above it, asked before the plant answers its own mayPlaceOn (may_place_on) wherever vanilla's plant rule reads its ground: when the plant is placed, from its shape update and wherever else vanilla asks. Some(true) lets the plant stand there, Some(false) refuses it (a planted one pops off when its ground changes to this block), and left None the plant's own may_place_on answers, as vanilla's does. Answer only for your own soil. The level is read-only. Runs on every shape update of a plant over a part's block: keep it short. Asked on both sides, as vanilla asks it: a client asks it from its placement prediction and its own shape updates, with its loaded copy of the level (match LevelSide). Reads a client can't answer, tag tests among them, are None there, and BlockEntityPartState::state_in gives its default: never answer from those as if they were the server's. Answer None on a client where only a server can decide: the template's rule then predicts, and the server still decides. Version 2 is catalog metadata; rebuild for the LevelSide signature. A disabled owner's subscribed soil rule supports plants of this type already above it or settling there, but does not authorize a new planting.
  • clone_item_stack

    Side
    server
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.getCloneItemStack
    Summary
    IBlockExtension.getCloneItemStack, asked by ServerGamePacketListenerImpl.handlePickItemFromBlock on the server. player is the requesting player, available for reads through the Host. include_data is true for a creative player picking with Ctrl. The request carries no client hit face. Leave stack unset to keep the game's item. Creative breaking, such as a beehive's playerWillDestroy, does not ask this query.
  • collision_shape

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    The collision shape of the block state state at pos is being read for the collision query query (vanilla's BlockBehaviour.getCollisionShape(state, level, pos, context)), by an entity's move, a placement check or a projectile's path. query is vanilla's EntityCollisionContext, captured when the query was made: the entity's id and class, descending, placement, always-fluid, the main-hand item, and is_above. shape starts as None, which keeps the shape the block would otherwise have (its declared one, a context-keyed one, or the one its block entity published); a part that answers Some(boxes) replaces it for this query, as block-local [min_x, min_y, min_z, max_x, max_y, max_z] boxes. An answer with more than 64 boxes, a box that is not finite or has a minimum above its maximum is refused. A part that is refused, panics or traps keeps the normal shape, the block's collision_shape parts, those of every mod that attaches one to it, are disabled for the session and the game logs it once, naming the block and its mods. It is asked only for blocks with a part that answers it, on the thread that ticks the entity, once for each distinct question (state, position, entity and the rest of the query) in a tick: a step-up retry or a second sweep reads the first answer. Fluid passage and face-support checks never ask. It is given the loop context of the side that ticks the entity and takes no Host: the part answers from query and the state it keeps itself, keyed by the entity's id and synced to the client, which asks the same question for its own prediction. A collision query made inside the callback gets the empty-context answer, never a nested call. Diverges from upstream: new hook.
  • connects_to

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    Whether a fence, wall, or iron bars or pane of yours connects a side: set connected to say whether the block state at pos connects toward neighbour, the state beside it, direction pointing from the block to that neighbour and face_solid whether the neighbour's face toward the block is sturdy. kind names vanilla's rule, and connected holds its answer: ConnectionKind::Fence is FenceBlock.connectsTo (a solid face, a fence of the same kind or a gate across the arm), Wall is WallBlock.connectsTo (a wall, a solid face, iron bars or a pane, or a gate across the side; a connected side is still low or tall from the block above) and Bars is IronBarsBlock.attachsTo for iron bars and glass panes (a solid face, bars or a pane, or a wall; vanilla's rule ignores direction). Change it, to false as well as to true, when the block is your own. The neighbour's part answers first, in can_be_connected_to, and connected starts from its answer: this hook has the last word. Asked whenever the block settles its shape toward a side or is placed, inside the level's update: answer from the arguments without touching the world. Only the block's own part is asked, so vanilla blocks cost nothing. Authoritative servers only. Contract version 2: version 1 was fence_connects_to, for fences alone and without kind. Diverges from upstream: new hook.
  • contents_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server-only, non-cancellable backing-block notice at Container.setChanged / BlockEntity.setChanged, after the write and before dirty/comparator updates. Default ITEMS and item STORAGE handlers coalesce implicit notices per backing block at root commit, for vanilla containers and engine-managed mod slots. During menu_quick_move, implicit notices publish only after a committed move settles its source slot (including when the source is emptied), and never after an unhandled or refused move. If the original backing container was removed or replaced, neither its replacement nor watchers receive the deferred notice. Explicit set_changed notifies immediately, even for equal contents and inside a transaction; the notice survives abort. Direct set_item_slot, writes to storage a mod provides itself, and rollback restores synthesize no notice. Nested writes to the backing block whose notice is active still apply, with dirty/comparator updates, but do not re-enter or queue a second notice for that block. Another block notifies normally. Double containers notify each backing component, not the other half merely refreshed for comparators. Vehicle/menu placeholder coordinates are excluded. The source level, pos and state always name the changed backing block. observer is None for its own Parts, or Some for Parts of a block entity watching that source through watch_contents. Source Parts run first, then a snapshot of observers in registration order; a stale observer is skipped. A self-watch never duplicates the source callback. Registration changes affect the next notice. Replaces the Create port positional contents_changed mixin for depot, package and schematic storage; there is no matching NeoForge bus event. Each Part runs in the existing storage journal. A panic discards that Part's tentative writes (including successful nested transactions), not the backing change that raised the notice or another Part's writes.
  • dispense_method

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    DispenserBlock.getDispenseMethod, before the item's dispense_item: the block the dispenser faces chooses what the dispense does, for any item, including vanilla items, on the authoritative server (not droppers). state is the block at pos moved by facing (air included), and the part is asked only for that block. An answer wins: no item part is asked and vanilla's behaviour doesn't run. The answer is dispense_item's: a remainder of None empties the slot, Some(stack) replaces it (the hook owns consumption: no extra item is removed afterwards), and event is the level event played with the smoke: 1000 the click, 1001 the fail sound, or 0 for no sound or smoke. Leave answer None and dispense_item decides. In an open transaction in the dispenser's level, sound and smoke follow the behaviour's published effects at the outermost commit and are discarded on abort. The remainder is detached until the dispenser writes its slot. An invalid remainder is reported without writing or notifying the slot, and no other behaviour runs. A disabled owner's subscribed method skips the slot write and dispense events unless an earlier enabled Part supplies a reply the engine accepts.
  • enchant_power_bonus

    Side
    both
    Contract
    collect
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.getEnchantPowerBonus, IBlockStateExtension.getEnchantPowerBonus
    Summary
    The enchanting power the supplied state at pos gives the table at table_pos (IBlockExtension.getEnchantPowerBonus). power starts at 1.0 for a block in #minecraft:enchantment_power_provider, 0.0 otherwise. Explicit reads return the answer unchanged; offers and particle sampling ignore a non-finite override.
  • entity_inside

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    —
    Summary
    An entity's block sweep crossed a block state this part is attached to (Block.entityInside), and the part is told mid-sweep, where vanilla runs the block's own entityInside. event.precise is Entity.checkInsideBlocks' flag: the entity moved nearly a block, or its box at the target touches the block. It runs inside the entity's move, on the level random host: it reads blocks and draws the level's random in vanilla's order, interleaved with the vanilla blocks the same walk visits; only writes are restricted to the event. event.apply queues one of the five InsideBlockEffectTypes, event.run_before/event.run_after queue a typed entity write around one, and event.request asks for a level write that lands at the touched block once the entity's batch has ticked, if the block is still the state it touched — the same contract as a landing write, whose complete batch is checked before queuing and an invalid state refuses all writes and sibling outputs. The queued entity writes apply to the swept entity inside its own tick, in StepBasedCollector order, and stop when it dies. EntityWrite::Hurt { damage_type, amount } deals the registered type in the level without a causing or direct entity. Fires for players, mobs, items and projectiles alike, each on the shared walk inside its own tick or batch. Inside hurt writes apply to players, mobs and dropped items. Armor stands, projectiles and vehicles ignore contact hurt; experience orbs accept hurt only from step_on.
  • exp_drop

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.getExpDrop
    Summary
    Experience before enchantments (IBlockExtension.getExpDrop). First answer replaces vanilla sampling; the global break_block event may override it. Negative answers are clamped to 0; positive values are awarded as given. A panic unwinds before the answer is applied.
  • explosion_resistance

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.getExplosionResistance
    Summary
    On an authoritative server, the explosion resistance of the block state at pos against explosion (IBlockExtension.getExplosionResistance), asked as a ray of the blast enters the block (ExplosionDamageCalculator.getBlockExplosionResistance). The answer replaces only the block's own value (BlockProperties.explosion_resistance); a fluid in the cell still raises it to the fluid's 100. What vanilla applies after the block's value keeps winning: a respawn anchor's water cell, a TNT minecart's rails and the blocks under them (never asked) and a dangerous wither skull's 0.8 cap. A negative or non-finite answer is refused and the block's own value is used; a panicking part is contained and the block's own value is used. A ray asks once per block it enters, so keep the answer a pure function of the inputs. The level is read-only. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • fall_on

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    LivingFallEvent
    Summary
    An entity landed on a block state this part is attached to (Block.fallOn), after falling event.distance blocks. Writable event.distance and event.damage_multiplier feed the fall calculation before hurt and sounds. The multiplier starts at the block's vanilla value (normally 1.0). Damage is floor((distance + 1e-6 - safe_fall_distance) * damage_multiplier * fall_damage_multiplier_attribute), with safe fall distance 3 by default. Halving distance is not halving damage. Zero multiplier or a distance within the safe fall prevents damage and generic fall sounds. An entity that cannot be hurt by the fall (creative, fall immune) is told with zero multiplier and keeps its immunity, and a cancelled fall still lands. It runs inside the entity's move, on the level random host: it reads blocks and draws the level's random in vanilla's order, and cannot write. A write the override makes (farmland turning to dirt, a turtle egg breaking) is asked with event.request(LandingWrite::SetBlock(state)) or LandingWrite::DestroyBlock { drop } and lands at the block the entity landed on once the entity's batch has ticked, in the order asked, if the block is still the state it landed on. SetBlock takes an API BlockState. The complete requested batch is checked before queuing: an invalid key or ordinal refuses all writes and sibling outputs from that callback, including distance and multiplier. The original landed-state guard is checked once per batch, not between its ordered writes. Players, mobs and dropped items land here (an item as an EntityRef of kind minecraft:item, with zero multiplier: items take none); projectiles and the other entities do not.
  • falling_tick

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    IFallableExtension.fallingTick
    Summary
    A falling block of state ticked and is still in the air (IFallableExtension.fallingTick): entity is the falling block, and pos the block it is in (Entity.blockPosition) after its move. Heard once for each tick that ends with it still falling, not in the tick it lands, drops as an item or is removed (that is Fallable.onLand's moment). The part can write to the level and, through entity, to the falling block: its velocity, its position. The tick is recorded as it ends and delivered once the level's falling blocks, primed TNT and orbs have ticked in this pass, so a write lands on the stored falling block; a falling block gone by then is skipped. Diverges from NeoForge: server only, where NeoForge also calls it on the client. Only a state a part listens to is recorded; with no such part, one table lookup per falling block per tick. Diverges from upstream: new hook.
  • fence_gate_in_wall

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    Whether state, the neighbour of a fence gate, counts as a wall for that gate's in_wall property (FenceGateBlock.isWall). Asked of the neighbour's block part, on placement and horizontal shape updates on both sides. Some(true) lowers the gate, Some(false) rejects this neighbour, and None keeps vanilla's minecraft:walls tag check. This does not change wall connections or pathfinding. Answer from the state alone; the host is read-only.
  • fire_odds

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    IBlockExtension.getFlammability, IBlockExtension.getFireSpreadSpeed, IBlockExtension.isFlammable
    Summary
    How fire treats the block state at pos on either side (FireBlock.setFlammable(block, igniteOdds, burnOdds)). The client reads ignite odds for placement and shape prediction; only the server burns blocks. From the block's side face, the one facing the fire or the air fire may take, put (ignite, burn) in odds for your own blocks, and vanilla's table isn't read. Ignite odds above zero let fire stand beside the block and spread into the air around it (planks 5, wool 30, leaves 30); burn odds are how fast fire destroys it (planks 20, wool 60, leaves 60). (0, 0) never burns, and a face with ignite odds of zero isn't flammable. Negative answers become zero; burn odds cap at 300 (horizontal rolls are 300, vertical rolls 250), and spread speed uses saturating arithmetic. A waterlogged state never burns and isn't asked. Answer only for your own blocks and leave odds empty otherwise; the level is read-only. Asked hundreds of times per fire tick: keep it short.
  • friction

    Side
    both
    Contract
    listen
    Host / context
    LevelSide
    NeoForge
    IBlockExtension.getFriction
    Summary
    The friction of state at pos (IBlockExtension.getFriction), for an optional entity (its id and type). The state need not occupy that position. The read-only level host reads the side that made the query: blocks, states, light, fluids, weather, enabled features, tags and resident block entities, as the other level hosts do, without loading chunks. It has no container, shape or signal view and answers None for those. Block-entity handles are the side's own: a client's is not the server's, so answer from state both sides hold. Set event.friction to answer; it starts at the state's own coefficient. Any finite answer is used as given, as vanilla uses what getFriction returns; a non-finite one keeps that coefficient. Runs on both sides, including during client replay. Keep the answer a pure function of the event and the level reads.
  • has_analog_output

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    BlockState.hasAnalogOutputSignal: set output for a block of yours that comparators read (how full or far along it is, as a composter's level), so they ask analog_output. Asked from inside the level's update: answer from state alone. Authoritative servers only.
  • ignited_by_lava

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.ignitedByLava
    Summary
    On an authoritative server, whether lava sets fire beside the block state at pos (LavaFluid.isFlammable, the only reader of BlockStateBase.ignitedByLava), asked from its side face, the one that faces the air the fire would take, as lava's random tick looks for something to light. Some(true) lets lava light it, Some(false) refuses it, and left None the block's own flag answers, as vanilla's does (planks, wool and leaves yes; stone no). Answer only for your own blocks. The level is read-only.
  • is_bonemeal_success

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn LevelRandomHost
    NeoForge
    —
    Summary
    BonemealableBlock.isBonemealSuccess for a block that answered is_valid_bonemeal_target, after it did: set success to grow it this time. Vanilla draws the level's random here (isBonemealSuccess(Level, RandomSource, BlockPos, BlockState)). Use host.with_random(|rng| rng.next_int_bound(bound)) to draw from that live stream in vanilla's order. Authoritative servers only.
  • is_fertile

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.isFertile
    Summary
    Whether the soil this part is attached to, the block state at pos under a growing crop, counts as moist (IBlockExtension.isFertile): set fertile to decide. fertile starts with vanilla's answer, moisture > 0. CropBlock.getGrowthSpeed asks it for each of the 3×3 blocks under a crop, stem or pitcher crop on its random tick, but only for a block in #minecraft:grows_crops: a fertile one adds 3 to the speed, any other tagged block 1 (a quarter of that off-centre), so a block outside the tag is never asked. Asked on an authoritative server; the level is read-only. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • is_fire_source

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.isFireSource
    Summary
    On an authoritative server, whether the block state at pos, under a fire, keeps that fire burning (FireBlock.tick's check of the dimension's infiniburn tag), asked on every tick of the fire above it: Some(true) makes the fire endless, as netherrack does in the overworld (rain doesn't put it out and it never burns out), and Some(false) refuses a block the tag lists. Left None, the dimension's tag answers. Asked only for the block under a fire, so its side is always the top. Answer only for your own blocks. The level is read-only.
  • is_ladder

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    IBlockExtension.isLadder
    Summary
    Whether a living entity climbs the block state this part is attached to (IBlockExtension.isLadder, which LivingEntity.onClimbable asks of the block the entity stands in). entity is the climber's id and pos the block it stands in; state is that block's state. ladder starts with vanilla's answer, whether the block is in #minecraft:climbable, and a part may set either value: true makes the block climbable as a ladder is, false refuses it though the tag lists it. A gliding entity (isFallFlying) in a #minecraft:can_glide_through block, a spectator and a player who is flying are never asked, as vanilla never climbs for them, and an open trapdoor over a ladder climbs as before. Read for the player, the mobs, and the climbing a mod reads through LivingRef::is_climbing. It fires on both sides and on the client's replayed ticks, so register the mod on both and keep the listener a pure function of its inputs. It is given the loop context of the side that ticks the entity, and takes no Host. With no part attached to the state, the owning game checks the hook subscription and prepared API block key before any event conversion, so the cost is one table lookup. Armor stands never ask it. Diverges from upstream: new hook.
  • is_pathfindable

    Side
    server
    Contract
    collect
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Changes whether a path of a PathComputationType (Land, Water or Air) may go through a block state. event.pathfindable starts with the block's own answer. The answer depends on the state and the type alone: the game asks once per state and type when parts resolve, at world load and on every /reload, so path finding and spawning read the stored answer and a part cannot answer from a position, level or time. The state's PathType follows the Land answer as vanilla's does, unless the block has a type of its own (air, doors, fences, leaves, rails...): Blocked when it is no, else Water for a water state, else Open. block_path_type is asked after it.
  • is_possible_to_respawn_in

    Side
    server
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Whether a player can respawn inside state at a forced spawn point (Block.isPossibleToRespawnInThis). The server asks for the saved point and the block above it when no applicable bed or anchor rule handles the spawn, including when a bed or anchor cannot set spawn here. Some(true) accepts the space, Some(false) refuses it, and None keeps the block's vanilla predicate. The state alone determines the answer; the host is read-only. This does not choose a bed or anchor's stand-up position (see respawn_position).
  • is_signal_source

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    BlockState.isSignalSource: set source for a block of yours that gives a signal, so redstone wire beside it connects to it. Authoritative servers only.
  • is_slime_block

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.isSlimeBlock
    Summary
    Whether the block state this part is attached to counts as a slime block to a piston (IBlockExtension.isSlimeBlock, which PistonStructureResolver asks wherever it tells slime from honey): set slime to decide. slime starts with vanilla's answer, true for minecraft:slime_block only. The structure resolver reads it for the one pair that never sticks, slime beside honey, so a block answering true is held apart from honey as slime is; stickiness itself is is_sticky_block's. Asked on an authoritative server while a piston resolves its structure: answer from the state, without touching the world. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • is_sticky_block

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.isStickyBlock
    Summary
    Whether the block state this part is attached to is sticky to a piston (IBlockExtension.isStickyBlock): set sticky to decide. sticky starts with vanilla's answer, true for minecraft:slime_block and minecraft:honey_block. A sticky block pulls along the blocks beside it that can_stick_to lets it hold, so a piston moving one drags its neighbours, and a structure of them moves as one (still at most twelve blocks). A block that is not sticky still moves with a sticky neighbour that holds on to it, because sticking needs one sticky side. Asked on an authoritative server while a piston resolves its structure: answer from the state, without touching the world. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • is_valid_bonemeal_target

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    A block nothing in Sunrise knows a BonemealableBlock for is about to take bone meal: vanilla's BonemealableBlock.isValidBonemealTarget, state the block's own state at pos. Answer valid for your own blocks: the meal is used up on one as vanilla uses it up (the growth particles and the sound follow, whether or not the roll below grows it), from a player's BoneMealItem.useOn, from a dispenser and, on a crop (a villager bonemeals only a CropBlock), from a villager. Asked on both sides, as vanilla asks it on both, so a client predicts the use with your answer: say no where you can only grow on a server (match LevelSide). Some(false) refuses the meal, even on a block whose template takes it (vanilla's growCrop then keeps the meal); left None, the block keeps the BonemealableBlock its template gives it, or takes no bone meal. A disabled owner's subscribed Part refuses bone meal.
  • item_after_vertical_collision

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    —
    Summary
    native_item_after_vertical_collision lends a dropped item's active stack after vertical collision response, before block effects, merging and pickup. The block is the one selected by the legacy on-position query. client identifies prediction. Set discard (trait Flow::Cancel) or set the stack to None to consume the item without loot or pickup. A movement skipped by the normal item tick sends no notification. Bundles need "hooks": @API:item_after_vertical_collision@.
  • light_emission

    Side
    both
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.getLightEmission, IBlockStateExtension.getLightEmission
    Summary
    The light the block state emits at pos in dimension (IBlockExtension.getLightEmission), for a block that declares dynamic_light: true. The declaration is per block, not per state as hasDynamicLightEmission is, because it lives on the block's row: every state of a declared block is asked, and parts on other blocks are never asked, at any moment (NeoForge asks on a block change and a queued check whether or not the block declares). emission starts empty: set Some(level) to replace the state's own light at that position, or leave it empty to keep it. LevelRef::get_light_emission can explicitly query a candidate state that is not the state at pos. Treat state as the emitter and use the named dimension and position for context. Explicit reads return the raw value; only publication to the light queue clamps an answer above 15. Asked only on the thread that owns the level, both sides, with that level read-only, as a chunk holding the block comes in, as an edit sets it and at LevelRef::check_light (LevelLightEngine.checkBlock); the light engine keeps the answer until the cell's state changes or the chunk unloads, its workers read only that answer, and it never asks on its own: an answer that reads more than the state (the block below, the depth) calls check_light when that changes. A client also asks its own parts again, at most once per cell, for the sections a server's light update changed: a Sunrise addition, as the contract asks on no light packet, for an answer that reads data the client receives later. Not asked for the block's own rendered light, ambient occlusion or the spawn rule, which take the state's light. The game may ask more often than the contract does, so keep the answer a pure function of the level, pos and state. Diverges from upstream: new hook.
  • makes_open_trapdoor_above_climbable

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    IBlockExtension.makesOpenTrapdoorAboveClimbable
    Summary
    Whether an open trapdoor above the block state this part is attached to climbs like a ladder (IBlockExtension.makesOpenTrapdoorAboveClimbable, which LivingEntity.onClimbable asks of the block under the open trapdoor a living entity stands in). state is that block's state and pos its position; trapdoor is the open trapdoor's state above it. climbable starts with vanilla's answer, true for a minecraft:ladder facing the trapdoor's way, and a part may set either value. Asked only once the trapdoor itself was not a ladder (is_ladder and the #minecraft:climbable tag), so it never makes a block that is a ladder stop climbing. A gliding entity in a #minecraft:can_glide_through block, a spectator and a player who is flying are never asked. Read for the player, the mobs, and the climbing a mod reads through LivingRef::is_climbing. It fires on both sides and on the client's replayed ticks, so register the mod on both and keep the listener a pure function of its inputs. It is given the loop context of the side that ticks the entity, and takes no Host. With no part attached to the state below, the owning game checks the hook subscription and prepared API block key before any event conversion, so the cost is one table lookup. Armor stands never ask it. Diverges from upstream: new hook.
  • may_place_on

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    IBlockExtension.canSustainPlant
    Summary
    VegetationBlock.mayPlaceOn for the plant state on ground at ground_pos. The plant inherits vegetation rules from its template or opts into them in its block declaration. Only when the soil's can_sustain_plant leaves the decision to the plant does this method answer what it can stand on. Answer only for your own blocks. The level is read-only. Asked on both sides, as vanilla asks it: a client asks it from its placement prediction and its own shape updates, with its loaded copy of the level (match LevelSide). Reads a client can't answer, tag tests among them, are None there, and BlockEntityPartState::state_in gives its default: never answer from those as if they were the server's. Answer None on a client where only a server can decide: the plant's default rule then predicts, and the server still decides. Version 2 is catalog metadata; rebuild for the LevelSide signature. A disabled owner's subscribed rule preserves a plant of this type already at the position or settling there, but does not authorize a new planting.
  • minecart_pass

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A minecart passed over a rail block state this part is attached to (the moment AbstractMinecart calls activateMinecart on an activator rail, for every rail; Forge's IBaseRailExtension.onMinecartPass, which NeoForge 26.3 no longer has, so this hook has no counterpart). event.entity is the cart, event.pos the rail. With the old minecart physics it fires once per tick the cart is on a rail; with minecart_improvements once per track iteration, so a fast cart can pass several times in a tick. It fires after the cart's batch has ticked, not mid-move, so a write the part makes (a velocity change through the cart handle) lands on the stored cart, and a pass whose cart is gone or whose rail changed is dropped. Only a rail state a part listens for is recorded; with no such part nothing is kept. Diverges from upstream: new hook.
  • neighbor_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn LevelWriteHost
    NeoForge
    —
    Summary
    An authoritative server is about to deliver neighborChanged. State and block IDs are valid in this level's registries for this call. The host is the level writer vanilla's neighborChanged gets: a part may read its inputs (signal, has_neighbor_signal), schedule its tick, as a diode does (DiodeBlock.checkTickOnNeighbor), and set blocks, as RedstoneLampBlock lights itself at once (level.setBlock(pos, state.cycle(LIT), 2)). A write's own neighbour updates run next, before the rest of the update that delivered this call (CollectingNeighborUpdater), as Level.setBlock from inside neighborChanged runs them. The block's own handling then runs with the state it was called with.
  • on_block_exploded

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    IBlockExtension.onBlockExploded
    Summary
    An explosion destroys this block, before removal and while its live block entity is readable. Writes are allowed; the engine still replaces the cell with air afterwards, including a replacement written by the part.
  • on_block_state_change

    Side
    both
    Contract
    listen
    Host / context
    LevelSide
    NeoForge
    IBlockExtension.onBlockStateChange
    Summary
    A write through Level.setBlock held and the block at pos changed from old to new (IBlockExtension.onBlockStateChange), heard at the end of the write, where vanilla runs updatePOIOnBlockStateChange: after the block-entity removal, on_place, the client update, the neighbour updates and the neighbours' shape updates. The parts of old's block hear it, then, when the block changed, the parts of new's block; state is the state whose block's parts are asked. A write that on_place replaced with another block is not heard; the write that replaced it is. Heard on both sides: a server's writes, a client's replay of a piston's move and the blocks a client takes from the server (LevelSide names which). Applied local predictions are heard at once with predicted: true; server writes, settled corrections and all server-side writes have predicted: false. A held server update is unheard until acknowledgement; a confirmed prediction is not heard twice, and a denial hears predicted-to-server once. Equal-state writes and unapplied guesses are not heard. The level is read-only. A panicking part is contained. With no listener, one flag check builds nothing. Diverges from upstream: new hook.
  • on_caught_fire

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn LevelWriteHost
    NeoForge
    IBlockExtension.onCaughtFire
    Summary
    On an authoritative server, a neighbour of fire passed its burn roll. state is still at pos; face points toward the fire. The spread, burn and (when replacing with fire) ignite cancel gates run first. The listener may write or schedule ticks, but the pending fire/air replacement overwrites any write at pos, then TNT is primed. Fire spread has no igniter and an empty stack, so neither is passed. Lava, lightning, spread into air, flint and steel, TNT use, burning projectiles, redstone and dispensers are outside this spread-only hook.
  • on_destroyed_by_player

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    IBlockExtension.onDestroyedByPlayer
    Summary
    A player removes the block state at pos (IBlockExtension.onDestroyedByPlayer, where ServerPlayerGameMode.destroyBlock runs playerWillDestroy and removes the block), with tool, the stack in the player's hand (None for a bare hand), and will_harvest, whether the break will drop loot as far as the tool goes (never in creative, and false for a tool the block refuses). Asked after break_block allowed the break, before anything of the break changes the world. will_harvest is the tool's own answer; the mods' harvest listeners (can_harvest_block, then player_harvest_check) are asked once, after the removal, of the adjusted state and the stack in the hand then, as vanilla reads hasCorrectToolForDrops. destroyed is whether the block was actually destroyed: Some(true) says the part removed it itself, Some(false) that it stays (a block of layers losing one layer: change it with the host and leave it standing), and either answer replaces the game's own playerWillDestroy (a pot's cracking, piglin anger, a tripwire's disarming, a creative shulker box's or beehive's drop) and removal. Some(false) ends the break there: no drops, tool wear or statistic. Left None, vanilla's removal runs. Server-side, for every player of the world; the first part answering wins. Asked of the block's own parts only, so a block with none costs nothing.
  • on_destroyed_by_push_reaction

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn LevelWriteHost
    NeoForge
    IBlockExtension.onDestroyedByPushReaction
    Summary
    On an authoritative server, a piston's move destroys the block state at pos (IBlockExtension.onDestroyedByPushReaction), direction the way the blocks move and fluid the fluid state the cell holds. It is heard in PistonBaseBlock.moveBlocks after the block dropped its resources and while it is still in its cell, before the cell becomes air. The removal still happens: a write to pos is overwritten, and so is a write to any other cell of the move (the other destroyed cells, the pushed blocks and the cells they move into, the arm), since the pushed blocks were read before the destroy loop. Writes elsewhere stay; ticks is the move's, so scheduled ticks stay too. A cancelled move (piston_pre) and a client's replay of the move are not heard. A panicking part is contained. With no part attached to the state, the cost is one table lookup per destroyed block. Diverges from upstream: new hook; the removal is not replaceable here.
  • on_neighbor_change

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.onNeighborChange
    Summary
    A neighbouring block entity changed, was created or removed. Vanilla comparator processing runs first.
  • on_tree_grow

    Side
    server
    Contract
    replace
    Host / context
    &dyn WorldgenHost
    NeoForge
    IBlockExtension.onTreeGrow
    Summary
    A trunk placer is about to place the block under its trunk at pos, where the soil state this part is attached to stands (IBlockExtension.onTreeGrow, asked from TrunkPlacer.placeBelowTrunkBlock). Answer Some(Some(state)) to place state there through the tree's trunk setter, Some(None) to place nothing, or None to leave it to the tree's below_trunk_provider (vanilla's trees place dirt unless the soil is in #minecraft:cannot_replace_below_tree_trunk). A part that answers skips the provider and its draws. Asked once per trunk, four times for the 2×2 trunks (giant, mega jungle, dark oak). Draw only from event.random, the tree's own: your draws fall between the tree's, in call order. Server-side, on the worldgen worker threads and on the server thread when a sapling grows, with the server's worldgen context: no Host, no writes. NeoForge's feature argument is left out: an inline tree feature has no key. Diverges from upstream: new hook. A disabled owner's subscribed Part keeps the soil unchanged; the rest of the tree still grows.
  • perform_bonemeal

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn LevelWriteHost
    NeoForge
    —
    Summary
    BonemealableBlock.performBonemeal for a block that answered is_valid_bonemeal_target and whose is_bonemeal_success said yes: grow it here, state its state at pos. The meal is used up either way. Change the block with the level's native_set_block_property, and schedule with native_schedule_block_tick (ticks is the hook's). Authoritative servers only.
  • piston_carries_block_entity

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    Whether a piston carries your block state at pos with its block entity: asked at the last step of PistonBaseBlock.isPushable, after the block's push reaction, for a block that is otherwise pushable, whenever a piston's structure takes the block in. Left None, vanilla's rule holds: a block with a block entity does not move, and any other block does. Some(false) keeps the block in place at that position. Some(true) lets a piston move it even with a block entity, which travels with the block: taken out of the world as the move starts, with its saved data and its attachments and without its removal side effects (nothing drops), and put where the block lands as a new block entity of that position, with a new ticker slot; a handle to the old position no longer resolves. If the moving block is replaced before it lands, the block entity is removed there as a broken block's is (a container drops its contents). A save mid-move keeps it in the moving piston's tag. A block entity, including a chest, moves only after its reaction permits movement and this hook answers true. While the block moves it draws as its state, without its block entity's drawing. Asked on both sides, as a client replays the move on its own copy: answer the same on both, from the arguments, without touching the world. Only attached block parts are asked; blocks without a subscribed part pay only the dispatch guards. A block that only needs to move or not, or to be popped or pushed only, is the push reaction's question, asked before this one. The order is reaction first, then this shared block-entity rule for push-pull, ignore-entity and push only; a wrong-direction push-only answer refuses before this hook. Popped destroys and drops without asking it. This hook is asked only for an otherwise-pushable block. A live owned payload is required: data-only or unmaterialized vanilla entities remain refused. Diverges from vanilla: push only never discards a block entity. NeoForge has no counterpart: its IBlockExtension.getRelocability is an unrelated region-copy query that pistons do not ask. Diverges from upstream: new hook.
  • piston_push_reaction

    Side
    both
    Contract
    replace
    Host / context
    —
    NeoForge
    IBlockExtension.getPistonPushReaction
    Summary
    Resolve a state's piston reaction at load and reload on both sides. None keeps the properties' reaction. Answers must depend only on state. Unbreakable blocks still refuse movement. The reaction is checked first; push-pull, ignore-entity and push only then reach the shared block-entity rule. An otherwise-pushable block with a block entity moves only when piston_carries_block_entity answers true, using the carry machinery to move its data and attachments without drops. No answer or false refuses the move. Popped remains destruction with ordinary drops, and never asks the carries hook. The carries hook is asked only for an otherwise-pushable block. Carrying also requires a live owned payload; raw-only or currently borrowed native payloads remain refused. Diverges from vanilla: push only never discards a block entity.
  • place_liquid

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn LevelWriteHost
    NeoForge
    —
    Summary
    LiquidBlockContainer.placeLiquid, before the template fills state at pos. A bucket supplies a source fluid; spreading supplies the state that would flow there. Live structure templates supply the displaced fluid or a neighbouring source, without asking can_place_liquid. The first Some(bool) replaces the template. Return true after storing the fluid and scheduling any tick it needs, or false when it was not placed. None leaves it to the next part, then to the template. A plain bucket still empties on false, unlike a validated fluid-container operation.
  • play_hit_sound

    Side
    client
    Contract
    cancel
    Host / context
    &mut dyn ClientHost
    NeoForge
    IClientBlockExtensions.playHitSound
    Summary
    Asked before a mining hit sound, including the initial hit, every fourth breaking tick, and the level-event route. Return Flow::Cancel when the part handled the sound through ClientHost and vanilla should stay silent. Otherwise vanilla plays the state's hit sound at (volume + 1) / 8 and pitch * 0.5. The position and face identify the current hit; sculk growth is outside this hook.
  • rail_can_make_slopes

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBaseRailBlockExtension.canMakeSlopes
    Summary
    Whether the rail state at pos may climb toward a raised rail beside it (IBaseRailBlockExtension.canMakeSlopes). can starts true, as for every vanilla rail; set false to keep it flat as it connects to its neighbours (RailState). Asked on an authoritative server as a rail is placed or a neighbour changes it: answer from the state and the position, without touching the world. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • rail_direction

    Side
    both
    Contract
    collect
    Host / context
    LevelSide
    NeoForge
    IBaseRailBlockExtension.getRailDirection
    Summary
    The track the rail state at pos lays for cart (IBaseRailBlockExtension.getRailDirection), so a switch track or a one-way rail can turn a cart differently from its stored shape. shape starts at the rail's shape property. cart is the minecart moving on it, or None when the rail asks for itself: as it connects to its neighbours (RailState) and as a minecart item is placed on it. The cart's movement asks wherever it reads the track under it. Asked on both sides, since a client predicts its own cart's motion: register the mod on both and answer the same on each, from the level host and the event alone. With no part attached to the state, the cost is one table lookup per rail read. Diverges from upstream: new hook.
  • rail_flexible

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBaseRailBlockExtension.isFlexibleRail
    Summary
    Whether the rail state at pos may make corners (IBaseRailBlockExtension.isFlexibleRail). flexible starts true for a plain rail and false for the straight ones (powered, detector, activator); set false to keep it straight at a junction. Asked on an authoritative server as the rail and its neighbours connect (RailState): answer from the state and the position, without touching the world. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • rail_valid_shape

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBaseRailBlockExtension.isValidRailShape
    Summary
    Whether the rail state may take shape (IBaseRailBlockExtension.isValidRailShape), asked as it connects to its neighbours (RailState) before the shape is written. valid starts true when the rail's shape property has that value; set false to refuse it, and the rail keeps its current shape. A part can't make valid a shape the property lacks. Asked on an authoritative server: answer from the state and the shape, without touching the world. With no part attached to the state, the cost is one table lookup. Diverges from upstream: new hook.
  • random_tick

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn LevelWriteHost
    NeoForge
    —
    Summary
    An authoritative server's ServerLevel.tickChunk is about to random-tick the block state at pos (BlockState.randomTick): only blocks that tick randomly, a mod's as its vanilla template block does. Bone meal's random ticks (StemBlock.performBonemeal) don't fire it. Change the block with native_set_block_property and set handled to skip the block's own random tick (a mod crop growing its own way); a block changed without handled takes its own random tick as it is now, if it still ticks randomly. Lava's fluid random tick runs either way. Its disabled owner's subscribed Part keeps the block inert instead of running the template tick.
  • remove_block

    Side
    server
    Contract
    replace
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    Choose the state left by removing your block. Return a state in answer to replace vanilla's fluid block (air when dry), or leave it unanswered. replacement is the state written when the listener leaves answer unanswered: the fluid's legacy block (air when dry, water for a waterlogged block). Only the removed block's Part is asked, on the authoritative server. The replacement must be a registered block state; an invalid answer is refused with a diagnostic and vanilla's replacement is written instead. The normal setBlock effects and flags 3 (+64 when moved by a piston) apply to the written state. The level is read-only during this call.
  • respawn_position

    Side
    server
    Contract
    collect
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.getRespawnPosition, IBlockStateExtension.getRespawnPosition
    Summary
    Where a player whose respawn point is the block state at pos stands up when they respawn there (IBlockExtension.getRespawnPosition), or that they can't respawn there. entity_type is the respawning entity's type, always minecraft:player, and orientation the yaw saved with the respawn point. position starts at vanilla's answer: a bed's or a charged respawn anchor's stand-up spot facing the block, a forced point's free column, or empty where vanilla finds no spot. Set Some((position, yaw, pitch)) to stand the player there, or None to send them to the world spawn with missing_respawn_block set. An answer with a non-finite value is ignored. An anchor still loses a charge only when the answer is a spot. Asked on the server as the respawn point is resolved, before player_respawn_position, which receives the answer as its original position and may still redirect it, and as a player leaves the End, which resolves the point the same way. A same-level End exit clamps the answer's pitch to -90..=90 when it teleports the player. The level is read-only. NeoForge asks only beds; this is asked for any block, so a mod block that is neither a bed nor an anchor can be a respawn point. With no part attached to the state, the game checks the hook subscription and the block key before any event conversion, so the cost is one table lookup per respawn. Diverges from upstream: new hook.
  • rotate

    Side
    server
    Contract
    collect
    Host / context
    &dyn WorldgenHost
    NeoForge
    IBlockExtension.rotate
    Summary
    A structure template is about to place the block state at pos turned by rotation (IBlockExtension.rotate, where vanilla runs state.mirror(mirror).rotate(rotation)): state is already mirrored, and rotated starts at the game's own answer (vanilla's table, or a mod block's template's). Set it to another state of the same block to place that instead. A state of another block, or one the game does not have, is refused and the game's answer kept. Asked for every block a template places: world generation's structures, /place template, the structure block and the jigsaw pieces that join them, and the template snapshots structure_template reads. Mirroring stays the game's. Server-side, on the worldgen worker threads and on the server thread, with the server's worldgen context: no Host, no writes; context.state_with_property builds states. A panicking part is contained and the game's answer kept. Diverges from upstream: new hook.
  • set_placed_by

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    Runs on the server once for the placed block, after vanilla's Block.setPlacedBy work and before ItemPart::on_block_placed_by for a block-item placement. state is the placed block's state, read before the game-level steps that can remove it (such as a wither pattern). stack is the original, read-only stack before consumption, or None if no stack was supplied. placer is None for a dispenser or for code placement. LevelRef::set_placed_by also reaches this part, without firing the item notice. Writes through the ServerHost participate in the current transaction, if one is open.
  • should_check_weak_power

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.shouldCheckWeakPower
    Summary
    IBlockExtension.shouldCheckWeakPower: set check to decide whether indirect power is read through this block. check starts with vanilla's conductor answer. direction is the input side of the block being powered, opposite the queried block's output side. Authoritative servers only.
  • should_display_fluid_overlay

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    IBlockExtension.shouldDisplayFluidOverlay
    Summary
    Whether a fluid's side beside a block state uses the fluid's overlay sprite (water's water_overlay) instead of its flowing sprite (IBlockExtension.shouldDisplayFluidOverlay): set event.overlay. overlay starts with vanilla's test, true beside a HalfTransparentBlock or LeavesBlock (for a content block, its template's class), so a part can turn the overlay on or off. event.fluid is the fluid as it is asked: a source at amount 8, or a flowing fluid at amount 7, not falling. A fluid with no overlay sprite, such as lava, draws its flowing sprite whatever the answer. The answer depends on the state and the fluid alone and is resolved at join or explicit visibility refresh, never on a meshing worker: the client asks once for every state and fluid where it resolves block_render_visibility (joining a world, ClientHost::refresh_render_visibility), and the meshing workers read the table. The level and position are dropped: the meshing workers run no mod code. With no part answering, nothing is asked and meshes are unchanged. Diverges from upstream: new hook.
  • should_hide_adjacent_fluid_face

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    IBlockExtension.shouldHideAdjacentFluidFace
    Summary
    Whether a block state hides the face a fluid beside it draws toward it (IBlockExtension.shouldHideAdjacentFluidFace): set event.hidden and the fluid's face toward the block is not drawn. event.direction points from the fluid to the block (Sunrise's reading, not checked), and event.fluid is the fluid as it is asked: a source at amount 8, or a flowing fluid at amount 7, not falling. hidden starts false. Vanilla's tests still apply first: a fluid beside the same fluid, or behind a face that occludes it, draws no face there whatever the answer. The answer depends on the state and the fluid alone and is resolved at join or explicit visibility refresh, never on a meshing worker: the client asks once for every state and fluid where it resolves block_render_visibility (joining a world, ClientHost::refresh_render_visibility), and the meshing workers read the table. The level and position are not arguments. With no part answering, nothing is asked and meshes are unchanged. Diverges from upstream: new hook.
  • should_redstone_wire_connect_to

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    BlockBehaviour.shouldRedstoneWireConnectTo: set connected to say whether redstone wire connects to the block state at pos. direction points from the wire toward the neighbouring block, or is None when the wire asks about the block above or below. connected holds vanilla's answer: change it when the block is yours. Asked whenever wire settles its shape: answer from state and pos without touching the world. When the answer changes, and once the wire is placed, update its neighbours (level.update_neighbors). Authoritative servers only.
  • smoke_source

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    CampfireBlock.isSmokeSource on both sides for the block state under a campfire, as the campfire is placed or the block under it changes: Some(true) for your own blocks makes the campfire a signal fire whose smoke rises higher, as over a hay bale. The level is read-only. The client asks during placement prediction. None keeps vanilla's hay-bale check; Some(false) overrides it.
  • sound_type

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    IBlockExtension.getSoundType
    Summary
    The sound type of a block state this part is attached to (IBlockExtension.getSoundType) is being read, to play one of its sounds. pos is the block and state its state; entity is nullable, as NeoForge's: the id and type (minecraft:player, minecraft:creeper) of the entity stepping on it, landing on it, placing it or digging it (a sniffer), and None for a break and for a placement by no entity (a dispenser); cause says which sound is about to play (BlockSoundCause::Step, Fall, Place, Break or Dig). It is asked only where NeoForge asks it, not for the hit sound while a block is mined (that has its own client hook upstream) nor for sculk growth. A part may change sound (event.sound), which starts as the state's own sound type: its event names, volume and pitch. The game then applies vanilla's factors for cause to the volume and pitch and plays that one sound. An answer whose volume or pitch is not finite and at least 0, or one of whose events is not a namespace:path id, is dropped whole and the state's own sound type is used. An event the resources lack plays nothing, as in vanilla; a mod's own event (from its content mod's assets/<id>/sounds.json) is sent to players by name. It runs for each sound, on the side that plays it, so register the mod on both and keep the listener a pure function of its inputs: the placer's client and the server ask for the same placement and must agree. It is given the loop context of the side that asks, and takes no Host. It cannot play no sound, several sounds, or a sound somewhere else (playStepSound and playFallSound can). Diverges from upstream: new hook.
  • state_at_viewpoint

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    IBlockExtension.getStateAtViewpoint, IBlockStateExtension.getStateAtViewpoint
    Summary
    The block state the camera at viewpoint sees of the block state at pos (IBlockExtension.getStateAtViewpoint), so a partial fluid block, a tank or a waterlogged mod block can show underwater fog only while the eye is really inside the liquid. seen starts at state: set it to the state whose fluid and powder snow the camera should read. Asked as the client finds the fluid at the camera (Camera.getFluidInCamera) for the block at the eye, the block above it and the blocks at the near plane's centre and corners: the fog, the field of view in a fluid, the water vision, the sky's dark disc and conduit power's underwater vision read it. The first-person water overlay uses the player's tick-sampled eye fluid instead; change its eligibility with camera_submersion. The client host is read-only; answer from the event alone, as the game asks every frame. With no part on any block the subscription check skips the asks; otherwise each block read costs one table lookup. Diverges from upstream: new hook.
  • state_for_placement

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    Choose a block's placement candidate (Block.getStateForPlacement(BlockPlaceContext)), with state the block's own default state. This is not a placement notice: code holding a ServerHost can call LevelRef::state_for_placement to ask for a candidate without placing anything. The Part still has only its LevelHost through LevelSide, not the caller's ServerHost. Answer only for your blocks: put the state you want in answer as Some(Some(state)), including a registered state of another block. If this is an actual placement, survival and entity obstruction use that candidate at the placement position, but the selected block's getStateForPlacement is not called. A mod selecting a multi-cell block is responsible for checking its footprint: setPlacedBy does not recheck its companion cell. Sunrise also requires creative-operator permission to select a game-master block. An unknown state falls back to ordinary placement. Refuse with Some(None): the block goes nowhere and the stack is kept, as vanilla's null. Left empty, the block's own placement runs. context is vanilla's BlockPlaceContext (the clicked face, the clicked position, source distinguishing PlacementSource::Player { yaw, pitch, sneaking } from a non-player PlacementSource::Directional { direction }, whether the clicked block is being replaced, and the item key in hand, not an item stack or its components). For a directional source, whether the clicked block is replaced is the game's answer from the clicked block, as DirectionalPlaceContext.replacingClickedOnBlock() is, and a block whose own rule reads the placer's vertical look (pointed dripstone) has no vanilla answer: left empty, that placement is refused (PlacementStateError::NoVerticalLook for LevelRef::state_for_placement), and answering replaces that rule. fluid is the fluid in the position the block would go in, which a waterlogged block reads. Build the state from state with native_state_with_property, and know whether state is yours with native_state_block. It is asked for every placer that goes through vanilla's placement (a player's BlockItem.place, a dispenser's DirectionalPlaceContext). The item's must_survive controls the ordinary final survival check. Standing/wall candidate survival and entity obstruction are independent. A trait mod returns Some(Some(state)) to choose a state, Some(None) to refuse, or None to leave the answer to the next mod or vanilla. Changes to the event's fluid copy are mod-provided data forwarded to later Parts, never consumed by the engine. Asked on both sides, as vanilla asks it: a client asks it from its placement prediction, with its loaded copy of the level (match LevelSide). Reads a client can't answer, tag tests among them, are None there, and BlockEntityPartState::state_in gives its default: never answer from those as if they were the server's. A client refusal keeps its stack unspent until the server answers. Answer None on a client where only a server can decide: the template's rule then predicts, and the server still decides.
  • step_on

    Side
    both
    Contract
    collect
    Host / context
    LevelRandomSide
    NeoForge
    —
    Summary
    Block.stepOn in Entity.applyEffectsFromBlocks, before inside-block effects. It runs on the block at getOnPosLegacy for a grounded body affected by blocks, including an item whose idle tick did not move. state and pos name that same contact; the position need not be the actual supporting cell. Each applicable effects pass gets its own callback.
  • tick_block

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn LevelWriteHost
    NeoForge
    —
    Summary
    An authoritative server's ServerLevel.tickBlock is about to run a due scheduled tick of the block state at pos (BlockState.tick): the block is still the one the tick was scheduled for. Change the block with native_set_block_property and set handled to skip the block's own tick; a block changed without handled takes its own tick as it is now, if it is still the tick's block. If the block's owner subscribes and is disabled, the occurrence is held before dispatch, including for any enabled Parts attached to the block. Once re-enabled, the held occurrence is dispatched once with its original deadline, priority and order.
  • tool_modified_state

    Side
    both
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    IBlockExtension.getToolModifiedState
    Summary
    The state the block state becomes under a tool action (IBlockExtension.getToolModifiedState: an axe's strip, scrape or wax-off, a shovel's flatten or douse, a hoe's till), asked of the block a tool is used on (tool.pos). final_state starts with vanilla's answer, None for a block the tool does nothing to: set it to Some(new) to allow the action or replace its result (a mod log an axe strips, a path a shovel makes), and Cancel it to deny the action, so the tool does nothing. tool.simulated says the game is only asking what the tool would do (LevelRef::block_transform, NeoForge's simulate): answer the same and change nothing in the world. A part answers before the global block_tool_modification, which still hears the result and may change or cancel it; a cancelled part skips it. Asked for the block's own parts only, so a block with none costs nothing. A disabled owner's subscribed transform suppresses the unchanged template result, not the ability's notification or a listener's replacement. The global hook still sees the candidate, and later abilities can be tried if this one has no result.
  • update_shape

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn LevelTicksHost
    NeoForge
    —
    Summary
    An authoritative server is about to compute the state the block state at pos takes now that its neighbour in direction is neighbour (BlockBehaviour.updateShape). state may not be in the world yet (a piston landing it): decide from state, not from the block at pos. Answer only for your own blocks: put the new state in new (state keeps the block as it is; air breaks it, with its drops, on a neighbour update) and the block's own updateShape doesn't run, nor the ticks it would schedule. The level is read-only, as vanilla's LevelReader; ticks go through native_schedule_block_tick and native_schedule_fluid_tick with ticks (ScheduledTickAccess). It runs often, at least six times per setBlock that updates shapes (more for redstone wire's diagonals and knock-on updates): keep it short. A disabled owner's subscribed update keeps the input state instead of running the template.
  • use_item_on

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    BlockBehaviour.useItemOn: the block's own behaviour, with the held item, on the server for each player. An answer replaces the template's behaviour; TryWithEmptyHand tries useWithoutItem on the main hand, and Pass goes on to the item's useOn. A disabled owner's subscribed interaction passes without running the block template.
  • use_without_item

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    BlockBehaviour.useWithoutItem: the captured state's empty-hand method, after useItemOn asks for it, on the server and main hand only. A disabled owner's subscribed interaction passes without running the block template.
  • weak_changes

    Side
    server
    Contract
    collect
    Host / context
    &dyn LevelHost
    NeoForge
    IBlockExtension.getWeakChanges
    Summary
    Whether this block receives block entity changes through an adjacent conductor. Starts false.

EntityPart

  • can_rider_interact

    Side
    client
    Contract
    collect
    Host / context
    —
    NeoForge
    IEntityExtension.canRiderInteract
    Summary
    Whether this candidate counts normally in the client's ordinary entity pick despite sharing the camera's root vehicle. Mirrors NeoForge's IEntityExtension.canRiderInteract, false by default. Only parts attached to the candidate's type are asked, in dependency order; allowed starts false and the last write wins. event.subject is an EntityClientScope: with_view lends a read-only EntityClientView of the candidate (handle, kind, position, rotation, UUID), and host() borrows &mut dyn ClientHost sequentially. Asked only at the same-vehicle branch of ProjectileUtil.getEntityHitResult, after a non-inside ray intersection qualifies against the running nearest distance. True lets this candidate update that distance normally. Inside-box selection does not ask it. Both the tick and frame pick use this rule. Attack-range component rays have no same-vehicle restriction and do not ask it. No server reach or interaction checks change.
  • general_entity_tick

    Side
    server
    Contract
    listen
    Host / context
    —
    NeoForge
    —
    Summary
    The authoritative tick of one general entity row of type kind (mymod:robot) in the server level's entity phase: ServerLevel.tickNonPassenger's entity.tick() for a row the type registry owns (#792 stage 4). The row's common bookkeeping has run (its previous position is its current one); a rider is ticked after its vehicle, depth-first as tickPassenger recurses. A passenger dismounted before its join-order slot can tick as a root if it has not already ticked this pass. Rows that joined this tick first tick next pass; parked levels and rows outside entity-ticking chunks do not tick. Canceling entity_tick_pre skips the row's own tick; cancellation alone does not skip its passengers' ticks. A listener can separately change the riding graph. event.subject is an EntityServerScope: with_view lends a live EntitySubjectView of the row (handle, kind, position, velocity, rotation, UUID and checked velocity, rotation and fall-distance writes), and host() borrows &mut dyn ServerHost sequentially for attachments (view.handle() is their holder) and other world operations. Told only for general entity types: vanilla families tick their own paths (#6509 owns bringing them to one join-order walk), so a part attached to minecraft:zombie hears no tick from this hook. Server-side.

FluidPart

  • fluid_rules

    Side
    server
    Contract
    listen
    Host / context
    &dyn LevelHost
    NeoForge
    —
    Summary
    How a mod's world fluid flows at pos, starting from what it declared (NeoForge's BaseFlowingFluid and FluidType getters: getTickDelay, getDropOff, getSlopeFindDistance, canConvertToSource). fluid is the id it was declared with. Asked for every flow step and every cell a spread looks at: answer fast. An answer outside what WorldFluid accepts is brought back within it. Server-side.

ItemPart

  • apply_enchantments

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.applyEnchantments
    Summary
    NeoForge's IItemExtension.applyEnchantments: the enchanting table applies enchantments, the list it chose for the clicked row as (id, level), to stack, the item in its input slot (EnchantmentMenu.clickMenuButton). result arrives with vanilla's result: a book becomes an enchanted book with the same count and components, then each level is added as ItemStack.enchant adds it, keeping the higher one. Replace or change it, and the input slot holds it; player_enchant_item, the enchanted_item trigger and enchant_item then see it. The levels and lapis paid stay as without the part. The result goes through the stack boundary: an unknown item, invalid damage or an oversized count is refused, and so is a count other than the input's, since the table holds one input; a refused result keeps vanilla's. Only the ItemParts attached to stack's item are asked, on the server, with a read-only Host. Loot, trades and spawn gear (EnchantmentHelper.enchantItem) don't ask. The contract beyond the method's name and parameters is Sunrise's reading, not checked against NeoForge's.
  • can_equip

    Side
    both
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.canEquip
    Summary
    NeoForge's IItemExtension.canEquip: may stack go into the equipment slot slot of the living entity entity, of type kind (minecraft:player)? slot is an EquipmentSlot name: head, chest, legs, feet, mainhand or offhand, and body or saddle from a dispenser. can_equip arrives holding the data answer, as LivingEntity.isEquippableInSlot and Equippable.canBeEquippedBy read the stack's own equippable component (a stack's override replaces the item's): yes when it names that slot and its allowed_entities is absent or lists the entity type (an empty list allows none); with no component, removed or never there, yes for mainhand only. Set it either way. Asked where vanilla asks: the armour slots of a player's inventory menu (ArmorSlot.mayPlace, which a shift-click into one reaches too), a dispenser equipping what stands in front of it (EquipmentDispenseItemBehavior, one entity at a time) and a mob picking an item up off the ground (Mob.equipItemIfPossible). It decides whether the stack fits the slot, not what the slot holds, whether the entity may wear one at all (canUseSlot) or the dispenser's own rules for the entity. Only the ItemParts attached to stack's item are asked, on both sides, as the client's menu predicts the slot. host is read-only and reads live entity and world state directly, for example entity.entity().position(host). A missing or despawned target refuses wherever a part is asked; the no-listener data path performs no conversion or entity lookup. A client without this mod predicts vanilla here; the server corrects it.
  • can_fit_inside_container_items

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    IItemExtension.canFitInsideContainerItems
    Summary
    NeoForge's IItemExtension.canFitInsideContainerItems: may stack go inside an item that holds items? fits arrives with vanilla's answer (Item.canFitInsideContainerItems): every stack fits except a shulker box. Set it true or false. It is asked, on both sides, wherever that rule is: - a shulker box's slots (ShulkerBoxSlot.mayPlace), in its menu and a guest's; - a bundle (BundleContents.canItemBeInBundle): a click that puts the stack in a bundle, and the /item bundle contents; - the item slots a mod gives an item (item_container) and its bundle slots.
  • can_grindstone_repair

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    IItemExtension.canGrindstoneRepair
    Summary
    NeoForge's IItemExtension.canGrindstoneRepair: does the grindstone repair stack as it repairs a damageable item? can_repair arrives with vanilla's answer, whether the stack is damageable (ItemStack.isDamageableItem); set it true or false. It is asked at two places, on both sides (the server's menus and the client's own result): - GrindstoneMenu.mergeItems, for the top stack when both inputs are single stacks of the same item. true takes the repair branch: one item, the enchantments of both merged, then all but the curses removed. Durability is merged only when the result has durability, as vanilla checks it again on the copy. false takes the other branch: two matching stacks of an item that stacks give two, and anything else gives nothing. - The input slots' mayPlace (damageable or enchanted): a granted stack can be placed. This site is Sunrise's reading.
  • can_perform_action

    Side
    both
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.canPerformAction
    Summary
    NeoForge's IItemExtension.canPerformAction: can stack perform the item ability ability, a plain, case-sensitive name such as shield_block, shears_harvest or shears_carve (a mod's own abilities also use plain names, such as my_mod_chop)? can_perform arrives with vanilla's answer for that ability: the item kind's (shears shear) or the stack's component (blocks_attacks, a shield's, blocks); set it either way and the stack grants or loses the ability. Loot conditions use the shared item defaults; action sites retain their own vanilla answers until #3330. Asked where vanilla checks the item for an action: a raised item blocking attacks (shield_block: a granted stack blocks as a bare blocks_attacks component does, a denied one never blocks nor is raised); shearing a sheep, mooshroom, snow golem or bogged, a dispenser's shears and a bee nest's honeycombs (shears_harvest); carving a pumpkin (shears_carve). It decides whether the stack may do the action, not what the action does to the world or the tool (block_tool_modification is the block's side of a tool action; item wear is its own). Only the ItemParts attached to stack's item are asked, on both sides, so the client's prediction agrees with the server: answer from the stack and ability alone, and fast. An item with no such part costs one table lookup. A client without this mod predicts vanilla here; the server corrects it.
  • contained_fluid

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The fluid a stack of a mod's own container item holds, as its neoforge:fluid_container item model draws it (FluidUtil.getFirstStackContained): fluid arrives None (holds none); set it to the fluid's key, taken once at registration with r.fluid_key. Asked on the client each time a stack of an item outside minecraft: is drawn through a fluid container model; vanilla's items keep their own answer and never ask. A fluid with no look in an item draws the missing texture; a key no fluid is registered under draws the stack as holding none, and the game logs it once per item. Answer from the stack alone, and fast.
  • crafting_remainder

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.getCraftingRemainder(ItemStack)
    Summary
    NeoForge's IItemExtension.getCraftingRemainder(ItemStack): what stack leaves when consumed by crafting, furnace fuel or brewing. remainder arrives holding the item's data remainder. Replace it, or set it to None to leave nothing. A part that leaves it alone preserves the data remainder. Recipe-specific book and banner copies are handled by the recipe. Asked for each consumption on the authoritative server, with a read-only Host. Oversized counts, unknown items and invalid damage are refused by the stack boundary, retaining the original data remainder. API stacks cannot have count zero; use None to leave nothing. Native panics follow the normal Part crash path, attributed to the owning mod and Part.
  • creator_mod_id

    Side
    both
    Contract
    collect
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.getCreatorModId
    Summary
    IItemExtension.getCreatorModId: the mod that made stack, which a recipe viewer or tooltip names, instead of the mod that registered its item. mod_id arrives as the item id's namespace; set it to another mod (a universal bucket holding that mod's fluid, a facade of its block) or None for no mod. Asked by ItemResource::creator_mod_id, from client tooltips and viewers as well as the server: answer from the stack alone. Only the ItemParts attached to stack's item are asked: an item with none costs one table lookup.
  • damage_item

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    IItemExtension.damageItem
    Summary
    IItemExtension.damageItem: the wear stack is about to take (ItemStack.hurtAndBreak: a tool that mines or hits, armour that takes a hit, a shield, a rod, an elytra, a tool a dispenser uses, a mob's armour), after Unbreaking has had its say, as NeoForge passes it. entity is who wears or uses it: the acting player on a player's paths, the mob, armour stand or dragon wearing it, None for a dispenser's tool. amount is the points about to be lost; change it (0 or less leaves the item whole) or set canceled for no wear at all. Set break_now and the item breaks whatever durability it has left, through the vanilla break (the sound and particles, the stack emptied, player_destroy_item for a player): NeoForge's onBroken. It wins over canceled. Not asked when Unbreaking already saved the item, nor for a creative player's tools (they take no wear). Only the ItemParts attached to stack's item hear it: an item with none costs one table lookup, and a game with no such part none at all. On the paths of a player the player's state is swapped in, so host.players().acting_player() answers them. Once for each wear, on a server.
  • dispense_item

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    DispenserBlock.getDispenseMethod: choose a behaviour for any item, including vanilla items, on the authoritative server (not droppers). The block the dispenser faces is asked first (dispense_method), and its answer keeps this part from being asked. Leave answer None for vanilla. Otherwise answer (remainder, event): a remainder of None empties the slot, Some(stack) replaces it (the hook owns consumption: no extra item is removed afterwards). event is the level event the dispenser plays with its smoke: 1000 the click, 1001 the fail sound (OptionalDispenseItemBehavior without success), or 0 for no sound or smoke. In an open transaction in the dispenser's level, sound and smoke follow the behaviour's published effects at the outermost commit and are discarded on abort. The remainder is detached until the dispenser writes its slot. An invalid remainder is reported without writing or notifying the slot, and no other behaviour runs. To drop one normally, answer with host.dispense_default's remainder and 1000.
  • empty_contents

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    IDispensibleContainerItemExtension.emptyContents
    Summary
    IDispensibleContainerItemExtension.emptyContents: stack (a bucket of a mod fluid, a jar, a canister) is about to be emptied at pos, by player (the acting player) who clicked hit (the block and face), or by a dispenser (player and hit are None). Leave answer None for vanilla's emptying. Answer Some(true) when the part placed the contents itself through the host: the stack becomes an empty minecraft:bucket (a creative player keeps it), no vanilla sound plays and the use counts as a success. Answer Some(false) for a failure: nothing is placed, a player keeps the full stack and a dispenser drops it, as vanilla's does when emptying fails. Asked for a player once bucket_empty let the pour go on, and for a dispenser before its own placement; an item with this part reaches the dispenser's bucket behaviour even when it is no bucket of a mod fluid, and a dispense_item answer still comes first. A server's client does not predict the pour of an item with this part. The part is asked in a transaction with the game's apply: a part that changes the player's hand or the dispenser's slots while answering Some(true) is refused and its journaled writes are undone, as a failed use (the player keeps the stack, the dispenser fails). A player's successful pour counts for the placed_block criterion. Only the ItemParts attached to stack's item are asked. Server-side.
  • held_item_tint

    Side
    client
    Contract
    replace
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Tint one third-person held-item submission in the world, for a player, mob or armor stand. entity_id is the holder's current client-level entity id, hand is the logical main or off hand (independent of the dominant arm), stack is the rendered stack, and partial_tick is the frame's tick fraction.
  • highlight_tip

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    IItemExtension.getHighlightTip
    Summary
    NeoForge's IItemExtension.getHighlightTip: the name drawn above the hotbar when stack is selected. name arrives with what Hud.extractSelectedItemName draws (the hover name in its rarity colour, italic when the stack has a custom_name); the text the part leaves is drawn in its place, centred at the same height and fade, cut at the screen edge as a long custom name is. Asked once each client tick while the name shows. The display timer still restarts only when the selected item or its hover name changes, so a tip that changes every tick doesn't keep the name up. Only the ItemParts attached to stack's item are asked. Client-side.
  • hurt_enemy

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player's hit landed on the mob entity of type kind (minecraft:zombie), holding stack: where Item.hurtEnemy is called, before the post-attack enchantments and the weapon's wear. It only hears. Another player as the target is not told. Server-side, for every player of the world (the helpers read the acting one).
  • inventory_tick

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A server tick of stack, the stack a player carries in slot: where Inventory.tick calls Item.inventoryTick, for every stack, each tick, /tick freeze included (it stops the world, not the player). slot is as Inventory saves it (0 to 35; the armour 100 feet to 103 head; -106 the off hand), and selected says it is the held slot. ItemPlace::PlayerSlot { player, slot } reads and changes the stack, which stays in its slot: an emptied one empties the slot, and the player's client gets the change. Only the ItemParts attached to stack's item hear it. Server-side, for every living player of the world (the helpers read the acting one).
  • is_combine_repairable

    Side
    both
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    IItemExtension.isCombineRepairable
    Summary
    NeoForge's IItemExtension.isCombineRepairable: may two of stack's item be combined in a crafting grid to repair it (RepairItemRecipe.canCombine)? repairable arrives with vanilla's answer, whether the stack has durability (minecraft:max_damage and minecraft:damage); set it true or false. It is asked for each of the two stacks, once they are found to be single stacks of the same item, and both must answer true. A true for a stack with no durability (a maximum damage of 0) is refused with a warning, and vanilla's false is kept, because the result needs a positive maximum. The anvil's combining of two of the same item keeps vanilla's test and doesn't ask. It is asked on both sides, wherever the grid's result is matched: a crafting table, the inventory grid, a crafter and the client's own result. Only the ItemParts attached to stack's item are asked. It is given the loop context of the side that runs the match and takes no Host, so answer from the stack and context alone, and fast: a match may ask it many times. With no part on the stack's item the cost is one table lookup, and the stack isn't converted. The contract beyond the method's name and parameters is Sunrise's reading, not checked against NeoForge's. Diverges from upstream: new hook. A client without this mod predicts vanilla here; the server corrects it.
  • is_not_replaceable_by_pick_action

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.isNotReplaceableByPickAction
    Summary
    NeoForge's IItemExtension.isNotReplaceableByPickAction: must a pick (the pick-block key) leave stack, in hotbar slot (0 to 8), where it is? player is the player picking. not_replaceable arrives with vanilla's answer, whether the stack is enchanted; set it true to keep the stack in place or false to let the pick swap it out. Asked in Inventory.getSuitableHotbarSlot's second pass, when a pick moves an item into the hotbar and no hotbar slot is empty: from the selected slot on, for each hotbar stack, until one answers false, which is the slot the pick uses; when all answer true, the selected slot is used. A pick that selects a matching hotbar stack, or finds an empty slot, doesn't ask, nor one player_pick_item cancelled. Only the ItemParts attached to stack's item are asked, on the server (the host's own player and its guests), with a read-only Host. The contract beyond the method's name and parameters is Sunrise's reading, not checked against NeoForge's.
  • is_piglin_currency

    Side
    both
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.isPiglinCurrency
    Summary
    NeoForge's IItemExtension.isPiglinCurrency: is stack barter currency to a piglin (PiglinAi.isBarterCurrency)? currency arrives with vanilla's answer, whether the stack is a minecraft:gold_ingot; set it true to make the stack currency, false to refuse it (a gold ingot included), or leave it to keep vanilla's answer. Asked where vanilla asks: whether a piglin wants a stack on the ground (currency is wanted whenever its off hand holds no #minecraft:piglin_loved item, with no inventory-space check); whether an adult piglin that isn't admiring takes the stack from a player's hand, on the server and in the client's prediction of that click; and when a piglin stops holding the item it admired, where an adult barters currency (minecraft:gameplay/piglin_bartering, thrown toward the nearest player) after admiring it, loses it when hit, and equips or keeps anything else. A currency stack picked up from the ground is admired, and so bartered, only when it is also in #minecraft:piglin_loved, as vanilla admires loved items only; otherwise the piglin equips or keeps it. Only the ItemParts attached to stack's item are asked, on both sides, so register the part on both for the client's prediction to agree with the server: answer from the stack alone, and fast. An item with no such part costs one table lookup. The contract beyond the method's name and parameters is Sunrise's reading, not checked against NeoForge's.
  • is_primary_item_for

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.isPrimaryItemFor
    Summary
    NeoForge's IItemExtension.isPrimaryItemFor: is stack's item primary for enchantment (an id such as minecraft:sharpness), so enchantment selection may offer it? Selection chooses the enchanting table's offers and clues, loot enchant_with_levels, trades and spawn gear. primary arrives true for a plain book; otherwise it is the resolved supports_enchantment answer and membership in primary_items when that set is present. Set it true to offer the pair or false to withhold it, including for a plain book.
  • item_bar

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The small bar GuiGraphicsExtractor.itemDecorations draws under an item, wherever the game shows one: bar arrives holding vanilla's value (the damage bar, or a bundle's fullness already applied) and may be replaced (width 0..=13, colour rgb) or set to None to hide it. Asked each frame a stack is drawn. Client-side.
  • item_decorations

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    IItemDecorator.render
    Summary
    Append an item's custom decorations after its default bar, cooldown and count. Coordinates are the icon's top-left in GUI units, as the batch takes them; no item translation is active. Runs wherever the shared item-decoration path is used (hotbar, menus, tooltips, and the other screens that draw item icons: advancements, beacon, stats, trading). The NeoForge counterpart is IItemDecorator.render; registration through RegisterItemDecorationsEvent is a separate moment.
  • item_destroyed

    Side
    server
    Contract
    collect
    Host / context
    &mut dyn ServerHost
    NeoForge
    IItemExtension.onDestroyed
    Summary
    IItemExtension.onDestroyed (vanilla ItemStack.onDestroyed): a dropped item entity holding stack has reached zero health from damage_type (fire, lava, cactus, explosion, /damage, or block-contact damage) and is about to be discarded.
  • item_interact_mob

    Side
    both
    Contract
    replace
    Host / context
    HostSide
    NeoForge
    —
    Summary
    ItemStack.interactLivingEntity: after ordinary entity interactions pass, for an alive native Mob and a nonempty stack in hand. Both logical sides answer independently. A consuming client result ends the hand loop; only Success swings there. SuccessServer and Consume consume without a client swing; Fail, Pass and TryWithEmptyHand fall through. A server-only answer leaves client off-hand prediction unchanged. ClientHost permits reads and local effects, not authoritative writes. Armor stands, other players and dragon parts are not covered. A client without this mod predicts vanilla here; the server corrects it.
  • item_name

    Side
    both
    Contract
    collect
    Host / context
    &dyn LoopContext
    NeoForge
    Item.getName
    Summary
    Vanilla's Item.getName(ItemStack): the name of stack from its components, so one mod item has many names (a data model named after the mob in it, a filled container after its contents). name arrives as None, which keeps the default: the stack's minecraft:item_name component, else the item's translated name. Set it to Some(text) to name the stack; a translatable Text (Text::translate) renders in each viewer's own language. It replaces the default rather than filling in for a missing item_name, as the vanilla items that override getName do. A minecraft:custom_name, or a written book's title, still wins over it (ItemStack.getHoverName), and the part isn't asked then.
  • item_stacked_on_other

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    ItemStackedOnOtherEvent
    Summary
    NeoForge's ItemStackedOnOtherEvent and vanilla's Item.overrideStackedOnOther / Item.overrideOtherStackedOnMe, fired inside a resolved pickup click (a direct left/right Pickup when no drag is active, or a one-slot left/right QuickCraft drag release; never on multi-slot or middle-button drags, active-drag resets, or creative catalogue slots), with the cursor and both stacks frozen in event.
  • makes_piglins_neutral

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.makesPiglinsNeutral
    Summary
    NeoForge's IItemExtension.makesPiglinsNeutral: does stack, worn by wearer, keep calm piglins from targeting it, as gold armour does (PiglinAi.isWearingSafeArmor)? neutral arrives with vanilla's answer, whether the stack is in #minecraft:piglin_safe_armor; set it true to make the piece count as gold, false to make it not count though the tag lists it, or leave it to keep the tag's answer. Asked for each stack in a player's armour slots, in the order feet, legs, chest, head, until one counts. A player wearing a piece that counts is not the target a calm piglin picks (NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD); an angry piglin attacks anyway. Only the ItemParts attached to stack's item are asked. It is asked whenever the server builds a player's view for the mobs, several times a tick, so the answer must be a pure, fast function of stack and wearer. An item with no such part costs one table lookup. Server-side. The contract beyond the method's name and parameters is Sunrise's reading, not checked against NeoForge's.
  • must_survive

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    BlockItem.mustSurvive: whether placing this item must pass the block's can_survive predicate in the final BlockItem.canPlace check. Asked on both sides after placement state selection, with a read-only level host. Standing/wall items select candidates using unconditional survival checks and their own placement-state override; this hook does not skip them. Some(false) skips survival only, not replaceability, bounds or entity obstruction. Some(true) requires survival. None keeps vanilla's requirement (false for scaffolding, true for other block items). Dispatch is by item id; this event has no held-stack components.
  • on_block_placed_by

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    BlockItemExtension.onBlockPlacedBy
    Summary
    BlockItemExtension.onBlockPlacedBy: the selected block has been placed, its final block state and the original item's block-entity data applied, and Block.setPlacedBy completed (including companion blocks). Runs once, at the primary position, before the item's placement sound, game event, placement trigger and stack consumption. state is the live block state after the callback, which can have changed the block or run its own effects. stack is the pre-shrink stack; placer is the placing player, or None for a dispenser. level is the level the block was placed in. face and click are the placement context's clicked face and world-space hit point. Failed, refused and canceled placements never notify, nor do successful writes that leave a different block at the primary position. Only Parts attached to the original item hear this server notice.
  • on_dropped_by_player

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.onDroppedByPlayer
    Summary
    IItemExtension.onDroppedByPlayer: player (the acting player's handle) pressed the drop key on stack, the whole selected stack before anything leaves it; all is true when the whole stack goes, false for one item (ServerPlayer.drop(boolean)). Set canceled and the stack stays in the slot: nothing is taken out, no item entity is made, no drop statistic is awarded and item_toss does not fire; a server's player is sent the slot back, undoing their predicted drop. Not asked for a menu's throw, nor for a spectator (who drops nothing). Only the ItemParts attached to stack's item are asked: an item with none costs one table lookup. Server-side, with a read-only Host.
  • on_entity_item_update

    Side
    server
    Contract
    cancel
    Host / context
    —
    NeoForge
    IItemExtension.onEntityItemUpdate
    Summary
    IItemExtension.onEntityItemUpdate: each tick of a dropped item entity, before the entity's own tick (ItemEntity.tick: its fluids, movement, pickup delay, merging and lifetime), and after entity_tick_pre. event.subject is an ItemEntityServerScope: with_view lends a live ItemEntitySubjectView for the dropped item's handle, position, velocity, stack, pickup delay, age, target, owner and checked writes, and host() borrows &mut dyn ServerHost sequentially for attachments and world operations. Return Flow::Cancel to skip that tick's vanilla work, as NeoForge's true return does. The item skips movement and its own merge pass, but another item can still merge into it. entity_tick_post still hears it. Only the ItemParts attached to the item ID held at dispatch entry hear it. Read the live stack via event.subject.with_view and view.with_stack; component conversion is deferred until that stack view is projected. Server-side, for every dropped item that ticks.
  • on_entity_swing

    Side
    both
    Contract
    cancel
    Host / context
    HostSide
    NeoForge
    IItemExtension.onEntitySwing
    Summary
    IItemExtension.onEntitySwing: the player in place (entity, its Entity.getId when known) is about to swing stack in hand: where LivingEntity.swing starts, for an attack, a use or a swing the server asked for. Set canceled and no swing starts: no animation and no swing packet. Only the ItemParts attached to stack's item are asked. Both sides, as vanilla's: answer the same on both, and change the world only where this Game runs the world, not on a server's client.
  • on_item_use_first

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    IItemExtension.onItemUseFirst
    Summary
    IItemExtension.onItemUseFirst: the held item's first say on a click on a block, on the server for each player, after use_item_on_block (ItemBeforeBlock) let it through and before the block's own useItemOn. An answer ends the click: neither the block nor the item's useOn runs. Pass goes on to the block.
  • on_left_click_entity

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    IItemExtension.onLeftClickEntity
    Summary
    IItemExtension.onLeftClickEntity: player (the acting player's UUID), holding stack in the main hand, is about to attack the entity entity (Entity.getId) of type kind (minecraft:cow, minecraft:player, minecraft:item_frame): where Player.attack starts, once the global attack_entity let the blow through and before any damage, knockback, enchantment effect, hurt_enemy or the weapon's wear. Set canceled and the attack ends there: the target is not hurt, hurt_enemy does not fire and the stack takes no wear. Only the ItemParts attached to stack's item are asked. Server-side, for every player of the world (the helpers read the acting one).
  • on_use_tick

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    LivingEntityUseItemEvent.Tick
    Summary
    Item.onUseTick of stack, used by entity with remaining ticks left, always above 0: what a mod's own item does each tick it is used (cook, charge, drain). It comes where ItemStack.onUseTick calls the item, once living_entity_use_item_tick let the use go on: after a consumable's crumbs, for consumables, shields and mods' items (vanilla's other items do their own, and a kinetic weapon has none on the server). Both sides, as living_entity_use_item_tick: change the world only where this Game runs the world, not on a server's client. Runs every tick of every use: check the item first.
  • placement_context

    Side
    both
    Contract
    replace
    Host / context
    LevelSide
    NeoForge
    —
    Summary
    BlockItem.updatePlacementContext: replace context before selecting the block's placement state, on both sides with a read-only level host. Some(Some(context)) rewrites the target and click, Some(None) refuses placement, and None keeps the item's vanilla rewrite (including scaffolding's column walk). The placing item cannot be changed. The actual pre-use stack supplies the item key and components. context.source distinguishes a player placement (PlacementSource::Player { yaw, pitch, sneaking }) from a directional non-player placement (PlacementSource::Directional { direction }): the effective placement rules, which a rewrite can change independently of placer. placer supplies the actual player's handle and eyes on this side, or is absent for a dispenser. A player's original destination may be occupied: a part can redirect the placement even when vanilla would refuse it there. A dispenser still needs a replaceable front cell before asking the part. With no answer, vanilla checks the original destination before its own rewrite. A part's rewritten destination must be loaded, in bounds, and replaceable with the supplied context. Non-finite click or player view values are refused. A rewritten directional context's replace_clicked is read from the block at hit_pos, not from the answer, and a directional question vanilla throws on (PlacementStateError::NoVerticalLook or ReplacingClickedCycle) refuses the placement. Survival and obstruction still apply at the final position.
  • release_using

    Side
    both
    Contract
    listen
    Host / context
    HostSide
    NeoForge
    LivingEntityUseItemEvent.Stop
    Summary
    Item.releaseUsing of stack: entity let it go with time_left ticks of its use_duration left, so it was held for duration - time_left (a bow-like item shoots by that charge). Set used as vanilla's return, and the stack's use cooldown starts (ItemStack.releaseUsing). After the vanilla item's own release, once living_entity_use_item_stop let it through. Both sides, as vanilla's: change the world only where this Game runs the world, not on a server's client.
  • should_cause_block_break_reset

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    IItemExtension.shouldCauseBlockBreakReset
    Summary
    NeoForge's IItemExtension.shouldCauseBlockBreakReset: does a break restart because the main hand changed? stack is the stack the break began with (vanilla's destroyingItem), held the main hand now (None for an empty hand). reset arrives with vanilla's answer: not ItemStack.isSameItemSameComponents(held, stack) (count left out, damage compared). false keeps the break and its progress going; true aborts it and starts it again from 0. A true for an unchanged stack restarts the break every tick, so it never finishes. Asked on each continueDestroyBlock and startDestroyBlock of the block the break targets, on the local player's client (single player and a server's client alike). Only the ItemParts attached to stack's item are asked. Client-side.
  • should_cause_reequip_animation

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    IItemExtension.shouldCauseReequipAnimation
    Summary
    NeoForge's IItemExtension.shouldCauseReequipAnimation: does the first-person hand lower and raise again to show stack, the stack the hand holds now? old is the stack the hand shows (None for an empty hand), slot_changed whether stack came from another slot (always false for the off hand). reequip arrives with vanilla's answer (!FirstPersonHandsAndItems.shouldInstantlyReplaceVisibleItem: the same stack changed in place, or an equal one but for its damage, is shown at once). true lowers the hand and raises it with stack; false shows stack at once. Asked each client tick, for each hand, while the shown stack differs from the held one by slot or by value; an unchanged hand and an empty hand aren't asked. Only the ItemParts attached to stack's item are asked. Client-side.
  • supports_enchantment

    Side
    both
    Contract
    replace
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.supportsEnchantment
    Summary
    NeoForge's IItemExtension.supportsEnchantment: may this item's stack receive enchantment (an id such as minecraft:sharpness)? The first Some(bool) replaces support; None tries the next part and then keeps the caller's vanilla rule. Anvils accept enchanted books; /enchant and compatibility-filtered loot use supported_items. Creative anvil use still bypasses support, and enchantment conflicts remain separate. Both anvil calculations, /enchant and compatibility-filtered enchant_randomly read the answer. The default for is_primary_item_for reads it before testing the enchantment's primary_items.
  • tooltip

    Side
    client
    Contract
    collect
    Host / context
    &dyn ClientHost
    NeoForge
    ItemTooltipEvent
    Summary
    Item.appendHoverText: an item's own lines in its tooltip, after its name and before its components' (enchantments, lore, attributes). Add lines to lines, which arrives empty, each with a colour as rgba packs it (u32::MAX keeps the text's own); Text::legacy reads § codes. context is the same TooltipAppendContext passed to component appenders: player, advanced/creative/nested flags and vanilla Item.TooltipContext.tickRate() (the client level's rate, or 20 without a level). The stack has its components (stack.data()). Asked when lines are built for display or ItemResource::tooltip, except during reentrant line queries, when the stack hides its tooltip or for a crossbow's loaded projectile. NeoForge's ItemTooltipEvent is the corresponding line-building event; this scoped hook adds attached parts' lines before component lines are assembled. Afterwards Hooks::item_tooltip sees the finished list, including these parts' lines.
  • tooltip_image

    Side
    client
    Contract
    replace
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    Optional tooltip component data for this item stack (Item.getTooltipImage). Answer Some(TooltipComponent::custom(data)) (or Some(TooltipComponent::bundle(stack))) to insert a component after the item's name line before render_tooltip_gather_components runs. Register a client factory for custom data types in register_client_tooltip_component_factories. Answer None to leave the vanilla tooltip component unchanged. A callback or retained payload destructor panic disables only this item-part registration for this hook. Client-side.
  • use_animation

    Side
    both
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Item.getUseAnimation of stack: the animation the renderer draws while the stack is in use, which ItemStack::use_animation also reads. animation arrives with the item's vanilla answer; the item's Part may change it. A Spear override on an item without kinetic data is refused as None. Asked on the client when each render consumer updates, and on either side when a mod reads ItemStack::use_animation, with host read-only: answer from the stack alone, the same on both sides. From inside this callback, a read of ItemStack::use_animation for any stack of the same item (a copy with another count or components included) does not ask its Part again: it gets the item's own answer. Another item's read asks that item's Parts. Contract version 3: version 2 asked no Part again for any read from inside the callback; version 1 was asked on the client only, with a ClientHost.
  • use_duration

    Side
    both
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Item.getUseDuration of stack, in ticks: duration arrives with vanilla's (a consumable's time, 72000 for a shield, a spear, a bow, 0 for an item with no use over time). A mod's own item (outside minecraft:) with no consumable, blocks_attacks or kinetic weapon that answers above 0 is used over time on a right click, as an Item.use that calls startUsingItem, until it is let go or the time runs out (living_entity_use_item_finish). A consumable's time changes too, potions and the other vanilla items keep their own. Asked when a use starts, each tick a mod's item is in use, and each frame the hand draws one in use, on both sides. It has no user, as it is asked so often: answer from the stack alone.
  • use_item

    Side
    both
    Contract
    replace
    Host / context
    HostSide
    NeoForge
    PlayerInteractEvent.RightClickItem
    Summary
    A player uses stack (right click) with self.hand: in the air, or on a block once native_use_on let it through, where Item.use starts. Runs on both logical sides after the global right-click event. Return an interaction result: Success swings on the client, SuccessServer swings on the server, Consume handles without swinging. Fail skips this item's use without swinging, then the off hand may be tried. None lets later Parts answer; if none answers, the item's own use runs. Some(Pass) skips later Parts and continues to the item's own use. TryWithEmptyHand is block-phase-only and is treated as Pass here. Cooldown items are skipped. A server-only answer does not stop the client's off-hand prediction. ClientHost permits reads and local effects, not authoritative writes. hand is the interaction hand of THIS click, including an instantaneous air use. Unlike this field, living_used_item_hand answers only during active item use. This is PlayerInteractEvent.RightClickItem.getHand. player is the clicking player's UUID and player_entity_id that player's entity id on this logical side: the acting player's on a server (a guest's own, never the host's), this client's own player on a client. They name who clicked from the event alone, unlike players().acting_player(), which only answers while the host has set the acting player. A client without this mod predicts vanilla here; the server corrects it.
  • use_on

    Side
    both
    Contract
    replace
    Host / context
    HostSide
    NeoForge
    UseItemOnBlockEvent
    Summary
    A player uses stack (right click) with self.hand on the block at pos, face the face clicked ([0, 1, 0] is the top), once the block itself let the click through (a chest still opens): where ItemStack.useOn starts. Both logical sides answer independently: a consuming client result ends the hand loop; only Success swings there. SuccessServer and Consume consume without a client swing. Fail ends the block path; Pass and TryWithEmptyHand fall through. A server-only answer does not stop the client's off-hand prediction. ClientHost permits reads and local effects, not authoritative writes. Cooldown items are skipped. hand and hit describe this click; player and player_entity_id identify its player on this side.
  • xp_repair_ratio

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    IItemExtension.getXpRepairRatio
    Summary
    IItemExtension.getXpRepairRatio: the durability points Mending restores to stack per point of experience, where ExperienceOrb.repairPlayerItems repairs the damaged Mending item it picked, once per item it repairs. experience is the points being spent (never 0) and player the player they go to. ratio arrives holding vanilla's: the stack's minecraft:repair_with_xp repair divided by experience, 2.0 for vanilla Mending. The repair becomes floor(experience × ratio), capped at the stack's damage; a ratio left as it arrived keeps vanilla's repair exactly. A ratio that isn't finite is refused and vanilla's repair is used; a negative one counts as 0. A ratio that takes a positive repair to 0 leaves the experience unspent, for the player. Only the parts attached to stack's item are asked: to change Mending for every item, change the enchantment's minecraft:repair_with_xp effect in a data pack. Server-side, including PlayerRef::give_experience_points.
  • menu_button

    Side
    server
    Contract
    listen
    Host / context
    —
    NeoForge
    —
    Summary
    A player pressed a mod menu's button (clickMenuButton), on the server. subject lends sequential access to the live resident block entity (when present) and the server Host: subject.with_view(...) returns None on a blockless menu or after the block entity is removed or replaced, while subject.host() and subject.transaction(...) stay usable on both. Mods may change the live block entity in place (each write is validated at the boundary) and the clicking player's carried stack. A panicking listener is contained and disabled for menu_button for the rest of the session, discarding its carried-stack edit and rolling back any open transaction. A panic in a different hook does not discard the cursor edit of a button callback that returns normally.
  • menu_button_valid

    Side
    server
    Contract
    cancel
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Whether this menu's owner accepts a button id before menu_button runs. The owner chooses the ids for its own menu; there is no shared numeric range. Leave accepted false for ids the active menu does not support.
  • menu_clicked

    Side
    server
    Contract
    cancel
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A click in menu, before its default action (AbstractContainerMenu.clicked). Only parts registered for that menu type are asked. slot is in menu order (container slots, then any player inventory; -999 outside), button and mode are the click input, and uuid identifies the clicking player. Menu-button clicks, recipe placement and the creative set-slot packet do not call it. Return Flow::Cancel after applying the click yourself to skip the default: for example, copy an item into a filter slot without consuming the cursor. A display-only menu has no default moves. Other menus keep their ordinary slot rules when unhandled. The client predicts the ordinary click and the server corrects it. No player's state is swapped in. Use their current PlayerRef::container_menu or the native menu's UUID and window to reach its slots and cursor. Host writes are kept if the action succeeds. An unhandled click applies the default in the same transaction; a stale, refused or failed action rolls back the transaction. The action refuses opens. ServerHost::close_menu and MenuRef::close_container close only after commit.
  • menu_slot_changed

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    The non-result slots of an open mod menu of type menu changed on the server, so its outputs can follow its inputs, as vanilla processing menus do in AbstractContainerMenu.slotsChanged. Nothing is asked when no part listens for menu.
  • menu_slot_rules

    Side
    both
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    Slot placement, pickup and stack limits for registered vanilla and mod menus; mounts use sunrise:mount_inventory, while player inventory and the creative picker have no registered type. slot is the backing index, including player inventory slots. The slot's own answers arrive first; the maximum is bounded to 0–99 and the item limit (matching vanilla Slot.getMaxStackSize and Container.getMaxStackSize). Refusal also prevents quick-move top-ups. Runs on server and client prediction with the read Host: it is a query, so it can neither write nor cancel. Each live may_place, may_pickup and getMaxStackSize check during a click asks the parts directly against the current menu slots (matching vanilla AbstractContainerMenu.doClick and Slot). Permission and capacity are separate checks. During shift-click a later destination sees the source remainder and the earlier destinations' updates. A nested MenuRef::slot_holds or MenuRef::slot_gives read uses the slot's own rules without asking menu Parts again, even for another slot or menu. context.slot still reads the slots of the ongoing click. A panicking part's answers are discarded and its callback is disabled for the session, with the mod named in the log and error toast. The other parts still answer the check. Answer quickly from the question and the read-only Host. On a LAN host's own click the LAN host is not reachable through the Host (it answers as if no LAN were open). container is the container slot indexes (MenuContainer): a mod crafting grid's slots are Grid's and its result Result's slot 0. context lends the player, the menu's block position and the live slots for this ask (MenuSlotContext). Read slots on demand with context.slot(container, index), covering both the menu's backing containers (Main, Grid, Result) and the player's inventory (Player: 0..36 inventory, 36..40 armor feet-to-head, 40 offhand, matching vanilla Inventory). A client without this mod predicts vanilla here; the server corrects it.
  • menu_slot_take

    Side
    server
    Contract
    listen
    Host / context
    —
    NeoForge
    —
    Summary
    A player took a stack out of slot slot of the mod menu type menu (Slot.onTake), on the server: a notice after the item left the slot, which refuses nothing (the pickup rule, menu_slot_rules' may_pickup, refuses). It reaches the parts registered for menu, on a block-backed mod menu and on a blockless owned menu alike. subject lends the server Host (subject.host()) and atomic transactions (subject.transaction(...)) on both; on a block-backed menu it also lends sequential access to the live resident block entity (subject.with_view(...)), which returns None on a blockless menu or once the block entity was removed or replaced during the call. player is the player's UUID; slot is the menu's index, the menu's own slots first (linked containers and the player's inventory are never heard). taken is a copy of the stack that left the slot, components included, and left what the slot holds afterwards (None when it was emptied). Vanilla hands onTake the taken stack on a click but the stack left in the slot on a quick move, so both are carried: for a quick move taken is the amount moved (the slot's stack before, less left).
  • menu_still_valid

    Side
    server
    Contract
    listen
    Host / context
    &dyn LoopContext
    NeoForge
    —
    Summary
    Whether a player's mod menu stays open (AbstractContainerMenu.stillValid). Asked on the server each tick the menu is open and before processing a matching non-spectator container click. pos is the backing block's position, or None for a blockless menu even if its opener supplied a position for the client's screen. opening_item is present when the opener supplied a hand; its stack_matches says whether that hand holds the same item with the same components as at open (count ignored). Neither affects the initial validity answer. valid starts true without a backing block; for a block menu it is whether eye is within the player's block interaction range plus 4 of each backing block. Set it to keep the menu open or close it. Vanilla menu types are never asked, and a menu whose block entity is gone closes without asking. Answer from the event and loop context alone.
  • menu_transfer

    Side
    server
    Contract
    replace
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A recipe viewer's "+" on a mod menu (JEI's IRecipeTransferHandler): move one set of recipe's ingredients (as many as the items allow with max) from player's inventory into the open menu of a mod menu type, or with dry_run only say what that would do. Asked on the server before the game's own grid transfer, only for a mod menu type whose part answers, with menu its type, pos its block (None for a menu with no block) and recipe the recipe's id as the viewer sent it. Return Some(Moves) once moved, or Missing, NoRoom or NotIntoMenu; a part that returns None lets the game try its own crafting-grid transfer. A dry run must move nothing. With dry_run a part may also push the recipe's cells nothing fills to missing_cells, and the cells it lacks but could craft to craftable_cells (both empty by default), in RecipeTransferCheck's cell order; the game keeps the ones below the recipe's cell count (its known layout: one for stonecutting, 256 for a recipe it can't inspect), each once, in ascending order, and ignores both outside a dry run.
  • recipe_book_ghost

    Side
    client
    Contract
    listen
    Host / context
    &dyn ClientHost
    NeoForge
    —
    Summary
    The server answered a recipe click in a mod menu's recipe book with missing items, and the client is about to draw the recipe's ghosts: the place vanilla calls the component's fillGhostRecipe(ghostSlots, display, context). display is the alternative the player clicked. ghosts arrives holding the game's own ghosts for the menu's layout (a crafting, furnace, stonecutter or smithing layout maps the display to its slots; a Mod layout arrives empty); add, change or clear them. Each ghost's display resolves to stacks as the book's own displays do, and one that resolves to none, or sits in a slot the menu's screen hides or lacks, is dropped. At most 256 ghosts are kept. A listener that pushes nothing leaves what arrived. Asked for the open menu's book only, once per answer, by the part of the menu's type; a menu with none skips the hook. Client-side, with the ClientHost.
  • recipe_book_place

    Side
    server
    Contract
    listen
    Host / context
    &mut dyn ServerHost
    NeoForge
    —
    Summary
    A player clicked a recipe in the recipe book of a mod menu whose RecipeBookLayout is Mod, on the server (RecipeBookMenu.handlePlacement, the method a Java menu overrides). The part of the open menu's type moves the recipe's ingredients itself and sets ghost when items are missing, as vanilla's answer PLACE_GHOST_RECIPE does: the client is then told to draw the recipe's ghosts (recipe_book_ghost). use_max_items is the Shift click and creative the player's mode. player is swapped in, so host.players().acting_player() names them.

MobEffectPart

  • apply_effect_tick

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    MobEffect.applyEffectTick: the content mod's resolved EffectKey effect acts on entity in dimension (minecraft:overworld). Clear keep and the effect ends now, before it counts down. entity is a mob's Entity.getId, None for a player (host.players().acting_player() says who). It runs inside the entity's tick: a mob's world borrows the game there, so the game is read-only, and it does not hold the ticking mobs, nor the player's effects. holder identifies the holder; Host reads of a mob holder are unavailable while it is ticking. Queued changes apply after the hook; clearing keep ends the effect. active_effects is the holder's live active-effect snapshot at this point in the pass; has_effect(key) reads it, reflecting removals earlier in the pass. The current level's game rules remain readable through host.level(dimension). Called only when this Part's own cadence requests it. All Parts see the same snapshots; their queued changes apply in Part order afterward (with the declaring package's — or, for a served_by content package, its serving native host's — Parts running first). On mobs, each queued hurt finishes its damage, death or protection, and living_damage_post before the next queued change or the effect countdown. Clearing keep skips later Parts. Server-side.
  • should_apply_effect_tick_this_tick

    Side
    server
    Contract
    listen
    Host / context
    &dyn Host
    NeoForge
    —
    Summary
    MobEffect.shouldApplyEffectTickThisTick for this Part's effect. Each Part starts with apply = false; only that Part's answer decides whether its apply_effect_tick runs. tick_count is the remaining duration, or the holder's tick count for an infinite effect. For an effect declared by a served_by content package, its serving native host is the owning package (admitted without an extra dependency, and its Parts run first). Server only.

Host methods (Host, ServerHost, ClientHost)

Shared (Host)

  • attachment_query

    Signature
    fn attachment_query (&self, namespace: &str, name: &str ,) -> Result<AttachmentBatch, AttachmentError>
    Summary
    Capture a SNAPSHOT of the current dimension's attachment residency and values. Later changes require a fresh query. Removed-but-unswept entities may appear; writes through stale holders fail. Values are neither cloned nor eagerly decoded. The batch is local, not a save or sync record. In a transaction it can be used only while the capturing frame is current. An undeclared id is refused with the calling package and attachment id.
  • attachment_read_scope

    Signature
    fn attachment_read_scope (&self) -> Result<AttachmentReadScope<'_>, AttachmentRowError>
    Summary
    Borrow this host for an attachment snapshot read in its transaction. Pass the result to row.with_value or query.get; it does not open a transaction.
  • attachments

    Signature
    fn attachments (&mut self) -> &mut dyn AttachmentStore
    Summary
    The server-owned holders' attachments; TYPE.get(host, holder) reads one. On a client it is the copy of what the server synced: set and remove change only the copy. While held during a proxy handoff, the client can already read updates or removals for entities and other players it tracks, without waiting for placement or requesting a resync.
  • biome_key

    Signature
    fn biome_key (&self, id: &str) -> Option<BiomeKey>
    Summary
    before world data is installed, or for an unknown id. Reacquire after reload.
  • block_collision

    Signature
    fn block_collision (&self, pos: [i32; 3]) -> Vec<[f64; 6]>
    Summary
    Collision boxes in block-local coordinates with an empty collision context.
  • block_entity

    Signature
    fn block_entity (&self, level: LevelRef, pos: [i32; 3]) -> Option<BlockEntityRef>
    Summary
    Find a block entity in a loaded chunk of an open level, or on a client in the level it shows. Tick and menu callbacks keep the entity resident and readable until removal.
  • block_entity_identity

    Signature
    fn block_entity_identity (&self, level: LevelRef, pos: [i32; 3]) -> Option<BlockEntityRef>
    Summary
    The handle BlockEntitiesHost::block_entity gives, and also for a block entity temporarily taken out by an engine operation. Its identity and attachments stay in place, so its Part state (BlockEntityPartState) can still check its handle even though data reads find nothing until the row is put back.
  • block_in_tag

    Signature
    fn block_in_tag (&self, block: BlockKey, tag: &str) -> Option<bool>
    Summary
    Whether the resolved block is in the world's merged block tag, on a client the tag its server sent. Unknown tags return false; unavailable tags or owning-thread block mappings return None.
  • block_item

    Signature
    fn block_item (&self, block: BlockKey) -> Option<ItemKey>
    Summary
    Block.asItem: the block's item identity, including air for a block with no item; None if either resolved identity is unavailable.
  • block_key

    Signature
    fn block_key (&self, id: &str) -> Option<BlockKey>
    Summary
    The key of the block named id, for a name that only arrives at run time (data, config, a command, a network message). id is the full registry name, minecraft:stone or mymod:machine. None for a name the registry does not hold, and before the registry is complete (during registration, use Registrar::block_key). Does not allocate.
  • block_keys

    Signature
    fn block_keys (&self) -> Vec<BlockKey>
    Summary
    Every block key in the registry's registration order: vanilla's first, then mod blocks in the order they registered. A block registry lists a name once per state; this yields it once. Empty before the block table completes.
  • block_state_default

    Signature
    fn block_state_default (&self, block: BlockKey) -> Option<BlockState>
    Summary
    The default state of the resolved block key: Block.defaultBlockState, the one a block takes when nothing else says. None for an unknown block.
  • block_state_id

    Signature
    fn block_state_id (&self, name: &str) -> Option<BlockState>
    Summary
    The state name names, read as /setblock reads a block (BlockStateParser.parseForBlock): minecraft:oak_stairs[facing=east], stone for minecraft:stone, the properties left out at their default. Returns an owned block key and canonical local ordinal, never vanilla's numeric Block.getId. None for an unknown block, a property it doesn't have or a value it can't take, or block NBT ({...}); and, as /setblock's argument, for anything after the block.
  • block_state_string

    Signature
    fn block_state_string (&self, state: BlockState) -> Option<String>
    Summary
    The state state as /setblock takes it back (BlockStateParser.serialize): its block, then each property in name order, minecraft:oak_stairs[facing=east,half=bottom,...], or the block alone for one with no properties. None for an unknown key or local ordinal; an invalid value never falls back to air.
  • built_creative_tabs

    Signature
    fn built_creative_tabs (&self ,) -> Result<Option<std::sync::Arc<CreativeModeTabs>>, CreativeTabReadError>
    Summary
    CreativeModeTab.getDisplayItems reads it, for a reader that only has &dyn Host. It never builds and never fires build_creative_mode_tab_contents. Ok(None) before this side has built once (a read through creative_tabs, or the creative screen, builds it); CreativeTabReadError::Unavailable in setup or reload and without a live world. The snapshot keeps the permissions of that build and stays immutable: a later build publishes a new one.
  • cauldron_content_for_block

    Signature
    fn cauldron_content_for_block (&self, block: BlockKey) -> Option<CauldronContent>
    Summary
    Contents registered for block, or none if absent or no table has been built. Reads the current resource generation, including after reload.
  • cauldron_content_for_fluid

    Signature
    fn cauldron_content_for_fluid (&self, fluid: FluidKey) -> Option<CauldronContent>
    Summary
    Contents registered for fluid, or none if absent or no table has been built.
  • cauldron_level

    Signature
    fn cauldron_level (&self, state: BlockState) -> Option<u32>
    Summary
    Current level of state, or none without registered contents or a built table. Always-full contents answer their maximum level.
  • check_payload_token

    Signature
    fn check_payload_token (&self, token: &PayloadToken) -> Result<(), PayloadSendError>
    Summary
    Whether token is one this load's registrar handed out: the frozen declaration at its slot has its id, protocol, direction and schema, and its owning mod is on. Anything else (forged, from another load, of another type) is StaleToken, and nothing is sent.
  • chunk

    Signature
    fn chunk (&self, level: LevelRef, pos: [i32; 2]) -> Option<ChunkRef>
    Summary
    Find a loaded chunk in an open server level (ServerChunkCache.getChunkNow). As there, a FULL chunk found becomes one of the level's recent FULL lookups, so a level.load_chunk of it before the end of the level's next chunk tick places no ticket.
  • config_files

    Signature
    fn config_files (&self) -> &'static dyn ConfigFiles
    Summary
    The calling mod's own files in the game's config/ folder, beside options.txt (beside server.properties on a dedicated server): its folder config/<mod id>/ and the files beside it named <mod id>.<ext> or <mod id>-<rest>, as Fabric and NeoForge mods keep theirs. The service is bound to the mod whose hook or part is running, so a mod never names its id and can't reach another mod's files; a world's serverconfig/ is read only through config_loading.
  • creative_tabs

    Signature
    fn creative_tabs (&mut self, permissions: CreativeTabPermissions ,) -> Result<std::sync::Arc<CreativeModeTabs>, CreativeTabReadError>
    Summary
    On a cache miss, build it with explicit permissions and dispatch build_creative_mode_tab_contents. It does not require an open creative screen. A same-parameter read from a listener sees tabs already built and the previous contents of tabs not yet built. Reentering with different parameters is refused. Published snapshots stay immutable. Permission is a build parameter, not a grant. During setup, reload, or without a live world, returns CreativeTabReadError::Unavailable.
  • data_files

    Signature
    fn data_files (&self) -> &'static dyn ConfigFiles
    Summary
    sunrise-mod-data/<mod id>/ in the game folder, never scanned as settings or config. Paths omit the mod id; ConfigPath::root() names its root. Sunrise allows at most DATA_FILE_MAX bytes per file.
  • dimension

    Signature
    fn dimension (&self) -> &'static str
    Summary
    The level in place (minecraft:overworld), for a hook that isn't told which it runs in.
  • dist

    Signature
    fn dist (&self) -> Dist
    Summary
    Physical process, not the logical side of this hook.
  • effect_key

    Signature
    fn effect_key (&self, id: &str) -> Option<EffectKey>
    Summary
    The key of the effect named id: the full registry name, minecraft:speed or mymod:rage. None for a name the registry does not hold, and before the registry is complete (during registration, use Registrar::effect_key). Does not allocate.
  • enchantment_keys

    Signature
    fn enchantment_keys (&self) -> Vec<EnchantmentKey>
    Summary
    Every enchantment key in global sorted loaded-registry order, including vanilla and mod data-pack entries together (RegistryDataLoader sorts by id).
  • enchantments_compatible

    Signature
    fn enchantments_compatible (&self, a: &str, b: &str) -> bool
    Summary
    Whether enchantments a and b may share an item (Enchantment.areCompatible), by the world's enchantment definitions. API @API:item_components@.
  • entity

    Signature
    fn entity (&self, id: u32) -> Option<EntityRef>
    Summary
    The entity id (the id events carry) as a handle for the entity_* methods: None with no world open, or for no such entity in the level in place or among the server's players. On a client (API @API:client_entity_refs@), any entity the server shows this window, this window's own player included. API 373.
  • entity_residency

    Signature
    fn entity_residency (&self, entity: EntityRef) -> EntityResidency
    Summary
    Where the entity entity names is now, as its Part state (EntityPartState) checks it: resident in the level this host is in, out of its lists for its own tick, resident in another level, or gone (removed or its removal pending, unloaded, moved under a new id, or a handle of another world open). On a client, in place for an entity the client has in the level it shows.
  • entity_type_default_attribute

    Signature
    fn entity_type_default_attribute (&self, entity_type: &str, attribute: &str) -> Option<f64>
    Summary
    An entity type's default value of an attribute, with no entity spawned (DefaultAttributes.getSupplier(type).getValue(attribute)): what a new entity of entity_type (minecraft:zombie) has for attribute (minecraft:max_health) before any modifier, its supplier's base inside the attribute's range, for vanilla's types and mods' (a mod type's declared row, NeoForge's EntityAttributeCreationEvent and EntityAttributeModificationEvent included). Both names are read as Identifier.parse reads them: max_health and :max_health are minecraft:'s. The Host and typed reload/setup contexts share this read on both sides; it never unwinds. None before publication, for an unregistered type or one with no supplier (such as minecraft:item), or for a missing attribute.
  • entity_type_in_tag

    Signature
    fn entity_type_in_tag (&self, entity_type: &str, tag: &str) -> bool
    Summary
    EntityType.is(TagKey): whether entity_type (minecraft:player) is in the entity type tag tag (minecraft:cannot_be_pushed_onto_boats).
  • entity_type_keys

    Signature
    fn entity_type_keys (&self) -> Vec<EntityTypeKey>
    Summary
    Every entity-type key: built-in and content types in registry order (BuiltInRegistries.ENTITY_TYPE), then native general types ordered by declaring mod and type id.
  • fluid_bucket

    Signature
    fn fluid_bucket (&self, fluid: &str) -> Option<ItemKey>
    Summary
    The bucket item that picks fluid up (Fluid.getBucket), minecraft:water_bucket for water and flowing water. None for minecraft:empty, whose bucket is air, and for a name no fluid has.
  • fluid_empty_sound

    Signature
    fn fluid_empty_sound (&self, fluid: &str) -> Option<&'static str>
    Summary
    The sound event a bucket plays as it empties fluid (BucketItem.playEmptySound, the BUCKET_EMPTY sound of NeoForge's FluidType), minecraft:item.bucket.empty_lava for lava and flowing lava and minecraft:item.bucket.empty for water and a mod's world fluid. None for minecraft:empty, for a tank-only fluid, which has no world form, and for a name no fluid has.
  • fluid_in_tag

    Signature
    fn fluid_in_tag (&self, fluid: &str, tag: &str) -> Option<bool>
    Summary
    Whether fluid is in the fluid tag tag (FluidState.is(TagKey), minecraft:water or water), over the merged fluid tags, on a client those its server sent. An unknown tag is false. None as for native_block_in_tag.
  • fluid_is_same

    Signature
    fn fluid_is_same (&self, fluid: &str, other: &str) -> bool
    Summary
    Whether fluid and other are the same fluid (Fluid.isSame): a source and its flowing form are, so minecraft:water and minecraft:flowing_water are the same, water and lava not. Names are fluid ids, with or without minecraft:; false when either names no fluid.
  • fluid_key

    Signature
    fn fluid_key (&self, id: &str) -> Option<FluidKey>
    Summary
    Resolve a registered fluid identifier.
  • fluid_pickup_sound

    Signature
    fn fluid_pickup_sound (&self, fluid: &str) -> Option<&'static str>
    Summary
    The sound event a bucket plays as it picks fluid up (Fluid.getPickupSound), minecraft:item.bucket.fill_lava for lava and flowing lava. None for minecraft:empty, which has none, and for a name no fluid has.
  • game_event_key

    Signature
    fn game_event_key (&self, id: &str) -> Option<GameEventKey>
    Summary
  • game_version

    Signature
    fn game_version (&self) -> &'static str
    Summary
    Exact Minecraft version supported by this process.
  • hover_name

    Signature
    fn hover_name (&self, stack: &ItemStack) -> Result<Text, TextFormError>
    Summary
    ItemStack.getHoverName() as a component. The custom name wins, then a written book's nonblank raw title. Otherwise the item's name is used: a mod item's ItemPart::item_name answer replaces its default; None keeps it. Vanilla item overrides (such as potion contents or a profiled player head) participate in the item-name step; the base item uses the stack's item_name patch or inherits its prototype's value. A removal in the stack's patch reads empty; if a mod item's prototype has no item_name (including when the mod removes it), the game uses its item or block translation key. Only a fallback written into a component is kept. It carries no rarity colour or italics (getStyledHoverName adds those). Each viewer renders a translatable in their own language; call text_string on it for a string in this side's language. An invalid stack is a TextFormError.
  • instance_dir

    Signature
    fn instance_dir (&self) -> PathBuf
    Summary
    The instance (game) folder, which its players share: saves/, resourcepacks/, shaderpacks/ and sunrise-mods/ are in it, and the title's screens create worlds and read packs there. A world's own datapacks/ is in that world's folder (saves/<world>/datapacks). The folder the game runs in (--player-dir moves a player's options and servers only, not the instance). Nothing is created.
  • is_loaded

    Signature
    fn is_loaded (&self, id: &str) -> bool
    Summary
    Whether a mod with the sunrise-mod.toml id id is installed: a native or content-only package (Fabric's FabricLoader.isModLoaded, NeoForge's ModList.isLoaded). The list is fixed at startup.
  • item_block

    Signature
    fn item_block (&self, item: ItemKey) -> Option<BlockKey>
    Summary
    The block item places (BlockItem.getBlock, as Block.byItem reads it): minecraft:wheat_seeds places minecraft:wheat, and a standing/wall item places its standing block, not the wall variant. None for an item that places no block, and for an unknown item.
  • item_burn_time

    Signature
    fn item_burn_time (&self, item: ItemKey) -> Option<i32>
    Summary
    Item item's cooking-fuel burn time in ticks (FuelValues.burnDuration of its cooking_fuel component, the data pack's context int provider resolved), None where it is no fuel. API @API:item_components@.
  • item_compost_chance

    Signature
    fn item_compost_chance (&self, item: ItemKey) -> Option<f32>
    Summary
    Item item's chance to raise a composter's level (its compostable component's layers provider resolved), None where it is not compostable. API @API:item_components@.
  • item_cooldown_group

    Signature
    fn item_cooldown_group (&self, stack: &ItemStack) -> String
    Summary
    ItemCooldowns.getCooldownGroup(stack): the group stack's cooldown is filed under, the group its use_cooldown component names (its own, else its item's default), else its item id.
  • item_crafting_remainder

    Signature
    fn item_crafting_remainder (&self, stack: &ItemStack) -> Option<ItemStack>
    Summary
    Item.getCraftingRemainder: Sunrise currently stores the remainder's item id, so the result is a single plain stack.
  • item_default_component

    Signature
    fn item_default_component (&self, item: ItemKey, component: &str) -> Option<Tag>
    Summary
    Item item's default value of component component, in its prototype (Item.components().get): minecraft:max_damage on an iron sword is 250, data packs' and native mods' changes included. Read from the item report's JSON, so a number is an Int, Long or Double and a boolean a Byte. None where the item hasn't the component, and for an unknown item.
  • item_entity

    Signature
    fn item_entity (&self, entity: EntityRef) -> Option<ItemEntityRef>
    Summary
    Narrows an entity to a dropped item, or None for another kind, a stale handle, a client, or an item temporarily taken out for ticking.
  • item_from_snbt

    Signature
    fn item_from_snbt (&self, snbt: &str) -> Option<ItemStack>
    Summary
    Decodes a saved-item compound from SNBT, for example {id:"minecraft:diamond_sword",count:1,components:{"minecraft:damage":5}}. A missing count defaults to 1, unknown fields such as Count are ignored, and stone means minecraft:stone. Returns None unless the input is one compound with only whitespace around it. Air, unknown items and patches naming a transient component are refused. A present count must be numeric and in 1 to 99 after Java's Number.intValue conversion. The text parser also enforces binary NBT's 2 MiB input and 512-level nesting bounds.
  • item_key

    Signature
    fn item_key (&self, id: &Identifier) -> Option<ItemKey>
    Summary
    Resolve an item once at load, including vanilla items, to its process-local identity. None if the completed registry does not contain the identifier.
  • item_keys

    Signature
    fn item_keys (&self) -> Vec<ItemKey>
    Summary
    Every item key in the registry's registration order: vanilla's first, then mod items in the order they registered. Empty before the item table completes.
  • known_recipes

    Signature
    fn known_recipes (&mut self) -> Arc<[i32]>
    Summary
    The book_ids of the recipes the player's recipe book holds now (the server's book on a server); empty outside a world.
  • level

    Signature
    fn level (&self, dimension: &str) -> Option<LevelRef>
    Summary
    The level dimension (minecraft:the_nether) as a handle: on a client, the level it shows, whatever the server calls it, and each level the server opened for viewing (sunrise:levels) while that view is open. A viewed level's handle answers its block reads from its own world: block_state, block, block_property, clip, collision_boxes, has_collisions, and the fluid reads built on block_state (fluid_shape, fluid_height, fluid_height_for_camera, fluid_can_be_replaced_with). get_enchant_power_bonus uses the viewed level as context. Its other reads, its entity reads and every write refuse it. It answers None while the server has the level closed; a close and a later open within the same client level make the old handle read again. A login, a reconfiguration or a respawn into another level replaces the client level: the old handle stays stale and the mod asks host.level again. None with no world open, or for a dimension the server hasn't loaded. API 373.
  • list_resources

    Signature
    fn list_resources (&self, pack_type: PackType, directory: &str, suffix: &str) -> Vec<Identifier>
    Summary
    The resources of pack_type's stack under folder directory of every namespace whose path ends in suffix, one each, in identifier order, as ResourceManager.listResources answers it: list_resources(PackType::ClientResources, "textures/item", ".png") gives minecraft:textures/item/apple.png and the rest. An empty directory lists a whole namespace. Metadata files (.mcmeta) are never listed, and a name that isn't a valid identifier is skipped. A side without that stack, or a directory that leaves its namespace, lists nothing. This read never reloads packs.
  • lit_block_name

    Signature
    fn lit_block_name (&self, pos: [i32; 3]) -> Option<BlockKey>
    Summary
    Read a loaded, light-emitting block. No implicit chunk loading.
  • living

    Signature
    fn living (&self, entity: EntityRef) -> Option<LivingRef>
    Summary
    The entity as a living entity (vanilla's LivingEntity: a mob, a player, an armor stand or the dragon), or None for another kind or a stale handle.
  • math_profile

    Signature
    fn math_profile (&self) -> MathProfile
    Summary
    The native engine's fixed selection for the seven platform-dependent Java Math operations. This read allocates nothing on the native path. It identifies behavior, not the machine. See MathProfile for the algorithms selected by each profile.
  • max_damage

    Signature
    fn max_damage (&self, item: ItemKey) -> Option<u32>
    Summary
    Default durability of the resolved item, or none if its metadata is unavailable. Stack-specific component overrides are checked at the game's write boundary.
  • max_stack_size

    Signature
    fn max_stack_size (&self, item: ItemKey) -> Option<u32>
    Summary
    The most of the item item one slot holds (Item.getDefaultMaxStackSize), or None for an unknown item: for a mod's container that fills or merges stacks itself.
  • menu_keys

    Signature
    fn menu_keys (&self) -> Vec<MenuKey>
    Summary
    Every built-in menu-type key in registry order (BuiltInRegistries.MENU order): vanilla's first, then mod types in the order they registered.
  • mob

    Signature
    fn mob (&self, entity: EntityRef) -> Option<MobRef>
    Summary
    The entity as a vanilla Mob: a mob or the ender dragon. Players, armor stands, stale handles and clients are rejected. Mobs taken out for ticking are unavailable.
  • mod_recipe_property_contains

    Signature
    fn mod_recipe_property_contains (&self, set: &str, item: ItemKey) -> bool
    Summary
    Whether a mod-created recipe property set accepts an item ID. Unknown sets/items and vanilla keys return false. The server uses its current load, and clients use the server's last synchronized generation (local preload before the first packet). The same read on LoopContext lets menu_slot_rules filter a slot identically for server and prediction. Membership reads allocate nothing and perform no registry scans.
  • on

    Signature
    fn on (&self, mod_id: &str) -> bool
    Summary
    Whether the player left mod mod_id on in Options > Mods. A mod turned off does nothing (check this first in each hook) until the launcher's next build leaves it out.
  • payload_drop_counts

    Signature
    fn payload_drop_counts (&self, id: &PayloadId ,) -> Result<Option<PayloadDropCounts>, LevelReadError>
    Summary
    The drops of Droppable channel id so far, by cause, over every connection of this game (a server's clientbound drops, a client's serverbound ones, and the server's refusals of a client over its byte budget). None for a channel that is not Droppable or not declared by an enabled mod. Err(Unavailable) when the host has no backend.
  • player

    Signature
    fn player (&self, uuid: u128) -> Option<PlayerRef>
    Summary
    Resolve a real online player by UUID, never a fake. A fake is reached through the handle returned by its factory. During a nested player swap, outer players whose records are displaced return None.
  • recipe_book_category

    Signature
    fn recipe_book_category (&mut self, kind: &str) -> Option<RecipeBookCategory>
    Summary
    Published asset/data read: available in Setup, Reloading and World. The validated category and icon of a custom recipe type, or None for an undeclared/invalid type, before resources load, or outside a world. Returns the first category in category-id order when a type has several. This local declaration may include placement predicates; it is not the category data sent to a remote client. Any invalid declaration refuses the complete generation. Rebuilt when the recipe table changes. Does not unlock any recipes.
  • recipe_ingredient

    Signature
    fn recipe_ingredient (&self, json: &str) -> Result<Option<Ingredient>, RecipeJsonError>
    Summary
    Published asset/data read: available in Setup, Reloading and World. An ingredient from recipe-file JSON text: an item, a #tag, or a list of them, a bare id as minecraft: (as vanilla reads it); test says whether a stack fits. Items the game doesn't know are left out; None for missing tags, invalid ingredients or no known named items, and outside a world. An existing-empty tag returns an empty ingredient. This helper parses standalone JSON; it does not bind a mod's custom kind. To test a custom ingredient already resolved at load, use Ingredient::test. Invalid JSON is refused with RecipeJsonError::InvalidJson.
  • recipe_result

    Signature
    fn recipe_result (&self, json: &str) -> Result<Option<ItemStack>, RecipeJsonError>
    Summary
    Published asset/data read: available in Setup, Reloading and World. A stack from recipe-file result JSON text: id (a bare one as minecraft:), count (1 by default, up to 99) and components. None without an id, for an item the game doesn't know or a count outside that, and outside a world. Invalid JSON is refused with RecipeJsonError::InvalidJson.
  • recipes_of_type

    Signature
    fn recipes_of_type (&self, kind: &str) -> Arc<[Recipe]>
    Summary
    Published asset/data read: available in Setup, Reloading and World. The recipes of registered recipe type kind (minecraft:crafting, mymod:crusher), vanilla's types and mods' own alike, from data/<namespace>/recipe/*.json of vanilla, the content mods (.smod) and the world's data packs, in file order: each one typed (Recipe: its ingredients, results, group, cooking time and experience, or its stonecutting, smithing or special crafting rule), together with its JSON. Locally loaded recipes give the original recipe JSON; synced vanilla serializers give the server's resolved item lists, and synced mod serializers give the data written by that serializer. Bound native predicates aren't written into the JSON or sent to clients. The type field names the serializer; this can differ from the reported recipe kind. Dynamic rules are not fixed outputs; use LevelRef::recipe_for for engine-matchable recipe types. Registered crafting kinds match through LevelRef::recipe_for. Cache other mod-owned types once per load/reload and match those in mod memory; those return RecipeLookupError::NotMatchable. These are the recipes in force (RecipeManager.getAllRecipesFor): data packs merged and load conditions held, so a pack's override or removal shows. A loaded recipe the API cannot represent is left out of this listing and logged at debug level with its id and reason; the rest remain in order. This does not change recipe loading. A data pack changes them on /reload, so look them up again when you need them. Empty for a type nobody uses and outside a world. These are the server's table on the server thread, a dedicated server or a LAN host; a client, the single-player window included, sees vanilla's and the content mods' recipes, not the world's data packs', unless a mod had the server send it the type (native_datapack_sync).
  • registry_entries

    Signature
    fn registry_entries (&self, registry: &str) -> Option<Vec<Identifier>>
    Summary
    Entry identifiers in the current table, each once. None for an unavailable or unknown registry; an available empty registry returns an empty list.
  • registry_entry

    Signature
    fn registry_entry (&self, registry: &str, id: &str) -> Option<RegistryEntry>
    Summary
    Resolve a canonical entry in the current side's live registry. None for an unknown registry or entry, or before that registry is available.
  • registry_entry_in_tag

    Signature
    fn registry_entry_in_tag (&self, entry: &RegistryEntry, tag: &str) -> Option<bool>
    Summary
    Membership in the current side's merged tags. None for an unavailable registry or entry; an absent tag, or a tag not containing the entry, returns false.
  • registry_protocol_id

    Signature
    fn registry_protocol_id (&self, registry: &Identifier, name: &Identifier) -> Option<i32>
    Summary
    The network id of name in registry (Registry.getId): the number a packet carries for it, for a mod that builds or reads raw packets (minecraft:particle_type and minecraft:flame). Built-in registries answer their fixed ids, mod entries included; data-driven ones (minecraft:damage_type, minecraft:biome, ...) answer the order the server synced them in; custom data component types are included. A client reads its own connection's registries, a server the ones it sends. The id holds for one connection and one data reload: do not keep it across a reconnect, a reconfiguration or /reload. None for an unknown registry or name, on a client before that registry was synced, and with no connection. Allocates nothing; each registry is searched in order. Use ItemKey::registry_id for the local prepared item number used by scatter rendering; that read is available without a connection and is not a packet lookup.
  • resource

    Signature
    fn resource (&self, pack_type: PackType, identifier: &Identifier) -> Option<Vec<u8>>
    Summary
    The winning bytes of resource id in pack_type's stack, as ResourceManager.getResource answers it: the highest selected pack that supplies the file wins. Client resources are the selected asset packs over the game's assets; server data is the world's selected data packs over the game's and mods' data, with minecraft:vanilla kept unless disabled. identifier is the resource name without its assets/<namespace>/ or data/<namespace>/ prefix, e.g. minecraft:models/block/stone.json or mymod:machines/furnace.json. Missing, unreadable and files above MAX_RESOURCE_BYTES return None; a client side (or one without that stack) also returns None. This read never reloads packs.
  • resource_stack

    Signature
    fn resource_stack (&self, pack_type: PackType, identifier: &Identifier) -> Vec<Vec<u8>>
    Summary
    Every selected pack's copy of resource identifier in pack_type's stack, lowest first and the highest pack's last, as ResourceManager.getResourceStack answers it; empty where no pack supplies it. The stack and the names are those of resource, which reads the highest pack's copy. A copy that can't be read or is above MAX_RESOURCE_BYTES is left out: when that is the highest pack's copy, the last entry is a lower pack's while resource returns None. This read never reloads packs.
  • server_data_version

    Signature
    fn server_data_version (&self) -> i32
    Summary
    The engine's DataVersion written into level data and chunks. Constant on both sides, including before a world is open; this describes this game build, not the version of a remote server or an older save.
  • server_has_time

    Signature
    fn server_has_time (&self) -> bool
    Summary
    Whether the server's current tick still has time before the next one is due (MinecraftServer.haveTime, NeoForge's ServerTickEvent.hasTime and LevelTickEvent.hasTime): a mod doing optional work in server_tick or level_tick_pre/level_tick_post skips it when this is false. Always true on a client, and outside a scheduled tick.
  • set_setting

    Signature
    fn set_setting (&self, mod_id: &str, key: &str, value: &str)
    Summary
    Keeps a mod's registered setting key. Another mod's id or an unregistered key keeps nothing. A successful write invalidates the typed read cache for this data folder and key; a failed write leaves it unchanged. This raw write does not fire setting_changed.
  • setting

    Signature
    fn setting (&self, mod_id: &str, key: &str) -> Option<String>
    Summary
    A mod's setting key (one file per key in native_data_dir). A mod reads only its own: another mod's id or a key not registered by that owner gives None.
  • state_fluid_state

    Signature
    fn state_fluid_state (&self, state: BlockState) -> Option<FluidState>
    Summary
    The fluid state state holds (BlockState.getFluidState): water for a waterlogged state, the empty fluid for most. None for an id no state has.
  • state_outline

    Signature
    fn state_outline (&self, state: BlockState) -> Option<Vec<[f64; 6]>>
    Summary
    The outline of state as BlockState.getShape answers it with an empty getter at the origin (EmptyBlockGetter.INSTANCE, BlockPos.ZERO): its boxes, each [min x, y, z, max x, y, z] in the block's own space, with no random offset and none of a world's context (a state that reads its neighbours or block entity answers what its state alone gives). Empty for a state with no outline, such as air. None for an id no state has.
  • sunrise_version

    Signature
    fn sunrise_version (&self) -> &'static str
    Summary
    Sunrise version printed in crash reports.
  • tags

    Signature
    fn tags (&self) -> &dyn Tags
    Summary
    The merged-tag service, using load-resolved item and tag keys.
  • text_from_json

    Signature
    fn text_from_json (&self, json: &str) -> Result<Option<Text>, TextFormError>
    Summary
    Reads a text component as /tellraw and ComponentSerialization.CODEC take it: one JSON or SNBT value ("plain", {"text":"Hi","color":"gold"}, ["a",{"text":"b"}], translate, extra, click and hover events), with nothing but whitespace after it (Paper's GsonComponentSerializer.deserialize). None when it does not parse as one component: an object needs one content key (a type binds alone, a null type counts as absent), text must be a string, extra a non-empty list, and a style field that is present and wrong refuses the whole component. Command, URL and page click actions use command, url and page, respectively; a legacy value-only click for those actions is refused. open_url requires a well-formed HTTP(S) URI; a malformed URI or another scheme refuses the component (Ok(None)). show_item refuses minecraft:air; a component removal (!id) requires an object value. An object whose only content key is index is refused, as in vanilla's codec; Sunrise follows vanilla there.
  • text_from_legacy

    Signature
    fn text_from_legacy (&self, legacy: &str) -> Result<Text, TextFormError>
    Summary
    Reads legacy formatting codes (§a, §l, §r...) as the font draws them (Style.applyLegacyFormat; Bukkit's ChatColor strings): a colour code resets the decorations, §r resets everything, an unknown code is dropped. & codes are not read; a mod that takes them replaces & with § first, as ChatColor.translateAlternateColorCodes does.
  • text_from_nbt

    Signature
    fn text_from_nbt (&self, tag: &Tag) -> Result<Option<Text>, TextFormError>
    Summary
    Read a component with ComponentSerialization.CODEC and NbtOps. A string is literal, including § codes. Numeric style flags are true when nonzero, and a custom click payload keeps its original NBT tag types. Ok(None) means the tag does not decode as a component; nesting beyond the 512 containers allowed by vanilla NBT returns TextFormError::TooDeep.
  • text_string

    Signature
    fn text_string (&self, text: &Text) -> String
    Summary
    Component.getString(): resolve translations, arguments, keybinds and siblings to plain characters. Styles do not add characters; literal legacy formatting codes remain.
  • text_to_nbt

    Signature
    fn text_to_nbt (&self, text: &Text) -> Result<Tag, TextFormError>
    Summary
    Encode one component with ComponentSerialization.CODEC and NbtOps. An unstyled literal with no siblings encodes as a string. Translations and styles are stored, not resolved. Refuses malformed fields and nesting beyond vanilla NBT's 512 containers.
  • unresolved_fluid_id

    Signature
    fn unresolved_fluid_id (&self, fluid: UnresolvedFluid) -> String
    Summary
    The saved name for an engine-issued unresolved fluid.
  • upgrade_nbt

    Signature
    fn upgrade_nbt (&self, _kind: NbtDataType, _data_version: i32, _nbt: Compound ,) -> Result<Compound, NbtUpgradeError>
    Summary
    Run the game's data fixers on one saved compound, from data_version to the current game data version. This needs no world, adds no DataVersion field, and runs no fixes that operate on the enclosing chunk or file. Use NbtDataType::EntityTree if the upgrade should include riders and passengers as well as the root entity. Like vanilla's standalone fixers, entity and block-entity roots can retain legacy keys alongside newly written ones.

Server (ServerHost)

  • add_objective

    Signature
    fn add_objective (&mut self, name: &str, criteria: &str, display_name: Text, render_type: ObjectiveRenderType ,) -> Result<ObjectiveRef, ObjectiveError>
    Summary
    Scoreboard.addObjective: a new objective with no number format that does not update scores' display names, shown nowhere. The name is any string, as the board takes it; the /scoreboard command only reads a single word. Refused with ObjectiveError::NameTaken or ObjectiveError::UnknownCriteria.
  • add_team

    Signature
    fn add_team (&mut self, name: &str) -> Result<TeamRef, TeamError>
    Summary
    /team add: a new team with its name as display name, no color, no members and vanilla's default options. The name is any string, as the board takes it. Refused with TeamError::NameTaken when a team has it.
  • advancement

    Signature
    fn advancement (&mut self, id: &Identifier) -> Option<AdvancementInfo>
    Summary
    ServerAdvancementManager.get(id): the loaded advancement id, from the set the last data-pack load or /reload built (loaded on first use). None when no advancement has that id.
  • attachment_validate_write

    Signature
    fn attachment_validate_write (&self, token: AttachmentWriteToken ,) -> Result<(), AttachmentRowError>
    Summary
    Validate the capture's transaction, if any, and residency in the current dimension immediately before an ordinary journaled attachment write. The token comes from a captured row, not from disk or the network. Returns Unavailable outside the world phase. In the world phase, OutsideTransaction for an expired frame takes precedence over StaleHolder for missing or mismatched residency. This does not open a transaction.
  • block_entity_sync

    Signature
    fn block_entity_sync (&mut self, pos: [i32; 3])
    Summary
    Sends clients the block at pos and its block entity's update tag (block_entity_update_tag) again, as Level.sendBlockUpdated does: with the level's other block changes, to the players who see its chunk, once however often it is called before then. Changes made in a block entity's tick go out at the start of the next tick, as vanilla's do (ServerLevel.tick broadcasts chunks before it ticks block entities). Call it when what clients show changed (a machine started), not for every tick's progress: a menu's data slots carry that. Nothing happens for an unloaded block. It also sends the one-shot fields of BlockEntityView::set_client_update_fields.
  • boss_bar

    Signature
    fn boss_bar (&self, id: &str) -> Option<BossBarRef>
    Summary
    An existing custom boss bar by id (minecraft: when no namespace), or None. Saved bars are there from the world's start, as vanilla's CustomBossEvents. Boss bars of mobs and raids are not custom boss events.
  • boss_bars

    Signature
    fn boss_bars (&self) -> Vec<BossBarRef>
    Summary
    Every custom boss bar, in the order /bossbar list shows them.
  • cancel_task

    Signature
    fn cancel_task (&mut self, id: TaskId) -> bool
    Summary
    Withdraws the waiting task identified by the opaque capability id: returns true if it was still waiting. A panic while dropping an attributed task's captures is reported against the scheduling mod, disables that mod's delayed callbacks and does not unwind through the caller.
  • close_menu

    Signature
    fn close_menu (&mut self, uuid: u128)
    Summary
    Closes the player's native menu (a menu_closed follows). During an active menu click, the close waits for the transaction to commit; an abort leaves the window open.
  • commands

    Signature
    fn commands (&mut self) -> &mut dyn Commands
    Summary
    The commands service.
  • configuration_has_channel

    Signature
    fn configuration_has_channel (&self, connection: ConfigurationConnection, channel: &PayloadId ,) -> bool
    Summary
  • configuration_send_payload

    Signature
    fn configuration_send_payload (&mut self, connection: ConfigurationConnection, channel: &PayloadId, bytes: PayloadBytes ,) -> Result<(), ConfigurationTaskError>
    Summary
    connection while its configuration epoch is active, regardless of current task state. A saved connection returns ConfigurationTaskError::Disconnected after it moves to Play. Prefer ConfigurationTaskContext::send_payload in start and tick callbacks.
  • create_boss_bar

    Signature
    fn create_boss_bar (&mut self, id: &str, name: Text ,) -> Result<Option<BossBarRef>, TextFormError>
    Summary
    /bossbar add: a new bar, visible, white, progress, at 0 of 100, with nobody added. None if the id is taken or invalid, or outside a server. Refuses text deeper than 512 component nodes before applying any changes.
  • dispense_default

    Signature
    fn dispense_default (&mut self, dimension: &str, pos: [i32; 3], facing: Direction, stack: ItemStack ,) -> Result<Option<ItemStack>, StackWriteError>
    Summary
    Drop one item as DefaultDispenseItemBehavior does. For a dispenser hook: return this remainder in its answer with CLICK; the caller plays the answer's event and smoke once. The detached stack keeps its actual count until one item is dropped; placement limits apply only to the final slot write. An enclosing transaction defers the drop in the dispenser's level until commit. A client, another dimension or an unloaded chunk keeps the input stack unchanged.
  • dispense_with_remainder

    Signature
    fn dispense_with_remainder (&mut self, dimension: &str, pos: [i32; 3], facing: Direction, stack: ItemStack, remainder: ItemStack ,) -> Result<Option<ItemStack>, StackWriteError>
    Summary
    DefaultDispenseItemBehavior.consumeWithRemainder: one of stack is used and remainder replaces it, a single stack by becoming it, else into the dispenser at pos (DispenserBlockEntity.insertItem) or, where it doesn't fit, out of its front with the click and smoke. Returns the detached active-slot remainder immediately. Inside a transaction, insertion into another slot is provisional; slot notices, overflow drops, click and smoke are published in the source level only when the enclosing transaction commits at the root. A client, another dimension or an unloaded chunk keeps stack unchanged.
  • display

    Signature
    fn display (&self, entity: EntityRef) -> Option<DisplayRef>
    Summary
    Narrows an entity to a display, or None for another kind, a stale handle or a client.
  • display_slot_objective

    Signature
    fn display_slot_objective (&self, slot: DisplaySlot) -> Option<ObjectiveRef>
    Summary
    Scoreboard.getDisplayObjective: the objective shown in the slot, or None.
  • dragon

    Signature
    fn dragon (&self, entity: EntityRef) -> Option<DragonRef>
    Summary
    The entity as the ender dragon, or None for another kind, a stale handle or a client.
  • edit_blocks

    Signature
    fn edit_blocks (&mut self, dimension: &str, edit: &BlockEdit) -> Result<u64, String>
    Summary
    For a server mod: the runs made at once, straight into the chunks of the authoritative level dimension (the one being ticked, as for native_set_block), with what fill ... strict does for block entities (a block replaced by another loses its block entity, and a new block gets the one native_set_block would give it, a mod block's included); no neighbour is told and the replaced block entity's contents do not drop. Inside a transaction in this level, the new blocks and entities are visible at once; abort quietly restores both, with the connection group each replaced block had. The changed chunks go to the players whole, with their resulting connection groups, only after the level's outermost commit. At positions also written with LevelRef::set_block, strict and ordinary edits commit in call order; the strict edit never spills a container or requests neighbor updates. Runs in chunks not loaded, and the parts of runs outside the column, are left out. The blocks changed, or why the edit was left out, with nothing changed: another dimension, a client of a server, a palette entry or predicate that fails typed validation, a run naming a palette entry or filter past the end, or more than 65536 filters.
  • experience_orbs

    Signature
    fn experience_orbs (&self, dimension: &str, min: [f64; 3], max: [f64; 3]) -> Vec<ExperienceOrb>
    Summary
    The experience orbs of the server level dimension whose box meets the box min..max, in the level's order: what a mod reads before it cancels an orb in entity_join_level, to give its points with PlayerRef::give_experience_points. Empty for a level not in place, on a client of a server and for a bound that is not finite (NaN or infinite); a minimum above its maximum is the same box with the two swapped (AABB).
  • fake_player

    Signature
    fn fake_player (&mut self, level: LevelRef, uuid: u128, name: &str) -> Option<PlayerRef>
    Summary
    Create or retrieve a connectionless player for the level currently in place.
  • fishing_hook

    Signature
    fn fishing_hook (&self, entity: EntityRef) -> Option<FishingHookRef>
    Summary
    Narrows an entity to a cast fishing hook. None for another kind, a stale handle, a client, or a hook taken out for its tick.
  • fluid_interaction_result

    Signature
    fn fluid_interaction_result (&self, source: FluidState, neighbour: BlockState, below: BlockState ,) -> Option<BlockState>
    Summary
    What a liquid cell of source becomes beside one cell (neighbour, a block state whose fluid is read through it, so a waterlogged block holds water) with below under it: the open world's fluid interaction table (vanilla's lava rules, then every mod's entries, as LiquidBlock.shouldSpreadLiquid and NeoForge's FluidInteractionRegistry walk it) for that one neighbour, with the same exact-tag and family matching, a source cell's result for a source and the flowing result otherwise. None is no interaction, and for a fluid with no entries or one that has no world form. A pure read: it changes no world, fires no fluid_place_block and plays no fizz. A liquid checks its five neighbours in vanilla's order, above, north, south, west, east (never below), and the first that answers wins: loop over them in that order to ask the same.
  • game_rule

    Signature
    fn game_rule (&self, id: &str) -> Result<GameRuleValue, GameRuleReadError>
    Summary
    Read the server-wide rule from the first server hook onward. Returns UnknownRule for an unknown id; level reads use the same store.
  • game_rules

    Signature
    fn game_rules (&self) -> Vec<(String, GameRuleValue)>
    Summary
    Every current rule in the one server-wide store, by namespaced id. Readable from server_about_to_start, before any level exists. Level game-rule reads use this same store once their level exists.
  • game_tests_enabled

    Signature
    fn game_tests_enabled (&self) -> bool
    Summary
    Startup opt-in for test-only content. Test registration runs regardless.
  • holder_team

    Signature
    fn holder_team (&self, holder: ScoreHolder) -> Option<TeamRef>
    Summary
    Scoreboard.getPlayersTeam: the team the holder is on, or None when it is on none or does not resolve. Membership is by the holder's key, so an offline player's name works.
  • kill_mob

    Signature
    fn kill_mob (&mut self, dimension: &str, id: u32) -> bool
    Summary
    Kills mob id as /kill does: it falls and drops its loot. False for no such living mob or another dimension.
  • levels

    Signature
    fn levels (&self) -> &dyn Levels
    Summary
    The levels service.
  • menu

    Signature
    fn menu (&self, uuid: u128, window: i32) -> Option<MenuRef>
    Summary
    The menu open_menu opened that the player has open as window window (the window id open_menu, menu_clicked and menu_closed give). Its slots are written as ItemPlace::MenuSlot in a transaction, and the client is sent each changed slot with the next tick's container sync (AbstractContainerMenu.broadcastChanges), as for any open menu. None for another window, a menu the game opened, or a player who isn't here.
  • menu_set_items

    Signature
    fn menu_set_items (&mut self, uuid: u128, window: i32, items: Vec<Option<ItemStack>> ,) -> Result<(), MenuItemsRefusal>
    Summary
    Replaces everything the player's open open_menu menu window shows with items (by slot, padded with empty ones, extra ones dropped, as open_menu takes them) and sends it at once as one ClientboundContainerSetContentPacket (AbstractContainerMenu.sendAllDataToRemote), without reopening the menu: the title, the cursor and the screen stay. Writing slots through menu sends each changed slot with the next tick's sync instead; this is the whole-contents form, for a page turned or a list rebuilt. Each refusal sends nothing and changes nothing, and is named by MenuItemsRefusal: Client, NoPlayer (no placed player of that UUID), NotOpen (window is not their open native menu), Stack (a stack the game's item conversion refuses), or OwnedSlots (use ItemPlace::MenuSlot for an owned window). Inside a transaction, an abort puts the display contents back without sending a packet.
  • merchant

    Signature
    fn merchant (&self, entity: EntityRef) -> Option<MerchantRef>
    Summary
    Narrows an entity to a villager or wandering trader, or None for another kind, a stale handle, or a client.
  • messages

    Signature
    fn messages (&self) -> &dyn Messages
    Summary
    The messages service.
  • minecart

    Signature
    fn minecart (&self, entity: EntityRef) -> Option<MinecartRef>
    Summary
    Narrows an entity to a minecart of any kind, or None for another kind of entity, a stale handle, a client, or an entity held out of storage.
  • objective

    Signature
    fn objective (&self, name: &str) -> Option<ObjectiveRef>
    Summary
    Scoreboard.getObjective: the objective with that name, or None. The name is any string; saved objectives are there from the world's start.
  • objectives

    Signature
    fn objectives (&self) -> Vec<ObjectiveRef>
    Summary
    Scoreboard.getObjectives: every objective. Vanilla keeps them in a hash map, so no order is promised; Sunrise answers its board's own.
  • open_menu

    Signature
    fn open_menu (&mut self, uuid: u128, rows: u8, title: Text, items: Vec<Option<ItemStack>>, replace: MenuReplace ,) -> Result<Option<i32>, StackWriteError>
    Summary
    Opens a chest menu of rows rows (1 to 6) titled title for the player, showing items (by slot, padded with empty ones), in place of the menu they had open: its window id, a new one each time (ServerPlayer.openMenu). The old menu closes as a close does, its cursor stack going back to the player's inventory; replace says whether the client is first sent a close for it (MenuProvider.shouldTriggerClientSideContainerClosingOnOpen). MenuReplace::InPlace changes the title and rows without the client centring the mouse again. Packets for the old window are ignored. The items of an open menu change through its slots (menu), not by opening it again. An active speculative menu click refuses the open with Ok(None).
  • place_recipe_in_grid

    Signature
    fn place_recipe_in_grid (&mut self, recipe: &str, grid_width: u16, grid_height: u16, grid_slots: Vec<u16>, clear_slots: Vec<u16>, use_max_items: bool ,) -> Result<bool, String>
    Summary
    Only inside recipe_book_place, once per click: places recipe, the recipe that hook was asked about, into a grid of the open mod menu as vanilla's ServerPlaceRecipe.placeRecipe does. grid_width and grid_height give the grid's cells, row by row; grid_slots the menu slot of each cell (a recipe never fills a cell past the last slot given); clear_slots the slots emptied first, their items going back to the player's inventory (the grid's slots are cleared too). use_max_items places as many sets as the items allow (Shift), else one more than the grid holds when it already matches. Items are taken from the player's inventory and from what the menu's sources lend. Candidate IDs and client displays do not replace the server's recheck of live stacks, including custom predicates. Returns whether items were missing: the grid was cleared and the answer for ghost. Refused (and nothing changes) outside that hook, on a second call, for another recipe, a slot the menu lacks or hides, a repeated slot, an empty grid, a recipe larger than the slots given, a slot whose pickup a part refuses, or a player with no room for the cleared items outside creative mode.
  • place_template

    Signature
    fn place_template (&mut self, source: &StructureTemplateSource, at: [i32; 3], pivot: [i32; 3], rotation: StructureRotation, mirror: StructureMirror ,) -> Result<(), String>
    Summary
    For a server mod: template source placed at at the way /place template and a structure block's load place one, with rotation, mirror and pivot, the level position the turn and the mirroring go around (at, which /place template uses, turns the template about its own origin). Blocks, block-entity data and the template's own entities come through vanilla's placement, so states are mirrored then turned, block entities keep their data and get the loot seed a placement gives them, and entities are spawned as the game spawns them: no processor runs, nothing is strict, and the neighbours of a replaced block are not told. A template read from structure NBT is read by the game's own loader, within vanilla's limits for a template file (a structure/*.nbt read under NbtAccounter.unlimitedHeap, gzipped or plain). Err says why nothing was placed: an id that doesn't parse or has a . or .. part, a template the game doesn't have, NBT that doesn't read or is past those limits, a template that places nothing, a client of a server, a chunk of the template's box not loaded, or the game's structure resources missing. API @API:structure_template@.
  • players

    Signature
    fn players (&self) -> &dyn Players
    Summary
    The players service.
  • players_send_payload

    Signature
    fn players_send_payload (&mut self, players: &[PlayerRef], id: &PayloadId, bytes: PayloadBytes ,) -> u32
    Summary
    Queue the same application bytes on each of players' connections: one crossing and one buffer for the whole group, where player_send_payload repeats both per player. Each send follows player_send_payload's rules; a player whose send is refused (offline or stale, no channel, wrong phase, backpressure, framing) is skipped and not counted. Returns how many sends were accepted, which is 0 for an empty list; a player listed twice is sent to twice. Publication waits for root commit; abort publishes nothing.
  • profiles

    Signature
    fn profiles (&self) -> &dyn Profiles
    Summary
    The profiles service.
  • projectile

    Signature
    fn projectile (&self, entity: EntityRef) -> Option<ProjectileRef>
    Summary
    Narrows an entity to a projectile: one in the projectile list, a trident a player threw or a firework rocket. None for another kind, a stale handle or a client.
  • read_columns

    Signature
    fn read_columns (&self, dimension: &str, columns: &[(i32, i32)], heightmap: Heightmap, range: (u32, u32) ,) -> Result<ColumnBlocks, String>
    Summary
    For a server mod: below blocks under and above blocks from each column's height by heightmap, as a palette of complete BlockState values and indexes, with each column's server-side biome JSON water colour (water_colors, 0xRRGGBB; 0 where not loaded; air outside the column and in columns not loaded). Colormap-derived grass and foliage tints are client-side only: read blended tints on the client with BlockAndTintGetter::block_tint in block tint callbacks or ClientHost::biome_tint in other client hooks. Err says why nothing was read: another dimension or a client of a server, below + above of 0 or more than the level's height, or a read of more than 1,048,576 blocks (MAX_READ; it runs on the server tick, so read big areas in pieces).
  • reload_resources

    Signature
    fn reload_resources (&self) -> &dyn ServerReloadResources
    Summary
    The retained server reload listeners of the last successful reload.
  • runtime_levels

    Signature
    fn runtime_levels (&mut self) -> &mut dyn RuntimeLevels
    Summary
    The runtime_levels service.
  • schedule_task

    Signature
    fn schedule_task (&mut self, delay_ticks: u32, task: Box<dyn FnOnce (&mut dyn ServerHost)> ,) -> Result<TaskId, ScheduleError>
    Summary
    Runs task once after delay_ticks server ticks, matching vanilla's MinecraftServer.schedule(TickTask) / BlockableEventLoop.runAllTasks. Due tasks drain to exhaustion after both the server_tick start hook and the server_tick end hook, so delay_ticks == 0 runs in the current tick (including 0-delay tasks scheduled from inside a running task). A paused server does not advance the delay. Tasks due together run in the order they were scheduled.
  • server_is_published

    Signature
    fn server_is_published (&self) -> bool
    Summary
    Whether the server is open to players other than a single-player world's owner (MinecraftServer.isPublished): always true on a dedicated server; on a single-player world's server, true while it is open to LAN (the Open to LAN screen or /publish) and false again once that ends (/unpublish). No hook fires when it changes: read it when the answer matters.
  • server_max_players

    Signature
    fn server_max_players (&self) -> Option<u32>
    Summary
    The most players who may be on at once (PlayerList.getMaxPlayers, max-players), as the server list shows it. Logins at or above the limit are refused unless they bypass it. None where no server is open to players (a client, or a server nobody can join).
  • server_set_max_players

    Signature
    fn server_set_max_players (&mut self, max_players: u32) -> Result<(), PlayerLimitRefusal>
    Summary
    Sets the player limit from the next login and server list ping on (Paper's Server.setMaxPlayers); players already on stay, even when they are more than the new limit. The existing login bypass still applies (dedicated operators flagged bypassesPlayerLimit). server.properties is not changed, so a restart goes back to its max-players. Writes nothing and refuses with PlayerLimitRefusal::NotOpen where no server is open to players, and with TooHigh { maximum } for a limit above i32::MAX, as vanilla keeps the limit in an int (Paper's setMaxPlayers takes one). Zero is taken: it refuses all new logins that do not bypass the limit.
  • server_set_simulation_distance

    Signature
    fn server_set_simulation_distance (&mut self, distance: i32) -> bool
    Summary
    Sets the server's simulation distance live, as PlayerList.setSimulationDistance does: every player is sent ClientboundSetSimulationDistancePacket, and the chunks around the players tick to the new distance from the next tick. server.properties is not written. False for a distance outside 2 to 32, and off a dedicated server.
  • server_set_view_distance

    Signature
    fn server_set_view_distance (&mut self, distance: i32) -> bool
    Summary
    Sets the server's view distance live, as PlayerList.setViewDistance (and the management protocol's serversettings/view_distance/set) do: every player is sent ClientboundSetChunkCacheRadiusPacket and their chunks follow, each up to what their client asked for. server.properties is not written, so a restart goes back to it. False for a distance outside 2 to 32, and off a dedicated server (an integrated server follows its window's option).
  • server_simulation_distance

    Signature
    fn server_simulation_distance (&self) -> Option<i32>
    Summary
    The server's simulation distance in chunks (PlayerList.getSimulationDistance, simulation-distance): how far around each player chunks tick. None off a server open to players.
  • server_view_distance

    Signature
    fn server_view_distance (&self) -> Option<i32>
    Summary
    The server's view distance in chunks (PlayerList.getViewDistance, view-distance): how far players are sent chunks at most. None off a server open to players.
  • set_block_property

    Signature
    fn set_block_property (&mut self, pos: [i32; 3], key: &str, value: &str) -> bool
    Summary
    Sets property key of the block at pos to value, as a furnace's tick sets its lit (Level.setBlock with UPDATE_ALL: neighbours and clients are told); true when the block changed, false when the block has no such property or value, or the property already has value (as Level.setBlock for an unchanged state). The block entity stays.
  • set_block_property_with

    Signature
    fn set_block_property_with (&mut self, pos: [i32; 3], key: &str, value: &str, flags: i32 ,) -> bool
    Summary
    native_set_block_property with Level.setBlock's flags, as a brewing stand's tick sets its bottles with flags::UPDATE_CLIENTS. Players get the write when UPDATE_CLIENTS is set; false when this window isn't a server, and in each case native_set_block_property returns false.
  • set_display_slot

    Signature
    fn set_display_slot (&mut self, slot: DisplaySlot, objective: Option<ObjectiveRef>) -> bool
    Summary
    Scoreboard.setDisplayObjective: shows the objective in the slot, or clears the slot with None. Clients are sent the change by the board's usual per-tick sync. False for a stale objective.
  • set_experience_orb

    Signature
    fn set_experience_orb (&mut self, dimension: &str, id: u32, value: Option<i32>, count: Option<u32>, age: Option<u32> ,) -> bool
    Summary
    Writes the experience orb id's value (the points a pickup gives), count (orbs merged into it, each worth value) and age (ticks lived; an orb despawns at 6000); a None is left as it is. Signed values are preserved, including zero and negative values. False, and nothing written, for an orb not in the server level dimension, a count of 0 or above i32::MAX, an age above i32::MAX (ExperienceOrb.age is an int), a value outside -32768..=32767 (a save keeps Value as a short and Count as an int, so a write it accepts reloads unchanged), and on a client of a server. In experience_orb_merge, a write to into is the merged orb.
  • set_tick_rate

    Signature
    fn set_tick_rate (&mut self, rate: f32) -> bool
    Summary
    Sets the server's tick rate, as /tick rate does (ServerTickRateManager.setTickRate): the game ticks rate times a second from the next tick on, an autosave wait already running is shortened when the new rate asks for less, and server_tick_rate_changed fires. The players' clients follow on the next sync. False, with nothing changed, for a rate outside 1 to 10000 (the command's range), one that isn't finite, a call from inside server_tick_rate_changed (which would hear itself again without end), or on a client.
  • spawn_falling_block

    Signature
    fn spawn_falling_block (&mut self, dimension: &str, state: BlockState, pos: [f64; 3], velocity: [f64; 3], falling: Falling ,) -> bool
    Summary
    Throws a falling block of state from pos (its bottom centre) at velocity (blocks a tick) in the level in place, dimension: it falls, lands and places itself as sand does, or drops as an item where it can't. The block at pos is left as it is: take it away first with native_set_block to make a block fall out of the world. False, with nothing thrown, on a client's copy of the world, for another dimension, an air or unknown state, a chunk that isn't loaded, a value that isn't finite, or with 1024 falling blocks in the level already. Each axis of velocity is cut to 3.9.
  • spawn_projectile_from_rotation

    Signature
    fn spawn_projectile_from_rotation (&mut self, owner: LivingRef, entity_type: &Identifier, stack: &ItemStack, offset: f32, power: f32, inaccuracy: f32 ,) -> Option<ProjectileRef>
    Summary
    projectile: snowball, egg, pearl, potion, experience bottle, wind charge, or a registered mod thrown type. Constructs at the owner's eyes minus 0.1F blocks (wind charges use eye height directly), sets ownership before shooting, inherits known movement (vertical only while airborne), adds to the level and fires projectile_launch. Spread draws x, y, z triangular noise from the new projectile's own random. Once it is in the level, stack's enchantments run their projectile_spawned effects on it (Projectile.applyOnProjectileSpawned): in the stack's order, each effect's requirements tested with the level random just before it applies, its own draws from the projectile's random. Does not consume the stack or apply item-use cooldowns or statistics. None for an unavailable owner or one in another level, unsupported type, invalid stack or non-finite shot parameter. Also refuses a stack with a projectile_spawned effect the engine does not apply: ignite, apply_impulse, play_sound and all_of of those apply (apply_mob_effect and apply_exhaustion do nothing to a projectile, as in vanilla); the block, damage, explosion, particle, summon, function and item-damage effects are refused rather than skipped. No random is drawn and nothing spawns on those refusals. Unsupported requirement contexts (including entity flags) and invalid clamped level-value ranges also refuse before insertion. Type predicates, random chance and their boolean combinations are supported. The original stack is unchanged; carried count is one; the effects see the stack as given.
  • structure_template

    Signature
    fn structure_template (&mut self, id: &str, at: [i32; 3], rotation: StructureRotation, mirror: StructureMirror ,) -> Option<StructureTemplateSnapshot>
    Summary
    For a server mod: structure template id (mymod:hut, found as StructureTemplateManager.get finds it: the world's saved structures, then the game's and the mods' own) as /place template id would place it at at with rotation and mirror, without placing anything. The blocks come in vanilla's placement order (full blocks, the others, then those with a block entity, each by y, x, z), from the palette /place template picks at at; no processor runs, and the template's entities are left out. None for an id that doesn't parse or has a . or .. part, a template the game doesn't have, and on a client. API @API:structure_template@.
  • summon

    Signature
    fn summon (&mut self, dimension: &str, kind: &str, pos: [f64; 3], nbt: Compound) -> Option<u32>
    Summary
    Spawns an entity of kind (minecraft:item_display) at pos in the level in place, dimension, from nbt (its compound, as /summon <kind> <pos> <nbt> takes it; passengers included): its id. None on a client's copy of the world, for another dimension, a position outside /summon's bounds, a chunk that isn't loaded, a kind Sunrise can't load, or one a mod kept out (entity_join_level). Inside a transaction its join waits for the root commit, so a mod keeping it out is not known at the call: the id is returned and names nothing from the commit on.
  • surface_heights

    Signature
    fn surface_heights (&self, dimension: &str, columns: &[(i32, i32)], heightmap: Heightmap ,) -> Result<Vec<Option<i32>>, String>
    Summary
    For a server mod: each column's height by heightmap in the authoritative level dimension (the one being ticked), none for a column not loaded. Err says why nothing was read: another dimension or a client of a server, or more than 65,536 columns (MAX_COLUMNS).
  • team

    Signature
    fn team (&self, name: &str) -> Option<TeamRef>
    Summary
    Scoreboard.getPlayerTeam: the team with that name, or None.
  • teams

    Signature
    fn teams (&self) -> Vec<TeamRef>
    Summary
    Scoreboard.getPlayerTeams: every team, in the board's own order (vanilla's is a hash map's, so no order is promised).
  • terrain_surface

    Signature
    fn terrain_surface (&self, dimension: &str, columns: &[(i32, i32)] ,) -> Result<Vec<Option<TerrainColumn>>, String>
    Summary
    Read the level generator before features, without creating, holding or loading chunks. One optional answer per input column, in order, independent of loaded chunks and previous calls. Height counts from the level top: the Nether returns its roof, not a floor. The top block omits slope rules and may differ even from an undecorated chunk. Trees, ores and other features are absent. Void columns and worlds without their own generator return None. Refuses before reading on a client, for a dimension other than the one being ticked, or for more than MAX_TERRAIN_COLUMNS inputs. One noise sample per column on the server tick; slow calls log the column count when the slow-call threshold is enabled.
  • tick_rate_is_frozen

    Signature
    fn tick_rate_is_frozen (&self) -> Option<bool>
    Summary
    Whether the server's ticking is frozen (TickRateManager.isFrozen, /tick freeze). A frozen server still runs the ticks /tick step asks for, so server_tick_start's world_running can be true while this is true. None on a client.
  • tick_stats

    Signature
    fn tick_stats (&self) -> (f32, f64)
    Summary
    The server's tick rate (20 unless /tick rate changed it) and the milliseconds its ticks took on average lately, as /tick query reports them. The ticks a second it keeps up is the rate, or 1000 / milliseconds when that is lower.
  • tick_times

    Signature
    fn tick_times (&self) -> Vec<u64>
    Summary
    The last 100 server ticks' durations in nanoseconds, as MinecraftServer.getTickTimesNanos lays them out: the tick numbered n at index n % 100, 0 where none was recorded yet. Sort a copy for percentiles; tick_stats has the average.
  • transaction_lifecycle

    Signature
    fn transaction_lifecycle (&self) -> TransactionLifecycle
    Summary
    Where the transaction system is (Transaction.getLifecycle): none open, one open, a nested one closing, or the outermost closing while the game tells the world of a commit.
  • world_data_files

    Signature
    fn world_data_files (&self) -> &dyn ConfigFiles
    Summary
    sunrise-mod-data/<mod id>/, copied, backed up and deleted with that save. Paths omit the mod id. Calls refuse with NoWorld before a save is open; this service never outlives its borrowed world host.
  • world_dir

    Signature
    fn world_dir (&self) -> Option<PathBuf>
    Summary
    The open world's folder (world/, beside its level.dat): a server mod keeps its data in a folder of its own there, so the world's backups carry it. None when no world is open.

Client (ClientHost)

  • add_particle

    Signature
    fn add_particle (&mut self, options: &ParticleOptions, at: [f64; 3], velocity: [f64; 3]) -> bool
    Summary
    ClientLevel.addParticle: submits one local particle through the ordinary provider, camera-distance, setting and population limits. False without a loaded client world, for non-finite input or for an item crumb whose colour has a component outside 0 to 1. True means submitted, not necessarily visible. For a registered ParticleType, pass ty.options(value); the matching client factory receives the value and original auxiliary inputs before the particle is queued.
  • add_toast

    Signature
    fn add_toast (&self, toast: ModToast) -> Result<(), AddToastError>
    Summary
    Submit a notification to the window's toast manager. The next toast update offers it to toast_add as ToastKind::Mod before inserting or replacing anything. An accepted matching kind restarts the display time in place; a veto leaves any existing toast untouched. Calls from toast_add itself wait for the following update. Refuses the whole request if its text or item icon cannot be represented.
  • apply_screen_blur

    Signature
    fn apply_screen_blur (&self) -> bool
    Summary
    Requests vanilla's menu background blur for this frame, with a per-frame guard so blur is applied at most once per frame. Returns true if blur was newly requested this frame, or false if it was already applied/requested this frame. API @API:screen_transparent_background@.
  • audio_device

    Signature
    fn audio_device (&self) -> String
    Summary
    The output device the options ask for (Options.soundDevice).
  • audio_devices

    Signature
    fn audio_devices (&self) -> Vec<String>
    Summary
    The output devices sound can play on (SoundEngine.getAvailableSoundDevices).
  • audio_options

    Signature
    fn audio_options (&self) -> ClientAudioOptions
    Summary
    A snapshot of the current audio preferences.
  • bake_layer

    Signature
    fn bake_layer (&self, layer: &str) -> Option<ModelPart>
    Summary
    Entity model layer layer baked into its ModelPart tree, each part at its pose, as EntityModelSet.bakeLayer bakes it: one a native mod registered (register_layer_definitions), or vanilla's, by the name entity-models.json gives it (minecraft:zombie#main, minecraft:player#main). The tree is the caller's own copy: bake it once, as a renderer does, and set its parts' poses each frame. None for a layer neither has. A vanilla layer no mob has (a player's, a chest's) is read from the resources each call, so slow. API @API:model_layers@.
  • biome_tint

    Signature
    fn biome_tint (&self, pos: [i32; 3], resolver: ColorResolver) -> Result<u32, LevelReadError>
    Summary
    The resolver's blended colour at pos in the current client level, as opaque ARGB. Like ClientLevel.getBlockTint (BiomeColors.getAverageGrassColor and its counterparts), this samples a square at the block's height using the client's biome blend radius and the same biome colours as the mesher, including updates from Self::refresh_biome_colors. Use ColorResolver::Grass or ColorResolver::Foliage without looking up a block state or a model. For a specific block or fluid face, use Self::block_tint_color. Returns LevelReadError::Unavailable outside the World phase or when the host has no client level to read.
  • block_sprites

    Signature
    fn block_sprites (&self, blocks: &[BlockState]) -> Vec<Option<BlockSprites>>
    Summary
    Published asset/data read: available in Setup, Reloading and World. For a client mod: what each resolved block state draws on its six sides, preserving its properties without reparsing names. Resolve states once at load. Each face's sprite (array and layer, as WorldDrawn::block_sprites cuts them) and its texture by the name cube and quad take, where it lies on the side, how its texture runs across it (FaceSprite::quad_on draws it on another block's box, turned as its model turns it), its tint source and index (block_tint_color) and whether it is cut out, translucent or animated; its particle sprite; whether it is a plain cube. None for a block the game does not know. The model is the state's first random variant. API 380.
  • block_sprites_version

    Signature
    fn block_sprites_version (&self) -> u64
    Summary
    Published asset/data read: available in Setup, Reloading and World. For a client mod: changes each time the resources load (a resource pack turned on or off can move every sprite): ask native_block_sprites again then. API 380.
  • block_tint_color

    Signature
    fn block_tint_color (&self, state: BlockState, tint_index: i32, pos: [i32; 3]) -> Option<u32>
    Summary
    For a client mod drawing a block's faces itself (a copycat drawing its material's, from block_sprites): the 0xRRGGBB colour a face of state with tint index tint_index (FaceSprite::tint_index) is multiplied by at pos, as the chunk mesher tints it there (biome blend included). Grass, foliage and water use the client's current biome colours, including updates from Self::refresh_biome_colors. A face's own tint source or a pack colormap can give it a different colour. Returns None for an untinted face (-1, or an index past the state's tints). For a biome colour independent of the face's tint source, use Self::biome_tint.
  • camera

    Signature
    fn camera (&self) -> Option<Camera>
    Summary
    The most recently extracted world frame's camera, if one exists. During GUI rendering this is the current frame, including bob/spin and FOV.
  • camera_entity

    Signature
    fn camera_entity (&self) -> Option<EntityRef>
    Summary
    The entity the view follows (Minecraft.getCameraEntity): the entity a server attached the camera to, else the local player. None outside a client world.
  • camera_type

    Signature
    fn camera_type (&self) -> CameraType
    Summary
    The window's camera type (Options.getCameraType), including its latest pending request.
  • chat_line

    Signature
    fn chat_line (&mut self, line: Text) -> Result<(), TextFormError>
    Summary
    Adds line to this client's chat HUD and history (vanilla's ChatComponent.addClientSystemMessage): it shows here only, so nothing is sent to the server. The Chat option's server-message filter doesn't hide it (GuiMessageSource.SYSTEM_CLIENT), and client_chat_received is not told: vanilla fires that event from ChatListener for lines the server sent, not for lines the client adds itself. Returns an error if the text exceeds the boundary's size or nesting limits; rejected text is not added.
  • chat_options

    Signature
    fn chat_options (&self) -> ClientChatOptions
    Summary
    A snapshot of the current chat preferences.
  • clear_particles

    Signature
    fn clear_particles (&self) -> bool
    Summary
    ParticleEngine.clearParticles: every particle and emitter goes before the next frame is drawn or the next particle tick runs, whichever comes first. It takes &self, so a screen or render hook can ask, as with native_play_local_sound. False on a server.
  • client_executor

    Signature
    fn client_executor (&self) -> Option<ClientExecutor>
    Summary
    The calling mod's handle for submitting work to the client thread from any thread. Obtain it in client_setup and clone it into workers that cannot borrow a host. Returns None when the client loop is unavailable or closing, on restricted hosts such as the client-side entity_entering_section callback, or after a task from the calling mod panicked in this client session.
  • client_scoreboard

    Signature
    fn client_scoreboard (&self) -> Result<Option<ClientScoreboard>, TextFormError>
    Summary
    What this client has been sent of the scoreboard: the objectives shown in a display slot, with their scores, and every team. None outside a logged-in client world. A text the API cannot hold (nested deeper than 512 component nodes) refuses the whole snapshot with TextFormError::TooDeep; nothing is flattened or skipped.
  • client_session

    Signature
    fn client_session (&self) -> &dyn ClientSession
    Summary
    The client_session service.
  • client_surface_heights

    Signature
    fn client_surface_heights (&self, columns: &[(i32, i32)], heightmap: Heightmap ,) -> Result<Vec<Option<i32>>, String>
    Summary
    Each column's height by heightmap in the world this window shows (LevelReader.getHeight(type, x, z) on a client level): one above the highest block that counts on that map, from the blocks the server has sent, none for a column whose chunk this client does not hold. Err, reading nothing, for no client world (the title screen) or more than 65,536 columns (MAX_COLUMNS).
  • clipboard_text

    Signature
    fn clipboard_text (&self) -> Option<String>
    Summary
    The clipboard's text (KeyboardHandler.getClipboard), empty when it holds none, while the game handles a key, mouse or typed-text event: a mod's key or screen hook pasting into its own field. None at any other moment (a tick, a frame, a packet), so no mod reads the clipboard without the player doing something, and None on a server.
  • clock

    Signature
    fn clock (&self) -> Option<Clock>
    Summary
    The clock of the world this window shows, for client mods: its game time and time of day as the server last sent them (ClientboundSetTimePacket), advanced each tick between packets; none on the title screen.
  • close_screen

    Signature
    fn close_screen (&mut self) -> bool
    Summary
    Closes the open screen as its Escape key does: a container screen closes as the player's container close (ServerboundContainerClosePacket with the menu's id, then the client menu closed), a pause menu closes to the game, and another screen runs its own close. The sign editor sends its sign update (ServerboundSignUpdatePacket), as Escape does. A book closes with nothing sent; a lectern's book closes its menu (ServerboundContainerClosePacket). A confirmation, a server's pack prompt or a dialog open over another screen is the one that closes. Declining a required pack disconnects rather than returning to the screen underneath. The screen hooks fire as for Escape. The death screen, the code of conduct and a dialog Escape cannot close do not close this way. False when no screen is open (or, outside a world, when it cannot act).
  • container_click

    Signature
    fn container_click (&self, request: &ContainerClickRequest ,) -> Result<ServerboundPlayPacket, PacketBuildError>
    Summary
    Builds a vanilla container click; it needs the host because the packet carries hashed stacks. Uses this connection's registries and component codecs, refusing components that cannot be encoded or hashed, unrepresentable IDs/slots and more than 128 changed slots. Applies no menu checks or local effects; submit the result with send_packet.
  • create_dynamic_texture

    Signature
    fn create_dynamic_texture (&mut self, id: &Identifier, width: u32, height: u32, rgba: &[u8] ,) -> Result<(), DynamicTextureError>
    Summary
    Vanilla's TextureManager.register of a DynamicTexture under id, then its upload: the calling mod's RGBA image id, in its own namespace (mymod:dynamic/panel), made from rgba, width * height pixels of four bytes, row by row from the top left. The image takes a slot of the HUD atlas's dynamic texture pool, of the smallest class (DYNAMIC_TEXTURE_CLASSES) that holds it, and id names it as a GUI sprite of width x height pixels: DrawContext::sprite (src in the image's own pixels), DrawContext::gui_nine_slice, DrawContext::tiled_sprite and gui_sprite draw and find it as they do any GUI sprite, from the next frame on. It lasts, through resource reloads, until free_dynamic_texture or the game's end.
  • create_fireworks

    Signature
    fn create_fireworks (&mut self, request: &FireworksRequest) -> bool
    Summary
    ClientLevel.createFireworks: draws a firework's explosions in this client's world as a bursting rocket draws them (FireworkParticles.Starter): each explosion's shape, colours, fade colours, trail and twinkle, one every other tick. The blast, and the crackle after a twinkling explosion, play only when request.audible, as for a rocket that isn't silent. Only the picture and the sound: no entity, no damage, nothing sent to the server, and other players see nothing (a mod's server half tells each client half to draw it). True means queued; false on a server, without a client player or world, for non-finite input or for more than 256 explosions. API @API:client_fireworks@.
  • creative_search_items

    Signature
    fn creative_search_items (&mut self) -> Vec<ItemStack>
    Summary
    The creative search tab's final display order, for ranking stacks in inventory sorters. This requests the same catalog as the creative screen (using the player's permission and Operator Items Tab option). On a miss it dispatches the creative build hook. During setup, reload, a different build, or without a live catalog, this returns an empty list.
  • cross_passage

    Signature
    fn cross_passage (&mut self, passage: PassageId) -> Result<(), PassageCrossError>
    Summary
    Moves the window's player through passage (#3775), one its server told it of, as Immersive Portals' client does: its feet, where it was a tick ago (so the frames between two ticks do not jump), its velocity and its look come out at the far side, turned with the passage, and the server is told the passage and where the feet were. Nothing else of the player changes: on ground, fall distance, sprinting, what it uses. The server checks the move to there as any move, then answers with a position packet that changes nothing (all relative and zero), so the player keeps its velocity; as any position packet does, it stops mining (a passage crossed while mining aborts the dig). A refused crossing puts the player back where the server has it (Self::last_passage_refusal says why). One crossing at a time: the next waits for the server's answer. Refused, with nothing moved or sent, when not connected to a server, with no player, while riding, for a passage the window does not hold, when the feet are more than 20 blocks from the opening, and when a mod's client_packet_send cancels the crossing's payload.
  • crosshair_target

    Signature
    fn crosshair_target (&self) -> Option<CrosshairTarget>
    Summary
    The committed client_pick result (Minecraft.hitResult), computed at partial tick 1.0 before each tick's inputs, including while paused, and at the frame's partial tick before extraction. Each input reads its tick's result; the highlight reads the frame's result. Reads during dispatch see original. None before the first pick, without a client world or on a miss. Consumption never recasts or rechecks target liveness; a block broken earlier in a tick remains that tick's use target.
  • cursor

    Signature
    fn cursor (&self) -> [f32; 2]
    Summary
    Where the mouse is, in GUI pixels.
  • debug_overlay_visible

    Signature
    fn debug_overlay_visible (&self) -> bool
    Summary
    Whether the client draws its debug overlay this frame. Always-on debug entries can make it visible with F3 off. F1 hides the overlay unless a screen is open.
  • disconnect

    Signature
    fn disconnect (&mut self, reason: Option<Text>) -> Result<(), DisconnectError>
    Summary
    Leaves the server or the single-player world (NeoForge's IClientCommonPacketListenerExtension.disconnect(Component)), at the end of this frame, not inside the calling hook. With a reason, the disconnect screen shows it (a single-player world is saved first); with none, it leaves as the pause menu's Disconnect does. The request belongs to the world it was made in: one made while that world closes is dropped, never carried into the next. A second call in the same frame replaces the reason. The retained reason renders in the active language at draw and narration time; literal text stays unchanged. DisconnectError::Unavailable when no server or world is joined. The reason is local to the client, not encoded into a packet.
  • drop_held

    Signature
    fn drop_held (&mut self, hold: HoldId) -> Result<(), HoldError>
    Summary
  • dynamic_texture_budget

    Signature
    fn dynamic_texture_budget (&self) -> Result<DynamicTextureBudget, DynamicTextureError>
    Summary
    What the calling mod may still create: images and bytes of pixels left of its DYNAMIC_TEXTURE_MOD_IMAGES and DYNAMIC_TEXTURE_MOD_BYTES. These are limits of the atlas pool, which vanilla's TextureManager does not have. A free slot of a class is not part of it: the slots are shared by every mod. Unavailable when the atlas has no pool, NotOwned when no mod is calling.
  • enchantment_min_cost

    Signature
    fn enchantment_min_cost (&self, id: &str, level: u32) -> Option<i32>
    Summary
    Enchantment.getMinCost(level): the enchanting power needed, or None for an unknown id.
  • enchantment_supports

    Signature
    fn enchantment_supports (&self, id: &str, item: ItemKey) -> bool
    Summary
    Whether item is in enchantment id's supported_items (Enchantment.isSupportedItem). Does not consult Item Part overrides.
  • enchantments

    Signature
    fn enchantments (&self) -> Vec<EnchantmentInfo>
    Summary
    Registered enchantments in registry order, including selection weight and anvil_cost (the base anvil fee per enchantment level). This and the other enchantment reads use the table built from the server's synced entries when available, and the local table otherwise.
  • flame_particle

    Signature
    fn flame_particle (&mut self, at: [f64; 3], soul: bool)
    Summary
    A small local vanilla particle; caller should rate-limit emission.
  • fluid_name

    Signature
    fn fluid_name (&self, fluid: &str) -> String
    Summary
    Fluid fluid's name as the lang names it (fluid_type.<mod>.<name>, vanilla's by its block), else its path in words.
  • free_dynamic_texture

    Signature
    fn free_dynamic_texture (&mut self, id: &Identifier) -> Result<(), DynamicTextureError>
    Summary
    Vanilla's TextureManager.release: frees the calling mod's image id. The GUI sprite id is gone at once, the slot goes back to the pool for any mod, and the image and its bytes go back to the mod's budget. Refused by name, with nothing changed: Unavailable, NotOwned for an id outside the mod's namespace and Unknown for one that names no image.
  • give_stack

    Signature
    fn give_stack (&mut self, stack: &ItemStack) -> Result<Option<ItemStack>, CreativeGiveError>
    Summary
    Creative mode only: puts stack, components and all, into the local player's inventory as Inventory.add does: onto matching stacks (the selected slot, the off hand, the hotbar, then the main inventory), then into empty slots, up to the stack's effective maximum (minecraft:max_stack_size included). Every slot it changed goes to the server at once as MultiPlayerGameMode.handleCreativeModeItemAdd does (ServerboundSetCreativeModeSlotPacket; the off hand is slot 45), even while a container menu is open. Ok(Some(remainder)) is what did not fit; nothing is dropped. A CreativeGiveError gives nothing (including FeatureDisabled when the connected server does not enable the item's required feature flags).
  • graphics_options

    Signature
    fn graphics_options (&self) -> ClientGraphicsOptions
    Summary
    A snapshot of the current graphics preferences.
  • gui_options

    Signature
    fn gui_options (&self) -> ClientGuiOptions
    Summary
    A snapshot of the current GUI and accessibility preferences. Its gui_scale is only the option, where 0 means automatic; read Self::gui_scale for the scale the window applies.
  • gui_scale

    Signature
    fn gui_scale (&self) -> Option<u32>
    Summary
    The GUI scale in effect (Window.getGuiScale), at least 1; none on a server or when no window exists. Vanilla's Window.calculateScale resolves it from the GUI Scale option and the window size: the option is a maximum (0 = automatic, not a guarantee), and with the Unicode font forced an odd result is raised by one. This read returns the scale the window applies, never a separate recomputation. Divide Self::window_size by this scale, rounding up, for the GUI-scaled width and height (Window.getGuiScaledWidth/Height).
  • gui_sprite

    Signature
    fn gui_sprite (&self, sprite: &Identifier) -> Option<AtlasRegion>
    Summary
    Published asset/data read: available in Setup, Reloading and World. For a client mod: where GUI sprite sprite lies in the GUI atlas and its size, none for one the atlas lacks or whose entry its definition removed (a server's metrics-only atlas lacks them all). The atlas names its sprites by GUI id, the id its definition lists them under: minecraft:container/slot (also given as container/slot), a mod's mymod:panel; a sprite a registered sprite source made in gui.json is found by the id it named, and a live texture (create_dynamic_texture) by its own.
  • gui_ticks

    Signature
    fn gui_ticks (&self) -> i32
    Summary
    The HUD tick counter (Hud.getGuiTicks): advances once per unpaused client tick, including on the title screen, independently of server tick freeze. Wraps as a Java int.
  • has_channel

    Signature
    fn has_channel (&self, id: &PayloadId) -> bool
    Summary
    Whether the connected server has channel id for the connection's current phase (NeoForge's ICommonPacketListener.hasChannel): the test send_payload_to_server makes before it queues anything, so true means that send won't return UnsupportedPeer (it may still refuse the bytes, for their size or under backpressure). False with no connection, for a channel declared for the other phase or direction, and for an optional channel the server did not negotiate.
  • has_waypoints

    Signature
    fn has_waypoints (&self) -> bool
    Summary
    Whether the server tracks any waypoint for this client (ClientWaypointManager.hasWaypoints), the waypoints the locator bar draws. The HUD's contextual bar reads the same fact. Which bar the HUD shows is not exposed: vanilla's Hud.nextContextualInfoState is private.
  • hold_packets

    Signature
    fn hold_packets (&mut self) -> Result<HoldId, HoldError>
    Summary
    A second hold is refused with Limit while one is active. The limits are 256 packets and 1,048,576 encoded bytes. Overflow ends and flushes the hold oldest first; its next release or drop returns Limit. Network-thread replies (keep-alives, chunk batch acknowledgements, cookies) bypass holds.
  • hud_mode

    Signature
    fn hud_mode (&self) -> HudMode
    Summary
    Read effective HUD visibility independently of first-person hands.
  • input_options

    Signature
    fn input_options (&self) -> ClientInputOptions
    Summary
    A snapshot of the current input preferences.
  • instance_group_destroy

    Signature
    fn instance_group_destroy (&self, group: InstanceGroupRef) -> Result<(), GroupError>
    Summary
    Retire retained model copies; use InstanceGroupRef::destroy.
  • instance_group_set_len

    Signature
    fn instance_group_set_len (&self, group: InstanceGroupRef, len: u32) -> Result<(), GroupError>
    Summary
    Set the drawn length; use InstanceGroupRef::set_len.
  • instance_group_set_transform

    Signature
    fn instance_group_set_transform (&self, group: InstanceGroupRef, transform: [f32; 12] ,) -> Result<(), GroupError>
    Summary
    Replace the group pose; use InstanceGroupRef::set_group_transform.
  • instance_group_write

    Signature
    fn instance_group_write (&self, group: InstanceGroupRef, first: u32, instances: &[ModelInstance] ,) -> Result<(), GroupError>
    Summary
    Atomically overwrite retained model copies; use InstanceGroupRef::write.
  • instance_groups

    Signature
    fn instance_groups (&self) -> &dyn InstanceGroups
    Summary
    Persistent model groups.
  • is_key_down

    Signature
    fn is_key_down (&self, key: &str) -> bool
    Summary
    Whether a specific key is currently held down. key is the vanilla physical key or mouse button name (key.keyboard.left.shift, key.mouse.left, key.mouse.4, for example). Unknown names are not down. Modifier combinations use ClientHost::modifiers.
  • is_paused

    Signature
    fn is_paused (&self) -> bool
    Summary
    The applied client pause state, not whether a pause screen is open.
  • item_particle_options

    Signature
    fn item_particle_options (&self, stack: &ItemStack) -> Option<ParticleOptions>
    Summary
    Resolve vanilla's ItemParticleOption for this stack using the ground display context and seed 0, exactly like the game's eating particles. Includes every resolved model layer's particle sprite, respecting resource packs and stack component overrides. Returns None for an invalid stack or unavailable resources/provider. Available in Setup, Reloading and World. Resolve again after a resource reload; this read allocates the sprite list.
  • item_uses_block_light

    Signature
    fn item_uses_block_light (&self, stack: &ItemStack, context: ItemDisplayContext) -> bool
    Summary
    ItemStackRenderState.usesBlockLight of stack's model resolved for context (ItemModelResolver.updateForTopItem, no owner or level): whether the model is lit as a block is, from the side (gui_light: side, vanilla's 3D item models), where a flat item is lit from the front. It is what the 1.21.3 BakedModel.isGui3d became: a mod uses it to draw a stack as a flat sprite or as a 3D model. False for an empty or invalid stack, and for a model that draws nothing. Reads the model the client resolved from its resource packs.
  • jumpable_vehicle

    Signature
    fn jumpable_vehicle (&self) -> Option<EntityRef>
    Summary
    The vehicle the local player controls that can jump now (LocalPlayer.jumpableVehicle): the player is its controlling passenger (getControlledVehicle: the first one, on its saddle) and it can jump (PlayerRideableJumping.canJump): a saddled horse, donkey, mule, nautilus or camel, the camel neither sitting nor getting up or down; a pig or a strider never jumps. The HUD's jump bar makes the same decision. None when the player controls no such vehicle (a second passenger included), or outside a client world.
  • last_passage_refusal

    Signature
    fn last_passage_refusal (&self) -> Option<(PassageId, PassageCrossRefusal)>
    Summary
    The server's refusal of the window's last crossing (Self::cross_passage) and the passage it named, until the next crossing; None when it was not refused or no answer came yet.
  • local_item_use

    Signature
    fn local_item_use (&self) -> Option<ItemUse>
    Summary
    The local player's ordinary item use as the client sees it: the hand, ticks used and ticks left (isUsingItem, getUsedItemHand, getTicksUsingItem, getUseItemRemainingTicks). None when the player uses no item or no client world is open. Does not report input intercepted by crate::ClientItemUseBehavior. Sends nothing.
  • local_player

    Signature
    fn local_player (&self) -> Option<PlayerRef>
    Summary
    The local player in a logged-in client world.
  • menu_blur_radius

    Signature
    fn menu_blur_radius (&self) -> f32
    Summary
    The user's configured menu background blur radius (menuBackgroundBlurriness in options.txt, usually 0.0 to 10.0; default 5.0). 0.0 means blur is turned off. API @API:screen_transparent_background@.
  • microphone_devices

    Signature
    fn microphone_devices (&self) -> Result<Vec<MicDevice>, MicRefusal>
    Summary
    Lists the client's available audio input devices, each with a distinct opaque selector (MicDevice::id) and a human-readable display label (MicDevice::label). Returns an empty list when no input devices exist or client audio capture is disabled. An individual inaccessible endpoint does not hide other available inputs. On macOS, listing does not request microphone permission.
  • millis

    Signature
    fn millis (&self) -> u64
    Summary
    Milliseconds on the game's own clock (Util.getMillis), counting from the game's start: what a text field's cursor blinks by and what tells a double click from two clicks. Only differences between two readings mean anything.
  • mod_key_mapping

    Signature
    fn mod_key_mapping (&self, owner: &str, id: &str) -> Result<ModKeyMappingRef, ModKeyRefusal>
    Summary
    Resolve owner's registered mapping id once after registration, usually in client_setup. Keep the handle for subsequent calls; save the owner and id, not the handle. Any mod can resolve, read, rebind or reset any registered mapping. Returns ModKeyRefusal::NotRegistered for an unknown owner or id and ModKeyRefusal::Unavailable when there is no client backend in this host.
  • mod_screen

    Signature
    fn mod_screen (&self) -> Option<&str>
    Summary
    The mod whose own screen is currently open, if one is (Escape, or another screen replacing it, closes it). This is a live query for the screen open right now; inside screen_closing or screen_*_post hooks, read event.screen.mod_screen to identify the screen that received the event even after a synchronous replacement or close.
  • mod_screen_close

    Signature
    fn mod_screen_close (&mut self, mod_id: &str)
    Summary
    Closes mod mod_id's own screen, if it is open.
  • mod_screen_open

    Signature
    fn mod_screen_open (&mut self, mod_id: &str) -> bool
    Summary
    Opens a screen of mod mod_id's own through the normal screen-transition path (Gui.setScreen): screen_opening and screen_closing fire for the transition and screen_init_post runs once it opens, so the mod mounts widgets in screen_init_post, draws in screen_render_post, and takes its clicks, scroll, keys, and typing there; the mouse is freed, and Escape closes it. Every mod's own screen has the ScreenView.id mod and sets ScreenView.mod_screen to its owning mod id, so a mod's screen hooks check event.screen.mod_screen == Some("my_mod") (or live mod_screen() to query the currently open screen). It doesn't pause a single-player game (as the inventory doesn't). Can replace any open vanilla screen, title screen, overlay (book, sign editor, dialog, or prompt), or another mod's screen, running the replaced screen's close cleanup once hooks allow the transition. Replacing a server-pack prompt leaves the server's request unanswered, as in vanilla Gui.setScreen. Returns true when mod_id's screen is open, and false when cancelled or redirected by screen_opening, while a world or connection is loading, or without a client window (a headless/dedicated server, the server thread, or guest-acting contexts). A gamepad can close it (B, Start) and activate focused mounted controls. That activation does not dispatch screen mouse hooks.
  • modifiers

    Signature
    fn modifiers (&self) -> ClientModifiers
    Summary
    The current window modifier keys in the same GLFW encoding as input hooks. Cleared when the window loses focus; available even outside a world.
  • move_local_player_by

    Signature
    fn move_local_player_by (&mut self, delta: [f64; 3] ,) -> Result<Option<[f64; 3]>, LevelWriteError>
    Summary
    Moves the local player by delta in blocks, as Entity.move(MoverType.SELF, delta). The move uses the player's usual collisions and step height, and updates its ground and fall state, including the usual effects of collisions and blocks on velocity. Available to client hooks with world access. For per-tick movement call from the local player's client-side player_tick_pre, before its own movement. This sends no packet and fires no entity_move hook (that hook is server-only). A section change is reported through entity_entering_section at the position write, before the move updates collision flags, ground, fall distance and velocity. The normal position report carries the movement and ground flag, and the server checks the report as usual. Returns the displacement actually made, or Ok(None) without moving if there is no local player, the player is dead, sleeping or riding, or a component is non-finite or outside ±64 blocks. Err(LevelWriteError::Unavailable) means the call is outside a world phase or the engine couldn't finish the move.
  • muffle_sounds

    Signature
    fn muffle_sounds (&mut self, amount: f32, lowpass: f32, ticks: u32, exempt: &[& str]) -> bool
    Summary
    Muffles the game's sounds for a while, as ears ringing after a close blast hear them: amount (0 to 1) of every sound's volume is taken away and lowpass (0 to 1) dulls it, from untouched to a 300 Hz low-pass. Both start in full and fade back in a straight line over ticks client ticks, held while the game is paused. The sound events in exempt (mymod:ear.ringing) play clearly through it, those already playing too, so the mod's own ringing stays sharp. Everything else is muffled, music and the interface's clicks included. A new call replaces the muffle in place; ticks 0 ends it at once. Nothing changes while no mod calls it. False, with nothing changed, on a server, for an amount or strength outside 0 to 1, or for an exempt event that isn't namespace:path or more than 64 of them. API @API:muffle_sounds@.
  • narrate

    Signature
    fn narrate (&mut self, text: &Text, when: Narration) -> Result<(), NarrateError>
    Summary
    Has the narrator say text as a system message, through the same GameNarrator the game's own narration uses: Narration::Now is saySystemNow (cuts off what is being said), Narration::Queued is saySystemQueued. The player's Narrator option, the voice volume and the narrator's log of recent lines apply as to vanilla's lines. The text is the component's plain string (Component.getString) in the current language, bounded only by the component's own form limits. Nothing reaches the server. Refused with nothing said, by name, as NarrateError lists: an empty line, the option Off or Chat only, or no speech. Available from client setup onward.
  • observed_screen_id

    Signature
    fn observed_screen_id (&self) -> Option<ScreenId>
    Summary
    The same screen identifier provided to screen hooks.
  • open_audio_stream

    Signature
    fn open_audio_stream (&self, _spec: &StreamSpec, _source: Box<dyn AudioStream> ,) -> Result<AudioStreamRef, AudioRefusal>
    Summary
    Gives the mixer a native source of interleaved signed 16-bit PCM, like NeoForge's SoundInstance.getStream. The mixer takes ownership and calls AudioStream::read serially on the output's shared worker as it needs frames, with no Host or world borrow. The device callback requests PCM but never calls or waits for the source. Returning 0 signals EOF so already-queued frames drain before playback stops; return n > 0 without writing to the zeroed buffer for temporary silence. An async or network producer bridges through its own nonblocking buffer inside AudioStream::read.
  • open_chat

    Signature
    fn open_chat (&mut self, text: &str) -> Result<(), String>
    Summary
    Opens the chat screen with text typed in for the player to finish and send, as T and / open it; nothing is sent. Returns an error with no player in a world or while another screen is open.
  • open_inventory

    Signature
    fn open_inventory (&mut self) -> bool
    Summary
    Opens the player's inventory as the inventory key does: locally, with no packet (the player menu is always open on the server). Riding a vehicle with its own inventory sends the open-inventory player command (ServerboundPlayerCommandPacket), as the key does. False with a screen already open, for a spectator, in a portal transition, or with no world.
  • open_microphone

    Signature
    fn open_microphone (&self, _spec: &MicSpec) -> Result<MicRef, MicRefusal>
    Summary
    Opens live PCM capture from the system default or selected input device directly on the client. Returns a client-local MicRef readable from any thread off the OS audio callback: MicRef::read writes only validated whole interleaved signed 16-bit PCM frames from a bounded MIC_RING_MAX_MS ms ring that drops the oldest frames on overflow, leaving any unreturned suffix untouched and returning 0 immediately on concurrent reader contention. Calling MicRef::close or dropping the handle stops capture and waits for the stream's teardown thread to release the OS input device before returning; a backend device error also releases the OS stream promptly without waiting for close, drop, or a tick. The engine never records or transmits captured audio. On macOS, opening a matching input can wait for the operating system's first microphone permission decision, before probing the input configuration. A label matching only an output does not request microphone permission.
  • panel_items

    Signature
    fn panel_items (&mut self, mod_id: &str, items: Vec<Stack>)
    Summary
    Shows the panel beside container screens with these items (at most 8192), as the game's own slots in pages, with a search box; the player's clicks, searches and keys over items, and items dragged off the panel onto the screen (PanelEvent::Dropped), come back as panel_event. The panel is the last mod's to show one; empty items and no recipe page take yours away.
  • panel_recipes

    Signature
    fn panel_recipes (&mut self, mod_id: &str, page: Option<RecipePage>)
    Summary
    Shows page in mod mod_id's item panel instead of its items, drawn by the game with its own slots (RecipePage, RecipeView): a title and a back button, tabs, and the recipes paged to the panel's height. None, or a page without recipes, shows the items again. The renderer's limits are cut, never refused: 256 recipes and 16 tabs a page, 27 slots, 4 results and 8 fluids each way a recipe, 64 stacks a slot. The same title and tab again keep the page the player turned to. Clicks on its slots, actions, page turns, the back button and tabs come back as panel_event.
  • panel_search

    Signature
    fn panel_search (&mut self, mod_id: &str, text: &str)
    Summary
    Sets the text in mod mod_id's item panel search box (panel_items), called by the panel's owner itself: mod_id must be the mod whose hook or part is making the call and whose panel is showing; any other call changes nothing, so one mod can't rewrite another's search (another mod asks the owner, through the owner's published integration). The text, cut to the box's 50 characters counted in UTF-16 code units as vanilla's box counts them, goes into the box the next time the owner's panel draws its box, never during this call: the box's value is replaced, the cursor goes to its end, the panel goes back to its first page, and the owner hears panel_event Search(text), the event the player's typing sends. No keystrokes are simulated. A later call before that replaces an earlier one; the player editing the box first, or another mod taking the panel, drops it; text the box already holds changes nothing, its cursor and selection included. Set while no container screen is open, it waits for the panel to appear. A viewer jei clearing its own box calls host.panel_search("jei", "") from one of its hooks. JEI's IIngredientFilter.setFilterText.
  • panel_style

    Signature
    fn panel_style (&mut self, mod_id: &str, style: PanelStyle)
    Summary
    How mod mod_id's item panel (panel_items) looks from now on: PanelStyle::RecipeBook (the default: the recipe book's page arrows and a plain search box), PanelStyle::Viewer (square page buttons on a bar over the items and the viewer's search box, as Sunrise's Recipes panel draws them) or PanelStyle::Classic (JEI's list on Minecraft 1.12: flush right under page buttons that always show and wrap around, the search box at the foot of the screen with a settings button that opens the mod's page in Options > Mods). The viewer's look changes only the drawing; the classic one also lays the panel out. Kept for the session, whether or not the panel is showing.
  • particle_count

    Signature
    fn particle_count (&self) -> u32
    Summary
    The particles alive in the client's level (ParticleEngine.countParticles): 0 once a clear is asked, and on a server.
  • place_recipe

    Signature
    fn place_recipe (&mut self, book_id: i32, all: bool) -> Result<(), String>
    Summary
    Places a recipe in the open screen's grid as a click in the recipe book does (ServerboundPlaceRecipePacket): the inventory's grid or a crafting table's. all places as many as the items allow, as with Shift. Refused while no such screen is open and for a recipe the player's book doesn't hold; one missing items shows as a ghost.
  • play_local_sound

    Signature
    fn play_local_sound (&self, sound: &SoundPlay, after: u32) -> Option<SoundRef>
    Summary
    Plays sound for this player only (SoundPlay's event: minecraft:ui.button.click, or a mod's own from its assets/<id>/sounds.json): nothing is sent to the server, and other players don't hear it. It takes &self, so a screen, key or mouse hook can play one: the sound is queued and starts at the next audio update (once a client tick), after ticks counted from then (0 to 1200, a minute; SoundEngine.playDelayed). SoundPlay::ui plays it at the listener as an interface sound (SimpleSoundInstance.forUI); SoundPlay::at at a position in the client's level, fading with distance (volume past 1 carries farther, 16 blocks times the volume), as thunder heard after the flash or a blast heard when its shock wave arrives. Its SoundRef follows and controls this play: state, stop and fade. None, with nothing played, on a server or for a value out of range (SoundPlay::effects included, by SoundEffects::valid); an event the resources don't have plays nothing, as vanilla's, and its handle reads Stopped once the update has tried it. Its effects stay as given unless the sound ticks: a play_sound listener can change them on each live refresh.
  • playing

    Signature
    fn playing (&self) -> bool
    Summary
    Playing, with nothing over the world: keys and zoom apply.
  • potions

    Signature
    fn potions (&self) -> Vec<PotionInfo>
    Summary
    Registered potions (Registries.POTION), in registry order, each by its registry id: vanilla's 46, from minecraft:water to minecraft:infested (content mods cannot declare potions yet). The game builds the list once; each call copies it. A mod builds the potion, splash, lingering or tipped-arrow stack itself with the minecraft:potion_contents component.
  • preset_editor_dimensions

    Signature
    fn preset_editor_dimensions (&self) -> Option<Compound>
    Summary
    A copy of the open world_preset_editor screen's working dimension stems. Stays available to screen hooks while world_preset_editor is open alongside the bound PresetEditor.
  • project

    Signature
    fn project (&self, at: [f64; 3]) -> Option<[f32; 3]>
    Summary
    World point at projected on this frame's screen (GameRenderer.projectPointToScreen): normalised device x and y, -1 to 1 across the screen (x to the right, y up), and depth z (reversed: nearer is larger). The view is the camera's rotation without bob or spin, as vanilla's. Unlike vanilla, None for a point behind the camera or a non-finite at; also None outside a world, before extraction, and between render frames. Supported during GUI, screen and world drawing after camera extraction. In GUI pixels of a DrawContext of size [w, h]: ((x + 1) / 2 * w, (1 - y) / 2 * h).
  • push_player

    Signature
    fn push_player (&mut self, kick: [f32; 3])
    Summary
    For a client mod: a push added to the local player's velocity, in blocks a tick, as an explosion's knockback is (the window's player moves itself, as vanilla's client does). Each component is clamped to -4..4; a spectator, or a value that is not a number, is left alone.
  • raycast

    Signature
    fn raycast (&self, distance: f32) -> Option<Hit>
    Summary
    The first block along the view within distance (at most 1024), in loaded chunks only; None on a miss.
  • recipe_book_ids

    Signature
    fn recipe_book_ids (&mut self, recipe_id: &str) -> Arc<[i32]>
    Summary
    The book_ids of the recipe recipe_id (minecraft:stick), the ids transfer_recipe, place_recipe and known_recipes use: one for each way the recipe book shows it, in the book's order. For a recipe viewer, which has the recipe from recipes_of_type. A server numbers its recipes itself and names none of them, so an id is given only when the server sent the recipe book entry with that number and this client's own numbering of the recipe agrees with it: the entry is the same recipe (the same result, category and ingredients), so two different recipes with identical displays cannot be told apart. Empty otherwise: a recipe the server sent no entry for (the player's book does not hold it, or it was removed), one the server numbers differently, one the book doesn't show (campfire, stonecutting, smithing, a mod's own type), an unknown id, and outside a world. The answer changes when the server adds, replaces or removes entries and when recipes reload or arrive, and no hook announces a recipe book change: query it when you use it, rather than keeping an answer from recipes_received.
  • refresh_biome_colors

    Signature
    fn refresh_biome_colors (&mut self)
    Summary
    Asks biome_colors again for every biome and, when the colours differ from those in use, rebuilds every loaded section and the far terrain with them (LevelRenderer.allChanged, as changing Biome Blend does). Call it when your colours change (a new season, a new day of a slow fade) and once when the player joins, not every frame: a rebuild takes the workers a few seconds.
  • refresh_render_visibility

    Signature
    fn refresh_render_visibility (&mut self)
    Summary
    Asks block_render_visibility again for every state and, when the answers differ from those in use, remeshes every loaded section with them. While a mod listens to section_visibility, rebuilds meshes in the player's current level and asks about them again, except for a first all-air compile with no section geometry contributors. Other viewed levels do not call that hook; no NeoForge counterpart has been verified. Call it when a decision changes (a toggle key, a scan finishing), not every frame. With no part answering or listener, the mesher keeps its no-mod path.
  • release_held

    Signature
    fn release_held (&mut self, hold: HoldId) -> Result<usize, HoldError>
    Summary
    Send reports the number published and the remaining packets are dropped. Disconnect, protocol changes and aborted travel invalidate the id.
  • render_assets

    Signature
    fn render_assets (&self) -> &dyn RenderAssets
    Summary
    The render_assets service.
  • request_client_quit

    Signature
    fn request_client_quit (&self) -> bool
    Summary
    Ask the local client to quit, even from the title screen without a world open. The client uses the normal Quit Game path after the calling hook returns, disconnecting from any server and waiting for an integrated server to save and release its world lock before exiting. This is not a server operation. Returns true if the request was recorded, not if shutdown succeeded; returns false if there is no live client or a quit is pending or underway.
  • screen_exclusion

    Signature
    fn screen_exclusion (&self) -> Vec<[f32; 4]>
    Summary
    Where the open screen draws outside its rect, and where mods draw over it: the recipe book's panel, the creative tab rows, the active effects beside the inventory, then whatever screen_exclusion_areas adds. Each is [x, y, width, height] in GUI pixels; an empty or non-finite one is dropped. A mod that lays out its own panels (a recipe viewer) keeps them clear of these. Client-side; empty with no screen up.
  • screen_hovered_stack

    Signature
    fn screen_hovered_stack (&self) -> Option<ItemStack>
    Summary
    The full stack in the slot under the pointer on the open container or creative screen (AbstractContainerScreen.getHoveredSlot().getItem()), including creative catalog display slots; None over no slot, an empty slot, or with no container or creative screen open.
  • screen_pos

    Signature
    fn screen_pos (&self) -> Option<[i32; 3]>
    Summary
    The position of the currently shown mod menu opening. Use crate::MenuScreenOpen::pos while constructing its screen instead. An explicit absent position from the server stays None.
  • screen_slot

    Signature
    fn screen_slot (&self, menu: &str, slot: usize) -> Option<[f32; 2]>
    Summary
    Where the shown mod menu screen for menu puts backing slot slot from the next frame (Slot.x, Slot.y in GUI pixels from the screen's top left, the item's top left corner): where set_screen_slot last put it, else where the screen declared it. None for an inactive/hidden slot, another menu type's screen, or no shown mod screen.
  • screen_title

    Signature
    fn screen_title (&self) -> Option<String>
    Summary
    The open menu's title (the block's name, or the one it was given), as plain text.
  • select_hotbar_slot

    Signature
    fn select_hotbar_slot (&mut self, slot: u8) -> Result<(), HotbarSlotError>
    Summary
    For a client mod: chooses the local player's hotbar slot, slot (0 to 8), as Inventory.setSelectedSlot does for a number key. It sends nothing itself: the game sends the carried-item packet at the next tick's start at the latest, and before the packets of an attack, a use, an interact, a release, a drop and a continued block break (not before a block break start). Refused above 8 with OutOfRange, without a client world with NoWorld, and for a spectator with Refused (its number keys open the spectator menu), leaving the selection as it was.
  • send_chat

    Signature
    fn send_chat (&mut self, message: &str) -> Result<(), String>
    Summary
    A mod's chat line or command (/ first), sent as send_chat sends it (ClientPacketListener.sendChat / sendCommand), to any server: no chat history, and no client chat event (vanilla's ClientChatEvent comes only from ChatScreen). An error when the player isn't in a server's play state or the Chat option blocks the message. API 404.
  • send_packet

    Signature
    fn send_packet (&mut self, packet: ServerboundPlayPacket) -> Result<(), SendPacketError>
    Summary
    Submits a vanilla play packet to any server, including unrelated plugin payloads. The body is validated once and outgoing credit is reserved before acceptance. Publication waits for the current root transaction to commit; rollback, disconnect, or a protocol incarnation change cancels it. Registered and engine-reserved channels are refused: use their payload or service API. Unrelated plugin bodies retain vanilla's discard-codec limit. No effects are applied locally. Typed packet builders validate wire fields; sequence numbers and required client state remain the mod's responsibility. Chat and commands use send_chat, which owns signing. API 409.
  • send_payload_to_server

    Signature
    fn send_payload_to_server (&mut self, id: &PayloadId, bytes: PayloadBytes ,) -> Result<PayloadAccepted, PayloadSendError>
    Summary
    Queue exact application bytes to the connected server, using the frozen declaration for its current protocol. Optional absent channels return UnsupportedPeer. Frame refusal and Backpressure write no application bytes. The root transaction owns publication and cancellation.
  • set_block_extra_models

    Signature
    fn set_block_extra_models (&mut self, pos: [i32; 3], models: &[ModelRef] ,) -> Result<(), BlockExtraModelsError>
    Summary
    The standalone models (resolved with RenderAssets::model) drawn as part of the block at pos in this client's level, as NeoForge's ModelData lets a block's model choose parts at run time without a block state for each choice: a cable's per-side channel counts. The chunk mesher draws them after the block's own models, unturned from the block's lower north-west corner (with its offset), in the block's own light and tints. Each quad takes its render layer as a block's would (cut out, translucent), and a face with a cull direction is culled by the neighbour there as the block's own faces are. On air they draw nothing.
  • set_camera_entity

    Signature
    fn set_camera_entity (&mut self, entity: EntityRef) -> bool
    Summary
    Points the view at entity (Minecraft.setCameraEntity), as a server's camera packet does; the local player's own ref puts it back. True when the view now follows it; false, with nothing changed, for a stale ref, an entity this window is not shown, or one the camera cannot follow (only the local player and mobs). While the view is off the player, the player sends no moves (LocalPlayer.isControlledCamera). When the camera entity is removed, the view returns to the local player. A mod can also release the view by calling this with the player's ref; this client-only selection does not notify the server.
  • set_camera_type

    Signature
    fn set_camera_type (&self, camera_type: CameraType)
    Summary
    Request the window's camera type without cycling, also from shared-host callbacks. The last request wins and Self::camera_type reports it immediately. Requests before or during camera_pose apply to that frame's camera, FOV and spectator post effects; later requests apply at the next frame's camera extraction. Explicit pose overrides remain unchanged when vanilla placement is refreshed. No cycle hook is emitted.
  • set_clipboard_text

    Signature
    fn set_clipboard_text (&self, text: &str) -> bool
    Summary
    Puts text on the clipboard (KeyboardHandler.setClipboard) on the same terms as native_clipboard_text reads it. False, with nothing copied, at any other moment or on a server; empty text copies nothing, as vanilla's.
  • set_collision_exclusions

    Signature
    fn set_collision_exclusions (&mut self, boxes: &[[f64; 6]] ,) -> Result<(), CollisionExclusionsError>
    Summary
    For a client mod: the local player's collision exclusions, the client half of EntityRef::set_collision_exclusions, with the same boxes, rules and refusals (a client with no player of its own answers Stale). The client moves its player itself, so a mod sets the same boxes on both sides: the engine sends neither set to the other.
  • set_hud_mode

    Signature
    fn set_hud_mode (&mut self, mode: HudMode)
    Summary
    Select HUD and hand visibility, including after vanilla F1 input handling. Other first-person hand restrictions and render cancellation still apply. This does not change the player's F1 preference for mandatory mod-error diagnostics.
  • set_local_player_on_ground

    Signature
    fn set_local_player_on_ground (&mut self, on_ground: bool) -> bool
    Summary
    For a client mod: sets the local player's on-ground flag. Write it from player_tick_pre: this tick's jump decision reads it, and the move that follows sets it again from the collision, so the report to the server carries the flag the move left. false, and nothing changes, with no player of its own.
  • set_local_player_velocity

    Signature
    fn set_local_player_velocity (&mut self, velocity: [f64; 3]) -> bool
    Summary
    For a client mod: sets the local player's velocity (Entity.setDeltaMovement), in blocks per tick. Write it from player_tick_pre: the tick's own move then integrates it, and the position report the move produces is checked by the server as any report is, so a velocity the server's speed test or collision check refuses is corrected there. The write replaces the velocity outright, as the client's handling of a motion packet does, and nothing is sent. false, and nothing changes, with no player of its own and for a value that is not finite.
  • set_local_rotation

    Signature
    fn set_local_rotation (&mut self, yaw: f32, pitch: f32) -> Result<(), LocalRotationError>
    Summary
    Turns the local player's view to yaw and pitch (degrees), as setYRot and setXRot store them: yaw as given (not wrapped; the server wraps it), pitch % 360 then clamped to -90..90. The previous-frame angles move by the same amount, as Entity.turn does for the mouse, so the view doesn't jump for a frame. Sends no packet: the game's own player sync of this client tick sends the look in its one move packet, only while the camera is the player (the rotation-only packet when riding); a call after that step goes out the next tick. NotFinite, changing nothing, for a NaN or infinite value; NoWorld outside a client world.
  • set_overlay_message

    Signature
    fn set_overlay_message (&mut self, line: Text, animate_color: bool) -> Result<(), TextFormError>
    Summary
    Shows line over this window's hotbar (the action bar), as Hud.setOverlayMessage does: it replaces the current line, empty text included, and restarts the stock overlay timer and fade (Hud.tick, Hud.extractOverlayMessage). animate_color cycles the colour as a jukebox's "Now Playing" line does. One slot: a server's action-bar packet or a jukebox message replaces a mod's line, and a mod's line replaces theirs. Nothing joins chat or its history, no chat event fires, nothing is narrated and nothing is sent. Text the boundary refuses is an error and the previous line stays.
  • set_preset_editor_dimensions

    Signature
    fn set_preset_editor_dimensions (&self, dimensions: Compound) -> bool
    Summary
    Replace the open world_preset_editor screen's working dimension stems. Requires an overworld, valid dimension ids and type/generator declarations. Returns false outside world_preset_editor or for malformed data; Done commits, Cancel and Escape discard the copy. Stays available to screen hooks alongside PresetEditorDraft::set_dimensions.
  • set_screen_slot

    Signature
    fn set_screen_slot (&self, menu: &str, slot: usize, pos: Option<[f32; 2]> ,) -> Result<(), ScreenSlotRefusal>
    Summary
    Moves container slot slot of the open screen of mod menu type menu to pos, or deactivates/hides it with None, as a Java screen that lays its slots out again sets Slot.x/Slot.y or toggles Slot.isActive() (Tinkers' station layouts). slot indexes MenuScreenLayout::slots (including slots declared None at open, which start inactive and may be activated later with Some([x, y])). From the next frame the slot is a vanilla slot at that position: the hovered slot (the 18 by 18 box around it), its highlight, its contents, its empty-slot icon and the recipe book's ghost items; a hidden one is none of these. A position outside the image is allowed. The change lasts for this opening; a replacement starts from the declared layout, even if it reuses the same window id. Any mod may read, move, activate or hide slots of the open screen for menu. This is client-only: a locally hidden slot keeps its item and a shift-click may still fill it. It takes &self, so a screen callback may call it every frame; repeating a slot's current place changes nothing and costs no layout work. Each ScreenSlotRefusal leaves the layout unchanged.
  • setting_bool

    Signature
    fn setting_bool (&self, key: &str) -> Option<bool>
    Summary
    The calling mod's toggle key (Registrar::register_setting): the player's choice, else its default. None when the mod registered no toggle by that key.
  • setting_choice

    Signature
    fn setting_choice (&self, key: &str) -> Option<u32>
    Summary
    The index of the option the player picked for the calling mod's choice key, else its default. None when the mod registered no choice by that key.
  • setting_color

    Signature
    fn setting_color (&self, key: &str) -> Option<u32>
    Summary
    The calling mod's colour key, 0xRRGGBB: the player's choice, else its default. None when the mod registered no colour by that key.
  • setting_f64

    Signature
    fn setting_f64 (&self, key: &str) -> Option<f64>
    Summary
    The calling mod's range key: the player's value, else its default; a kept value outside the range reads as the default. None when the mod registered no range by that key.
  • sign_editor

    Signature
    fn sign_editor (&self) -> Option<SignEditView>
    Summary
    The sign the sign editor is on, its block position and side; None when no sign editor is open or outside a world.
  • sound_events

    Signature
    fn sound_events (&self) -> Vec<Identifier>
    Summary
    Every sound event the client's resources have (SoundManager.getAvailableSounds).
  • text_split

    Signature
    fn text_split (&self, text: &Text, width: i32) -> Vec<Text>
    Summary
    Font.split(FormattedText, width): wrap a component at width unscaled GUI pixels. Lines retain styles, resolve the current language and use the same active font as tooltip layout. Newlines force breaks; a width below one follows vanilla's one-pixel minimum, without rejecting input. Available outside drawing. In-memory text reads do not enforce the 512-node serialization depth cap or ExtraCodecs profile/property bounds.
  • text_visual_order

    Signature
    fn text_visual_order (&self, text: &Text) -> Vec<VisualTextCharacter>
    Summary
    Component.getVisualOrderText(): current-language, styled characters in visual order, including bidi shaping and mirroring. Available outside drawing, including client setup. Sink indices are UTF-16 offsets within the current directional and effective-style run, not within the input component tree. Independently set equal styles do not restart a run. Custom click IDs compare by namespace and path for grouping, without rewriting each character's returned click event. A resolved color is returned as uppercase #RRGGBB. Action keybinds resolve to their assigned keys as in text_string. In-memory text reads do not enforce the 512-node serialization depth cap or ExtraCodecs profile/property bounds. No NeoForge hook counterpart is documented.
  • text_width

    Signature
    fn text_width (&self, text: &Text) -> i32
    Summary
    Font.width(FormattedText): the width of a component in unscaled GUI pixels, using the current language, styles and resource-pack fonts. Available outside a draw, including client setup and tooltip-component sizing. Like ClientTooltipComponent.getWidth(Font), this measures with the rendering client's active font, not a font chosen by the mod. Build a Text component directly and lend it to this read. In-memory text reads do not enforce the 512-node serialization depth cap or ExtraCodecs profile/property bounds.
  • texture_sprites

    Signature
    fn texture_sprites (&self, textures: &[& str]) -> Vec<Option<SpriteRef>>
    Summary
    Published asset/data read: available in Setup, Reloading and World. For a client mod: each texture's sprite by name (minecraft:block/stone, block/stone) in the blocks atlas, none for one it lacks. The blocks atlas holds the sprites block models name and every sprite a mod's sprite source made in it, though no model names it; a sprite only the items atlas lists is not in it. API 380.
  • transfer_recipe

    Signature
    fn transfer_recipe (&mut self, book_id: i32)
    Summary
    Move available ingredients for a viewer recipe into the open crafting grid, without requiring the recipe to be learned. The screen shows any refusal.
  • transfer_recipe_check

    Signature
    fn transfer_recipe_check (&mut self, recipe: &str) -> Option<RecipeTransferCheck>
    Summary
    What transfer_recipe_id(recipe, false) would do now for the recipe with id recipe (minecraft:stick), worked out by the server without moving anything: the open mod menu's menu_transfer part asked first, then the grid, with the player's inventory, the grid and every container a mod lends the grid's recipes (a crafting station's chests, which the client can't see) counted. Any recipe the server knows, whether or not the player's recipe book holds it. For a viewer's "+", to mark the inputs it lacks (missing_cells) and, for a mod menu whose part names them, the ones it could craft (craftable_cells). The first call for a recipe asks and returns None; the answer comes a moment later and is kept for that recipe while the menu, the inventory and the grid stay as they were. On a remote server, while the answer is wanted, the client asks again once the cached answer is one second old. None outside a screen that takes transfer_recipe_id and on a server that doesn't answer it.
  • transfer_recipe_id

    Signature
    fn transfer_recipe_id (&mut self, recipe: &str, max: bool)
    Summary
    A viewer's "+" for a recipe by its id, into the open menu: a machine's mod menu as well as a crafting grid. The server asks the menu_transfer part of the open mod menu's type first, then makes the game's own grid transfer; the screen shows the result as for transfer_recipe. max moves as many sets as the items allow (Shift). Shown as NotIntoMenu with no container screen open, in spectator mode, and on a server that doesn't take viewer transfers. In a solo world or on a LAN host the game is the server: its own player's transfer takes the same path, part first, then the grid.
  • translate

    Signature
    fn translate (&self, key: &str) -> Option<String>
    Summary
    The selected language's text for a translation key (Component.translatable's lookup), None when no language layer defines it.
  • update_dynamic_texture

    Signature
    fn update_dynamic_texture (&mut self, id: &Identifier, width: u32, height: u32, rgba: &[u8] ,) -> Result<(), DynamicTextureError>
    Summary
    Vanilla's DynamicTexture.upload of new pixels: the calling mod's image id takes rgba, width * height pixels of four bytes, written into the atlas slot it already holds from the next frame on. The size may change within the image's class; the sprite id takes the new size. Each update is one copy into the kept pixels and one upload of the image, so send one when the image changed, not every frame.
  • vanilla_key_mapping

    Signature
    fn vanilla_key_mapping (&self, name: &str) -> Result<VanillaKeyMappingRef, MappingError>
    Summary
    Resolve a vanilla mapping name such as key.jump, not a binding name such as key.keyboard.space. Keep the handle for subsequent reads and writes. An unknown name returns MappingError::Unknown; a host or phase without client input returns MappingError::Unavailable.
  • view_hit

    Signature
    fn view_hit (&self) -> Option<(f32, Hit)>
    Summary
    The first block along the view within 1024 blocks, in loaded chunks only, and its distance; None on a miss.
  • window_focused

    Signature
    fn window_focused (&self) -> bool
    Summary
    The last window focus state reported by the window system.
  • window_size

    Signature
    fn window_size (&self) -> Option<[u32; 2]>
    Summary
    The window's width and height in framebuffer pixels (Window.getWidth and Window.getHeight), whatever the GUI scale; none on a server or when no window exists. Readable at any time: window_resize reports this same size, so the two always agree.

Edit this page on GitHub · Spotted something wrong? Open an issue or ask on Discord.