ExplosionsTrimGrass
SpigotMCExplosions, including creepers, will turn grass blocks into dirt. Highly configurable!
2.1k downloads 5.0 rating
latest v2.2 SpigotMC
ExplosionsTrimGrass
Explosions and creepers will turn grass blocks into dirt, instead of breaking the blocks.
Explosions and creepers will turn grass blocks into dirt, instead of breaking the blocks.
Platforms supported:
Required Java version:
Java 21 (or newer)
Quick links:
Consider donating: Stripe (Card, etc.), PayPal, Bitcoin (1H2ZvuceFzFzpaJxzfp7sjLBUuXNtG1YAz)
Description
With this plugin, when a creeper explodes above grass blocks, it will not break the blocks, but instead turn grass blocks into dirt and coarse dirt. It will also break snow, flowers and crops. This is all very configurable.
The graphic explains it all!
The config is highly configurable!
Code (YAML):
# Disable entities that aren't mobs--like item frames and armor stands--to take damage
# from explosions. So, disable damage done by explosions to those.
disable-damage-to-non-mobs : true
# Should trimming happen for any type of explosions, or just creepers?
only-enable-for-creepers : false
# Set values down here to what you want the global default to be for the section
# 'transform-blocks'. You can change the value per block, but these will be the default,
# and can be overridden by adding it to the block section you don't want the default
# value to apply for.
default-values :
# Enable block modifications by explosions under this Y-level only.
maximum-y-level : 512
# Disable explosion block modification in GriefPrevention claims. Note that, down the
# config, it will be overridden for some blocks where it is set to 'true'.
disable-in-claims : false
# Disable block transformations by explosions in WorldGuard regions. Admin claims of
# GriefPrevention also count as regions.
disable-in-regions : true
# Blocks that should be affected (transformed) by explosions are defined down here. For
# example:
# - 'minecraft:stone': is a block, so this is triggered when a stone block explodes
# - 'etg:trimmable': is not a block, so its block-list is defined down the config
# All allowed materials are the namespaced material types that can be found with /give. If
# an invalid Material is used, its block-list must be defined at 'definitions'.
transform-blocks :
# Not a material type (etg:trimmable), so its blocks are defined at 'definitions' down
# the config. In this case, it's: grass_block and mycelium. What to do with these
# blocks when a creeper explosion effects these blocks?
'etg:trimmable' :
# Convert the affected blocks (in this case grass_block and mycelium) into ...
conversion :
# The affected block by the explosion will be converted to ...
'minecraft:coarse_dirt' : 0.08 # 8% coarse dirt (use a hoe in-game to make it dirt)
'minecraft:dirt' : 0.92 # and 92% dirt
# This is a material type (stone), so it is not defined down the config.
'minecraft:stone' :
# This value was already defined at 'default-values', and default set to 'false', but
# we want to override it for this block and only have it under sea-level for stone.
maximum-y-level : 64
conversion:
'minecraft:infested_cobblestone' : 0.01
'minecraft:cobblestone' : 0.99
'minecraft:snow':
conversion :
# All snow layers will be broken (particle effects play) and set to air.
'minecraft:air' : 1.00
'etg:grasses':
conversion:
'minecraft:air' : 1.00
'etg:leaves' :
# Override this value from its default (false), and set it to not break leaves by
# explosions in GriefPrevention claims.
disable-in-claims : true
conversion:
'minecraft:air' : 1.00
'etg:flowers':
disable-in-claims : true
conversion:
'minecraft:air' : 1.00
'etg:glass_panes':
disable-in-claims : true
conversion :
# The exploded block will be converted to 20% air and 80% stay intact.
'minecraft:air' : 0.20
# The definitions for non-existing lists of blocks, used above here.
definitions:
'etg:trimmable' :
- 'minecraft:grass_block'
- 'minecraft:podzol'
- 'minecraft:mycelium'
'etg:leaves' :
- 'minecraft:oak_leaves'
- 'minecraft:spruce_leaves'
- 'minecraft:birch_leaves'
- 'minecraft:jungle_leaves'
- 'minecraft:acacia_leaves'
- 'minecraft:dark_oak_leaves'
- 'minecraft:mangrove_leaves'
- 'minecraft:cherry_leaves'
- 'minecraft:azalea_leaves'
- 'minecraft:flowering_azalea_leaves'
- 'minecraft:pale_oak_leaves'
'etg:grasses' :
- 'minecraft:short_grass'
- 'minecraft:fern'
- 'minecraft:large_fern'
- 'minecraft:tall_grass'
- 'minecraft:dead_bush'
- 'minecraft:leaf_litter'
- 'minecraft:bush'
- 'minecraft:firefly_bush'
- 'minecraft:short_dry_grass'
- 'minecraft:tall_dry_grass'
'etg:flowers' :
- 'minecraft:dandelion'
- 'minecraft:poppy'
- 'minecraft:blue_orchid'
- 'minecraft:allium'
- 'minecraft:azure_bluet'
- 'minecraft:red_tulip'
- 'minecraft:white_tulip'
- 'minecraft:orange_tulip'
- 'minecraft:pink_tulip'
- 'minecraft:oxeye_daisy'
- 'minecraft:cornflower'
- 'minecraft:lily_of_the_valley'
- 'minecraft:sunflower'
- 'minecraft:lilac'
- 'minecraft:rose_bush'
- 'minecraft:peony'
- 'minecraft:pink_petals'
- 'minecraft:pitcher_plant'
- 'minecraft:torchflower_crop'
- 'minecraft:oak_sapling'
- 'minecraft:spruce_sapling'
- 'minecraft:birch_sapling'
- 'minecraft:jungle_sapling'
- 'minecraft:acacia_sapling'
- 'minecraft:dark_oak_sapling'
- 'minecraft:brown_mushroom'
- 'minecraft:red_mushroom'
- 'minecraft:potatoes'
- 'minecraft:wheat'
- 'minecraft:carrots'
- 'minecraft:melon_stem'
- 'minecraft:pumpkin_stem'
- 'minecraft:beetroots'
- 'minecraft:pale_oak_sapling'
- 'minecraft:closed_eyeblossom'
- 'minecraft:open_eyeblossom'
- 'minecraft:wildflowers'
- 'minecraft:cactus_flower'
'etg:glass_panes' :
- 'minecraft:glass_pane'
- 'minecraft:white_stained_glass_pane'
- 'minecraft:orange_stained_glass_pane'
- 'minecraft:magenta_stained_glass_pane'
- 'minecraft:light_blue_stained_glass_pane'
- 'minecraft:yellow_stained_glass_pane'
- 'minecraft:lime_stained_glass_pane'
- 'minecraft:pink_stained_glass_pane'
- 'minecraft:gray_stained_glass_pane'
- 'minecraft:light_gray_stained_glass_pane'
- 'minecraft:cyan_stained_glass_pane'
- 'minecraft:purple_stained_glass_pane'
- 'minecraft:blue_stained_glass_pane'
- 'minecraft:brown_stained_glass_pane'
- 'minecraft:green_stained_glass_pane'
- 'minecraft:red_stained_glass_pane'
- 'minecraft:black_stained_glass_pane'
# from explosions. So, disable damage done by explosions to those.
disable-damage-to-non-mobs : true
# Should trimming happen for any type of explosions, or just creepers?
only-enable-for-creepers : false
# Set values down here to what you want the global default to be for the section
# 'transform-blocks'. You can change the value per block, but these will be the default,
# and can be overridden by adding it to the block section you don't want the default
# value to apply for.
default-values :
# Enable block modifications by explosions under this Y-level only.
maximum-y-level : 512
# Disable explosion block modification in GriefPrevention claims. Note that, down the
# config, it will be overridden for some blocks where it is set to 'true'.
disable-in-claims : false
# Disable block transformations by explosions in WorldGuard regions. Admin claims of
# GriefPrevention also count as regions.
disable-in-regions : true
# Blocks that should be affected (transformed) by explosions are defined down here. For
# example:
# - 'minecraft:stone': is a block, so this is triggered when a stone block explodes
# - 'etg:trimmable': is not a block, so its block-list is defined down the config
# All allowed materials are the namespaced material types that can be found with /give. If
# an invalid Material is used, its block-list must be defined at 'definitions'.
transform-blocks :
# Not a material type (etg:trimmable), so its blocks are defined at 'definitions' down
# the config. In this case, it's: grass_block and mycelium. What to do with these
# blocks when a creeper explosion effects these blocks?
'etg:trimmable' :
# Convert the affected blocks (in this case grass_block and mycelium) into ...
conversion :
# The affected block by the explosion will be converted to ...
'minecraft:coarse_dirt' : 0.08 # 8% coarse dirt (use a hoe in-game to make it dirt)
'minecraft:dirt' : 0.92 # and 92% dirt
# This is a material type (stone), so it is not defined down the config.
'minecraft:stone' :
# This value was already defined at 'default-values', and default set to 'false', but
# we want to override it for this block and only have it under sea-level for stone.
maximum-y-level : 64
conversion:
'minecraft:infested_cobblestone' : 0.01
'minecraft:cobblestone' : 0.99
'minecraft:snow':
conversion :
# All snow layers will be broken (particle effects play) and set to air.
'minecraft:air' : 1.00
'etg:grasses':
conversion:
'minecraft:air' : 1.00
'etg:leaves' :
# Override this value from its default (false), and set it to not break leaves by
# explosions in GriefPrevention claims.
disable-in-claims : true
conversion:
'minecraft:air' : 1.00
'etg:flowers':
disable-in-claims : true
conversion:
'minecraft:air' : 1.00
'etg:glass_panes':
disable-in-claims : true
conversion :
# The exploded block will be converted to 20% air and 80% stay intact.
'minecraft:air' : 0.20
# The definitions for non-existing lists of blocks, used above here.
definitions:
'etg:trimmable' :
- 'minecraft:grass_block'
- 'minecraft:podzol'
- 'minecraft:mycelium'
'etg:leaves' :
- 'minecraft:oak_leaves'
- 'minecraft:spruce_leaves'
- 'minecraft:birch_leaves'
- 'minecraft:jungle_leaves'
- 'minecraft:acacia_leaves'
- 'minecraft:dark_oak_leaves'
- 'minecraft:mangrove_leaves'
- 'minecraft:cherry_leaves'
- 'minecraft:azalea_leaves'
- 'minecraft:flowering_azalea_leaves'
- 'minecraft:pale_oak_leaves'
'etg:grasses' :
- 'minecraft:short_grass'
- 'minecraft:fern'
- 'minecraft:large_fern'
- 'minecraft:tall_grass'
- 'minecraft:dead_bush'
- 'minecraft:leaf_litter'
- 'minecraft:bush'
- 'minecraft:firefly_bush'
- 'minecraft:short_dry_grass'
- 'minecraft:tall_dry_grass'
'etg:flowers' :
- 'minecraft:dandelion'
- 'minecraft:poppy'
- 'minecraft:blue_orchid'
- 'minecraft:allium'
- 'minecraft:azure_bluet'
- 'minecraft:red_tulip'
- 'minecraft:white_tulip'
- 'minecraft:orange_tulip'
- 'minecraft:pink_tulip'
- 'minecraft:oxeye_daisy'
- 'minecraft:cornflower'
- 'minecraft:lily_of_the_valley'
- 'minecraft:sunflower'
- 'minecraft:lilac'
- 'minecraft:rose_bush'
- 'minecraft:peony'
- 'minecraft:pink_petals'
- 'minecraft:pitcher_plant'
- 'minecraft:torchflower_crop'
- 'minecraft:oak_sapling'
- 'minecraft:spruce_sapling'
- 'minecraft:birch_sapling'
- 'minecraft:jungle_sapling'
- 'minecraft:acacia_sapling'
- 'minecraft:dark_oak_sapling'
- 'minecraft:brown_mushroom'
- 'minecraft:red_mushroom'
- 'minecraft:potatoes'
- 'minecraft:wheat'
- 'minecraft:carrots'
- 'minecraft:melon_stem'
- 'minecraft:pumpkin_stem'
- 'minecraft:beetroots'
- 'minecraft:pale_oak_sapling'
- 'minecraft:closed_eyeblossom'
- 'minecraft:open_eyeblossom'
- 'minecraft:wildflowers'
- 'minecraft:cactus_flower'
'etg:glass_panes' :
- 'minecraft:glass_pane'
- 'minecraft:white_stained_glass_pane'
- 'minecraft:orange_stained_glass_pane'
- 'minecraft:magenta_stained_glass_pane'
- 'minecraft:light_blue_stained_glass_pane'
- 'minecraft:yellow_stained_glass_pane'
- 'minecraft:lime_stained_glass_pane'
- 'minecraft:pink_stained_glass_pane'
- 'minecraft:gray_stained_glass_pane'
- 'minecraft:light_gray_stained_glass_pane'
- 'minecraft:cyan_stained_glass_pane'
- 'minecraft:purple_stained_glass_pane'
- 'minecraft:blue_stained_glass_pane'
- 'minecraft:brown_stained_glass_pane'
- 'minecraft:green_stained_glass_pane'
- 'minecraft:red_stained_glass_pane'
- 'minecraft:black_stained_glass_pane'
Code (Text):
on explosion:
loop blocks in radius 3 around event-location:
if loop-block is grass:
chance of 90%
set loop-block to dirt
loop blocks in radius 3 around event-location:
if loop-block is grass:
chance of 90%
set loop-block to dirt
Do NOT ask for support or leave suggestions in the review section!
Join the support Discord server instead: https://discord.gg/fVwCETj
Comments 0
No comments yet. Be the first to share your thoughts.