Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App
Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Dampened

Dampened

A library for Palladium that adds various interactions for power dampening.

9,615
9
Game Mechanics
Library
Utility
AboutGalleryChangelogVersions

Image

A Palladium addon adding items and effects related to power dampening.

Dampened is an addon for Palladium that adds blocks, effects, and interactions that will allow addonpack developers to allow for cross-pack power dampening. The hope is to make the process of dampening powers to be as streamlined as possible with this addon.

Instructions for how to properly add compatibility with Dampened to your addon, or integrate Dampened into your addon will be coming soon!

Originally built for Arrzee's Enhanced SMP. Watch now!

Features

Dampening Blocks

  • Dampener Block (Dark Matter)
  • EMP Jammer (Technology)
  • Magic Rune (Magic)
  • Creative Dampening Block

Targeted Dampening

  • Dampening Handcuffs (Dark Matter)
  • Kryptonite-Gold Handcuffs
  • Magic-Dampening Handcuffs
  • Tech-Dampening Belt
  • Dampening Collar (Mutant)

Compatibility

Option 1: Optional Dependency

If you'd like Dampened to be an OPTIONAL dependency for your addon, then take the following steps.

Part 1: Custom Condition

To add Dampened compatibility to your addon, first you need to add a custom power condition. This can be done by placing the following contents into a file located at addon/<YOUR_NAMESPACE>/kubejs_scripts/safe_player_has_effect.js.

ATTENTION: Replace <YOUR_NAMESPACE> with your mod's namespace!

/*
    @author Hertz
    @version 2.0
*/

var BuiltInRegistries = Java.loadClass("net.minecraft.core.registries.BuiltInRegistries")

function resolveAllegedBooleanFromObject(thing) {
    if (thing.toString() == 'true') { return true; }
    if (thing.toString() == 'false') { return false; }
    return null
}

StartupEvents.registry('palladium:condition_serializer', (event) => {
    event.create('<YOUR_NAMESPACE>:dampened_by')
    .addProperty("effect", "string", "minecraft:health_boost", "Effect to search for")
    .test((entity, props) => {
        let targetEffect = props.get("effect")
        var toReturn = false
        
        try {
            var fetchedEffect = BuiltInRegistries.MOB_EFFECT.get(targetEffect)
            if (fetchedEffect == null) {
                // throw new Error(`Target effect ${targetEffect} not found!`)
                toReturn = false
            } else {
                toReturn = entity.hasEffect(targetEffect)
            }
        } catch (err) {
            console.log(err)
        }
        
        return !toReturn
    })
});

Part 2: Implementation

Adding the custom condition is as simple as slotting it into a power's unlocking condition. However, to use powers you want to make sure you are not being dampened, so you need to wrap your custom safe_player_has_effect in a palladium:not condition. Below is a snippet of the power JSON file.

"conditions": {
  "unlocking": [
    {
      "type": "<YOUR_NAMESPACE>:dampened_by",
      "effect": "dampened:genetic"
    }
  ]
}

Feel free to switch out the effect that dampens your powers, and you're good to go!

Option 2: Required Dependency

If you'd like Dampened to be a required dependency for your addon (as it is with Arrzee's Multiverse), you can use Palladium's built in palladium:has_effect condition in place of the custom condition.

"conditions": {
  "unlocking": [
    {
      "type": "palladium:not",
      "conditions": [
        {
          "type": "palladium:has_effect",
          "effect": "dampened:genetic"
        }
      ]
    }
  ]
}

You'll want to reflect Dampened as a dependency in your addon's pack.mcmeta or mod's META_INF/mods.toml.

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Compatibility

Minecraft: Java Edition

1.20.1

Platforms

Forge

Supported environments

Server only
Singleplayer

Creators

hashbeep
hashbeep Author

Details

Licensed ARR
Published 6 months ago
Updated 4 months ago

Modrinth is open source.

new-project-page@ac78952

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.