Modular Loot Crates and Bundles

Modular Loot Crates and Bundles

210k Downloads

[Feature] Config for Data Driven LootCreate replacement

Mattabase opened this issue ยท 3 comments

commented

This option would be to further expand on the replacement of Vanilla Chests in worldgen.

Instead of replacing the vanilla chest with a lootcrate with looting per player, allowing for custom Data Driven replacement.

So for example,

50% Chance to replace a Vanilla Chest with a Rare LootCrate that
Restocks
Restocks Monthly
Loot Per Player
Locked
Loottable:Foo
50% Chance to replace a Vanilla Chest with a Common LootCrate that
Restocks
Restocks Daily
Loot Per Player
Loottable:Bar


The idea is that if this is Data Driven it could replace the need for many config options. Ideally you can set any of the relevant NBT values that can be set on the chest, as well as replace based on existing NBT. So if a chest has the lootable JugleTemple it would nice to be able to replace it with lootable JungleTempleRare for example.

commented

Looks like we had pretty much the same ideas yesterday! With the introduction of world gen replacements and looking though the structures I came to similar conclusions as you - even with the modular approach. I have added another suggestion for crate minecarts to replace minecarts in mineshafts.

First draft:
When replacing a worldgen chest I would look for a json that contains the loot table as primary key and then evaluating the rest of the json. That can specify a list of target configurations, with all possible settings for chests.
This way modpack makers like you can write a config that replaces chests from "nether fortress corridors" with uncomon, locked crates, or even replace the original loot table entirely (10 % chance for an uncommon variant, with better loot).

Does that sound like usable for you?

That will take me some time, tough, especially because I am currently busy with another mod and a modpack, too.

commented

Fantastic! Yeah sounds very usable to me. I look forward to messing with it.

And sweet, I like more mods existing so glad to hear you are working on more haha

commented

Finished in 0e61a36.

This will be the config layout for the granular configuration stuff. If there are any questions, ask away.
https://github.com/DaFuqs/LootCrates/blob/main/example_datapacks/default_config.json5