Jump to content

Forge Handlers and WorldGenMinable


QuantumLeaf7895

Recommended Posts

Hi all,

I have two mostly unrelated questions. The first:

Minecraft Forge offers a number of handlers -- events, world gen, gui, etc.  Can a single class implement all of them?

That is, would a class like this:

public class ForgeHandlers implements IWorldGenerator, IGuiHandler{

@Override
public void generate(/* parameters snipped */)
{
//World Generation
}

@Override
public Object getClientGuiElement(/* parameters snipped */)
{
//Gui stuff
}

@ForgeSubscribe
public void entityDeath(EntityDeathEvent event)
{
//Event stuff
}

Work?(outside unimplemented methods and syntax problems)

 

Also: Where in minecraft's code is WorldGenMinable used?  I want an example of how its used (I'm adding a custom ore I want to be a little rarer than iron, and want a few examples to get started), but can't actually find any.

Link to comment
Share on other sites

Yes, the class would work fine as long as you register it with the GuiRegistry, etc, and you'd probably want a normal worldgen tutorial (wuppy's tutorials or the wiki). AFAIK WorldGenMinable is just a world generator for ores.

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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