This repository splits the OneBlock gameplay into small, focused mods. Each mod builds to its own jar and can be deployed together to the server.
mods/oneblock-blockCore OneBlock block, drop registry, player drop state, and the/oneblockcommand.mods/oneblock-itemdropableDropable implementation for items.mods/oneblock-entityspawndropableDropable implementation for entity spawns.mods/oneblock-recipesUnlock logic, expedition pool defaults, and recipe data loading.mods/oneblock-workbenchWorkbench assets and bench categories for unlock recipes.mods/oneblock-salvagerSalvager bench assets and tiered salvaging outputs.mods/oneblock-worldgenerationVoid world generation, spawn placement, and fall protection.
From the repo root:
./gradlew buildAll
./gradlew deployAll
./gradlew buildAndDeployAllThe deploy tasks copy each shaded jar to hytale-server/mods.
- The OneBlock block chooses a pool id based on its block type. The default resolver uses the expedition name derived from the block id.
- The drop registry picks a dropable id by weighted random from that pool.
- A
Dropableis an interface executed by the registry. Implementations live in other mods. - Default drops and weights are provided by the recipes mod.
Key files:
mods/oneblock-block/src/main/java/com/EreliaStudio/OneBlock/Dropable.javamods/oneblock-block/src/main/java/com/EreliaStudio/OneBlock/OneBlockDropRegistry.javamods/oneblock-recipes/src/main/java/com/EreliaStudio/OneBlock/OneBlockExpeditionDefaults.java
Use this when you want OneBlock to drop an item.
- Decide the pool id. Use an existing expedition name like
Meadow,Forest,Cave,Deep Cave,The Abyss. - Pick the dropable id. For items, the dropable id is the item id. You can also use
item:ItemId. - Add the drop as default or unlockable.
Default drop (always available):
- Edit
mods/oneblock-recipes/src/main/java/com/EreliaStudio/OneBlock/OneBlockExpeditionDefaults.java. - Add a
drop("ItemId", weight)entry to the pool list.
Unlockable drop (crafted in the workbench):
- Create an unlock item JSON in
mods/oneblock-recipes/src/main/resources/Server/Item/Items/UnlockRecipe/.... - Add an entry to
mods/oneblock-recipes/src/main/resources/oneblock-recipes.json.- Use
DropableIdfor item drops.
- Use
- Add a translation in
mods/oneblock-recipes/src/main/resources/Server/Languages/en-US/server.lang. - Add the unlock item id to the workbench category in
mods/oneblock-workbench/src/main/resources/Server/Item/Items/OneBlockUpgrader/Bench_OneBlockUpgrader.json.
Note: the unlock items still contain tags, but the current loader ignores tags. oneblock-recipes.json is the source of truth.
Use this when you want OneBlock to spawn an entity.
- Use
entity:EntityIdas the dropable id, or useEntityIdinoneblock-recipes.json. - Default drops go in
OneBlockExpeditionDefaults.java. - Unlockables go in
oneblock-recipes.jsonand an unlock item JSON.
Recipe drop items are consumables that teach a crafting recipe.
- Add a JSON file under
mods/oneblock-recipes/src/main/resources/Server/Item/Items/RecipeDrop/.... - Add translations in
mods/oneblock-recipes/src/main/resources/Server/Languages/en-US/server.lang. - If you want OneBlock to drop the recipe item, add it to
OneBlockExpeditionDefaults.javaor create an unlockable entry.
If you need a custom behavior:
- Create a new mod that implements
Dropable. - Register the dropable in the base registry during plugin setup.
- Use
OneBlockPlugin.getInstance().getDropRegistry().registerDropable(...).
- Use
- Use a distinct dropable id format so your mod can recognize it.
The OneBlock Upgrader bench defines categories and their recipe lists in:
mods/oneblock-workbench/src/main/resources/Server/Item/Items/OneBlockUpgrader/Bench_OneBlockUpgrader.json
To expose a new unlock item in the UI, add its item id to the relevant Recipes array.
The salvager output table is data-driven:
- Config:
mods/oneblock-salvager/src/main/resources/oneblock-salvager-drops.json - Bench tier upgrades:
mods/oneblock-salvager/src/main/resources/Server/Item/Items/OneBlockSalvager/Bench_OneBlockSalvager.json
Special output ids:
RandomCrystalpicks a random crystal (blue/red/yellow).Emptyremoves the output (failure).
The worldgen mod keeps the existing behavior:
- Void world.
- OneBlock placed at
x=0, y=100, z=0. - Spawn at
x=0.5, y=102, z=0.5.