Jump to content

Recommended Posts

Posted

Such a simple fix, that fixed it!

 

Now, all I need to do is disallow the standard biomes from spawning in my dimension and it'll be DONE.

 

I tried using this:

 

  Reveal hidden contents

 

 

But on a new world, I landed in plains after going through the portal. Is there something else I need?

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted
  On 5/14/2013 at 8:29 PM, Flenix said:

Such a simple fix, that fixed it!

 

Now, all I need to do is disallow the standard biomes from spawning in my dimension and it'll be DONE.

 

I tried using this:

 

  Reveal hidden contents

 

 

But on a new world, I landed in plains after going through the portal. Is there something else I need?

 

I realized it was set as Plains as the default biome. Changed that to my custom one, and everything is peachy now. I don't know if multiple biomes work, as I don't have other biomes yet. I'll make one shortly and try it out...

For now though, I have one last question. How do I assign a biome decorator? I've made my own one, and I want it to add all the ores etc, I can't figure out where I should reference it and how though. I'd assume somewhere in my biome class? In vanilla biomes, it has "theBiomeDecorator" which is from BiomeGenBase - How would I do that?

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted

    /**
     * Decorates the world. Calls code that was formerly (pre-1. in ChunkProviderGenerate.populate
     */
    public void decorate(World par1World, Random par2Random, int par3, int par4)
    {
        if (this.currentWorld != null)
        {
            throw new RuntimeException("Already decorating!!");
        }
        else
        {
            this.currentWorld = par1World;
            this.randomGenerator = par2Random;
            this.chunk_X = par3;
            this.chunk_Z = par4;
            this.decorate();
            this.currentWorld = null;
            this.randomGenerator = null;
            
            
        }
    }

 

This is the code that you need to add in your biome.  the decorate function is this.decorate.  you need to call your custom decorator instead

Posted

Adding custom blocks to biomes is a sinch!

 

What you need is a config file. Then using configVariableName.getTerrainBlock(Paramaters...).getInt();

 

that will make sure that the block ID is UNDER 255, because what you set the ID to is not the actual ID when it comes to loading...

 

And also, inside the chunk manager you can set the top/filler block without needing a biome.

 

see here:

https://github.com/haydenf96/Spazzysmod/blob/master/Spazzysmod/spazzysmod_common/Spazzysmod/world/chunk/ChunkManagerMoon.java

 

Thats some chunk manager code for a mod I help make.

 

 

[EDIT]

Also, feel free to look at the code for the dimensions. It is found in the world package which is here:

https://github.com/haydenf96/Spazzysmod/tree/master/Spazzysmod/spazzysmod_common/Spazzysmod/world

 

Look through that and you will find everything you need for a dimension.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted
  On 5/15/2013 at 2:32 AM, Mew said:

Adding custom blocks to biomes is a sinch!

 

What you need is a config file. Then using configVariableName.getTerrainBlock(Paramaters...).getInt();

 

that will make sure that the block ID is UNDER 255, because what you set the ID to is not the actual ID when it comes to loading...

 

And also, inside the chunk manager you can set the top/filler block without needing a biome.

 

see here:

https://github.com/haydenf96/Spazzysmod/blob/master/Spazzysmod/spazzysmod_common/Spazzysmod/world/chunk/ChunkManagerMoon.java

 

Thats some chunk manager code for a mod I help make.

 

 

[EDIT]

Also, feel free to look at the code for the dimensions. It is found in the world package which is here:

https://github.com/haydenf96/Spazzysmod/tree/master/Spazzysmod/spazzysmod_common/Spazzysmod/world

 

Look through that and you will find everything you need for a dimension.

 

Thanks but I've already got all that ;) I mastered Dimensions about a week ago, just got my biome working nicely in it and all I needed was the decorator. Thanks though :)

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted
  On 5/15/2013 at 2:09 AM, robustus said:

    /**
     * Decorates the world. Calls code that was formerly (pre-1. in ChunkProviderGenerate.populate
     */
    public void decorate(World par1World, Random par2Random, int par3, int par4)
    {
        if (this.currentWorld != null)
        {
            throw new RuntimeException("Already decorating!!");
        }
        else
        {
            this.currentWorld = par1World;
            this.randomGenerator = par2Random;
            this.chunk_X = par3;
            this.chunk_Z = par4;
            this.decorate();
            this.currentWorld = null;
            this.randomGenerator = null;
            
            
        }
    }

 

This is the code that you need to add in your biome.  the decorate function is this.decorate.  you need to call your custom decorator instead

 

How exactly do I call my custom decorator though? I don't see anywhere that... "asks" for it?

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted

I still have this not working properly as my biomes spawn in the overworld and my dimension is still covered with all the possible biomes... And i think thats because of the fact that i use WorldChunkManager(), as it goes in there it has the list of all the biomes in there. I can't seem to figure out how to do this. I do have a biomeDecorator but i'm not sure wether it is working properly as i first wanted to try fix this. Although i think it works.

