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

Hi!

 

I wanted to make a mod letting asteroids fall from the sky.

To make them more rare I wanted to let them appear using an If-Loop.

 

But in order to initiate the loop I need a command (in the code ofc) which detects if a new chunk has been loaded.

(Only newly generated chunks should be counted)

 

Would be great if anyone could help me with this =)

Have a look at ForgeChunkManager. There may be a few methods in there that will help :)

In this case i would use the Retrogen Way.

The Retrogen way is there perfect.

When you save a chunk you could add a nbt that says randomly you have a meteor when you get loaded again.

And when it get loaded these chunks which have it spawn a meteor.

xD

 

Hope the idea is good.

(Only newly generated chunks should be counted)

This looks like a job for... IWorldGenerator.

  • Author

Thx for your replies, I will make sure to check them out^^

 

(Will post again, when I get it to work)

  • Author

Hi guys!

The best way to do this was the Method onChunkGenerate().

It is a great way to trigger the loop and, unlike onChunkLoad(), it makes sure, that only new Chunks count^^

Guest
This topic is now closed to further replies.

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.