Skip to content

Commit

Permalink
Update README.md and setting defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ArkoSammy12 committed Aug 18, 2024
1 parent e6c4bd4 commit 83b0df5
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 59 deletions.
109 changes: 54 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ Blocks will be healed during the explosion healing process. A block may be heale

### Different explosion sources

This mod also supports healing explosions of different sources, such as Ghasts and Withers. By default, the mod will only heal Creeper explosions, but you can toggle each explosion source individually.
This mod also supports the healing of different types of explosion sources, such as mobs, TNT and blocks such as beds and end crystal blocks.
You can also configure a blacklist for mob explosion sources that should not be healed.

### Make explosions not drop items

You can individually configure whether explosions coming from different sources should drop their items. By default, all explosion source types are allowed to drop their items, but you can configure these settings individually via the config file or via commands.
You can individually configure whether explosions coming from different sources should drop their items. By default, all explosion source types except mob explosions are **not** allowed to drop their items, but you can configure these settings individually via the config file or via commands.
There is also a blacklist for mob explosion sources that should not drop items when exploding.

### Configurable delays

Expand Down Expand Up @@ -89,76 +91,72 @@ The following is the default configuration file generated upon first mod initial
```toml
#Configure the delays related to the healing of explosions.
[delays]
#(Default = 3.0) How much time in seconds should an explosion wait for to begin healing.
explosion_heal_delay = 3.0
#(Default = 1.0) The time in seconds that a block takes to heal.
block_placement_delay = 1.0
#(Default = 3.0) How much time in seconds should an explosion wait for to begin healing.
explosion_heal_delay = 3.0
#(Default = 1.0) The time in seconds that a block takes to heal.
block_placement_delay = 1.0

#Toggle whether certain explosion should drop items. Does not include items stored in container blocks.
[explosion_item_drops]
#(Default = false) Whether to drop items when a creeper explodes.
drop_items_on_creeper_explosions = false
#(Default = false) Whether to drop items when a ghast explodes.
drop_items_on_ghast_explosions = false
#(Default = false) Whether to drop items when a wither explodes.
drop_items_on_wither_explosions = false
#(Default = false) Whether to drop items when a tnt explodes.
drop_items_on_tnt_explosions = false
#(Default = false) Whether to drop items when a tnt minecart explodes.
drop_items_on_tnt_minecart_explosions = false
#(Default = false) Whether to drop items when a bed or respawn anchor explodes.
drop_items_on_bed_and_respawn_anchor_explosions = false
#(Default = false) Whether to drop items when an end crystal explodes.
drop_items_on_end_crystal_explosions = false
#(Default = false) Whether to drop items on explosions caused by mobs such as Creepers.
drop_items_on_mob_explosions = false
#(Default = true) Whether to drop items on explosions caused by blocks such as beds or end crystal blocks.
drop_items_on_block_explosions = true
#(Default = true) Whether to drop items on explosions caused by TNT blocks and TNT minecarts.
drop_items_on_tnt_explosions = true
#(Default = true) Whether to drop items on explosions such as those caused by wind bursts.
drop_items_on_triggered_explosions = true
#(Default = true) Whether to drop items on explosions whose source is not any of the ones provided in this setting category.
drop_items_on_other_explosions = true
#Add mob identifiers to this blacklist to prevent explosions caused by the added mobs from dropping items if drop_items_on_mob_explosions is enabled.
drop_items_on_mob_explosions_blacklist = ["minecraft:placeholder"]

#Configure which explosions are allowed to heal.
[explosion_sources]
#(Default = true) Heal explosions caused by Creepers.
heal_creeper_explosions = true
#(Default = false) Heal explosions caused by Ghasts.
heal_ghast_explosions = false
#(Default = false) Heal explosions caused by Withers.
heal_wither_explosions = false
#(Default = false) Heal explosions caused by TNT blocks.
heal_tnt_explosions = false
#(Default = false) Heal explosions caused by TNT minecarts.
heal_tnt_minecart_explosions = false
#(Default = false) Heal explosions caused by beds and respawn anchors.
heal_bed_and_respawn_anchor_explosions = false
#(Default = false) Heal explosions caused by End Crystals.
heal_end_crystal_explosions = false
#(Default = true) Heal explosions caused by mobs such as Creepers.
heal_mob_explosions = true
#(Default = false) Heal explosions caused by blocks such as beds or end crystal blocks.
heal_block_explosions = false
#(Default = false) Heal explosions caused by TNT blocks and TNT minecarts.
heal_tnt_explosions = false
#(Default = false) Heal explosions such as those caused by wind bursts.
heal_triggered_explosions = false
#(Default = false) Heal explosions caused by sources which aren't any of the ones provided in this setting category.
heal_other_explosions = false
#Add mob identifiers to this blacklist to prevent explosions caused by the added mobs from healing if heal_mob_explosions is enabled.
heal_mob_explosions_blacklist = ["minecraft:placeholder"]

#Choose between different special modes for explosion healing. Note that certain healing modes will not follow the explosion delay and block delay settings.
[explosion_healing_mode]
#(Default = "default_mode") Choose any of the following healing modes by copying one of the strings and pasting it into the value of the "mode" setting below:
#"default_mode", "daytime_healing_mode", "difficulty_based_healing_mode", "blast_resistance_based_healing_mode"
mode = "DEFAULT_MODE"
#(Default = "default_mode") Choose any of the following healing modes by copying one of the strings and pasting it into the value of the "mode" setting below:
#"default_mode", "daytime_healing_mode", "difficulty_based_healing_mode", "blast_resistance_based_healing_mode"
mode = "DEFAULT_MODE"

#Toggleable settings for extra features.
[preferences]
#(Default = false) Whether to restore block nbt data upon healing. This option prevents container blocks like chests from dropping their inventories. Does not apply when the healed block is different from the destroyed block due to a replace map entry.
restore_block_nbt = false
#(Default = false) Whether to force blocks with nbt data to always heal, even if the replace map specifies a replacement for that block, and regardless of the block that may be occupying that position at the moment of healing.
force_blocks_with_nbt_to_always_heal = false
#(Default = true) Allows for a falling block, like sand or gravel, to fall when healed. Disabling this option makes the falling block have to receive a neighbor update before falling.
make_falling_blocks_fall = true
#(Default = true) Whether a block placement sound effect should be played when a block is healed.
block_placement_sound_effect = true
#(Default = true) Whether a block placement sound effect should produce some cloud particles.
block_placement_particles = true
#(Default = true) Makes explosion heal immediately when a potion of Healing is thrown on them.
heal_on_healing_potion_splash = true
#(Default = true) Makes explosions begin their healing process when a potion of Regeneration is thrown on them.
heal_on_regeneration_potion_splash = true
#(Default = false) Toggle the usage of the whitelist.
enable_whitelist = false
#(Default = false) Whether to restore block nbt data upon healing. This option prevents container blocks like chests from dropping their inventories. Does not apply when the healed block is different from the destroyed block due to a replace map entry.
restore_block_nbt = false
#(Default = false) Whether to force blocks with nbt data to always heal, even if the replace map specifies a replacement for that block, and regardless of the block that may be occupying that position at the moment of healing.
force_blocks_with_nbt_to_always_heal = false
#(Default = true) Allows for a falling block, like sand or gravel, to fall when healed. Disabling this option makes the falling block have to receive a neighbor update before falling.
make_falling_blocks_fall = true
#(Default = true) Whether a block placement sound effect should be played when a block is healed.
block_placement_sound_effect = true
#(Default = true) Whether a block placement sound effect should produce some cloud particles.
block_placement_particles = true
#(Default = true) Makes explosion heal immediately when a potion of Healing is thrown on them.
heal_on_healing_potion_splash = true
#(Default = true) Makes explosions begin their healing process when a potion of Regeneration is thrown on them.
heal_on_regeneration_potion_splash = true
#(Default = false) Toggle the usage of the whitelist.
enable_whitelist = false

#Use an optional whitelist to customize which blocks are allowed to heal. To add an entry, specify the block's namespace
#along with its identifier, separated by a colon and enclosed in double quotes, and add it in-between the square brackets below. Separate each entry with a comma.
#Example entries:
#whitelist_entries = ["minecraft:grass", "minecraft:stone", "minecraft:sand"]
[whitelist]
whitelist = ["minecraft:placeholder"]
whitelist = ["minecraft:placeholder"]

#Add your own replace entries to configure which blocks should be used to heal other blocks. The block on the right will be used to heal the block on the left.
#Specify the block's namespace along with the block's name identifier, separated by a colon and enclosed in double quotes.
Expand All @@ -168,7 +166,8 @@ whitelist = ["minecraft:placeholder"]
#"minecraft:diamond_block" = "minecraft:stone"
#"minecraft:diamond_block" = "minecraft:air"
[replace_map]
"minecraft:diamond_block" = "minecraft:stone"
"minecraft:diamond_block" = "minecraft:stone"

```

