Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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:

 

 

 

Posted

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.

Posted

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)

Posted

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.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hi,  I'm using Forge 47.3.0 for Minecraft 1.20.1 I apologise if this is obvious I am very new to modding for Minecraft. I sucessfully made a mod that launched without errors or crashes (without it doing anything) but in order to add the features I need, I need to add "Custom Portal API [Forge]" as a dependency. However no matter the way I've tried to acheive this, it crashes. I am pretty sure it's not the way I'm putting it in the repositories, the dependencies or the way I'm refrencing it, as I've a hundred diffrent combinations and multiple Maven methods. And on all those diffrent variations I still get this crash: pastebin.com/UhumzZCZ Any tips would be invaluable as I've been loosing my mind over this!
    • Hi, i'm really having problems trying to set the texture to my custom item. I thought i'm doing everything correctly, but all i see is the missing texture block for my item. I am trying this for over a week now and getting really frustrated. The only time i could make the texture work, was when i used an older Forge version (52.0.1) for Minecraft (1.21.4). Was there a fundamental change for textures and models somewhere between versions that i'm missing? I started with Forge 54.1.0 and had this problem, so in my frustration i tried many things: Upgrading to Forge 54.1.1, created multiple new projects, workspaces, redownloaded everything and setting things up multiple times, as it was suggested in an older thread. Therea are no errors in the console logs, but maybe i'm blind, so i pasted the console logs to pastebin anyway: https://pastebin.com/zAM8RiUN The only time i see an error is when i change the models JSON file to an incorrect JSON which makes sense and that suggests to me it is actually reading the JSON file.   I set the github repository to public, i would be so thankful if anyone could take a look and tell me what i did wrong: https://github.com/xLorkin/teleport_pug_forge   As a note: i'm pretty new to modding, this is my first mod ever. But i'm used to programming. I had some up and downs, but through reading the documentation, using google and experimenting, i could solve all other problems. I only started modding for Minecraft because my son is such a big fan and wanted this mod.
    • Please read the FAQ (link in orange bar at top of page), and post logs as described there.
    • Hello fellow Minecrafters! I recently returned to Minecraft and realized I needed a wiki that displays basic information easily and had great user navigation. That’s why I decided to build: MinecraftSearch — a site by a Minecraft fan, for Minecraft fans. Key Features So Far Straight-to-the-Point Info: No extra fluff; just the essentials on items, mobs, recipes, loot and more. Clean & Intuitive Layout: Easy navigation so you spend less time scrolling and more time playing. Optimized Search: Search for anything—items, mobs, blocks—and get results instantly. What I’m Thinking of Adding More data/information: Catch chances for fishing rod, traveling villager trades, biomes info and a lot more. The website is still under development and need a lot more data added. Community Contributions: Potential for user-uploaded tips for items/mobs/blocks in the future. Feature Requests Welcome: Your ideas could shape how the wiki evolves! You can see my roadmap at the About page https://minecraftsearch.com/about I’d love for you to check out MinecraftSearch and see if it helps you find the info you need faster. Feedback is crucial—I want to develop this further based on what the community needs most, so please let me know what you think. Thanks, and happy crafting!
    • Instructions on how to install newer Java can be found in the FAQ
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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