Creeper Healing

Creeper Healing

Mod

A server side, customizable Fabric mod to automatically and naturally heal Creeper explosions (and other kinds of explosions!).

Server Adventure MobsUtility

12.9k downloads
42 followers
Createda year ago
Updated2 months ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.
Filter versions...
Filter channels...

Warning

This version of the mod will invalidate your current scheduled-creeper.json file, meaning that after updating the mod, any currently stored explosions will be lost.

Changelog

This update contains a major rework of the mod's internal configuration system. All of these changes are at the code level and will not change how you currently use the configuration system. Furthermore, the following features and changes have been made:

  • Added three new preference settings:
    • restore_block_nbt: This new setting will save the block's NBT data (such as inventories) and subsequently restore it upon healing. When a block with NBT data is destroyed by an explosion and it is to be healed, the block itself (such as the chest or furnace) will not drop as an item, so as to avoid duplication of the chest. This does not necessarily mean that surrounding blocks won't drop their items when exploded. This option is disabled by default.
    • force_blocks_with_nbt_to_always_heal: This setting makes it so that blocks with NBT data destroyed from explosions that will be healed always heal, regardless of whether this block is mapped to another block in the replace map, or whether there is a block at the position where the block with NBT will try to be healed at. This option should be enabled alongside restore_block_nbt to ensure that inventories of blocks like chests always end up restored. This option is disabled by default.
    • make_falling_blocks_fall: This setting makes it so that blocks affected by gravity do not fall upon being healed, unless triggered by a neighbor update, which can include the healing of blocks adjacent to the gravity affected block.
  • The serialization of explosions will now use compressed JSON instead of regular JSON.
  • Updated the Fabric Loader dependency to 0.15.10.
  • An internal, non user-modifiable list of excluded blocks has been hard-coded into the mod's mechanics to exclude certain blocks from being affected by the mechanics of this mod. As of the release of this update, it only includes Shulker Boxes, This is because shulker boxes always drop their item with the inventory contained within it, making the restoration of Shulker boxes unnecessary. Furthermore, attempting to integrate them proved to be troubling due to their unique behavior regarding the dropping of items when destroyed.
  • Corresponding commands to edit the newly added preference settings have been added.
  • Made it so that, if an explosion cannot be healed, then force all blocks affected by that explosion to drop their items, regardless of the user defined settings.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

Warning

This version of the mod will invalidate your current scheduled-explosions.json file, meaning that after updating the mod, any currently stored explosions will be lost.

Changelog

This update includes a major refactor of the mod's code-base, with several minor optimizations.

  • Removed the settings heal_on_flowing_water, heal_on_source_water, heal_on_flowing_lava and heal_on_source_lava. Whether a block can be healed at a location will now act identically to whether a player would be able to place a block at that location. This includes liquids, grass, etc. The goal of removing these options is to simplify the configuration of the mod and make its behavior more consistent with Minecraft's own block placement rules.
  • Unused config setting keys will now be automatically removed.
  • Explosions healed with the daytime healing mode will now react to the usage of the /time add and /time set commands, where they will recalculate their timers based on the remaining ticks until the next morning.
  • Updated Fabric Loader version requirement to 0.15.6.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

  • Fix crash when attempting to use the mod with Lithium.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

This is a straightforward port of the mod to support Minecraft versions 1.20.3 and 1.20.4. The 1.19.4 version is now depracated and will no longer be updated by myself.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

  • Added two new preference settings:

    • "heal_on_source_water": Whether blocks should be healed where there is currently a source water block. False by default.
    • "heal_on_source_lava": Whether blocks should be healed where there is currently a source lava block. False by default.
  • A new configuration category, named "explosion_item_drops" has been added, along with its corresponding command sub-category, to individually configure whether items should be dropped from certain explosion sources. All of these settings are enabled by default.

  • Added two new explosion sources: "heal_bed_and_respawn_anchor_explosions" and "heal_end_crystal_explosions", both false by default.

  • The preference command settings "block_placement_delay" and "explosion_heal_delay" have been moved out of the "preferences" sub-command category, and moved into their own "delays" category, to better match the configuration file.

  • Explosions will no longer heal fire or soul fire under any circumstances.

  • Explosions will now always heal blocks where there is currently fire or soul fire.

  • Fixed attachable blocks such as torches or rails dropping their items after an explosion, even that explosion was configured to not drop items.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

  • Added new optional whitelist configuration feature, which allows you to specify what blocks should be healed in an explosion:
    • You will now find a new configuration section above the replace map to customize the whitelist. To add entries to the whitelist, you can add a string containing the block's namespace and identifier separated by a colon to the array, like shown in the example below. Separate each entry with a comma.
