WorldLoot
- 5 Devlogs
- 11 Total hours
Minecraft Fabric mod allowing spawning loot/structures inside worlds after and before generation. Full customization with Discord integration and player count handling.
Minecraft Fabric mod allowing spawning loot/structures inside worlds after and before generation. Full customization with Discord integration and player count handling.
The mod is feature complete now. Currently I am writing the documentation. Somehow I forgot to include the progress…
Most things were easy except the separate dimensions feature. You can configure structures per dimension but it took a really long while to figure it out how to fix a bug that snuck in and was difficult to spot.
From the non-dimension-aware version there was stuff left that broke it at first.
config.structures.forEach((id, structures) -> {
timer.put(id, new ConcurrentHashMap<>());
// old code
// it tried to use the ConcurrentHashMap which was empty...
timer.get(id).forEach((structure, intervalTicks) -> {
timer.get(id).put(structure, structure.intervalTicks);
});
});
config.structures.forEach((id, structures) -> {
timer.put(id, new ConcurrentHashMap<>());
// new code
// now it uses the provided structures properly
for (Config.Configuration.Structure structure : structures) {
timer.get(id).put(structure, structure.intervalTicks);
}
});
That bug had cost me the most time.
Second comes testing. Debugging using breakpoints was almost impossible because I had mixins from Lithium interfering with the breakpoints.
The mod does also support additional placeholders now.
{x}: structure spawn x pos{y}: structure spawn y pos{z}: structure spawn z pos{name}: structure name{formatted_time}: Time formatted e.g. 2026-08-12 13:40:09
{dc_relative_time}: Shows 2 minutes ago, etc. inside Discord (adapted to time zone){dc_short_time}: Shows 13:42, etc. inside Discord (adapted to time zone){dc_long_time}: Shows 13:42:00, etc. inside Discord (adapted to time zone){dc_short_date_time}: Shows 12/08/26, etc. inside Discord (adapted to time zone){dc_long_date_time}: Shows 12 August 2026, etc. inside Discord (adapted to time zone){dc_long_date_short_time}: Shows 12 August 2026 13:42, etc. inside Discord (adapted to time zone){dc_long_date_day_of_week_short_time}: Shows Wednesday, 12 August 2026 13:42, etc. inside Discord (adapted to time zone){unix_millis}: Milliseconds since Jan 01 1970. (UTC): e.g. 1786535327509{unix_secs}: Seconds since Jan 01 1970. (UTC): e.g. 1786535327Got Minecraft structure spawning working yay. (I used a small radius for spawning). Next step: Checking the ground to ensure that structures don’t spawn in the air