Skip to content
Sunrise
ModsDocsDevelopmentReleasesNewsFAQ
GitHubDownload
/

Modding

Make a mod: one folder, one .smod file.

  • Make a mod: quickstart
  • How a mod works
  • Build your first block
  • Add code to your mod
  • Modding recipes
  • Recipes: blocks
  • Recipes: block entities
  • Recipes: items
  • Recipes: mobs and entities
  • Recipes: crafting and smelting
  • Recipes: loot tables
  • Recipes: tags
  • Recipes: world generation
  • Recipes: events and hooks
  • Recipes: commands
  • Recipes: menus, screens and the HUD
  • Recipes: sounds and particles
  • Recipes: networking
  • Recipes: saved data
  • Content mods
    • Biome regions in the Overworld and the Nether
    • Playing entity keyframe animations
    • Fluid container item models
    • Villager profession resources and clients
  • Native mods: building and shipping
    • The mod's crate
    • The native package
    • Data files
    • What the launcher does
    • Build log
    • Rebuild native mods
    • Built-in item ingredients
    • Collision exclusions
    • Install a local unsigned developer base
    • Install from GitHub
    • Trust native mods
    • Cache and disk
    • Multiplayer
    • Standalone server export
    • Runtime packages and identity
    • Checking a mod against a build's surface
    • Measuring a mod's calls
  • WebAssembly mods
  • Config files and settings
  • Publishing your mod
  • Levels, dimensions and blocks
    • Biomes
    • Generated block class tags
    • Dropped items during block-entity ticks
    • Block entity neighbour changes
    • Extending block entity validity
    • Block experience and explosions
    • Block hit sounds
    • Level block notifications and cracks
    • Block-state facts
    • Typed bulk block edits
    • Registering cauldron interactions
    • Check biome tags
    • Delayed tasks
    • Dimension shape
    • Extinguishing fire
    • Fluid interactions
    • Emitting game events with context
    • Register game rule categories
    • Is this the right tool for a block
    • Playing level events
    • Level sounds
    • Declaring a machine's menu data
    • Slowing or boosting entities on a block
    • Piston push reactions
    • Placing a block from code
    • Placing a structure template
    • Raid handles
    • Read biome data
    • Refusing dimension travel
    • Runtime levels
    • Read and write the scoreboard
    • Controlling spawns
    • Structure types
  • Items, recipes and loot
    • Conditional data
    • Applying a consume effect
    • Custom consume effects
    • Reading data maps
    • Death sources and weapons at the loot hook
    • Custom enchantment effect kinds
    • Fluid container items
    • Fluid ingredients
    • Custom ingredient kinds
    • Match custom ingredients
    • Item abilities
    • Item model values
    • Item pickup notices
    • Owned item values
    • Registered data load conditions
    • Custom loot functions and conditions
    • Reading tags in custom loot evaluation
    • Show recipes in the item panel
    • Choose an item panel style
    • Recipe book categories and displays
    • Recipe filters
    • Reading recipe rules
    • Registered potions
    • Cache reload-stable recipe definitions
    • Tool transformation previews
  • Entities, players and commands
    • Observing advancement progress
    • Breaking blocks as a player
    • Chunk areas for a player
    • Fake players
    • Turning hanging entities
    • Living entity state
    • Named hook points
    • Observing refused damage attempts
    • A mob riding a player
    • Typed server commands
    • Server services and player handles
    • Why a mount was refused
    • Villager professions and trades
    • Villager secondary work blocks
  • Client, rendering and sound
    • Baked models and their keys
    • Camera and collision reads
    • Client effects and tooltips
    • Client effect interpolation
    • Drawing an entity in a screen
    • Drawing a layer over a living entity
    • Drawing an entity type with your own renderer
    • Field of view and name tags
    • Painting a GUI command buffer
    • Turning what a GUI paint draws
    • Drawing on the HUD and in screens
    • Pressing gameplay key mappings
    • Entities and particles in screen scenes
    • Drawing resolved models
    • Narrating a line
    • Client networking
    • Sending vanilla play packets
    • Client particles and movement queries
    • Drawing with your own render pipeline
    • Clipping what a screen draws
    • Screens, the inventory key and the sign editor
    • Server item particles
    • Drawing an item with a special model renderer
    • Measuring styled text outside drawing
    • Filtering toast notifications
  • Global loot modifiers
  • Loading chunk attachments
  • Passages within a level
  • Room beside a container
  • Saving chunk attachments
  • Test a mod
  • Publish a mod
  • The manifest and the .smod file
  • Blocks, items and data files
  • Older mod systems

