CC: Restitched

CC: Restitched

3M Downloads

[1.18.x] Chunks with computers in them fail to save on singleplayer.

Awsomekeldeo opened this issue ยท 6 comments

commented

Minecraft Version

1.18.x

Version

1.100.8

Details

How to reproduce:

  1. Load up a singleplayer world.
  2. Place a computer down and turn it on.
  3. Save and quit
  4. Reload world, computer is gone.

The logs show that the chunk is failing to save.
latest.log

commented

That is a pretty big issue... how the hell did it never come up before??

can you verify if the chunks actually do save? like place a computer, make an edit, exit the world and load back in?

commented

It seems like the chunks will actually save if you wait on the pause menu long enough, but if you quit out too quickly the chunks don't save.

Here's a video of that happening:

2023-04-25-19-31-42-Trim.mp4

And of course, the logs:
latest.log

commented

This is pretty similar to #146, and I guess cc-tweaked/CC-Tweaked#956 too. Really the best thing to do here is what we've done on the CC:T side and remove as many usages of GameInstanceUtils.getServer as possible. So:

  • NetworkHandler.sendToAllPlayers should accept a MinecraftServer argument rather than magic-ing it up.
  • ServerComputer and any block entities should fetch the server from the their Level.
commented

hmm... I don't know what could be causing that, looks like the computer might cause an delay in saving properly as the lua code gets stopped??

Realistically on servers this won't be an issue when the server takes its time to save but yeah...

@SquidDev ideas?

commented

@Merith-TK Hello, when a turtle moves outside of a chunk while I'm quitting the game in a singleplayer world or in a LAN world, the turtle literally disappears out of existence. I think this is a very serious problem with this mod. Also when a turtle is moving inside a chunk and I quit and enter the world, the turtle starts from it's past place, not the current place, making the mod unreliable. Please fix this issue.

Here is a video demonstrating the first issue:
https://github.com/cc-tweaked/cc-restitched/assets/136577948/fe2f992a-3141-4493-b5db-cc5a8bdf7774

Here is the log file:
latest.log

Thanks.

commented

As the earlier mentions in this issue say, the chunk itself doesn't save properly when computers are running in it, not just turtles,

So the issue is more serious than just turtles, someone made an potential fix that needs to be tested however