Carpet

Carpet

2M Downloads

[Feature Request] /tick freeze inside datapack functions pauses command execution

Evtema3 opened this issue ยท 1 comments

commented

I recently thought about applying Carpet mod's /tick freeze command for makeshift breakpoints in datapack functions (which would be a very helpful debugging tool for datapack developers like myself!). While a function can successfully run the command tick freeze, it unfortunately continues to run all other commands after tick freeze that would have been executed in the same gametick before actually activating the freeze, making it infeasible as a breakpoint mechanism. I am not sure whether subtick-precise tick freezes like this are even possible to code, but I figured it couldn't hurt to suggest.

commented

That'd probably be difficult, I've not looked at how mcfunctions are executed, but I'd assume they're just a loop over a list of commands, and we can't easily stop that (and definitely can't later resume it).

Carpet's freeze is not a "true" freeze, the game is still running, just with most stuff not ticking, else you wouldn't even be able to stay connected.

A mod could definitely add some debugging stuff (or maybe with just a development environment put actual breakpoints in the code that executes the mcfunction, though it'd probably be painful to then read the values of stuff), but I don't think Carpet is going to add it.