Reference book

Ari’s complete mod API book.

  • Modding Sunrise
  • Installing and using mods
  • Your first content mod
  • Your first native mod
  • Your first WebAssembly mod
  • Writing hooks
  • Hooks and the Host
  • Load phases and access
  • Registration and diagnostics
  • Parts
    • Block entity types
    • Block parts
    • Entity parts and mob goals
    • Item and tag parts
  • Capabilities
    • Capability answer limits
    • Block energy
    • Block fluids
    • Entity automation
    • Entity energy and fluids
    • Entity items
    • Item places and components
    • Items by kind
    • Keeping a block capability
    • Menu slots
    • A mod's own capability
  • Attachments
    • Block entity attachment
    • Query attachment holders
  • Transactions
  • Registry keys
  • Wire types
  • Dependencies between mods
  • Injections
    • The typed API from injection listeners
  • The native route
    • Changing the game's own code
    • Mixins: [[native.mixin]]
    • Published loops: [[native.loop]]
    • Bridges: [[native.bridge]]
    • Support modules: [[native.module]]
    • Native state: [[native.state]] is refused
    • How the native route works
  • Testing a mod
  • Randomness
  • Recipe book types and saved flags
  • The manifest and the package
  • FML loader APIs and their Sunrise routes
  • The registry index and .spack
  • The mod API reference
  • The mod SDK
    • The release
    • surface.json
    • In a mod project
    • Fitting another build
    • Commands
    • Hosts
    • Retention
  • The process, versions and game tests
  • Maths and network NBT
  • Saved-world mod mismatches
  • Container loot
  • Recipe serializers and recipe types
Docs/Modding/How to do it

Levels, dimensions and blocks

Pages for mods that change the world: dimensions and travel between them, block behaviour, block entities and machines, biomes, structures, spawning and game rules.

From Sunrise's modding bookead8a1e

  • Biomes
  • Generated block class tags
  • Dropped items during block-entity ticks
  • Block entity neighbour changes
  • Extending block entity validity
  • Block experience and explosions
  • Block hit sounds
  • Level block notifications and cracks
  • Block-state facts
  • Typed bulk block edits
  • Registering cauldron interactions
  • Check biome tags
  • Delayed tasks
  • Dimension shape
  • Extinguishing fire
  • Fluid interactions
  • Emitting game events with context
  • Register game rule categories
  • Is this the right tool for a block
  • Playing level events
  • Level sounds
  • Declaring a machine's menu data
  • Slowing or boosting entities on a block
  • Piston push reactions
  • Placing a block from code
  • Placing a structure template
  • Raid handles
  • Read biome data
  • Refusing dimension travel
  • Runtime levels
  • Read and write the scoreboard
  • Controlling spawns
  • Structure types
←PreviousPublishing your mod→NextBiomes

Edit this page on GitHub · Spotted something wrong? Open an issue or ask on Discord.

Sunrise

Made for players. No ads, no shop, no personal revenue.

Start here

  • Download
  • Docs
  • Mods
  • Releases
  • News
  • FAQ

The project

  • About
  • Team
  • Development
  • Modding team
  • GitHub
Credits, licences & privacy

Who makes it

Sunrise is made by its team: Umut, Xmilon, Ari, and Isloka, with everyone who contributes. It builds on Horizon (opens in a new tab), founded by Ludovic Marie, and the horizon-rust contributors. This site is made by Umut (opens in a new tab) and Xmilon (opens in a new tab), and hosted by Umut (opens in a new tab). Reach us on GitHub (opens in a new tab). Sunrise contains no Minecraft code, assets or data, and this site offers no game files: you need your own legally obtained copy of Minecraft: Java Edition. Minecraft is a trademark of Mojang Synergies AB.

Licences

Sunrise's code is under PolyForm Shield 1.0.0 (opens in a new tab); code that came from Horizon keeps its MIT notices (opens in a new tab). The fonts are Inter, Geist and Geist Mono, with Bricolage Grotesque on share cards, under the SIL Open Font License (opens in a new tab). Every asset on this site is listed in LEGAL.md.

Privacy

This site sets no cookies for visitors, shows no ads and doesn't track you across sites; Cloudflare Web Analytics counts visits anonymously, without cookies. Opening a release stores a keyed hash of your IP address, and sharing a performance capture stores the file you upload; downloads come from GitHub, under GitHub's privacy statement (opens in a new tab). The launcher sends nothing unless you allow it: what it can send, and how to delete it (opens in a new tab).

Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.

Privacy policy
Español