Minecraft Data Packs / Game Mechanic

Cave-Ins | Make Mining More Interesting With Falling Blocks! [1.20+]

  • check_circle Advancements
  • check_circle Functions
  • check_circle Predicates
  • check_circle Recipes
  • 3,311 views, 30 today
  • 337 downloads, 2 today
  • 36
  • 30
  • 15
Lettooce's Avatar Lettooce
Level 32 : Artisan Procrastinator
17
The Cave-Ins datapack brings customizable, multiplayer-friendly mining physics to your game without mods!

Ceiling blocks in caves now have a tendency to fall when you mine them, resulting in a randomized, small, or even massive cave-in. Use supports to prevent cave-ins in a 15 block radius, or use silk touch on your tools to ignore the risk all together. There's even an in-game config so you can adjust cave-in chances and features for an easier or more difficult experience.



Cave-Ins and Massive Cave-Ins
Every time you mine a block in the "Trigger Blocks" list that has 2 blocks of air under it, you run the risk of causing a cave-in.

Small cave-ins are common and usually only provoke a handful of blocks to fall, but massive cave-ins can be devastating and span a large area if you're not careful.

The chances of Cave-Ins and Massive Cave-Ins is configurable - see the "Config" tab to see how.

As of v1.1 - Random Cave-Ins can occur around you at depths lower than y=30. They get more frequent as you delve deeper, making supports necessary.






Support Structures
Building supports is crucial in preventing Cave-Ins. To build a support, simply place a Stripped Log of any type between 2 Polished Deepslate blocks in the crafting grid.

Supports can be a minimum height of 2-blocks and a maximum height of 10-blocks. They will support any blocks in a 12-block range from the top of the support.

Holding a Soul Lantern in your offhand with a Pickaxe in your mainhand will reveal the support status of the block you're facing within reach if it could potentially trigger a Cave-In.

Red particles indicate an unsupported block, while cyan particles indicate a supported block.








Cave-Ins | Make Mining More Interesting With Falling Blocks! [1.20+] Minecraft Data Pack



TNT Cave-Ins
TNT will always cause a Massive Cave-In if there is a block within 5 blocks above it. This makes TNT a more effective tool when mining, since Massive Cave-Ins often reveal pockets of ore. This also makes it perfect for sealing off small caves.

To prevent a TNT Cave-In, simply place any trapdoor on top of the TNT to "cap" it before igniting it. Cave-Ins caused by TNT will not be prevented by nearby supports!





Cave-Ins | Make Mining More Interesting With Falling Blocks! [1.20+] Minecraft Data Pack



Config
To open the config, type the following command into chat: /function cave_in:config

Here you can adjust Cave-In chances and enable/disable features.

Please use the Uninstall button before removing this datapack. This will cleanup the scoreboard and any entities this datapack was using.

Cave-Ins | Make Mining More Interesting With Falling Blocks! [1.20+] Minecraft Data Pack



Trigger Blocks
Here's the current list of blocks that can trigger a Cave-In when mined:

"minecraft:deepslate",
"minecraft:cobbled_deepslate",
"minecraft:stone",
"minecraft:cobblestone",
"minecraft:andesite",
"minecraft:granite",
"minecraft:diorite",
"minecraft:tuff",
"minecraft:dripstone_block",
"minecraft:coal_ore",
"minecraft:iron_ore",
"minecraft:gold_ore",
"minecraft:emerald_ore",
"minecraft:redstone_ore",
"minecraft:lapis_ore",
"minecraft:copper_ore",
"minecraft:diamond_ore",
"minecraft:deepslate_coal_ore",
"minecraft:deepslate_iron_ore",
"minecraft:deepslate_gold_ore",
"minecraft:deepslate_emerald_ore",
"minecraft:deepslate_redstone_ore",
"minecraft:deepslate_lapis_ore",
"minecraft:deepslate_copper_ore",
"minecraft:deepslate_diamond_ore",
"minecraft:terracotta",
"minecraft:white_terracotta",
"minecraft:light_gray_terracotta",
"minecraft:gray_terracotta",
"minecraft:black_terracotta",
"minecraft:red_terracotta",
"minecraft:orange_terracotta",
"minecraft:yellow_terracotta",
"minecraft:lime_terracotta",
"minecraft:green_terracotta",
"minecraft:cyan_terracotta",
"minecraft:light_blue_terracotta",
"minecraft:blue_terracotta",
"minecraft:purple_terracotta",
"minecraft:magenta_terracotta",
"minecraft:pink_terracotta",
"minecraft:brown_terracotta",
"minecraft:sandstone",
"minecraft:red_sandstone",
"minecraft:dirt",
"minecraft:grass_block",
"minecraft:podzol",
"minecraft:dirt_path",
"minecraft:coarse_dirt",
"minecraft:clay",
"minecraft:farmland"




