mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-26 10:05:10 +00:00
MineXLauncher 1.1
This commit is contained in:
9
public/resources/mods/nofallmod.js
Normal file
9
public/resources/mods/nofallmod.js
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
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
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user