Official Mod for Hardercore 2023
Supports Minecraft 1.19.4 with Fabric
This mod does not and will not support Forge.
This mod shares health loss between players (not damage).
[Example]
Consider there are 2 players on a server, Player A and Player B.
- Player A that is not wearing any armor, takes a large fall and loses 3 hearts.
- Player B that is 5000 blocks away and wearing diamond boots with feather falling IV takes damage and also loses 3 hearts
Put the .jar into your mods folder. *Requires Fabric
Put the .jar into your server's mods folder, and install the datapack into your world. *Requires Fabric
The code is split between client
and main
as now recommended by Fabric and is managed by the Loom gradle plugin.
The client only code is the HeartInHeartsHudOverlay
that displays health of all players on the left side of the screen.
The networking
package has packet receivers for the health and damage info.
HeartInHeartsHudOverlay
owns a hashmap of <UUID, health>
. It receives updates to it from the server when a player's health changes.
The server tracks damage taken by players, and redistributes it out to other players via the DamageS2CPacket
that sends the UUID of the player that last took damage, and the HealthS2CPacket
that sends the health of every player to every player.
When a player takes damage, the server distributes 0.1 of hih
type damage to every player to deliver a hit effect, then manually sets the HP of every player to their current HP minus the HP the original damaged player took. This is how armor/stat negation works.
NOTE: This mod is intended for a small server of players (<12 players) and does not scale well for larger sessions.