Jump to content

[SOLVED][1.6.4] Problem with new biome.


Delilah

Recommended Posts

Hi, this is my first post, I'm doing my first mod and learning at the same time that I'm doing the mod.

 

But I looking for information about the biomes generation.  In my mod I want to create my own biomes

so I decided to put off the vanilla minecraft biomes and start to create my first biome. Whit the code

in the spoiler I deactivated all the vanilla biomes.

 

 

 

                //Minecraft Biomes off

GameRegistry.removeBiome(BiomeGenBase.beach);

GameRegistry.removeBiome(BiomeGenBase.desert);

GameRegistry.removeBiome(BiomeGenBase.desertHills);

GameRegistry.removeBiome(BiomeGenBase.extremeHills);

GameRegistry.removeBiome(BiomeGenBase.extremeHillsEdge);

GameRegistry.removeBiome(BiomeGenBase.forest);

GameRegistry.removeBiome(BiomeGenBase.forestHills);

GameRegistry.removeBiome(BiomeGenBase.frozenOcean);

GameRegistry.removeBiome(BiomeGenBase.frozenRiver);

GameRegistry.removeBiome(BiomeGenBase.hell);

GameRegistry.removeBiome(BiomeGenBase.iceMountains);

GameRegistry.removeBiome(BiomeGenBase.icePlains);

GameRegistry.removeBiome(BiomeGenBase.jungle);

GameRegistry.removeBiome(BiomeGenBase.jungleHills);

GameRegistry.removeBiome(BiomeGenBase.mushroomIsland);

GameRegistry.removeBiome(BiomeGenBase.mushroomIslandShore);

//GameRegistry.removeBiome(BiomeGenBase.ocean);

GameRegistry.removeBiome(BiomeGenBase.plains);

GameRegistry.removeBiome(BiomeGenBase.river);

GameRegistry.removeBiome(BiomeGenBase.sky);

GameRegistry.removeBiome(BiomeGenBase.swampland);

GameRegistry.removeBiome(BiomeGenBase.taiga);

GameRegistry.removeBiome(BiomeGenBase.taigaHills);

 

//new biome registry

GameRegistry.addBiome(TeRforestBiome);

 

 

 

After that I did my first biome this is the code of my biome:

 

 

 

 

package JavaBuckets.Mods.TeR.Biomes;

 

import java.util.Random;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraft.block.Block;

import JavaBuckets.Modium.Main.MainClass;

import net.minecraft.world.gen.feature.WorldGenerator;

//import net.minecraft.entity.passive.EntityWolf;

//import net.minecraft.world.biome.SpawnListEntry;

 

 

public class BiomeGenTeRforest extends BiomeGenBase

{

    public BiomeGenTeRforest(int par1)

    {

    super(par1);

        this.spawnableCaveCreatureList.clear();

        this.spawnableCreatureList.clear();

        this.spawnableMonsterList.clear();

        this.spawnableWaterCreatureList.clear();

       

    this.theBiomeDecorator.treesPerChunk = 0;

        this.theBiomeDecorator.grassPerChunk = 0;

        this.theBiomeDecorator.cactiPerChunk=0;

    this.theBiomeDecorator.clayPerChunk=0;

    this.theBiomeDecorator.deadBushPerChunk=0;

    this.theBiomeDecorator.flowersPerChunk=0;

    this.theBiomeDecorator.bigMushroomsPerChunk=0;

    this.theBiomeDecorator.mushroomsPerChunk=0;

    this.theBiomeDecorator.reedsPerChunk=0;

    this.theBiomeDecorator.waterlilyPerChunk=0;

               

    this.topBlock = (byte)MainClass.TeRGrass.blockID;

    this.fillerBlock = (byte)MainClass.ModiumBlock.blockID;

   

                       

    }

 

}

 

 

 

 

 

The biome is working and everytime I'm doing the spawn in my biome because is the only biome in the game. Also I modified the BiomeDecorator class to deactivated all the vanilla ores in minecraft so I have my biome without ore. But the problems are...

 

In my biome minecraft still is creating rivers and beach even if those biomes are deactivated, so my topblock and fillerblock are not working 100% because the biome is having rivers and the beach. And the last thing is how I can change the cobblestone in my biome, the topblock and fillerblock they are just changin the firts 4 blocks of the biome but under those blocks the biome is full of cobblestone and I need to use my block instead of the cobblestone. I don't know if it possible to use your own block as the stone for the biome.

 

And one thing more, in the code of the biome  I set all the mobs to clear and in the surface of the biome is working, but in the caves of the biome the mobs are still doing spawn, I don't know if I need to go to cave generation to deactivate the spawn of the mobs.

 