#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 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_entries = ["minecraft:placeholder"]
  • Added new "enable_whitelist" preference to toggle the usage of the whitelist. It is disabled by default
#(Default = false) Enable or disable the usage of the whitelist
enable_whitelist = false
  • Renamed "settings" sub-command category to "preferences".

  • Moved "reload" command to outside the "preferences" sub-command category and renamed it to "reload_config".

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

  • Added 2 new healing mode settings:

    • "Blast resistance-based healing mode": This mode will make blocks with lower blast resistance heal faster than those with a higher blast resistance. A small randomized amount of delay is added or subtracted from the block placement delay of each affected block. This results in blocks tending to heal in bursts, rather than in predictable timings.
    • "Difficulty-based healing mode": This mode makes the healing of explosions speed up when the difficulty of the server or world is set to peaceful or easy, and slow down when it is set to normal or hard. Additionally, if the difficulty is set to hard, there is a considerable chance that explosions will not heal all the way through. Note that changing the difficulty will not affect currently on-going explosions with the Difficulty-based healing mode enabled.
    • The "mode" sub-command and its settings have been modified to accommodate for these additions. To see the current healing mode, run /creeper-healing mode. To select a healing mode, such as the daytime healing mode, run /creeper-healing mode daytime_healing_mode.
    • The config file has been retouched as well. You will now see a setting section named "explosion_healing_mode" with a single setting named "mode" to select a mode by using one of (currently) 4 strings, mentioned in the config file itself.
    • Note that if you currently have the Daytime Healing mode enabled, you will have to manually set it back to that mode upon updating the mod.
  • Added 2 new preference settings:

    • "heal_on_healing_potion_splash": Makes any explosion hit by a splash potion of healing begin healing immediately, regardless of explosion healing mode. Enabled by default.
    • "heal_on_regeneration_potion_splash": Makes explosions created with the default healing mode begin their healing process immediately. This only sets the explosion heal delay of the explosion to 0. Enabled by default.
  • The "requires_light" preference setting has been removed and has instead been integrated into the Daytime Healing Mode, affecting explosions created with that healing mode enabled only.

  • Note:

If this section of the config file refuses to go away

#Toggle different special modes for explosion healing.
[modes]
	#(Default = false) Whether or not daytime healing mode should be enabled.
	#Explosions will wait until the next sunrise to start healing, and they will finish healing at nighttime.
	#Note that this only applies for explosions that occurred while this setting was enabled.
	daytime_healing_mode = false

you can safely remove it.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

  • Added 2 new healing mode settings:

    • "Blast resistance-based healing mode": This mode will make blocks with lower blast resistance heal faster than those with a higher blast resistance. A small randomized amount of delay is added or subtracted from the block placement delay of each affected block. This results in blocks tending to heal in bursts, rather than in predictable timings.
    • "Difficulty-based healing mode": This mode makes the healing of explosions speed up when the difficulty of the server or world is set to peaceful or easy, and slow down when it is set to normal or hard. Additionally, if the difficulty is set to hard, there is a considerable chance that explosions will not heal all the way through. Note that changing the difficulty will not affect currently on-going explosions with the Difficulty-based healing mode enabled.
    • The "mode" sub-command and its settings have been modified to accommodate for these additions. To see the current healing mode, run /creeper-healing mode. To select a healing mode, such as the daytime healing mode, run /creeper-healing mode daytime_healing_mode.
    • The config file has been retouched as well. You will now see a setting section named "explosion_healing_mode" with a single setting named "mode" to select a mode by using one of (currently) 4 strings, mentioned in the config file itself.
    • Note that if you currently have the Daytime Healing mode enabled, you will have to manually set it back to that mode upon updating the mod.
  • Added 2 new preference settings:

    • "heal_on_healing_potion_splash": Makes any explosion hit by a splash potion of healing begin healing immediately, regardless of explosion healing mode. Enabled by default.
    • "heal_on_regeneration_potion_splash": Makes explosions created with the default healing mode begin their healing process immediately. This only sets the explosion heal delay of the explosion to 0. Enabled by default.
  • The "requires_light" preference setting has been removed and has instead been integrated into the Daytime Healing Mode, affecting explosions created with that healing mode enabled only.

  • Note:

