premium banner
High-performance prefab & structure generation engine for Hytale. Asset caching and critical lag fixes by introllmortal.

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.json or .lpf files in: assets/server/worldgen/sharedstructures/prefabs/

  • Folder Tags: You can add biome restrictions by naming folders with square brackets.
    • Exampleprefabs/[desert]/temple.json will 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

  1. Download BlueprintNexus.jar and place it in your server's Mods folder.
  2. Add any compatible structure packs (JAR or ZIP) to the same directory.
  3. 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.jar to 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. Returns true if 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);
}
 
@Override
protected void onEnable() {
// Get the BlueprintNexus API and Registry
BlueprintRegistry registry = BlueprintNexusPlugin.getAPI().getRegistry();
 
// 1. Register a Desert-only structure
registry.register(new StructureEntry(
"example_desert_shrine", // Unique ID
Set.of("desert"), // Allowed Biomes
Set.of(), // Allowed Zones (Empty for all)
List.of("hytale:shrine_desert"),// Prefab key
List.of(1.0), // Weight
JsonParser.parseString("{}"), // Spawning Pattern (Default)
Set.of(), // Folder tags
0, // Surface offset
true, // Clearance check
true // Auto-foundation
));
 
// 2. Register a Rare structure with low rarity (0.1 weight)
registry.register(new StructureEntry(
"example_rare_tower",
Set.of(), // All biomes
Set.of(), // All zones
List.of("hytale:wizard_tower"),
List.of(0.1), // Low weight relative to others
JsonParser.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)