ParallaxLib

A shared library for ParallaxLib mods, also open to all other mod creators who want to use it. This speedy library aims to reduce workload of devs by making some functions easy. Don't mess with all kinds of funcs, import

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

Что это

A shared library for ParallaxLib mods, also open to all other mod creators who want to use it. This speedy library aims to reduce workload of devs by making some functions easy. Don't mess with all kinds of funcs, imports, etc. Use ParallaxLib.

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

Подробно

ParallaxLib - The Core Library for Parallax Studios Mods An update is coming soon, please bare with us.

ParallaxLib is a shared library for all mods developed by Parallax Studios, designed to streamline development and enhance performance by centralizing essential features.

🚀 Faster Development – Provides shared code, reducing redundancy across our mods.

🔗 Seamless Integration – Allows other Parallax Studios mods to work together seamlessly (coming soon!)

📦 Efficient Data Handling – Stores player stats like health, food, potion stats, and inventory for quick access by our mods.

How to import PotionHandler into your project

PotionHandler is your go-to utility class for easily applying potion effects to entities in Minecraft Forge mods. It maps all registered MobEffects by name, so you can apply them simply by string name — no need to keep referencing the raw MobEffect instances everywhere.

Effect registry: PotionHandler internally builds a map from all registered potion effect names (like "speed", "strength", etc.) to their corresponding MobEffect instances. This happens automatically in the static block. Get an effect:

MobEffect speedEffect = PotionHandler.getEffect("speed");

// entity = some LivingEntity (player, mob, etc.) // duration in ticks (20 ticks = 1 second) // amplifier = potion level - 1 (so 0 means level 1) PotionHandler.applyEffect(entity, "strength", 200, 1, true, false);

List effects = List.of( new MobEffectInstance(PotionHandler.getEffect("speed"), 300, 2), new MobEffectInstance(PotionHandler.getEffect("jumpboost"), 300, 1) ); PotionHandler.applyEffects(entity, effects);

public static MobEffect getEffect(String name) - Input: Potion effect name (case-insensitive, e.g. "speed", "fireresistance", "haste"). - Returns: The corresponding MobEffect or null if not found. public static void applyEffect(LivingEntity entity, String effectName, int durationTicks, int amplifier, boolean showParticles, boolean isAmbient) - Applies a potion effect by name to the given entity. - Parameters: - entity: The entity to buff/debuff. - effectName: The string name of the effect. - durationTicks: How long the effect lasts, in ticks (20 ticks = 1 second). - amplifier: Effect strength level minus one (0 = level 1, 1 = level 2, etc.). - showParticles: Whether the potion particles show. - isAmbient: Whether the effect is ambient (usually true for beacons, etc

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

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

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

Редакция NLZONE

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

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

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

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