Kann ich über die API herausfinden in welchem Biom / welcher Region sich der Spieler befindet? bei den F3 Datei steht es dabei (Biome: ForestDead (Region: Default))
Region/Biom?
-
- German
- Devidian
- Thread is Unresolved
A new update (0.9.2) is available now!
Latest Hotfix: 0.9.2.1 (2026-05-13)
Latest Hotfix: 0.9.2.1 (2026-05-13)
-
-
Hi.
I used bellow code to get a biome.
Display MoreJavafinal byte[] rawLOD=World.getChunk(p.getChunkPosition().x, p.getChunkPosition().z).getRawLODTerrain(); // raw LOD data of chunk of player positionSo if i suppose correct, a code between
- 1 and 49 is a Default (or Ocean) region
- 50 and 99 is a Cold region
- 100 -149 is a Arid region
BTW:
In same chunk you can have differently biome for each block position. In old java game i think biome was tied to whole chunk, not individual block positions from chunk?
-
Thank you i will test if that works!
-
It didnt work that well, even my improved version that scans the sector for indicators did not match well with the region, in most cases it just returns forest as region
-
I test it with some locations and always get same things as in F3 Info.
Not sure what is wrong for you!
I just use something like :
Display MoreJava -
-
Well i want to just get the Region (Default / Dry) and if i sail with a boat and cross sector borders it always detects default = forest instead of dry
-
Ah, so you don't want to detect particular biome but whole type of region aka sector type (Default-Ocean / Dry / Cold)?
Hmm maybe time when check event? i suppose you check on PlayerEnterSectorEvent ? If so, if read player position still on chunk of old sector? maybe use position of chunk from getNewPlayerPosition() and not chunk from actual player. I think Event PlayerEnterSectorEvent occur before enter sector.
Note: Probable not that is cause. See following posts about overlap biome along border of sectors.
-
Maybe region type can be read directly from table Sectors from Chunks.db
But this work only for a changed sector (have at least one chunk altered and saved in db)! If you just enter a new sector and don't modify anything, sector data is not write on this table before any chunk is modified.
Here my -1,-1 sector is a Arid/Dessert.
After some override of a sector, i see values for column region:
1 - Default
2 - Ocean
3 - Arid
4 - Cold
-
I do some experiment on crossing border around 0,0 with a mix of differently sector type. My conclusion is:
- close to border line of a sector, a biome from a region (example grass from Default/Ocean) can extend in neighbor sector for some blocks and are not cut along border line.
So is unreliable to read biome on sector enter to get region type because that cross border biome overlaps. Inside sector at some distance from margin of sector data is accurate.
Maybe a quick fix to detect on what type of sector enter is to read data not from chunk just entered sector, but from a chunk close to middle of sector and from that data to conclude what type of sector is it:
- Default/ocean
- Dry
- Cold
I make some function who work this way when enter some sector:
1. Read data from table Sectors from Chunks.db
2. if sector is here, sector have some chunks modified, already visited and from column region read exact sector type
3. if not here, you entered a new sector, read a sample chunk for example from middle of that sector, read a biome from here and determine sector type.
Maybe red51 will expose via API, sector type!
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!