Sorry for my big post but is all the questions that I have in this moment in the mod. I'm looking for information or tutorials but all the tutorials that I saw are doing the same, creating the biome and adding the top and filler block so I decided to ask in the forum.

 

Thanks.

Link to comment
Share on other sites

Finally I did this morning, I modified the river and the beach original biome adding my custom blocks and also I did the stone changing the original texture of the vanilla mc stone and in the routine of the block dropped I change as well putting the vanilla mc stone to dropped the block that I created so my vanilla minecraft stone looks with my texture and when you break de stone is dropping the block that I created. I don't know if it the best solution but is working. Sorry for my english. This is the look of my stone now :)

 

http://imgur.com/Y1aHKq4

Link to comment
Share on other sites

You don't need to remove the biomes, but you can. I would recommend this:

 

Biome Class:

(Replace YOURMODCLASS with your mod class name, and it will have an error at the package, just click "change to: your package name")

package com.example.biome;

import (Your Main Mod File), EX: import com.example.BaseModClassFile;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;

public class YOURMODCLASS extends BiomeGenBase{

public YOURMODCLASS(int id) {
	super(id);
	this.topBlock = (byte)ThomasMod.Rubble.blockID;
	this.fillerBlock = (byte)Block.cobblestoneMossy.blockID;
	this.theBiomeDecorator.deadBushPerChunk = 5;
	this.setDisableRain();
}

}

 

That disables rain and puts 1 deadbush per chunk. (You can remove it.)

Try and play around with this.theBiomeDecorator.

 

Also, If you want to use custom blocks, do:

this.topBlock = (byte)YouModName.ExampleBlock.blockID;
this.fillerBlock = (byte)YourModName.ExampleBlock.blockID;

 

The top block for example is grass, and the filler is for example dirt.

 

Replace YourModName.ExampleBlock with you mod name and the block you want to use.

 

Otherwise, if you want to use vanilla blocks: replace it with: Block.(It should bring up a list here, just delete this and the dot after "Block", then replace the dot.).blockID;

 

For your main mod class file, You would register it like so:

(BIOMECLASSFILENAMEis the class file for the biome. BiomeName is the alias.)

(DO IT UNDER YOUR BLOCKS)

(for .setMinMaxHeight, 0.1 = 10 blocks high.)

public static BiomeGenBase BiomeName = new BIOMECLASSFILENAME(BiomeID here, has to be above 22 and below 256, EX: 50.).setBiomeName("What you would want it to say in F3").setMinMaxHeight(-0.5F, 0.1F);

 

To Register It: (Also in main mod file.)

GameRegistry.addBiome(BiomeName);

 

Find The WorldChunkManager Class File.

 

near the top there should be this:

 

public static ArrayList<BiomeGenBase> allowedBiomes = new ArrayList<BiomeGenBase>(Arrays.asList(beach, desert, forest, jungle, ocean, plains, river, taiga, (other biomes));

 

Edit it like so:

public static ArrayList<BiomeGenBase> allowedBiomes = new ArrayList<BiomeGenBase>(YouMainClassFile.BiomeAlias));

 

 

Hope I helped!

 

If confused:

 

 

 

Link to comment
Share on other sites

Thanks I did and it's working, but I have one problem in the biome, the block that I used as a topblock is one of my new blocks.

 

I follow a few tutorials to create flowers and all the tutorials and my flowers are working, but I only can put the flowers in the vanilla minecraft grass block. I'm looking information how to create a new blockflower class or where I can tell to the code that my flowers are going in a specific block and not in the vanilla grass block. All the tutorial to create flowers were easy to follow, but all the tutorials are thinking that we are going to put de flowers in the vanilla grass block. The point is... what happen is for example you have and obsidian biome and you want to have obsidian flowers on the obsidian blocks. I don't know how to do that in the moment but I need to do that for my mod, because all my topblocks in all my biomes are not the vanilla minecraft blocks. Thanks.

Link to comment
Share on other sites

To have a custom top/filler block:

this.topBlock = (byte)YouModName.ExampleBlock.blockID;
this.fillerBlock = (byte)YourModName.ExampleBlock.blockID;

 

So you want a flower only to be allowed to get placed on an obsidian block? Hmm... I have done flowers and found that I cannot define one block it can spawn on. (Sorry.)

 

 

If still confused:

this.topBlock = (byte)MainModClassName.(It should come up with a list after you type the MainModClassName., there scroll through and chose you block name.).blockID;

 

Your custom block's ID has to be under 256 for it to generate. (Experience) IT WILL NOT CONFLICT WITH VANILLA ITEMS(I think)

Link to comment
Share on other sites

I did the flowers on my custom block. I change the original code of the flower and I told to the flowers to grow in my block as well so now the biome decorator let me decorate my biome with my custom top blocks and the flowers are working. Thanks.

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.