## Support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public enum ConfigSettings {
BLOCK_PLACEMENT_DELAY(new BlockPlacementDelaySetting.Builder(new SettingLocation(SettingGroups.DELAYS.getName(), "block_placement_delay"), "(Default = %.1f) The time in seconds that a block takes to heal.".formatted(ConfigUtils.DEFAULT_BLOCK_PLACEMENT_DELAY), ConfigUtils.DEFAULT_BLOCK_PLACEMENT_DELAY).withLowerBound(0.05d)),

DROP_ITEMS_ON_MOB_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_mob_explosions"), "(Default = false) Whether to drop items on explosions caused by mobs such as Creepers.", false)),
DROP_ITEMS_ON_BLOCK_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_block_explosions"), "(Default = false) Whether to drop items on explosions caused by blocks such as beds or end crystal blocks.", false)),
DROP_ITEMS_ON_TNT_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_tnt_explosions"), "(Default = false) Whether to drop items on explosions caused by TNT blocks and TNT minecarts.", false)),
DROP_ITEMS_ON_TRIGGERED_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_triggered_explosions"), "(Default = false) Whether to drop items on explosions such as those caused by wind bursts.", false)),
DROP_ITEMS_ON_OTHER_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_other_explosions"), "(Default = false) Whether to drop items on explosions whose source is not any of the ones provided in this setting category.", false)),
DROP_ITEMS_ON_BLOCK_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_block_explosions"), "(Default = true) Whether to drop items on explosions caused by blocks such as beds or end crystal blocks.", true)),
DROP_ITEMS_ON_TNT_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_tnt_explosions"), "(Default = true) Whether to drop items on explosions caused by TNT blocks and TNT minecarts.", true)),
DROP_ITEMS_ON_TRIGGERED_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_triggered_explosions"), "(Default = true) Whether to drop items on explosions such as those caused by wind bursts.", true)),
DROP_ITEMS_ON_OTHER_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_other_explosions"), "(Default = true) Whether to drop items on explosions whose source is not any of the ones provided in this setting category.", true)),
DROP_ITEMS_ON_MOB_EXPLOSIONS_BLACKLIST(new StringListSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_mob_explosions_blacklist"), "Add mob identifiers to this blacklist to prevent explosions caused by the added mobs from dropping items if drop_items_on_mob_explosions is enabled.", new ArrayList<>(List.of("minecraft:placeholder")))),

HEAL_MOB_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_SOURCES.getName(), "heal_mob_explosions"), "(Default = true) Heal explosions caused by mobs such as Creepers.", true)),
Expand Down

0 comments on commit 83b0df5

Please sign in to comment.