Region/Biom?

A new update (0.9.2) is available now!
Latest Hotfix: 0.9.2.1 (2026-05-13)
  • Hi.


    I used bellow code to get a biome.

    So 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?

  • 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 :


  • 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!