A demigod minecraft mod for Holy SMP
Version:
Minecraft 1.21.7
Fabric 0.16.14
Dependencies
Fabric API 0.128.2+1.21.7
- Uriel: IMPLEMENTED
- Artemis: IMPLEMENTED YAY
- Nyx: Not implemented
Use /setDeity <target> <deity> to set a player's deity, deity names are all caps, ex: ARTEMIS.
.
|-- client
| |-- java
| | `-- lexicalerror
| | `-- halfbloods
| | |-- HalfbloodsClient.java // Keybinds here (shouldn't need to touch)
| | |-- datagen
| | |-- entities
| | | |-- ModEntitiesClient.java // Register renderers here
| | | `-- renderers // Add renderers here
| | `-- mixin
| `-- resources
`-- main
|-- generated
|-- java
| `-- lexicalerror
| `-- halfbloods
| |-- Halfbloods.java // Main entry
| |-- ModComponents.java // Register Components here
| |-- abilities
| | |-- Ability.java
| | |-- actives // Add actives here
| | `-- passives // Add passives here
| |-- commands // Add commands here
| |-- components // Add components here
| |-- config // Add gamerules here
| |-- deities // Add deity's to enum here
| |-- entities // Add & register entities here
| |-- items // Add & register entities here
| `-- mixin
`-- resources
|-- assets
|-- data // Add tags here
|-- fabric.mod.json
`-- halfbloods.mixins.json
The player component includes a deity and a hashmap that maps cooldowns to names of active abilities
getCooldown(name): returns remaining time of cooldown of an ability, stops at 0.setCooldown(name, duration): set cooldown of an ability.
Other stuff shouldn't be important, to handle cooldowns from the ability class:
- Get the player instance.
- Get the player's component with:
PlayerComponent component = ModComponents.PLAYER_COMPONENT.get(player);
Passive
Create a java class <passive>.java that implements passive:
getName(), define your passive name here.apply(), is called every tick.
Active
Create a java class <active>.java that implements active:
getName(), define your passive name here.apply(), is called every tick.canActivate()gets called and checked everytime the ability hotkey is pressed.activate()gets called if ability hotkey is pressed andcanActivate()is true.
Deity
Add a diety to the deities enum, define the name, passives and actives.
To add a diety, add passives and actives classes, then define the diety in the enum. Right now there can only be two actives since there are only two hotkeys, but we can add more.