Jump to content

[1.10.2]NetherBiomes


Mark136

Recommended Posts

Hello All, I'm building a huge RPG mod.(and finally updated it to 1.10.2)

but i'm currently stuck at the part where i need to create NetherBiomes.

 

Overworld biomes are relatively easy to add. but i have no idea how to begin with the netherbiomes.

 

I want some parts of the nether(biomes) to generate my custom block instead of netherrack. with some flowers and  trees.

 

can someone give me some intructions on what classes i need to create to create biomes in the nether?

 

 

my Mod: Extended RPG [W.I.P]

Link to comment
Share on other sites

This topic has come up within the last year, so a Google search should show you the earlier discussion(s) to get you started.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Hello All, I'm building a huge RPG mod.(and finally updated it to 1.10.2) but i'm currently stuck at the part where i need to create NetherBiomes.

 

Overworld biomes are relatively easy to add. but i have no idea how to begin with the netherbiomes.

 

I want some parts of the nether(biomes) to generate my custom block instead of netherrack. with some flowers and  trees.

 

can someone give me some intructions on what classes i need to create to create biomes in the nether?

 

I am working on a Nether Biome mod. Take a look: https://github.com/LogicTechCorp/NetherEx. Please do not copy-paste.

Link to comment
Share on other sites

ok, got it to work. the only problem i have with this. is that the biomes are way to small. sometimes its like 1 or 2 chunks big per biome. where can i change that so they got the size of a overworld Biome?

 

is this bug because of (if you travel through the nether like 100 meters and you build a portal again to go through the overworld. and al the meters you traveled wil be multiplied by 7.( so you have moved 700 meters away).) and the biome uses this type of calculation too. or is there something wrong with my code?

 

i unregistered and registered the nether so I can add my own worldProvider. something LogicTechCorp also did in his code. and I have copied(and changed a little bit) the vanilla GenLayer/Providers Stuff.

everything is working( except a little bit lag in the nether and the XXS biomes

my Mod: Extended RPG [W.I.P]

Link to comment
Share on other sites

ok, got it to work. the only problem i have with this. is that the biomes are way to small. sometimes its like 1 or 2 chunks big per biome. where can i change that so they got the size of a overworld Biome?

 

is this bug because of (if you travel through the nether like 100 meters and you build a portal again to go through the overworld. and al the meters you traveled wil be multiplied by 7.( so you have moved 700 meters away).) and the biome uses this type of calculation too. or is there something wrong with my code?

 

i unregistered and registered the nether so I can add my own worldProvider. something LogicTechCorp also did in his code. and I have copied(and changed a little bit) the vanilla GenLayer/Providers Stuff.

everything is working( except a little bit lag in the nether and the XXS biomes

 

Post your current ChunkProvider code. I had a similar issue with really small biomes, in my project a few weeks ago that I managed to fix. Need to see all of your biomesForGeneration setters, to see if you are facing the same issue that I had.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

Solved. thanks. i used a wrong setter for BiomeForGeneration. :P

 

only thing what i need to do is to generate trees and tall grass in the nether.

 

 

Well, as I mentioned in a previous post just today, I have an IWorldGenerator that places various trees for me, in a custom WorldType, WorldProvider, ChunkProvider etc. The actual dimension is heavily similar to the Nether, literally just stone instead of netherrack and so forth. You can find the link to said IWorldGenerator, in said thread.

 

As for the grass: How much of the grass do you want to spawn? If you want it to spawn quite a bit, but not take too much resources, I'd recommend you bake it directly into your chunkprovider.

In my own chunkprovider, I have a pseudo-dirt block that changes itself to grass|dirt|snow|sand|sandstone depending on biome and what is above it; this lets me easily add in 5 different blocks, at the world-generation cost of almost nothing.

ChunkProviders work directly with blockstates, whereas most custom worldgen 1) get block, 2) check block, 3) either stop or change block. This is heavy on performance.

You can see my voodoo-block here.

Take note on the snow-placing especially, as it checks if the blockpos above is suitable for another type of block, like you want for your grass.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

I already created A BiomeDecorater where I Spawned Trees and tall grass in the overworld

and this worked for 1.8.9 but I don't know if this still works in 1.10.2 because i havend found my own Biome yet.

 

I placed coins on the W button to let me flew 50 Km with a print that says ("Biome is here at" + pos.getX() + "x/ " + pos.getZ() + "z") when it is generated and i know this works because i tested it with the netherBiomes if it would work.

 

