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

Posted

Hopefully you get the just of it in the title, but I'd like for a mod that displays all the blocks currently in the loaded chunks.
Like 5000 dirt, 25000 stone... etc etc
I don't know if there is anything like that already created, or if writing one would be rather simple...
Not much experience modding, but maybe a little guidance would help get me started if anything

<3

5 hours ago, CSKLego said:

Hopefully you get the just of it in the title, but I'd like for a mod that displays all the blocks currently in the loaded chunks.
Like 5000 dirt, 25000 stone... etc etc
I don't know if there is anything like that already created, or if writing one would be rather simple...
Not much experience modding, but maybe a little guidance would help get me started if anything

<3

create a gui and go through the clients world's loaded chunks array then for each type of block increment one and then display then as icons in a scroll bar gui. Make sure it's not an air block

It's up to you if you want live updates or do you have to reopen the gui/refresh button since live every tick is laggy

Edited by jredfox

The problem is that performance is going to be an issue. A single chunk has 65k positions you need to check, so 20 chunks has over a million positions! Functions that need to consider lots of blocks like rendering the world have very sophisticated ways -- like caching, culling and frustum checking --  to keep the processing work manageable.

 

I think your best hope is to scan chunks as they are loaded and remember it. Even that will give a bit of a performance hit but at least it will be spread out and will only have to be done once. After the initial block counting, you'll also have to handle events for blocks breaking and blocks being placed/changed to keep your counts up to date. 

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.