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

How can I create my own village for my mod?

(I know, that I need a few classes, but I'm don't know, what I must change, that this looks like my village and how I can create the structure with the VillageComponent!)

 

 

I hope, that someone can help me  ;)

 

Bektor

Developer of Primeval Forest.

I'm starting to look into creating custom structures myself.

You need two classes:

The Component you are which has to inherit from ComponentVillage.

You will also need a class which implements the IVillageCreationHandler interface.

 

As for how to do the methods for placing the blocks for the Components addComponentParts() method I'd recommend that you look at the vanilla village houses like the church for example :)

 

 

During the initialization of your mod you will need to register the relevant classes.

You need to register the CreationHandler by using the following method:

VillagerRegistry.instance().registerVillageCreationHandler(/*argss here*/);

 

In 1.6+ you'd also need to tell the MapGenStructureIO about your new component by using it's func_143031_a method with the Component.Class as the first argument and a String with the components name as the 2nd argument.

 

Except that, all I can tell you is to look at how vanilla structure components behave. Try copying one of them and modifying them and see if you can get the hang of how it all works. I STRONGLY recommend that you read into the involved classes and try to understand how they are meant to work before you start slapping code together :)

 

Good luck mate! :D

 

 

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.