Closed ScribbleTAS closed 2 years ago
Pressing a pressure plate schedules a "nextticklistentry" in WorldServer
. And it updates again when world.getWorldTotalTime()
is bigger than the scheduled time. The scheduled time is the current world time + a specified delay. So pretty simple: If the scheduled time is reached, it updates the pressure plate. If nobody is on the plate it unpresses.
When loading a savestate, the world total time is loaded from the savestate and is way smaller than the previous world time, making the pressure plate unpress after a longer time.
Update the schedule time to the current world time. This makes all pressure plates jump up immediately, but maybe I should store this information somewhere to make it compatible with savestates
Seems like my old friend #58 since I can place blocks inside of me