Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Awsomekeldeo opened this issue Apr 24, 2023 · 6 comments
Open
Labels
bug Something isn't working critical bug that NEEDS fixing

Comments

@Awsomekeldeo
Copy link

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

@Awsomekeldeo Awsomekeldeo added the bug Something isn't working label Apr 24, 2023
@Awsomekeldeo Awsomekeldeo changed the title Chunks with computers in them fail to save on singleplayer. [1.18.x] Chunks with computers in them fail to save on singleplayer. Apr 24, 2023
@Merith-TK Merith-TK added the critical bug that NEEDS fixing label Apr 24, 2023
@Merith-TK
Copy link
Collaborator

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?

@Awsomekeldeo
Copy link
Author

Awsomekeldeo commented Apr 26, 2023

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

@Merith-TK
Copy link
Collaborator

Merith-TK commented Apr 26, 2023

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?

@SquidDev
Copy link
Member

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.

@0xPascal
Copy link

0xPascal commented Sep 11, 2023

@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.

Giraaffes added a commit to Giraaffes/cc-restitched that referenced this issue Sep 12, 2023
@Giraaffes Giraaffes mentioned this issue Sep 12, 2023
@Merith-TK
Copy link
Collaborator

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

Merith-TK added a commit that referenced this issue Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical bug that NEEDS fixing
Projects
None yet
Development

No branches or pull requests

4 participants