Minecraft.How
로딩 중...
본문으로 건너뛰기
Java 모드Libraries & APIs

HarpyModLoader

제작 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.

저희 소개글

이 프로젝트가 하는 일

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.

반응

반응하려면 로그인하세요.

호환성

버전과 로더

기록된 릴리스 8개

갤러리

HarpyModLoader icon

저희는 더 나은 이용 경험을 제공하기 위해 쿠키를 사용합니다. 이 사이트를 계속 이용하시면 쿠키 사용에 동의하는 것으로 간주됩니다. 개인정보 처리방침 보기