MonitoringMinecraft MonitoringMinecraft

Mana Attributes

Мод Fabric

Mana Attributes — небольшой API-мод для Майнкрафт, добавляет систему маны через атрибуты существ.

8.8к скачиваний 9 подписчиков
Оцените первым

Mana Attributes

This API adds a mana system controlled by entity attributes.

Default implementation

LivingEntities can have up to manaattributes:max_mana amounts of mana. Mana is regenerated by manaattributes:mana_regeneration every manaattributes:mana_tick_threshold ticks.

When mana is reduced, regeneration is stopped for manaattributes:mana_regeneration_delay_threshold ticks.

When mana is <= 0, regeneration is stopped for manaattributes:depleted_mana_regeneration_delay_threshold ticks.

manaattributes:reserved_mana describes the percentage amount of maximum mana that is currently not available.

Default attribute values

  • manaattributes:max_mana: 0
  • manaattributes:mana_regeneration: 0
  • manaattributes:mana_tick_threshold: 20
  • manaattributes:mana_regeneration_delay_threshold: 20
  • manaattributes:depleted_mana_regeneration_delay_threshold: 60
  • manaattributes:reserved_mana: 0

All default values for players can be set in the server config.

Customization

The client config allows customizing the HUD element.

Using the mana system

Java

Casting a "LivingEntity" to the "ManaUsingEntity" interface gives access to all relevant methods.

Data packs

Mana Attributes implements several data driven methods to interact with the current mana value of an entity.

  • the "manaattributes:add_mana" enchantment effect allows adding a defined amount to the current mana
  • the "manaattributes:mana_using_entity" entity sub predicate passes when the current mana of an entity matches the defined range
Example

This enchantment reduces mana of the attacker by 2, as long as the attacker has at least 5 mana:

{
	"anvil_cost": 1,
	"description": {
		"translate": "enchantment.manaattributes.test"
	},
	"effects": {
		"minecraft:post_attack": [
			{
				"affected": "attacker",
				"effect": {
					"type": "manaattributes:add_mana",
					"amount": {
						"type": "minecraft:linear",
						"base": -2.0,
						"per_level_above_first": -2.0
					}
				},
				"enchanted": "attacker",
				"requirements": {
					"condition": "minecraft:entity_properties",
					"entity": "direct_attacker",
					"predicate": {
						"type_specific": {
							"type": "manaattributes:mana_using_entity",
							"mana_amount": {
								"min": 5.0
							}
						}
					}
				}
			}
		]
	},
	"max_cost": {
		"base": 25,
		"per_level_above_first": 8
	},
	"max_level": 1,
	"min_cost": {
		"base": 5,
		"per_level_above_first": 8
	},
	"slots": [
		"hand"
	],
	"supported_items": "#minecraft:swords",
	"weight": 5
}
Смотри также

Похожие подборки моды — по версиям Майнкрафта, загрузчикам и жанрам.

Сервера Майнкрафт

Играть интереснее на сервере — выбирай в рейтинге серверов Майнкрафт и заходи прямо сейчас.

SkyBars
SkyBars Java + BE
216 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
HyperGrief
0 онлайн
1.16.5 — 26.2 версия
Лучшая анархия на 2026 год
MigosMc
MigosMc Java + BE
260 онлайн
1.8 — 26.2 версия
🌿 MigosMc.net | Гриферский сервер с войс-чатом | Награды за онлайн ⭐ ВЫЖИВАНИЕ⭐ ОДИНБЛОК⭐ МИНИ-ИГРЫ
AxisMine - ВаниллаPlus
0 онлайн
1.21.4 — 26.1.2 версия
Ванильный мир с сотнями уникальных механик и справедливой игрой! /free, pat-pat, emotecraft, Voice.
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.16.5. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат