[SPIGOT-7131] Chunk snapshot returned by World#getEmptyChunkSnapshot(int,int,boolean,boolean) thinks every block has PLAINS biome Created: 05/Aug/22  Updated: 25/Dec/24  Resolved: 30/Aug/22

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Ethan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: biomes

Attachments: File EmptyChunkSnapshotMinimumReproduction-1.0-SNAPSHOT.jar    
Version: CraftBukkit version 3551-Spigot-14a2382-9a8e080 (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Calling ChunkSnapshot#getBiome(int, int, int) always returns PLAINS when called on an empty chunk snapshot returned from World#getEmptyChunkSnapshot(int, int, boolean, boolean) when both boolean arguments are set to true.

Whether or not the chunk has been generated/visited does not affect this behavior.

Since the documentation says that this method is used to "Get empty chunk snapshot (equivalent to all air blocks), optionally including valid biome data. Used for representing an ungenerated chunk, or for fetching only biome data without loading a chunk.", either the documentation is wrong or the implementation of the method is bugged.

 

Minimal Reproduction Plugin: Run /demonstratebug as a player to print biome information from the empty snapshots of the player's chunk and of a random chunk to the console.



 Comments   
Comment by Marvin Rieple [ 28/Aug/22 ]

Made a PR for this: craftbukkit#1103

Generated at Sun Mar 30 17:57:32 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.