mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 09:24:48 +00:00
10 lines
465 B
JavaScript
10 lines
465 B
JavaScript
|
|
ModAPI.require("player"); //Require the player, we need to see their fall height.
|
|
ModAPI.require("network"); //Require the network, we need to send network packets.
|
|
|
|
ModAPI.addEventListener("update", ()=>{ // Every client tick
|
|
if (ModAPI.player.fallDistance > 2.0) { // If the player is at a height that they can take damage from hitting the ground:
|
|
ModAPI.network.sendPacketPlayer({isOnGround: true}); // Tell the server the player is on the ground
|
|
}
|
|
});
|