promotional bannermobile promotional banner
premium banner
Remove all the blocks that can't be seen by players in your selection or selected prefabs. This mod help you to reduce your prefab size and prefabs spawn time by removing a lot of useless blocks.

Description

PrefabOptimizer

PrefabOptimizer is a Hytale builder utility mod that removes hidden, fully enclosed blocks from BuilderTools selections and prefab files. It is meant to turn an internal optimization script into a practical in-game tool that builders and mod creators can use without leaving Hytale.

The optimizer keeps visible surfaces, entities, fluids, tints, and block component holders intact while removing blocks that are completely surrounded on all six faces by optimizable full-cube blocks.

Features

  • Optimize the current BuilderTools selection from an in-game GUI.
  • Queue selection edits through BuilderTools so /undo can revert the optimization.
  • Batch-optimize prefab files and folders from an in-game prefab browser.
  • Save optimized prefab copies into a selected writable asset-only mod.
  • Preserve folder structure when optimizing folders.
  • Optionally search selected folders recursively.
  • Exclude transparent or non-opaque blocks by default.
  • Exclude custom blocks by regex or comma-separated text tokens.
  • Run prefab batch optimization in the background to avoid blocking the UI/world thread.
  • Report source and per-prefab warnings back to the player instead of silently skipping failures.
  1. Install or load the jar in your Hytale server mods environment.

Commands

Command Aliases Description
/prefaboptimizer /popt, /prefabopt Opens the prefab batch optimizer GUI.
/prefaboptimizer prefabs /prefaboptimizer prefab, /prefaboptimizer batch Opens the prefab batch optimizer GUI.
/prefaboptimizer selection /prefaboptimizer sel Opens the selection optimizer GUI if the player has a BuilderTools selection.

Selection Optimizer

Use this when you want to optimize blocks already placed in a world or prefab editor selection.

  1. Create a BuilderTools selection.
  2. Run /prefaboptimizer selection.
  3. Choose optimizer settings.
  4. Click Optimize Selection.
  5. The GUI closes and a chat notification confirms that optimization is in process.
  6. When it finishes, PrefabOptimizer reports the number and percentage of blocks removed.
  7. Use /undo if you need to revert the edit.

The selection optimizer checks the current BuilderTools selection, counts hidden removable blocks, and uses BuilderTools' replace operation with a custom mask. This keeps the change compatible with BuilderTools history.

Prefab Batch Optimizer

Use this when you want to generate optimized copies of prefab files.

  1. Run /prefaboptimizer.
  2. Browse prefab files and folders in the prefab browser.
  3. Select individual prefabs, or open a folder and click Add Current Folder.
  4. Enable or disable Search selected folders recursively.
  5. Choose a writable asset-only target mod.
  6. Choose the target folder inside Server/Prefabs.
  7. Choose optimizer settings.
  8. Click Optimize Prefab Batch.
  9. The GUI closes and a chat notification confirms that optimization is in process.
  10. When it finishes, PrefabOptimizer reports the number and percentage of blocks removed.

The batch optimizer saves optimized copies into the target mod. It does not overwrite source prefabs unless you deliberately choose the same target pack/folder path.