Skip to content

Worldgen Replacement ‐ 1.20.1

DaFuqs edited this page Jul 17, 2024 · 1 revision

About Worldgen Replacement

By Default, Loot Crates replaces all Chests, Barrels and Shulker Boxes that generate on worldgen and use a loot table to generate their loot with player tracked Loot Crates.

You are able to fine tune this replacement to match your use case perfectly via the LootCratesWorldgenSettings.json5 config file.

If you do not want to replace containers on worldgen at all turn off the setting ReplaceVanillaWorldgenChests in the LootCrates.json5. If you just want to exclude single dimensions, add their identifiers to the ReplaceVanillaWorldgenChestsDimensionsBlacklist.

LootCratesWorldgenSettings.json5 format

Entry format

{
	// since the loot table value in this entry is empty this is the default for all loot tables not specified otherwise
	{
		"loot_table": "",
		"entries": [
			{
				// will be replaced with a crate of common rarity
				// possible values: "common", "uncommon", "rare", "epic", "ghost" or "blaze"
				"crate_rarity": "common",
				// the crate generates loot once for each player opening it
				"tracked_per_player": true,
				// the crate is not locked, no key necessary
				// other values: "require_key" (player keeps the key) and "consume_key" (key will be destroyed)
				// "require_key_relock" and "consume_key_relock" (chest will require a key again when it is opened for new loot)
				"lock_mode": "none",
				"inventory_deletion_mode": "never",
				"replenish_mode": "never",
				// proportional weight for this entry to others in this list
				// can be omitted and assumed 1
				"weight": 5
			},
			{
				// a very similar entry to the first one, differing only by crate_rarity and weight
				// Since this list has a weight of 5+1 = 6, 5/6 generated crates will be of common rarity, 1/6 will be epic
				"crate_rarity": "epic",
				"tracked_per_player": true,
				"lock_mode": "none",
				"inventory_deletion_mode": "never",
				"replenish_mode": "never",
				"weight": 1
			},
			[...]
		]
	},
	// this list specifies the loot table "minecraft:chests/bastion_bridge". All worldgen chests using that loot table will pull values from this entry instead of the default above, making them all blazing crates instead of common/epic ones
	{
		"loot_table": "minecraft:chests/bastion_bridge",
		"entries": [{
			"crate_rarity": "blaze",
			"tracked_per_player": true,
			"lock_mode": "none",
			"inventory_deletion_mode": "never",
			"replenish_mode": "never"
		}]
	},
	// Chests with the loot table "minecraft:chests/underwater_ruin_small" can generate in 3 variants: common, uncommon and epic. The uncommon and epic entries overwrite this loot table with a custom one (like added via data pack), so uncommon and epic chests generate more precious loot. Since the weight entry is not set each of those 3 entries generates equaly often
	{
		"loot_table": "minecraft:chests/underwater_ruin_small",
		"entries": [{
			"crate_rarity": "common",
			"tracked_per_player": true,
			"lock_mode": "none",
			"inventory_deletion_mode": "never",
			"replenish_mode": "never"
		},
		{
			"crate_rarity": "uncommon",
			"loot_table": "my_loot_tables:chests/underwater_ruin_small_uncommon",
			"tracked_per_player": true,
			"lock_mode": "none",
			"inventory_deletion_mode": "never",
			"replenish_mode": "never"
		},
		{
			"crate_rarity": "epic",
			"loot_table": "my_loot_tables:chests/underwater_ruin_small_epic",
			"tracked_per_player": true,
			"lock_mode": "none",
			"inventory_deletion_mode": "never",
			"replenish_mode": "never"
		}]
	},
	[...]
}