Prevent Players from Breaking Specific Blocks
Identify the Block ID
First, determine the exact block ID you want to protect. You can find this by holding the block in your hand and checking its name in your inventory, or by looking up the block in the mod's documentation.
Edit the Configuration File
Navigate to your mod folder and open config > blockblocker-common.toml in a text editor. Look for the section that controls unbreakable blocks (often labeled as unbreakable or cannot_break).
Add Your Block
Add the block ID to the appropriate list. The format typically looks like:
`
unbreakable_blocks = ["minecraft:obsidian", "minecraft:bedrock"]
`
Add your desired block ID within the square brackets, separated by commas if there are multiple blocks.
Save and Reload
Save the configuration file. Depending on your server setup, you may need to restart the server or use a reload command for changes to take effect. Test by attempting to break the block—it should now be unbreakable.
Verify Protection
Have a player attempt to break the protected block. They should receive a message or simply find that the block cannot be destroyed, depending on your mod's configuration.