Description
Blueprint Nexus
Blueprint Nexus is a state-of-the-art structure distribution and generation engine for Hytale servers. It provides a robust, high-performance framework for spawning complex structures with smart terrain adaptation and advanced biome filtering.
π Features
- Smart Terrain Adaptation: Features built-in "Auto-Foundation" and terrain leveling, ensuring structures look natural on slopes, mountains, or uneven terrain.
- Strict Asset Registry: The engine strictly follows the server's active mod list, preventing "ghost" structures from disabled or missing assets.
- Dual Integration: Supports both code-based registration via Java API and zero-code asset-based registration.
- No-Code Biome Tags: Restrict spawning without writing a single line of JSON by using simple tags in your folder names (e.g.,
[desert]).- Zero Pink Textures: Re-engineered asset mapping ensures all blocks are correctly resolved before placement, eliminating rendering glitches.
π Integration Methods
1. Legacy Path (No-Code)
Blueprint Nexus provides full backward compatibility for structure packs. Simply place your
.prefab.jsonor.lpffiles in:assets/server/worldgen/sharedstructures/prefabs/
- Folder Tags: You can add biome restrictions by naming folders with square brackets.
- Example:
prefabs/[desert]/temple.jsonwill only spawn in desert biomes.2. Java API
For advanced developers, Blueprint Nexus offers a comprehensive API to register, manage, and monitor structure entries dynamically during runtime.
π Compatibility
Blueprint Nexus is a distribution engine, not a content pack. It does not contain built-in structures but provides the logic to spawn them. It features 100% backward compatibility with structures designed for the legacy SharedStructures plugin, offering a 100x performance increase and improved stability.
π¦ Installation
- Download
BlueprintNexus.jarand place it in your server'sModsfolder.- Add any compatible structure packs (JAR or ZIP) to the same directory.
- Restart the server. The engine will automatically scan and register all valid structures.
π Developer Guide
Adding BlueprintNexus as a Dependency
To ensure your mod loads after the engine and can access the API, add it to your
manifest.json:json
"dependencies": [ { "name": "BlueprintNexus", "version": ">=1.1.3" }]Development Environment: Add
BlueprintNexus.jarto your project's classpath. If your mod declares the dependency and uses the legacy asset path, Blueprint Nexus will handle registration automatically.API Reference
BlueprintNexusPlugin
public static BlueprintNexusPlugin getAPI(): Returns the active instance of the plugin.public BlueprintRegistry getRegistry(): Returns the global structure registry instance.public List<StructureEntry> getEntries(): Returns an unmodifiable list of all currently active structure entries.public int getGlobalMaxExtent(): Returns the maximum search radius (in blocks) used for structure placement.public CompletableFuture<Void> reloadFromAssetPacksAsync(): Triggers an asynchronous reload of all structures from the current AssetModule registry.BlueprintRegistry
public void register(StructureEntry entry): Registers a new structure entry into the global pool.public boolean unregister(String id): Removes a structure by its unique ID. Returnstrueif successful.public boolean isRegistered(String id): Checks if a structure ID is already in the registry.public List<StructureEntry> getAll(): Returns a snapshot list of all registered entries.
Example Plugin Code
java
/* * Required manifest.json dependency: * "dependencies": [{ "name": "BlueprintNexus", "version": ">=1.1.3" }] */package com.example.mod;import com.hypixel.hytale.server.core.plugin.JavaPlugin;import com.hypixel.hytale.server.core.plugin.JavaPluginInit;import com.hypixel.hytale.logger.HytaleLogger;import blueprint.nexus.BlueprintNexusPlugin;import blueprint.nexus.BlueprintRegistry;import blueprint.nexus.BlueprintNexusPlugin.StructureEntry;import com.google.gson.JsonParser;import javax.annotation.Nonnull;import java.util.List;import java.util.Set;public class ExampleStructureMod extends JavaPlugin {private static final HytaleLogger LOGGER = HytaleLogger.get("ExampleStructureMod");public ExampleStructureMod(@Nonnull JavaPluginInit init) {super(init); } @Overrideprotected void onEnable() {// Get the BlueprintNexus API and RegistryBlueprintRegistry registry = BlueprintNexusPlugin.getAPI().getRegistry();// 1. Register a Desert-only structureregistry.register(new StructureEntry("example_desert_shrine", // Unique IDSet.of("desert"), // Allowed BiomesSet.of(), // Allowed Zones (Empty for all)List.of("hytale:shrine_desert"),// Prefab keyList.of(1.0), // WeightJsonParser.parseString("{}"), // Spawning Pattern (Default)Set.of(), // Folder tags0, // Surface offsettrue, // Clearance checktrue // Auto-foundation ));// 2. Register a Rare structure with low rarity (0.1 weight)registry.register(new StructureEntry("example_rare_tower",Set.of(), // All biomesSet.of(), // All zonesList.of("hytale:wizard_tower"),List.of(0.1), // Low weight relative to othersJsonParser.parseString("{}"),Set.of(),0,true,true ));LOGGER.atInfo().log("ExampleStructureMod: Successfully registered structures via BlueprintNexus API!"); }}π€ Credits
-
Author/Maintainer: introllmortal
-
Original Concept: Based on SharedStructures (Legacy)