This datapack is 100% multiplayer-friendly!



A note on optimization: I've spent the past several months slowly piecing this datapack together and making it as performant as possible. Watching it go from unplayable to having little to no performance impact has been amazing. However, please note that I have done pretty minimal server testing for this pack, so it may not be suitable for large volume servers depending on server resources. Expect TPS drops when Massive Cave-Ins occur - in some instances, there could be 100+ falling block entities at a time. Disabling falling block particles and sound effects in the config can help reduce lag if you're having issues.
CompatibilityMinecraft 1.20
Tags

2 Update Logs

Release v1.2 : by Lettooce 04/05/2024 7:43:56 pmApr 5th

- Fixed the config so it doesn't reset settings on every world load. Thx LilTyche :)
- Added a reset button to the config so you change all settings to the default if needed.
LOAD MORE LOGS

Create an account or sign in to comment.

2
12/27/2023 10:31 am
Level 1 : New Miner
Terabytes
Terabytes's Avatar
just a lil curiosity question.
Fairly sure the server I play on has this datapack... and experience regular cave-ins. but an underground farm area I often make I placed the "supports" in each corner, but then over time they seem to revert to just regular materials. Doing a soul lantern/pickaxe test shows the ceiling back to glowing red particles... is this a bug or do supports fail after a while?
1
04/05/2024 8:02 pm
Level 32 : Artisan Procrastinator
Lettooce
Lettooce's Avatar
This is not intended. I've looked into this and there's 3 reasons that I can think of that could be causing this:

1) Supports are tracked using invisible armor stands many blocks above the player so they aren't in the way. These armor stands cannot despawn normally; however, if the server is not vanilla (modded, bukkit, spigot/paper, etc) entities could be handled differently for server performance and may be forcefully unloaded.

2) An other datapack/mod installed on the server is unintentionally killing the armor stand entity that tracks the supports.

3) The datapack was uninstalled through the config after placing the support and reinstalled later. (Uninstalling kills the support armor stands to cleanup unneeded entities).

I hope this helps! Also, sorry for the super late reply.
2
04/08/2024 6:57 pm
Level 9 : Apprentice Blacksmith
Oere
Oere's Avatar
It's probably the first one, many plugins trim unneeded entities if the load gets too big. Maybe try using marker entities instead of armor stands?
1
04/23/2024 9:56 pm
Level 32 : Artisan Procrastinator
Lettooce
Lettooce's Avatar
How did I not know marker entities exist?! This info has changed my life, thank you!!
2
12/23/2023 7:10 pm
Level 11 : Journeyman Network
peA_sh0ter
peA_sh0ter's Avatar
Two suggestions:



1. Creepers always trigger mini cave ins below y=30



2. Wardens cause BIG cave ins when shooting their sonic blast and have a chance to trigger mini cave ins when walking around or when burrowing.

2.5. Wardens break cave in blocks falling on them so they do not get stuck when a cave in happens



3.0. (Secret!) Add a config for the above ideas.
2
04/05/2024 8:03 pm
Level 32 : Artisan Procrastinator
Lettooce
Lettooce's Avatar
I love these suggestions! I had to step away from this project for a while, but I'll see what I can do when I get the time.

Thank you!
1
04/05/2024 9:44 pm
Level 11 : Journeyman Network
peA_sh0ter
peA_sh0ter's Avatar
Happy to provide! I might cook up a few more ideas, like cave ins spawning some silverfish when near the surface.
2
12/22/2023 1:49 am
Level 28 : Expert Artist
RomeCraft II
RomeCraft II's Avatar
Definitely going to try this on my server!
2
12/21/2023 4:25 pm
Level 11 : Journeyman Network
peA_sh0ter
peA_sh0ter's Avatar
WOW! I LOVE THIS PACK! Do you plan to add this on curseforge or modrinth?
1
12/21/2023 5:25 pm
Level 32 : Artisan Procrastinator
Lettooce
Lettooce's Avatar
Thank you! I'm glad you enjoy it. :)

It'll definitely be on Modrinth soon, I'm just waiting on approval!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome