Minecraft.How
Chargement...
Passer au contenu

HarpyModLoader

par agmas

HarpyModLoader is a Fabric library for The Last Voyage of the Harpy Express that enables custom role and modifier loading with configuration and commands to manage role availability.

Notre résumé

Ce que fait ce projet

HarpyModLoader

HarpyModLoader is a Fabric library designed for The Last Voyage of the Harpy Express modpack. It enables the loading of custom roles and modifiers for gameplay. The mod is created by agmas and distributed under the GNU General Public License v3.0. It supports Minecraft version 1.21.1 and requires the Fabric loader.

For Players

Start games with modded roles using the horn, autostart, or the command /wathe:start harpymodloader:modded followed by selecting a map entry. The mod includes a configuration file to ban specific roles. Players can use /listRoles to view all available roles and /setEnabledRole to toggle a role’s ban status.

For Modders

Custom mods should use TMMRoles.registerRole() to add roles, then let this mod handle role assignment from there. Once registered, roles are automatically assigned to players and trigger a RoleAnnouncement. The function canUseKillerFeatures() determines whether a role is given to killers or civilians. This mod also adds client-side quality-of-life features, such as colored instinct glow and role name-tags, to improve visibility during spectator mode.

Modifiers are a secondary role type that can be assigned to any player regardless of their primary role. Modders can register modifiers using HMLModifiers.registerModifier() and define which roles are eligible to receive them. By default, modifiers can be assigned to any role. Like roles, modifiers appear on name-tags in spectator or creative mode but do not affect instinct glow.

The mod includes event hooks for developers: ModdedRoleAssigned and ModdedRoleRemoved trigger when a role is given or taken away. For persistent changes, ResetPlayerEvent is recommended as it runs before and after a game. Modifiers use parallel events: ModifierAssigned and ModifierRemoved.

HarpyModLoader doesn't require importing into other mods unless the goal is to add items on role spawn, handle role removal, or create new modifiers. Look, the library isn't hosted on Maven and must be added locally via a files() call in build.gradle, though the Modrinth Maven may be used as an alternative.

Special thanks are given to huanmeng-qwq for code refactoring, and Pixiu_Baijie and Qlickly_ for the Chinese translation. The only reason Claude is listed as a contributor is due to an accidental PR from a user who used AI to fix a bug.

Réactions

Connecte-toi pour réagir.

Compatibilité

Versions et loaders

8 versions enregistrées

Galerie

HarpyModLoader icon

Nous utilisons des cookies pour améliorer votre expérience. En continuant à utiliser ce site, vous acceptez notre utilisation des cookies. Lire notre politique de confidentialité