#[KubeJS] The Harvest Suffocating Bug Fix

25 messages · Page 1 of 1 (latest)

subtle basin
#

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:
    1. Sends the player an error message
    2. Retrieves the player’s last saved coordinates and dimension from persistent data.
    3. Teleports the player back to that recorded position/dimension via a silent server command.
    4. Sends a compensation message and gives the player one harvest map
    5. 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?

  1. Put the script in /kubejs/server_scripts/ folder.
  2. Reload a server or run /kubejs reload server_scripts command
spring pawn
#

Weird... I've never encountered this issue, do you know what causes this?

subtle basin
#

I don't know the exact cause, but resetting the entire the_harvest map does fix it for a while.

wicked musk
#

I copied the script and reloaded the game (I'm on singleplayer) and it doesn't detect that I'm stuck suffocating

#

Well, I broke the previous Harvest block that was used and used another map, ans this time it worked. Either it needs to be a map that is first being used with the script in place, or I just got lucky and got a map that worked.

wicked musk
#

okay, now I got stuck again, and this time it does give me a new Harvest map, but it doesn't teleport me in a safe place. I still have to wait while suffocating

#

Final Update : out of 11 tries, I got stuck 9 times, got a new harvest map each time, and each time I got stuck I had to die suffocating. This seems too buggy.

rigid talon
#

Not detected. Maybe the server is delayed. To make it simpler, you can increase the value of Utils.server.scheduleInTicks(40, () => {

hasty swift
proper basin
#

@vale drift

vale drift
#

found it

#

is this normal?

proper basin
vale drift
#

im on solo and i used a patch for it but im still dying

#

just unlucky

#

i went in got tp'd got reked by a massive spider ect

#

deffo not a thing you can do early

scarlet epoch
#

Hi, I installed the script, it does give me back the map but it fails to teleport me back to the original location. Any ideas why ?

subtle basin
shell knot
#

Happens to me like 90% of the times I use a harvest map in single player, I just switch to creative and break the floor, then back to survival 😂