Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

The 256 limit only applies to the core block of the dimension (stone for vanilla) and the 2 biome blocks for each biome (top & filler block).

So unless you have a massive number of biomes, you wont have problems with the 256 limit.

ย 

A rewrite of such proportion as to account for bigger block values is quite tedious and I believe you will need to create your own chuncks as well as your own way of storing the ids during gen :)

If you guys dont get it.. then well ya.. try harder...

Okay just saying, that it would be a lot less work that way by having two id ranges you occupy.

ย 

Anyways if you or anyone else is interested the change you need to do is in the ChunkProvider's provideChunk(int int) method. This is where the byte array is declared like this:

 byte[] data = new byte[32768]; 

After that it's used inside the generateTerrain and replaceBlocksForBiome both of which are inside the ChunkProivder.

Then it calls for cavegen and other generation classes.

And lastly it passes the byte array into a new Chunk.

Inside the chunk's constructor it's turned into ID's in the ExtendedBlockStorage which is used by the world.

ย 

So you would have to create your own version of chunk, which just has a new constructor.

And do some changes in the ChunkProvider (and optionally in the cavegen and other gen classes like that).

The most notable thing to understand would be how a given x/y/z position relates to a spot in the array.

Within the generateTerrain you find this line:

 int position = var42 + var10 * 8 << 11 | 0 + var11 * 8 << 7 | var12 * 4 + var31; 

which is used to get the position in the byte array, based on where in the 5 for loops we are atm.

ย 

I haven't gotten further yet myself, as I haven't had more time but it seems like it isn't to much which needs to be done in order for it to work nicely :)

ย 

ย 

ย 

If you guys dont get it.. then well ya.. try harder...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.