take a look at my BiomeDecorator here

 

public class MarkDecorator extends BiomeDecorator {

public MarkDecorator(Biome biome) {

    }
    
    public void decorate(World world, Random random, Biome base, BlockPos pos)
    {
    if (this.decorating)
    {
	    throw new RuntimeException("Already decorating!!");
    }
    else
    { 
    	this.chunkProviderSettings = ChunkProviderSettings.Factory.jsonToFactory(world.getWorldInfo().getGeneratorOptions()).build();
	    this.chunkPos = pos;
	    this.genDecorations(base, world, random);
	    this.decorating = false;
            
    }
    }

    protected void genDecorations(Biome base, World world, Random random)
    {
    	System.out.println("Decorating one of the biomes at : " + this.chunkPos.getX() + " / " + this.chunkPos.getZ());
    	
    	net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre(world, random, chunkPos));
    if(base == MarkBiome.Biome_1_Enriched || base == MarkBiome.Biome_2_NetherDesert || base == MarkBiome.Biome_2_BlueNetherDesert)
    { 
        if(net.minecraftforge.event.terraingen.TerrainGen.decorate(world, random, chunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS))
            for (int i3 = 0; i3 < this.grassPerChunk; ++i3)
            {
            	int j7 = random.nextInt(16) + 8;
                int i11 = random.nextInt(16) + 8;
                int k14 = world.getHeight(this.chunkPos.add(j7, 0, i11)).getY() * 2;

                if (k14 > 0)
                {
                
                	int l17 = random.nextInt(k14);
                	if(base == MarkBiome.Biome_1_Enriched){
                    ((BiomeGenEnriched)base).getRandomWorldGenForGrass(random).generate(world, random, chunkPos.add(j7, l17, i11));
                	}
                	else if(base == MarkBiome.Biome_2_NetherDesert){
                    ((BiomeNetherD)base).getRandomWorldGenForGrass(random).generate(world, random, chunkPos.add(j7, l17, i11));
                    }
                	else if(base == MarkBiome.Biome_2_BlueNetherDesert){
                	((BiomeNetherBD)base).getRandomWorldGenForGrass(random).generate(world, random, chunkPos.add(j7, l17, i11));
                	}
                }
            }
        int k1 = this.treesPerChunk;

        if (random.nextInt(10) == 0)
        {
            ++k1;
        }

        if(net.minecraftforge.event.terraingen.TerrainGen.decorate(world, random, chunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.TREE)){
        for (int j2 = 0; j2 < k1; ++j2)
        {
            int k6 = random.nextInt(16) + 8;
            int l = random.nextInt(16) + 8;
            WorldGenAbstractTree worldgenabstracttree = base.genBigTreeChance(random);
            worldgenabstracttree.setDecorationDefaults();
            BlockPos blockpos = world.getHeight(chunkPos.add(k6, 0, l));

            if (worldgenabstracttree.generate(world, random, blockpos))
            {
                worldgenabstracttree.generateSaplings(world, random, blockpos);
            }
        }
    }}
    
    if(base == MarkBiome.Biome_1_Enriched)
    {
if(net.minecraftforge.event.terraingen.TerrainGen.decorate(world, random, chunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.DEAD_BUSH)){
        	
            for (int j3 = 0; j3 < 1; ++j3)
            {
                int k7 = random.nextInt(16) + 8;
                int j11 = random.nextInt(16) + 8;
                int l14 = world.getHeight(chunkPos.add(k7, 0, j11)).getY() * 2;

                if (l14 > 0)
                {
                	
                    int i18 = random.nextInt(l14);
                    (new WorldGenMarkCrystalBush()).generate(world, random, chunkPos.add(k7, i18, j11));
                }
            }
    }
        
    }
    }
}

 

and my BiomeGenBase Class

