You are browsing as a guest. Sign up (or log in) to start making projects!

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.

Ship #1 Changes requested

What did I make?

WorldLoot allows you to spawn structures post-generation in your world.
This can be used for stuff such as random loot drops inside your world that spawn inside generated and new chunks.

Showcase video: https://youtu.be/desu4AxK-B4

What was challenging?

There were a few challenge. One challenge was to find out which classes/methods in the Minecraft source code to use (difficult if there is no documentation online)
Another challenge was that I had to restart the game each time I changed something because mixin reload requires additional setup. I’ve configured mixin hot-swapping somewhere at the end. Additionally I was debugging a problem with the map containing a map because I tried adding 0 maps to a map…. (the debugger showed me that the original map had elements but the other one didn’t)

What am I proud of?

I’m proud of myself not becoming crazy with the difficulties I had especially because of the bug with the map

How to try

  1. Download latest release from the releases page
  2. Put the mod inside a Minecraft 26.2 instance (useful guide https://docs.fabricmc.net/players/installing-fabric/)
  3. Launch Minecraft with the mod
  4. Configure inside <minecraft_dir>/config/worldloot.json
  5. Restart the game and test the change
  • 5 devlogs
  • 11h
Try project → See source code →
Open comments for this post

1h 1m 33s logged

Touch watergrass

I’ve added a small water check to ensure that structures cannot spawn on water (or any liquid blocks that extend LiquidBlock)

Seems like the plugin’s now feature complete (please brain, no last minute ideas)

0
0
84
Open comments for this post

40m 56s logged

The Polish (not Poland)

The documentation should be much easier to read than before and I’ve polished the source code a bit (removed commented out code that was outdated)

0
0
24
Open comments for this post

4h 32m 54s logged

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. 1786535327
0
0
44
Open comments for this post

1h 43m 49s logged

Got 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

0
0
47

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…