Jump to content

Problem with Chunk Provider


Recommended Posts

I am making a chunk provider for my dimension. I have this error


Multiple markers at this line
- The method populate(IChunkProvider, World, Random, int, int, boolean, PopulateChunkEvent.Populate.EventType) in the type TerrainGen is not applicable for the arguments (IChunkProvider, World, Random, int, int, 
 boolean, InitMapGenEvent.EventType)
- LAKE cannot be resolved to a variable


But yet the tutorial I am following to help me has the same code here as me and it works fine for him. I am coding in the same version of forge and Minecraft to him so i don't understand this.


Here is the full code:

package assassinhero.parallelworlds;

import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE;
import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE;
import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE;

import java.util.List;
import java.util.Random;

import net.minecraft.block.BlockSand;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.util.IProgressUpdate;
import net.minecraft.world.ChunkPosition;
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.*;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.structure.*;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
import net.minecraftforge.event.terraingen.TerrainGen;
public class ChunkProviderNight implements IChunkProvider {

private Random rand;

private World worldObj;

private final boolean mapFeaturesEnabled;

private double[] noiseArray;
private double[] stoneNoise = new double[256];
private MapGenBase caveGenerator = new MapGenCaves();
private MapGenVillage villageGenerator = new MapGenVillage();
private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature();
private BiomeGenBase[] biomesforGeneration;

	caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE);
	villageGenerator = (MapGenVillage)TerrainGen.getModdedMapGen(villageGenerator, VILLAGE);
	scatteredFeatureGenerator = (MapGenScatteredFeature)TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE);

public ChunkProviderNight(World worldObj, long seed, boolean features) {
	this.worldObj = worldObj;
	this.mapFeaturesEnabled = features;
	this.rand = new Random(seed);


public boolean chunkExists(int i, int j) {

	return false;

public Chunk provideChunk(int i, int j) {

	return null; 

public Chunk loadChunk(int i, int j) {

	return null;

public void populate(IChunkProvider ichunkprovider, int i, int j) {
	BlockSand.fallInstantly = true;
	int k = i * 16;
	int l = j * 16;
	BiomeGenBase biome = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long)i * i1 + (long)j * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(ichunkprovider, worldObj, rand, i, j, flag));

		this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, rand, i, j);
		flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, rand, i, j);

	int k1;
	int l1;
	int i2;

	if(biome != BiomeGenBase.desert && biome != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(ichunkprovider, this.worldObj, rand, i, j, flag, LAKE)){



public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {

	return false;

public boolean unloadQueuedChunks() {

	return false;

public boolean canSave() {

	return false;

public String makeString() {

	return null;

public List getPossibleCreatures(EnumCreatureType enumcreaturetype, int i,
		int j, int k) {

	return null;

public ChunkPosition findClosestStructure(World world, String s, int i,
		int j, int k) {

	return null;

public int getLoadedChunkCount() {

	return 0;

public void recreateStructures(int i, int j) {


public void saveExtraData() {




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.

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.


  • Create New...

Important Information

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