public class MarkBiome extends Biome {

public MarkBiome(BiomeProperties properties) {
	super(properties);
	this.theBiomeDecorator = new MarkDecorator(this);
}
public static void init(){
	initBiome();
	regBiome();

}
private static Set<BiomeManager.BiomeEntry> NetherEntries = Sets.newHashSet();
public static Biome Biome_1_Enriched;
public static Biome Biome_2_Nether;
public static Biome Biome_2_NetherDesert;
public static Biome Biome_2_BlueNether;
public static Biome Biome_2_BlueNetherDesert;

;



public static void initBiome(){

	DimensionManager.unregisterDimension(-1);
	DimensionType nether = DimensionType.register("Nether", "_nether", -1, NetherWorldProvider.class, false);
    DimensionManager.registerDimension(-1, nether);

	Biome_1_Enriched = new BiomeGenEnriched((new Biome.BiomeProperties("Enriched")).setBaseBiome("Enriched").setTemperature(1.2F).setRainfall(0.9F).setWaterColor(2653061));
	Biome_2_Nether = new BiomeNether((new Biome.BiomeProperties("Nether")).setRainDisabled());
	Biome_2_NetherDesert = new BiomeNetherD((new Biome.BiomeProperties("NetherDesert")).setRainDisabled());
	Biome_2_BlueNether = new BiomeCryst((new Biome.BiomeProperties("Cryst")).setRainDisabled());
	Biome_2_BlueNetherDesert = new BiomeCrystD((new Biome.BiomeProperties("CrystDesert")).setRainDisabled());



}
public static void regBiome(){
	BiomeDictionary.registerBiomeType(Biome_1_Enriched, Type.MAGICAL);
	BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(Biome_1_Enriched, 10));
	BiomeManager.addSpawnBiome(Biome_1_Enriched);

	AddNetherBiome(Biome_2_Nether, 45, 180, "Nether");
	AddNetherBiome(Biome_2_NetherDesert, 25, 181, "NetherDesert");
	AddNetherBiome(Biome_2_BlueNether, 17, 182, "BlueNether");
	AddNetherBiome(Biome_2_BlueNetherDesert, 13, 183, "BlueNetherDesert");
}

	public static void AddNetherBiome(Biome biome, int Weight, int ID, String Name)
	{
		Biome.registerBiome(ID, Name, biome);
		NetherEntries.add(new BiomeEntry(biome, Weight));
	}

	public static ImmutableList<BiomeManager.BiomeEntry> getBiomeEntries()
    {
        return ImmutableList.copyOf(NetherEntries);
    }

}	

 

the NetherBiomes were Registered with Biome.registerBiome because I needed a int ID to generate the biomes in the nether.

my Mod: Extended RPG [W.I.P]

Link to comment
Share on other sites

Bump...

 

I even cant find the surface biomes... flew 50km again without succes, have seen every minecraft biome. and 80% of the biomes i Saw was Taiga btw.

 

What's wrong with my code (previous post for where I register the biomes, and my mainclass:

 

@EventHandler
public void init(FMLInitializationEvent Event){

...
        ClientProxy.registerRenderers();
        MarkBiome.init();

}

what is wrong with it am I so unlucky or...?

 

