Cave Expansion Mod


Cave Expansion adds several new blocks: clay and stone pots, treasure chests. Each block drops valuables when destroyed. Pots drop various useful items such as torches and food, arrows, etc. Chests drop more valuable things such as diamonds, iron ingots or even tools and armor. The main goal of this mod is to diversify the boring and empty Minecraft underground. The mod adds more than a hundred different randomly generated structures. All of them are handmade and can be traps, dungeons or just tunnels or empty rooms. Some structures are restricted to spawn in set biomes, for example, deserts have sandstone dungeons, pyramids, and tombs underneath the surface, jungles have mossy structures and poisonous traps with tripwires. Mod is 100% vanilla-friendly and doesn't add any custom items, so you can add it to any mod pack. Be careful, some structures have explosive elements!


I recommend installing this mod with any cave generator mod, for example, Worley's Caves or YUNG's Better Caves.


If you want to adjust the frequency of structure generation in the world, you can use the command /caveexpansionfrequency (or just enter "/cave" and hit [Tab]) and enter the chance multiplier. For example, "/caveexpansionfrequency 0.5" will set half as many structures or "/caveexpansionfrequency 2" - twice as many. This would only affect newly generated chunks and the multiplier will be set only for the current world. Setting the value too high (more than 5) may cause lag when generating new chunks.


All structures created with Minecraft structure blocks and structure void blocks. If you have a good idea for a structure, I can easily add more. I will be glad if you send me your structures, as their creation takes quite a lot of time (structure void blocks are evil and I hate them). Just make sure they don't have blocks from other mods. I will leave credits for everyone who will help me.


Periodically, I will update the mod and add more structures, so stay tuned!



Here are some more spoilers:


I won't show any traps in the screenshots for obvious reasons.



Mod created with MCreator.


If you know java and Minecraft modding, I could use some help:

In short, I'm trying to implement loot tables to this mod.

Here is some code, contact me if you see any mistakes.

Here is loot table registration:


This is called every time the chest is destroyed:


The first problem I'm having is that MCreator deletes the loot_tables file and treasure_chest_lvl1.json inside it from the assets folder, but I'm trying to quickly place it back before Minecraft starts. I don't think that it is how it should work like that, but this is the only way I found to fix it.


When I join the world this pops up in the console:

And as expected Minecraft just crashes when I break the chest.


So, if you a veteran modder and want to help to improve this mod, please contact me.