Posted
  On 5/15/2013 at 11:09 AM, Flenix said:

  Quote

    /**
     * Decorates the world. Calls code that was formerly (pre-1. in ChunkProviderGenerate.populate
     */
    public void decorate(World par1World, Random par2Random, int par3, int par4)
    {
        if (this.currentWorld != null)
        {
            throw new RuntimeException("Already decorating!!");
        }
        else
        {
            this.currentWorld = par1World;
            this.randomGenerator = par2Random;
            this.chunk_X = par3;
            this.chunk_Z = par4;
            this.decorate();
            this.currentWorld = null;
            this.randomGenerator = null;
            
            
        }
    }

 

This is the code that you need to add in your biome.  the decorate function is this.decorate.  you need to call your custom decorator instead

 

How exactly do I call my custom decorator though? I don't see anywhere that... "asks" for it?

public YourCustomBiomeDecorator thebiomedecorator;

 

 

YourCustomBiomeDecorator thebiomedecorator = new YourCustomBiomeDecorator()
thebiomedecorator.decorate();

Posted

Custom biomedecorator is being called in the custom BiomeGenBase class and in all the biomes. Now i would really like to know how you guys did what i asked above. Because i almost got this to work i just need to find a way how to make it so that my custom biomes ONLY spawn in my dimension + that i don't get any overworld biomes to spawn there.

Posted
  On 5/15/2013 at 4:58 PM, OwnAgePau said:

Custom biomedecorator is being called in the custom BiomeGenBase class and in all the biomes. Now i would really like to know how you guys did what i asked above. Because i almost got this to work i just need to find a way how to make it so that my custom biomes ONLY spawn in my dimension + that i don't get any overworld biomes to spawn there.

 

I don't even have a custom BiomeGenBase- I didn't know we needed one?

 

Anyway, to remove your custom biome from overworld, add to your @Init:

            GameRegistry.removeBiome(yourBiomeName);

 

And to remove all vanilla biomes from your dimension:

 

  Reveal hidden contents

 

 

Did you manage to get multiple custom biomes in your dimension? If so, can I see your code, I haven't managed to get that yet either, but I put it on hold as the biome decorator is more important to me (I want ores, flowers, long grass etc)

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted

Well i am pretty sure that in my case the lists that are defined in my ChunkProvider are read but not used in the generation. Also i somehow do not get a message when entering the world and such while its perfectly the same as in the overworld and such. So uhm jeah here are my classes:

ChunkProviderMarona

 

  Reveal hidden contents

 

 

WorldProviderMarona

 

  Reveal hidden contents

 

 

mod_Ores, its about 2500 lines of code so i snipped out about 99%

@Mod(modid="myOresMod", name="Soul Forest Mod", version="1.4")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec =
@SidedPacketHandler(channels = {"mod_Ores" }, packetHandler = ClientPacketHandler.class),
serverPacketHandlerSpec =
@SidedPacketHandler(channels = {"mod_Ores" }, packetHandler = ServerPacketHandler.class))
public class mod_Ores
{
@Instance("myOresMod") // instance
    public static mod_Ores instance;

public static BiomeGenBase SoulForest;
	public static BiomeGenBase FrostCaves;

// i will just skip the @PreInit

@Init
public void load(FMLInitializationEvent ev)
{				
                SoulForest = (new BiomeGenSoulForest(23).setBiomeName("SoulForest").setTemperatureRainfall(0.3F, 0.8F).setMinMaxHeight(0.0F, 0.9F)); //Custom Biome
	FrostCaves = (new BiomeGenFrostCaves(24).setBiomeName("FrostCaves").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.0F, 0.9F)); //Custom Biome
	GameRegistry.addBiome(SoulForest);
	GameRegistry.addBiome(FrostCaves);
	GameRegistry.removeBiome(SoulForest);
	GameRegistry.removeBiome(FrostCaves);
// i know i add them and remove em again, as you sayd i should add removeBiome(), i think i could just leave the 4 rows out completel but i'm not sure if that works or something. Do i need to GameRegistry.addBiome somewhere else though??
}

 

And for you i also have my biomeGenBase and biomeDecorator

 

TheBiomeDeco

 

  Reveal hidden contents

 

 

BiomeGenBaseMarona // i am not sure what and how to use it yet because if i start changing everything to BiomeGenBaseMarona it makes me have to change a hell lot more... i haven't figured out how to do anything that way, like you end up making a custom WorldChunkManager, BiomeCacheBlock, GenLayer etc etc.  Thats also why i have everything outcomented in my editor.

 

  Reveal hidden contents

 

Posted
  On 5/15/2013 at 4:20 PM, Flenix said:

Sorry, I still don't quite follow. Which lines am I putting in which classes? Any chance you can show me an example? (psuedocode is fine)

 

Im not home at the moment to go into more detail, but you can look at BiomeGenBase at all the code related to the biome decorator, copy it into your biome and change it to your biome decorator.  I personally dont use a biome decorator, I put all the decorating in the biome file itself.  Ill post some code later when I get time if you havent figured it out by then.

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.