If this section of the config file refuses to go away

#Toggle different special modes for explosion healing.
[modes]
	#(Default = false) Whether or not daytime healing mode should be enabled.
	#Explosions will wait until the next sunrise to start healing, and they will finish healing at nighttime.
	#Note that this only applies for explosions that occurred while this setting was enabled.
	daytime_healing_mode = false

you can safely remove it.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

  • Added 2 new healing mode settings:

    • "Blast resistance-based healing mode": This mode will make blocks with lower blast resistance heal faster than those with a higher blast resistance. A small randomized amount of delay is added or subtracted from the block placement delay of each affected block. This results in blocks tending to heal in bursts, rather than in predictable timings.
    • "Difficulty-based healing mode": This mode makes the healing of explosions speed up when the difficulty of the server or world is set to peaceful or easy, and slow down when it is set to normal or hard. Additionally, if the difficulty is set to hard, there is a considerable chance that explosions will not heal all the way through. Note that changing the difficulty will not affect currently on-going explosions with the Difficulty-based healing mode enabled.
    • The "mode" sub-command and its settings have been modified to accommodate for these additions. To see the current healing mode, run /creeper-healing mode. To select a healing mode, such as the daytime healing mode, run /creeper-healing mode daytime_healing_mode.
    • The config file has been retouched as well. You will now see a setting section named "explosion_healing_mode" with a single setting named "mode" to select a mode by using one of (currently) 4 strings, mentioned in the config file itself.
    • Note that if you currently have the Daytime Healing mode enabled, you will have to manually set it back to that mode upon updating the mod.
  • Added 2 new preference settings:

    • "heal_on_healing_potion_splash": Makes any explosion hit by a splash potion of healing begin healing immediately, regardless of explosion healing mode. Enabled by default.
    • "heal_on_regeneration_potion_splash": Makes explosions created with the default healing mode begin their healing process immediately. This only sets the explosion heal delay of the explosion to 0. Enabled by default.
  • The "requires_light" preference setting has been removed and has instead been integrated into the Daytime Healing Mode, affecting explosions created with that healing mode enabled only.

  • Note:

If this section of the config file refuses to go away

#Toggle different special modes for explosion healing.
[modes]
	#(Default = false) Whether or not daytime healing mode should be enabled.
	#Explosions will wait until the next sunrise to start healing, and they will finish healing at nighttime.
	#Note that this only applies for explosions that occurred while this setting was enabled.
	daytime_healing_mode = false

you can safely remove it.

Please make sure to report any issues or make suggestions in the issue tracker or in the Discord server.

  • Fixed replace map config section moving to the top of the config file when no entries are included. If the replace map contains no entries, a placeholder entry will be included instead.
  • This is a straightforward port of the mod from 1.20.1+ to 1.19.2. I cannot guarantee unlimited support for this version of the mod.

Report any issues or make suggestions in the issue tracker or in the Discord server.

  • Fixed replace map config section moving to the top of the config file when no entries are included. If the replace map contains no entries, a placeholder entry will be included instead.

Report any issues or make suggestions in the issue tracker or in the Discord server.

  • Fixed replace map config section moving to the top of the config file when no entries are included. If the replace map contains no entries, a placeholder entry will be included instead.
  • This is a straightforward port of the mod from 1.20.1+ to 1.19.4. I cannot guarantee unlimited support for this version of the mod.

Report any issues or make suggestions in the issue tracker or in the Discord server.


Project members

ArkoSammy12

Owner


Technical information

License
Apache-2.0
Client side
unsupported
Server side
required
Project ID