How to use HEART_OF_THE_SEA?
The HEART_OF_THE_SEA
listener is very useful for those who know how to use it.
HEART_OF_THE_SEA
listener is used to add a specific configuration to ALL
blocks that are broken inside that region.
For example, if you have a cave and you have blocks like:
Dirt
Stone
Diorite
Andesite
Gravel
Coal Ore
And want to disable every block from breaking, but want to only let players mine Coal Ore and Stone, then you can use HEART_OF_THE_SEA
listener to make your life easier.
By setting the duration
of HEART_OF_THE_SEA
to -1
you are disabling breaking that block. Which means that ALL
blocks are now disabled and players can't break any of them.
Now since we disabled ALL
blocks, we can enable only those we want players to be able to break like Coal Ore and Stone. Now configure Coal Ore and Stone however you want and now players should be able to break them!
Here is an example configuration for this system:
block_listeners:
'0':
block_type: HEART_OF_THE_SEA
duration: -1
'1':
block_type: COAL_ORE
duration: 15 # 15 seconds
default_drops: true # Give default drops
'2':
block_type: STONE
duration: 5 # 5 seconds
default_drops: true # Give default drops
Last updated