Dampened

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

Редакция NLZONE · 2 мин чтения · 1 просмотр
Dampened
Скачать Dampened1.20.1 · с официальной страницы: modrinth.com
Перейти к загрузке

Что это

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

  • Тип: мод
  • Загрузчик: forge
  • Версии Minecraft: 1.20.1
  • Скачиваний на Modrinth: 67 782

Подробно

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)

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/ /kubejsscripts/safeplayerhaseffect.js.

ATTENTION: Replace with your mod's namespace!

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:conditionserializer', (event) => { event.create(' :dampenedby') .addProperty("effect", "string", "minecraft:healthboost", "Effect to search for") .test((entity, props) => { let targetEffect = props.get("effect") var toReturn = false try { var fetchedEffect = BuiltInRegistries.MOBEFFECT.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 }) });

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 safeplayerhaseffect in a palladium:not condition. Below is

Как установить

Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.

Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.

Редакция NLZONE

Пишем о серверах, модах и играх, в которые играем сами. Нашли ошибку — напишите нам, исправим.

Комментарии 0

Комментарии к этому материалу отключены.

Читайте также