PaperMC / PaperMC/Paper

Partially Generated Chunks are not saved in some situations

Open
#6,340 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted type: bug upstream: vanilla version: 1.17
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

Member of OpenTerrainGenerator dev team here.

We're running into issues with a Minecraft bug: MC-224729. It is causing chunks to be generated twice, which some of our structures don't support.

Observed/Actual behavior

Here are some images of the glitch in action.

Large Rock

Tree

The following issues appear in vanilla Minecraft.

Vanilla -- happening in spawn chunks

Vanilla -- Overload lighting engine

Another vanilla screenshot

Steps/models to reproduce

While you may be able to find this in vanilla, it is easier to see in OTG. Start by loading up an OTG preset using the OTG 1.16.5 Alpha. Wildlands, Biome Bundle, Dregora, etc should all work. Once the spawn chunks are loaded in, stop the server, and then begin exploring around. If you're lucky enough, you'll see some odd chunk borders where structures were cut off.

You can also attempt to find this is a vanilla world but it may be less noticable.

Plugin list

OpenTerrainGenerator 1.16.5 Alpha 0.0.17

Paper version

This server is running Paper version git-Paper-783 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
You are running the latest version

Agreements
  • I am running the latest version of Paper available from https://papermc.io/downloads.
  • I have searched for and ensured there isn't already an open issue regarding this.
  • My version of Minecraft is supported by Paper.
Other

Here's the mixins we used to fix the problem on Forge: MixinChunkManager.java

What one of our devs did but for Fabric: MixinThreadedAnvilChunkStorage.java

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked MixinChunkManager.java and MixinThreadedAnvilChunkStorage.java implementations, then reproduce the issue with an OpenTerrainGenerator 1.16.5 preset after loading spawn chunks and restarting the server. Done means partially generated chunks are saved and structures are no longer cut off when the area is explored.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.