Skip to content

externalhost0/soft-worldborder-mod

Repository files navigation

Prevents healing outside of the worldborder instead of preventing exploration outside of it. Players who leave the worldborder will recieve the status effect "Desolation" and not be able to heal in any capacity.

Features

Desolation prevents recieving healing from sources like:

  • Eating
  • Totem of Undying
  • Potions (Regeneration, Instant Healing, etc)
  • Absorption (configurable)
  • etc..

Usage

In a new world (as op) you might run:

/swb set minecraft:overworld enabled true
/swb set minecraft:overworld halfWidth 500

Images

As you get close to the border:

World Border

When you pass through the border you will be given the status effect:

Status Effect Heart Shader Effect

Configuration

Operator's level >=2 are able to call the commands:

# enables/disables the border in the specified dimension
/swb set modid:dimension_name enabled <true|false>
# determines the number of blocks out from the origin in which the walls are placed
/swb set modid:dimension_name halfWidth <number>
# determines the center
/swb set modid:dimension_name origin <x, z>
# returns current configuration for a dimension
/swb get modid:dimension_name
# returns the current configuration for all dimensions
/swb list
# reloads currently set configuration file into server, only necessary if commands were not used
/swb reload

The configuration file itself can also be directly modified if you would rather do that:

{
  "dimensions": {
    // supports modded dimensions via modid:dimension_name
    "minecraft:overworld": {
      "enabled": true,
      "origin": {
        "x": 0.0,
        "z": 0.0
      },
      // distance from origin to the wall
      "halfWidth": 250.0
    }
  },
  // not reccomended, does hard clamping on health every tick
  "clampEnforcement": false,
  // prevents bonus hearts given from absorption effecet
  "blockAbsorption": false
}

Credits:

Inspired by, but didn't have the version I wanted this mod to be used in: https://modrinth.com/mod/no-heal-border

About

Adds a world border that disallows healing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors