Information
- Listens for a player right-clicking the block with ID
the_harvest:harvest. - After a 100-tick delay (~5 seconds), it checks whether the player is suffocating at their feet or head (i.e. stuck inside the block).
- If the player is stuck:
- Sends the player an error message
- Retrieves the player’s last saved coordinates and dimension from persistent data.
- Teleports the player back to that recorded position/dimension via a silent server command.
- Sends a compensation message and gives the player one harvest map
- Destroys the original harvest block to prevent re-triggering the bug.
This ensures that if interacting with a harvest block accidentally traps a player inside it, they are safely returned to their last known location and compensated, while normal interactions only produce a simple “OK” notification.
How to Install?
- Put the script in
/kubejs/server_scripts/folder. - Reload a server or run
/kubejs reload server_scriptscommand