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

I'm trying to add custom structures (similar to villages) to map generation. I've so far worked out that I need to create a generator that implements the IWorldGenerator class and I can generate blocks within a single chunk. Beyond that I'm not sure where to go; most tutorials I've found have been for ore generation. If anyone can point out any tutorials or open-source mods that accomplish something similar I'd greatly appreciate it!

You can make a class that implements IWorldGenerator, but you might find it easier to subscribe to the DecorateBiomeEvent.Decorate.

 

Either of the two will do what you want.

 

One of my old classes with the event: https://github.com/Matryoshika/Saligia/blob/master/src/main/java/Matryoshika/mods/saligia/worldgen/biomeDecorationAltar.java

 

1.10 example of IWorldGenerator (About the same for 1.7.10)

https://github.com/Matryoshika/Underworld/blob/master/src/main/java/se/Matryoshika/Underworld/WorldGen/Dirty/DirtyTreeGen.java

 

Both of these are called from the respective main classes.

 

Remember: Make sure that what you want to spawn, spawns where it should.

Try to make the requirements simple though. Continuously getting and setting blocks will drain most computers, until they seem to load worlds like ten year old toasters. If you have something big to place, lookup chunkproviders and see how they deal with raw bytes instead.

 

Oh, and do think about upgrading to 1.10. I know that everyone is saying that on this forum, but, is it really worth it to code for something obsolete? If you're coding just for yourself, or to learn etc, that's all fine, but if you want people to play with your mod, you kinda do have to pick up the pace, so to speak, lest you finish your mod, but find none playing it.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

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.