Jump to content

Recommended Posts

Posted

Well, i still have some problems with the world generation.

Nearly everywhere i find these huge chunk cliffs:

ueQW8ae.jpg

(Overworld and custom dimension.)

 

Here is my new Chunk Provider:

 

 

 

package net.dimensionshift.mod.world.dimensions;

 

import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON;

import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE;

import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE;

import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA;

 

import java.util.List;

import java.util.Random;

 

import net.minecraft.block.Block;

import net.minecraft.block.BlockFalling;

import net.minecraft.entity.EnumCreatureType;

import net.minecraft.init.Blocks;

import net.minecraft.util.IProgressUpdate;

import net.minecraft.world.ChunkPosition;

import net.minecraft.world.SpawnerAnimals;

import net.minecraft.world.World;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraft.world.chunk.Chunk;

import net.minecraft.world.chunk.IChunkProvider;

import net.minecraft.world.gen.ChunkProviderGenerate;

import net.minecraft.world.gen.MapGenBase;

import net.minecraft.world.gen.MapGenCaves;

import net.minecraft.world.gen.NoiseGeneratorOctaves;

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

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

import net.minecraft.world.gen.structure.MapGenMineshaft;

import net.minecraft.world.gen.structure.MapGenScatteredFeature;

import net.minecraft.world.gen.structure.MapGenStronghold;

import net.minecraft.world.gen.structure.MapGenVillage;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.event.terraingen.PopulateChunkEvent;

import net.minecraftforge.event.terraingen.TerrainGen;

 

public class ChunkProviderDimenisonShift extends ChunkProviderGenerate{

 

public World worldObj;

private Random rand=new Random();

private NoiseGeneratorOctaves noiseGen1;

private NoiseGeneratorOctaves noiseGen2;

private NoiseGeneratorOctaves noiseGen3;

private NoiseGeneratorOctaves noiseGen4;

public NoiseGeneratorOctaves noiseGen5;

public NoiseGeneratorOctaves noiseGen6;

public NoiseGeneratorOctaves mobSpawnerNoise;

private final boolean mapFeaturesEnabled;

 

/** Holds Cave Generator */

private MapGenBase caveGenerator = new MapGenCaves();

 

 

 

 

/** The biomes that are used to generate the chunk */

private BiomeGenBase[] biomesForGeneration;

 

 

 

public ChunkProviderDimenisonShift(World worldObj, long seed, boolean mapFeatures) {

super(worldObj, seed, mapFeatures);

this.worldObj = worldObj;

this.mapFeaturesEnabled = mapFeatures;

 

 

}

 

@Override

    public Chunk provideChunk(int par1, int par2)

    {

        this.rand.setSeed((long)par1 * 341873128712L + (long)par2 * 132897987541L);

        Block[] ablock = new Block[65536];

        byte[] abyte = new byte[65536];

        this.func_147424_a(par1, par2, ablock);

        this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, par1 * 16, par2 * 16, 16, 16);

        this.replaceBlocksForBiome(par1, par2, ablock, abyte, this.biomesForGeneration);

        this.caveGenerator.func_151539_a(this, this.worldObj, par1, par2, ablock);

 

 

        Chunk chunk = new Chunk(this.worldObj, ablock, abyte, par1, par2);

        byte[] abyte1 = chunk.getBiomeArray();

 

        for (int k = 0; k < abyte1.length; ++k)

        {

            abyte1[k] = (byte)this.biomesForGeneration[k].biomeID;

        }

 

        chunk.generateSkylightMap();

        return chunk;

    } 

   

   

   

    @Override

    public void populate(IChunkProvider par1IChunkProvider, int par2, int par3){

        BlockFalling.fallInstantly = true;

        int k = par2 * 16;

        int l = par3 * 16;

        BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);

        this.rand.setSeed(this.worldObj.getSeed());

        long i1 = this.rand.nextLong() / 2L * 2L + 1L;

        long j1 = this.rand.nextLong() / 2L * 2L + 1L;

        this.rand.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed());

        boolean flag = false;

 

        MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

 

 

        int k1;

        int l1;

        int i2;

       

       

        /*water in oasen/maybe used in later versions

        *

        if (biomegenbase != BiomeGenBase.desert =BIOMEDSWOODS && !flag && this.rand.nextInt(4) == 0

            && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))

        {

            k1 = k + this.rand.nextInt(16) + 8;

            l1 = this.rand.nextInt(256);

            i2 = l + this.rand.nextInt(16) + 8;

            (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2);

        }

        */

 

 

        boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON);

        for (k1 = 0; doGen && k1 < 8; ++k1)

        {

            l1 = k + this.rand.nextInt(16) + 8;

            i2 = this.rand.nextInt(256);

            int j2 = l + this.rand.nextInt(16) + 8;

            (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2);

        }

 

        //biomegenbase.decorate(this.worldObj, this.rand, k, l);

 

        k += 8;

        l += 8;

 

       

        MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

 

        BlockFalling.fallInstantly = false;

    }

   

    @Override

    public void recreateStructures(int par1, int par2){

 

    }

}

 

 

 

 

May I ask you to send me whole code for your dimension. Could you upload it to the mediafire or github? If you did so, I would be really grateful since you will really help me. Things have changed from 1.6.4 to the 1.7.2 in a great deal.

 

Thank you!

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

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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