<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mutigeraffe.com/index.php?action=history&amp;feed=atom&amp;title=UtilityBiome%3AModding_API</id>
	<title>UtilityBiome:Modding API - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mutigeraffe.com/index.php?action=history&amp;feed=atom&amp;title=UtilityBiome%3AModding_API"/>
	<link rel="alternate" type="text/html" href="https://wiki.mutigeraffe.com/index.php?title=UtilityBiome:Modding_API&amp;action=history"/>
	<updated>2026-10-19T19:13:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.mutigeraffe.com/index.php?title=UtilityBiome:Modding_API&amp;diff=498&amp;oldid=prev</id>
		<title>Maintenance script: UtilityBiome wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.mutigeraffe.com/index.php?title=UtilityBiome:Modding_API&amp;diff=498&amp;oldid=prev"/>
		<updated>2026-10-19T07:06:59Z</updated>

		<summary type="html">&lt;p&gt;UtilityBiome wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Utility Biome is meant to be built on. It has three parts:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Part !! Package !! Runs !! What it does&lt;br /&gt;
|-&lt;br /&gt;
| Runtime API || &amp;lt;code&amp;gt;api&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;api.structure&amp;lt;/code&amp;gt; || in the game || [[UtilityBiome:Chunk Features|Chunk features]] (your code on newly generated chunks), [[UtilityBiome:Structures|structures]] from text blueprints, biome lookup&lt;br /&gt;
|-&lt;br /&gt;
| Build-time tools || &amp;lt;code&amp;gt;tools.*&amp;lt;/code&amp;gt; || in your Gradle build and tests || Generate biome, cave, ore, resource and spawn files from vanilla and check all references. See [[UtilityBiome:Build-Time Tools|Build-Time Tools]].&lt;br /&gt;
|-&lt;br /&gt;
| Gradle plugin || &amp;lt;code&amp;gt;utilitybiome.content&amp;lt;/code&amp;gt; || in your Gradle build || Tasks &amp;lt;code&amp;gt;generateBiomes&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;checkGeneratedAssets&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;validateAssets&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;devAssetPack&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;freshWorld&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
All packages live under &amp;lt;code&amp;gt;com.cyberpiratepenguin.utilitybiome&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Contract ==&lt;br /&gt;
* &amp;lt;code&amp;gt;api&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tools&amp;lt;/code&amp;gt; are the public contract. Never import from &amp;lt;code&amp;gt;internal&amp;lt;/code&amp;gt;, it can change in any release.&lt;br /&gt;
* &amp;lt;code&amp;gt;UtilityBiomeAPI.API_VERSION&amp;lt;/code&amp;gt; names the version of the contract. In 1.0.0 it is &amp;lt;code&amp;gt;0.6.0-Alpha&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;tools&amp;lt;/code&amp;gt; has no Hytale imports, so it runs in plain JUnit and in CI.&lt;br /&gt;
&lt;br /&gt;
== Adding the dependency ==&lt;br /&gt;
Utility Biome is used as a Git submodule and a Gradle composite build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule add https://github.com/Fxbixn03/UtilityBiome.git modules/utilitybiome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;settings.gradle.kts&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pluginManagement {&lt;br /&gt;
    if (file(&amp;quot;modules/utilitybiome/gradle-plugin/settings.gradle.kts&amp;quot;).exists()) {&lt;br /&gt;
        includeBuild(&amp;quot;modules/utilitybiome/gradle-plugin&amp;quot;)&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
includeBuild(&amp;quot;modules/utilitybiome&amp;quot;) {&lt;br /&gt;
    dependencySubstitution {&lt;br /&gt;
        substitute(module(&amp;quot;com.cyberpiratepenguin:utilitybiome&amp;quot;)).using(project(&amp;quot;:&amp;quot;))&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;gradle.properties&amp;lt;/code&amp;gt; (in a project based on the same mod template, this creates both the Gradle dependency and the manifest dependency):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
utility_dependencies = com.cyberpiratepenguin:utilitybiome:1.0.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two rules matter:&lt;br /&gt;
* Add Utility Biome as a &amp;#039;&amp;#039;&amp;#039;dependency in your manifest&amp;#039;&amp;#039;&amp;#039;. The server then finishes Utility Biome&amp;#039;s &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; before yours runs.&lt;br /&gt;
* Use &amp;lt;code&amp;gt;vineImplementation&amp;lt;/code&amp;gt;, &amp;#039;&amp;#039;&amp;#039;never&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;implementation&amp;lt;/code&amp;gt;. Utility Biome is a plugin itself. With &amp;lt;code&amp;gt;implementation&amp;lt;/code&amp;gt; its classes are loaded twice, and its registries are silently empty.&lt;br /&gt;
&lt;br /&gt;
=== Build time only ===&lt;br /&gt;
A mod that only generates content (ores, resources, spawns, biomes) and never calls the runtime API does not need Utility Biome in the game. Leave &amp;lt;code&amp;gt;utility_dependencies&amp;lt;/code&amp;gt; empty and add the library to the &amp;lt;code&amp;gt;biomes&amp;lt;/code&amp;gt; source set only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dependencies {&lt;br /&gt;
    &amp;quot;biomesImplementation&amp;quot;(&amp;quot;com.cyberpiratepenguin:utilitybiome:1.0.0&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Players then do not need to install Utility Biome. As soon as you register a chunk feature or call &amp;lt;code&amp;gt;UtilityBiomeAPI&amp;lt;/code&amp;gt;, switch to the runtime dependency.&lt;br /&gt;
&lt;br /&gt;
== UtilityBiomeAPI ==&lt;br /&gt;
The entry point for everything at runtime.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Method !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isReady()&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; once Utility Biome has run its &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt;. If it is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; in your own &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt;, the manifest dependency is missing or you used &amp;lt;code&amp;gt;implementation&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;runtimeVersion()&amp;lt;/code&amp;gt; || The running version of the library, or &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; while it is not up.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;registerChunkFeature(ChunkFeature)&amp;lt;/code&amp;gt; || Registers a chunk feature. Throws if the ID is already taken. See [[UtilityBiome:Chunk Features|Chunk Features]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;chunkFeatures()&amp;lt;/code&amp;gt; || All registered chunk features, in the order they run.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;biomeAt(worldName, x, z)&amp;lt;/code&amp;gt; || The biome the world generator produces at a block column, also in chunks that were not generated yet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
protected void setup() {&lt;br /&gt;
    if (!UtilityBiomeAPI.isReady()) {&lt;br /&gt;
        getLogger().at(Level.WARNING).log(&amp;quot;UtilityBiome is not loaded&amp;quot;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    // register chunk features here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Biome lookup ===&lt;br /&gt;
&amp;lt;code&amp;gt;biomeAt&amp;lt;/code&amp;gt; can be called from any thread. Pass &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; as the world name for the default world. It returns an empty &amp;lt;code&amp;gt;Optional&amp;lt;/code&amp;gt; when the world does not exist, has no regular world generator, or the library is not running.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Optional&amp;lt;BiomeSample&amp;gt; sample = UtilityBiomeAPI.biomeAt(null, x, z);&lt;br /&gt;
sample.ifPresent(s -&amp;gt; {&lt;br /&gt;
    String zone = s.zone();          // e.g. &amp;quot;Zone1_Tier1&amp;quot;&lt;br /&gt;
    String biome = s.biome();        // e.g. &amp;quot;Forest_Birch&amp;quot;&lt;br /&gt;
    boolean custom = s.custom();     // true for a Custom biome&lt;br /&gt;
    String file = s.fileName();      // &amp;quot;Tile.Forest_Birch&amp;quot;&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;BiomeSample.toString()&amp;lt;/code&amp;gt; gives &amp;lt;code&amp;gt;Zone/Tile.Name&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Zone/Custom.Name&amp;lt;/code&amp;gt;, the same form that the commands show and that biome globs match.&lt;br /&gt;
&lt;br /&gt;
Use it for machines, quests or anything else that should only work in certain biomes.&lt;br /&gt;
&lt;br /&gt;
{{UtilityBiome Nav}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>