and got another problem, with My custom mob not rendering correctly(it's a white box now)

it worked in 1.8.9

 

Clientproxy:

  public static void registerRenderers(){
    	RenderingRegistry.registerEntityRenderingHandler(EntitySalaCommon.class, RenderSalaCommon::new);
    	RenderingRegistry.registerEntityRenderingHandler(EntitySalaDesert.class, RenderSalaDesert::new);
}

 

and here is the render class:

@SideOnly(Side.CLIENT)
public class RenderSalaCommon extends RenderLiving {

public static final ResourceLocation Texture_SalaCommon = new ResourceLocation(ReferenceStrings.MODID + ":textures/entity/salacommon.png");

public RenderSalaCommon(RenderManager rendermanagerIn) {
	super(rendermanagerIn, new ModelSalamander(), 0.5f);

}

protected ResourceLocation getEntityTexture1(EntitySalaCommon entity) {

	return Texture_SalaCommon;
}

@Override
protected ResourceLocation getEntityTexture(Entity entity) {

	return this.getEntityTexture1((EntitySalaCommon)entity);
}

}

 

this code fully worked in 1.8.9 until I updated the mod to 1.10.2

 

my Mod: Extended RPG [W.I.P]

Link to comment
Share on other sites

  • 2 weeks later...

okay, found an alternative solution to generate my grass and trees in the nether

simply just add some code to my worldGenerator Class

 

checking what biome it is with:

 

@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
		IChunkProvider chunkProvider) {
	switch (world.provider.getDimension()) {
case 0: //the surface dimension
...
break;
case -1: // the nether dimension
...
if(world.getBiomeForCoordsBody(new BlockPos(chunkX * 16, 0, chunkZ * 16)) == the biome i want) 
{
//then here the "this.RunGenerator(parameters);"
}

my Mod: Extended RPG [W.I.P]

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Electronic Arts is making some much-needed changes to its soccer annual game EAFC 24 Coins. The addition of cross-play between PC, PS5. Stadia as well as Xbox Series X/S gamers and also players from PS4 as well as Xbox One players, is very thrilling. Cross-play has been demanded in FIFA by players for quite a long time. But as exciting as it may be, EA is actually holding off on providing full support for the technology. Particularly, FC 24 is not offering cross-play in its well-known Pro Clubs game mode. A confirmed statement from EA has stated that FC 24's cross-play feature will not be available for Pro Clubs in the foreseeable time. The reason according to EA is to ensure that "product innovativeness is of high top quality." Furthermore, Pro Clubs, according to EA is a degree of technical complexity that is higher than what developers can handle at the moment. "Technical complexity" is a subtle method of describing the scenario. The Pro Clubs of FIFA permit the use of up to 22 players in an online multiplayer game that includes between 2 and 11 real players in each team. Connecting 22 players on one platform isn't a simple task and adding interplay of the four platforms can make difficult. In the real world, the platforms pose less complicated than 22 players, however EA is just exploring cross-play, and therefore it's plausible when they say that additional time is required. It isn't stopping FIFA fans from feeling dissatisfied and angry about the situation However. Demands for cross-play being made available to FC 24 Pro Clubs are being circulated across the web and FIFA YouTuber JCC encouraging players to join support the cause. JCC along with other well-known players within the FIFA community are complaining that EA of placing the importance of FIFA Ultimate Team above the core experience like Pro Clubs. The company is very grateful that it has responded to the growing discontent within members of the FIFA community, saying it is aware of the criticism. Electronic Arts then points to its FIFA Twitter account to receive future updates on its plans for future games. This isn't a guarantee at all but it's about the closest a game's creator can get to say that something is being developed. FC 24 is all but certain to not have cross-play features for Pro Clubs at launch, or during the game's release. Maybe Pro Club cross-play will end being tested in FC 24 similar to how the basic cross-play was implemented in cheap EAFC 24 Coins. More likely, the feature will be a bit further away to be released by EA Sports FC's launch in 2023 or even later. It's also possible that FIFA fans are right and that EA's priority lies in FUT. It's the responsibility of EA to prove the criticism is not true.
    • SENSA69 💯 Daftar Link Slot Gacor Hari Ini Bisa Judi Slot Online KLIK DISINI >>> DAFTAR DAN LOGIN KLIK DISINI >>>   DAFTAR AKUN GACOR KLIK DISINI >>> DAFTAR AKUN VVIP KLIK DISINI >>>  LINK ALTERNATIF KLIK DISINI >>> AKUN GACOR SCATTER HITAM SENSA69 adalah slot gacor winrate 100% dengan server thailand dan akun pro. Dapatkan akses menuju kemenangan ke puluhan sampai ratusan juta rupiah hanya dalam hitungan menit. 3 web yang kami hadirkan ini adalah yang terbaik dengan histori kemenangan tertinggi di satu Asia Tenggara. Member-member dari web ini selalu kembali karena tim admin dan CS yang profesional serta kemenangan berapapun pasti akan dibayar. RTP slot gacor juga sudah disiapkan agar kalian tidak bingung lagi mau main apa dan di jam berapa. Semua fasilitas seperti deposit dana dan pulsa sudah disiapkan juga untuk kemudahan para slotters. Jadi tunggu apalagi? Raih kemenangan kalian disini sekarang juga!
    • SV388: Temukan situs taruhan sabung ayam resmi yang terjamin aman di Winning303! Bergabunglah dengan SV388 untuk pengalaman taruhan sabung ayam yang mengasyikkan dan aman. Nikmati berbagai pertandingan sabung ayam terbaik sambil memanfaatkan layanan terpercaya dari Winning303. Daftar sekarang dan rasakan sensasi taruhan yang tak terlupakan dengan SV388 di Winning303! ❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰ ❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰
    • MPO1121: Temukan daftar situs judi slot dengan layanan pembayaran melalui Bank Danamon. Bergabunglah dengan MPO1121 untuk pengalaman taruhan slot online yang menarik dan aman. Nikmati berbagai permainan slot terbaik sambil memanfaatkan kemudahan pembayaran melalui Bank Danamon. Daftar sekarang dan rasakan sensasi taruhan yang tak terlupakan dengan MPO1121!" ❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰ ❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰
  • Topics

×
×
  • Create New...

Important Information

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