Jump to content

Recommended Posts

Posted

Hello.

 

I'm currently updating my mod to 1.7.2, but now I'm getting the following error every time if I create a new world or if I load a world:

 

 


---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 02.06.14 19:49
Description: Exception initializing level

java.lang.NullPointerException: Exception initializing level
at minecraftplaye.primevalforest.world.layer.PFGenLayerBiomes.getInts(PFGenLayerBiomes.java:41)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at minecraftplaye.primevalforest.world.WorldChunkMangerPrimevalForest.findBiomePosition(WorldChunkMangerPrimevalForest.java:291)
at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:742)
at net.minecraft.world.WorldServer.initialize(WorldServer.java:726)
at net.minecraft.world.World.<init>(World.java:258)
at net.minecraft.world.WorldServer.<init>(WorldServer.java:96)
at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:14)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:65)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:92)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at minecraftplaye.primevalforest.world.layer.PFGenLayerBiomes.getInts(PFGenLayerBiomes.java:41)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20)
at minecraftplaye.primevalforest.world.WorldChunkMangerPrimevalForest.findBiomePosition(WorldChunkMangerPrimevalForest.java:291)
at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:742)
at net.minecraft.world.WorldServer.initialize(WorldServer.java:726)

-- Affected level --
Details:
Level name: Primeval Forest
All players: 0 total; []
Chunk stats: ServerChunkCache: 0 Drop: 0
Level seed: 3805043132271920285
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options:
Level spawn location: World: (0,0,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 0 game time, 0 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.world.World.<init>(World.java:258)
at net.minecraft.world.WorldServer.<init>(WorldServer.java:96)
at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:14)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:65)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:92)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_05, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 93673536 bytes (89 MB) / 194510848 bytes (185 MB) up to 3810525184 bytes (3634 MB)
JVM Flags: 0 total;
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 29, tcache: 90, allocated: 0, tallocated: 1
FML: MCP v9.03 FML v7.2.207.1103 Minecraft Forge 10.12.1.1103 4 mods loaded, 4 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
FML{7.2.207.1103} [Forge Mod Loader] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Forge{10.12.1.1103} [Minecraft Forge] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
primevalforest{Alpha 0.0.9} [Primeval Forest] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'[/spoiler]

Here are the classes:
WorldChunkMangerPrimevalForest
package minecraftplaye.primevalforest.world;

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

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import minecraftplaye.primevalforest.world.biome.PFBiomeBase;
import minecraftplaye.primevalforest.world.layer.PFGenLayer;
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.util.ReportedException;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeCache;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.IntCache;

public class WorldChunkMangerPrimevalForest extends WorldChunkManager
{
  
    private GenLayer genBiomes;
    /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */
    private GenLayer biomeIndexLayer;
    /** The BiomeCache object for this world. */
    private BiomeCache biomeCache;
    /** A list of biomes that the player can spawn in. */
private List<BiomeGenBase> biomesToSpawnIn;

public WorldChunkMangerPrimevalForest()
{
        this.biomeCache = new BiomeCache(this);
        this.biomesToSpawnIn = new ArrayList<BiomeGenBase>();
        this.biomesToSpawnIn.addAll(allowedBiomes);
}

public WorldChunkMangerPrimevalForest(long seed, WorldType worldType)
{
	super();
	// i changed this to my GenLayerTutorial
	GenLayer[] agenlayer = PFGenLayer.makeTheWorld(seed);
	agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer);
	this.genBiomes = agenlayer[0];
	this.biomeIndexLayer = agenlayer[1];
}

    public WorldChunkMangerPrimevalForest(World world)
    {
        this(world.getSeed(), world.getWorldInfo().getTerrainType());
    }
    
    /**
     * Gets the list of valid biomes for the player to spawn in.
     */
    @Override
public List<BiomeGenBase> getBiomesToSpawnIn()
    {
        return this.biomesToSpawnIn;
    }
    
    /**
     * Returns the BiomeGenBase related to the x, z position on the world.
     */
    @Override
    public BiomeGenBase getBiomeGenAt(int x, int z)
    {
    	BiomeGenBase biome = this.biomeCache.getBiomeGenAt(x, z);
    	
    	if(biome == null)
    	{
    		return PFBiomeBase.primevalforest;
    	}
    	
        return biome;
    }
    
    /**
     * Returns a list of rainfall values for the specified blocks. Args: listToReuse, x, z, width, length.
     */
    @Override
    public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length)
    {
        IntCache.resetIntCache();

        if (listToReuse == null || listToReuse.length < width * length)
        {
        	listToReuse = new float[width * length];
        }

        int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);

        for (int i1 = 0; i1 < width * length; ++i1)
        {
            try
            {
                float f = (float)BiomeGenBase.getBiome(aint[i1]).getIntRainfall() / 65536.0F;

                if (f > 1.0F)
                {
                    f = 1.0F;
                }

                listToReuse[i1] = f;
            }
            catch (Throwable throwable)
            {
                CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
                CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock");
                crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1));
                crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length));
                crashreportcategory.addCrashSection("x", Integer.valueOf(x));
                crashreportcategory.addCrashSection("z", Integer.valueOf(z));
                crashreportcategory.addCrashSection("w", Integer.valueOf(width));
                crashreportcategory.addCrashSection("h", Integer.valueOf(length));
                throw new ReportedException(crashreport);
            }
        }

        return listToReuse;
    }
    
    /**
     * Return an adjusted version of a given temperature based on the y height
     */
    @Override
    @SideOnly(Side.CLIENT)
    public float getTemperatureAtHeight(float par1, int par2)
    {
        return par1;
    }

    /**
     * Returns an array of biomes for the location input.
     */
    @Override
    public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
    {
        IntCache.resetIntCache();

        if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
        {
            par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
        }

        int[] aint = this.genBiomes.getInts(par2, par3, par4, par5);

        try
        {
            for (int i = 0; i < par4 * par5; ++i)
            {
            	if(aint[i] >= 0)
            	{
            		par1ArrayOfBiomeGenBase[i] = BiomeGenBase.getBiome(aint[i]);
            	}
            	else
            	{
            		//Change this to a biome
            		par1ArrayOfBiomeGenBase[i] = PFBiomeBase.primevalforest;
            	}
            }

            return par1ArrayOfBiomeGenBase;
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock");
            crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length));
            crashreportcategory.addCrashSection("x", Integer.valueOf(par2));
            crashreportcategory.addCrashSection("z", Integer.valueOf(par3));
            crashreportcategory.addCrashSection("w", Integer.valueOf(par4));
            crashreportcategory.addCrashSection("h", Integer.valueOf(par5));
            throw new ReportedException(crashreport);
        }
    }
    
    /**
     * Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the
     * WorldChunkManager Args: oldBiomeList, x, z, width, depth
     */
    @Override
    public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth)
    {
        return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true);
    }

    /**
     * Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
     * don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
     */
    @Override
    public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int y, int width, int length, boolean cacheFlag)
    {
        IntCache.resetIntCache();

        if (listToReuse == null || listToReuse.length < width * length)
        {
        	listToReuse = new BiomeGenBase[width * length];
        }

        if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (y & 15) == 0)
        {
            BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y);
            System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length);
            return listToReuse;
        }
        else
        {
            int[] aint = this.biomeIndexLayer.getInts(x, y, width, length);

            for (int i = 0; i < width * length; ++i)
            {
            	if(aint[i] >= 0)
            	{
                	listToReuse[i] = BiomeGenBase.getBiome(aint[i]);
            	}
            	else
            	{
            		//Change this to a biome
                	listToReuse[i] = PFBiomeBase.primevalforest;
            	}
            }

            return listToReuse;
        }
    }
    
    /**
     * checks given Chunk's Biomes against List of allowed ones
     */
    @Override
    @SuppressWarnings("rawtypes")
public boolean areBiomesViable(int x, int y, int z, List par4List)
    {
        IntCache.resetIntCache();
        int l = x - z >> 2;
        int i1 = y - z >> 2;
        int j1 = x + z >> 2;
        int k1 = y + z >> 2;
        int l1 = j1 - l + 1;
        int i2 = k1 - i1 + 1;
        int[] aint = this.genBiomes.getInts(l, i1, l1, i2);

        try
        {
            for (int j2 = 0; j2 < l1 * i2; ++j2)
            {
                BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]);

                if (!par4List.contains(biomegenbase))
                {
                    return false;
                }
            }

            return true;
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer");
            crashreportcategory.addCrashSection("Layer", this.genBiomes.toString());
            crashreportcategory.addCrashSection("x", Integer.valueOf(x));
            crashreportcategory.addCrashSection("z", Integer.valueOf(y));
            crashreportcategory.addCrashSection("radius", Integer.valueOf(z));
            crashreportcategory.addCrashSection("allowed", par4List);
            throw new ReportedException(crashreport);
        }
    }
    
    /**
    * Finds a valid position within a range, that is in one of the listed
    * biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive y
    * positions.
    */
    @Override
    @SuppressWarnings("rawtypes")
public ChunkPosition findBiomePosition(int x, int y, int z, List par4List, Random random)
    {
        IntCache.resetIntCache();
        int l = x - z >> 2;
        int i1 = y - z >> 2;
        int j1 = x + z >> 2;
        int k1 = y + z >> 2;
        int l1 = j1 - l + 1;
        int i2 = k1 - i1 + 1;
        int[] aint = this.genBiomes.getInts(l, i1, l1, i2);
        ChunkPosition chunkposition = null;
        int j2 = 0;

        for (int k2 = 0; k2 < l1 * i2; ++k2)
        {
            int l2 = l + k2 % l1 << 2;
            int i3 = i1 + k2 / l1 << 2;
            BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]);

            if (par4List.contains(biomegenbase) && (chunkposition == null || random.nextInt(j2 + 1) == 0))
            {
                chunkposition = new ChunkPosition(l2, 0, i3);
                ++j2;
            }
        }

        return chunkposition;
    }

    /**
     * Calls the WorldChunkManager's biomeCache.cleanupCache()
     */
    @Override
    public void cleanupCache()
    {
        this.biomeCache.cleanupCache();
    }
}

 

PFGenLayerBiomes

 


package minecraftplaye.primevalforest.world.layer;

import minecraftplaye.primevalforest.world.biome.PFBiomeBase;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.IntCache;

public class PFGenLayerBiomes extends GenLayer
{

    protected BiomeGenBase[] allowedBiomes =
    {
        PFBiomeBase.magicalforest,
        PFBiomeBase.mountains,
        PFBiomeBase.pineForest,
        PFBiomeBase.primevalforest,
        PFBiomeBase.silverwood
    };

public PFGenLayerBiomes(long seed, GenLayer genlayer)
{
super(seed);
this.parent = genlayer;
}

public PFGenLayerBiomes(long seed)
{
super(seed);
}

    @Override
    public int[] getInts(int x, int z, int width, int depth)
    {
        int[] dest = IntCache.getIntCache(width * depth);

        for (int dz = 0; dz < depth; dz++)
        {
            for (int dx = 0; dx < width; dx++)
            {
                this.initChunkSeed(dx + x, dz + z);
                dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID;
            }
        }

        return dest;
    }

}

 

 

I'm using Forge 1.7.2-10.12.1.1103.

 

I hope that you can help me!  ;)

Bektor

Developer of Primeval Forest.

Posted

Hi

 

My guess: one of these is not initialised properly (is still null)

        PFBiomeBase.magicalforest,

        PFBiomeBase.mountains,

        PFBiomeBase.pineForest,

        PFBiomeBase.primevalforest,

        PFBiomeBase.silverwood

 

If that doesn't work, you could try setting your debugger to break on NullPointerException, and see which object is causing the problem.  That will give you a clue on where to look next.

 

-TGG

 

Posted

Ok, I checked if some ot the biomes is not initialised and all biomes are initialised.

The Debug thing returns this line in the Minecraft ClassLoader class:

 

final Class<?> clazz = defineClass(transformedName, transformedClass, 0, transformedClass.length, codeSource);

Developer of Primeval Forest.

Posted

Ok, I checked if some ot the biomes is not initialised and all biomes are initialised.

The Debug thing returns this line in the Minecraft ClassLoader class:

 

final Class<?> clazz = defineClass(transformedName, transformedClass, 0, transformedClass.length, codeSource);

Yes, Forge triggers several Null Pointer Exceptions during startup.  Just keeping resuming until it stops with a NullPointerException on your code PFGenLayerBiomes.java:41.  Then look to see which variable is null.

 

-TGG

Posted

Ok, it tested it and with every of my biomes it crashs the game and I tested biome for biome and didn't test if it will work with "Mojang biomes".

 

So here are my biome classes:

BiomeSilverWood

 

package minecraftplaye.primevalforest.world.biome;

public class BiomeSilverWood extends PFBiomeBase
{

public BiomeSilverWood(int biomeId) 
{
	super(biomeId);
	this.theBiomeDecorator.treesPerChunk = 15;
	this.theBiomeDecorator.grassPerChunk = 2;
	this.theBiomeDecorator.flowersPerChunk = -1;
}
}

 

PFBiomeBase

 

package minecraftplaye.primevalforest.world.biome;

import cpw.mods.fml.common.FMLLog;
import minecraftplaye.primevalforest.configuration.PFConfigurationIDs;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeDictionary.Type;

public class PFBiomeBase extends BiomeGenBase
{

/** The biome height */
protected static final BiomeGenBase.Height height_pForest = new BiomeGenBase.Height(0.3F, 0.6F); 

/** The biome decorator. */

    public static BiomeGenBase primevalforest;
    public static BiomeGenBase magicalforest;
    public static BiomeGenBase silverwood;
    public static BiomeGenBase mountains;
    public static BiomeGenBase pineForest;

public PFBiomeBase(int biomeId) 
{
	super(biomeId);
	init();
	registerWithBiomeDictionary();
	this.rainfall = 0.6F;
}

    public static boolean checkForBiomeConflicts()
    {
        boolean noConflict = true;
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomePrimevalForest);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomeMagicalForest);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomeSilverwood);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomeMountains);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomePineForest);

        if (!noConflict)
        {
            FMLLog.warning("[Primeval Forest] Biome ID conflict detected.  Edit the Primeval Forest config to give all biomes unique IDs.", new Object[0]);
        }

        return noConflict;
    }
    
    public static boolean checkBiomeIDisClearOrOurs(int id)
    {
        BiomeGenBase biomeAt = BiomeGenBase.getBiome(id);

        if (biomeAt == null || (biomeAt instanceof PFBiomeBase))
        {
            return true;
        }
        else
        {
            FMLLog.warning("[Primeval Forest] Biome ID conflict.  Biome ID %d contains a biome named %s, but Primeval Forest is set to use that ID.", new Object[]
                           {
                               Integer.valueOf(id), biomeAt.biomeID
                           });
            return false;
        }
    }
    
    public static void init()
    {	
    	primevalforest = (new BiomePrimevalForest(PFConfigurationIDs.idBiomePrimevalForest).setColor(5470985).setTemperatureRainfall(0.95F, 0.9F).setHeight(height_pForest).setBiomeName("Primeval Forest"));
    	magicalforest = (new BiomeMagicalForest(PFConfigurationIDs.idBiomeMagicalForest).setColor(34049320).setTemperatureRainfall(0.8F, 0.4F).setHeight(height_LowPlains).setBiomeName("Magical Forest"));
    	silverwood = (new BiomeSilverWood(PFConfigurationIDs.idBiomeSilverwood).setColor(5470985).setTemperatureRainfall(1.4F, 0.9F).setHeight(height_Default).setBiomeName("Silver Wood"));
    	mountains = (new BiomeMountains(PFConfigurationIDs.idBiomeMountains).setColor(2432095).setTemperatureRainfall(0.25F, 0.8F).setHeight(height_MidHills).setBiomeName("Mountains"));
    	pineForest = (new BiomePineForest(PFConfigurationIDs.idBiomePineForest).setColor(1103243).setTemperatureRainfall(0.3F, 0.8F).setHeight(height_MidPlains).setBiomeName("Pine Forest"));
    }
    
    public static void registerWithBiomeDictionary()
    {
    	BiomeDictionary.registerBiomeType(primevalforest, Type.FOREST);
    	BiomeDictionary.registerBiomeType(magicalforest, Type.MAGICAL);
    	BiomeDictionary.registerBiomeType(silverwood, Type.JUNGLE);
    	BiomeDictionary.registerBiomeType(mountains, Type.MOUNTAIN);
    	BiomeDictionary.registerBiomeType(pineForest, Type.WASTELAND);
        
        BiomeDictionary.registerAllBiomes();
    }

    /*@Override
    public BiomeDecorator createBiomeDecorator()
    {
        return getModdedBiomeDecorator(new PFBiomeDecorator(this));
    }*/

    /**
     * Gets a WorldGen appropriate for this biome.
     */
    /*public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
    {
        return new WorldGenTallGrass(PFBlocks.silverTallGrass.blockID, 1);
    }*/
}

 

 

Oh and I post here only one biome class, because the other biome classes are exact the same, because I copied and renamed them only for testing if the code works.

 

The biome ids are 200, 201, 202, 203, 204.

I hope that this helps.

 

Bektor

Developer of Primeval Forest.

Posted

Hi

 

Did you try this?

Yes, Forge triggers several Null Pointer Exceptions during startup.  Just keeping resuming until it stops with a NullPointerException on your code PFGenLayerBiomes.java:41.  Then look to see which variable is null.

Which variable on that line was null?

 

Are you sure your PFBiomeBase.init() is called?  You seem to have some strange recursive initialisation thing happening where the constructor of PFBiomeBase creates a number of other PFBiomeBase objects.  As a general rule that is asking for trouble. 

 

-TGG

Posted

Yes, I'm sure that PFBiomeBase.init() is called, if not then  my mod in 1.6 won't work too, but there everything works.

 

Well, but I'm on some part confused. The WorldChunkManager says the Biome isn't null and the Main-Class says the biome is null.

And then there is an error that says if I change the order what should be loaded first that there is a packet handling problem a few lines over it the nullpointerexception.

 

 

 

package minecraftplaye.primevalforest;

import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import minecraftplaye.primevalforest.blocks.PFBlocks;
import minecraftplaye.primevalforest.configuration.PFConfiguration;
import minecraftplaye.primevalforest.configuration.PFConfigurationIDs;
import minecraftplaye.primevalforest.configuration.PFConfigurationMain;
import minecraftplaye.primevalforest.handler.BonemealHandler;
import minecraftplaye.primevalforest.handler.FFuelHandler;
import minecraftplaye.primevalforest.items.PFItems;
import minecraftplaye.primevalforest.lib.Reference;
import minecraftplaye.primevalforest.proxy.IProxy;
import minecraftplaye.primevalforest.util.RecipeHandler;
import minecraftplaye.primevalforest.world.WorldProviderPrimevalForest;
import minecraftplaye.primevalforest.world.biome.PFBiomeBase;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = Reference.MODID, name = Reference.MODNAME, version = Reference.VERSION)
public class PrimevalForest
{

@Mod.Instance(Reference.MODID)
public static PrimevalForest instance;

    @SidedProxy(clientSide = Reference.CLIENTPROXYLOCATION, serverSide = Reference.COMMONPROXYLOCATION)
    public static IProxy proxy;
    
    public static String configPath;
    public static boolean creatureCompatibility;
    public static boolean biomeIDConflicts;
    
    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    	/** Configuration file */
    	configPath = event.getModConfigurationDirectory() + "/primevalforest/";
    	PFConfiguration.init(configPath);
    	
    	/** Blocks/Items/other stuff */
	PFBlocks.init();

	PFItems.init();
    }
    
    @Mod.EventHandler
    public void load(FMLInitializationEvent event)
    {
    	proxy.registerTileEntities();
    	
    	RecipeHandler.init();
    	
    	MinecraftForge.EVENT_BUS.register(new BonemealHandler());
    	GameRegistry.registerFuelHandler(new FFuelHandler());
    	
	proxy.registerEntities();

	proxy.registerEntityRendering();

	proxy.registerTileEntityRendering();

	DimensionManager.registerProviderType(PFConfigurationIDs.primevalForestDimID, WorldProviderPrimevalForest.class, PFConfigurationMain.keepLoaded);

                // new... was removed from postInit and added here
	DimensionManager.registerDimension(PFConfigurationIDs.primevalForestDimID, PFConfigurationIDs.primevalForestDimID);
    }
    
    @Mod.EventHandler
    public static void postInit(FMLPostInitializationEvent event)
    {
        if (isDimensionUnregistered(PFConfigurationIDs.primevalForestDimID))
        {
           // DimensionManager.registerDimension(PFConfigurationIDs.primevalForestDimID, PFConfigurationIDs.primevalForestDimID);
        }
        else
        {
            FMLLog.warning("[Primeval Forest] Primeval Forest detected that the configured dimension id '%d' is being used.  Using backup ID.  It is recommended that you configure this mod to use a unique dimension ID.", new Object[]
                           {
                               Integer.valueOf(PFConfigurationIDs.primevalForestDimID)
                           });
            //DimensionManager.registerDimension(PFConfigurationIDs.primevalForestDimID, PFConfigurationIDs.primevalForestDimID);
        }

        biomeIDConflicts = PFBiomeBase.checkForBiomeConflicts();
    }
    
    private static boolean isDimensionUnregistered(int dimID)
    {
        try
        {
            DimensionManager.getProviderType(dimID);
            return false;
        }
        catch (IllegalArgumentException ex)
        {
            return true;
        }
    }
    
    public static void setDimensionID(int dim)
    {
        if (PFConfigurationIDs.primevalForestDimID != dim)
        {
            FMLLog.info("[Primeval Forest] Server has a different dimension ID (%d) for Primeval Forest.  Changing this on the client.  This change will not be saved.", new Object[]
                        {
                            Integer.valueOf(dim)
                        });
           // DimensionManager.unregisterDimension(PFConfigurationIDs.primevalForestDimID);
            PFConfigurationIDs.primevalForestDimID = dim;
           // DimensionManager.registerDimension(PFConfigurationIDs.primevalForestDimID, PFConfigurationIDs.primevalForestDimID);
        }
    }
}

 

 

Heres the second crash I get in this order in that the things will be loaded currently and the other order, well you see it in the comments :P

 

---- Minecraft Crash Report ----
// Oh - I know what I did wrong!

Time: 04.06.14 17:27
Description: Ticking memory connection

java.lang.NullPointerException: Ticking memory connection
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:643)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:531)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@7a662d68
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:643)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:531)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_05, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 112584856 bytes (107 MB) / 229113856 bytes (218 MB) up to 3810525184 bytes (3634 MB)
JVM Flags: 0 total; 
AABB Pool Size: 5567 (311752 bytes; 0 MB) allocated, 5136 (287616 bytes; 0 MB) used
IntCache: cache: 12, tcache: 93, allocated: 0, tallocated: 1
FML: MCP v9.03 FML v7.2.207.1103 Minecraft Forge 10.12.1.1103 4 mods loaded, 4 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.207.1103} [Forge Mod Loader] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.1.1103} [Minecraft Forge] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
primevalforest{Dev Build 1 - Beta 0.1.0} [Primeval Forest] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 900 (50400 bytes; 0 MB) allocated, 876 (49056 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Gamer_ABC'/397, l='New World', x=-1151,00, y=69,00, z=2909,00]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'

 

And what eclipse says to that (a bit more detailed...)

 

[17:27:39] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[17:27:39] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[17:27:39] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[17:27:39] [main/INFO]: Forge Mod Loader version 7.2.207.1103 for Minecraft 1.7.2 loading
[17:27:39] [main/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_05, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre8
[17:27:39] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[17:27:39] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:27:39] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[17:27:39] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:27:39] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:27:39] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[17:27:39] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[17:27:39] [main/ERROR]: The minecraft jar file:/C:/Users/Benutzer/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.1.1103/forgeBin-1.7.2-10.12.1.1103.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
[17:27:39] [main/ERROR]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!
[17:27:39] [main/ERROR]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/Benutzer/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.1.1103/forgeBin-1.7.2-10.12.1.1103.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it
[17:27:39] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing
[17:27:39] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[17:27:39] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[17:27:39] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[17:27:41] [main/INFO]: Setting user: Gamer_ABC
[17:27:41] [Client thread/INFO]: LWJGL Version: 2.9.0
[17:27:42] [Client thread/INFO]: Attempting early MinecraftForge initialization
[17:27:42] [Client thread/INFO]: MinecraftForge v10.12.1.1103 Initialized
[17:27:42] [Client thread/INFO]: Replaced 182 ore recipies
[17:27:42] [Client thread/INFO]: Completed early MinecraftForge initialization
[17:27:42] [Client thread/INFO]: Searching D:\Patrick\ForgeVersions\run\mods for mods
[17:27:42] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
[17:27:42] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.Start. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
[17:27:43] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
[17:27:44] [Client thread/INFO]: Forge Mod Loader has identified 4 mods to load
[17:27:44] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Primeval Forest
[17:27:44] [Client thread/INFO]: Processing ObjectHolder annotations
[17:27:44] [Client thread/INFO]: Found 341 ObjectHolder annotations
[17:27:44] [Client thread/INFO]: Configured a dormant chunk cache size of 0
[17:27:44] [Client thread/INFO]: [PrimevalForest] Generated Main Config!
[17:27:44] [Client thread/INFO]: [Primeval Forest] Generating Biome ID's
[17:27:44] [Client thread/INFO]: [Primeval Forest] Generated Id Config!
[17:27:44] [Client thread/INFO]: Applying holder lookups
[17:27:44] [Client thread/INFO]: Holder lookups applied

Starting up SoundSystem...
Initializing LWJGL OpenAL
    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
OpenAL initialized.
[17:27:45] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_166_campFire.png
java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_166_campFire.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(SourceFile:61) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(SourceFile:52) [TextureManager.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:523) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:815) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_05]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
[17:27:45] [Client thread/ERROR]: Using missing texture, unable to load primevalforest:textures/blocks/portal.png.png
java.io.FileNotFoundException: primevalforest:textures/blocks/portal.png.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(SourceFile:61) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(SourceFile:52) [TextureManager.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:523) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:815) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_05]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
[17:27:45] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[17:27:45] [Client thread/INFO]: Created: 256x256 textures/items-atlas

[17:27:45] [sound Library Loader/INFO]: Sound engine started
MAGIC-NULL-ERROR
[17:27:45] [Client thread/WARN]: [Primeval Forest] Primeval Forest detected that the configured dimension id '6' is being used.  Using backup ID.  It is recommended that you configure this mod to use a unique dimension ID.
[17:27:45] [Client thread/INFO]: Forge Mod Loader has successfully loaded 4 mods
[17:27:45] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Primeval Forest
[17:27:45] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_166_campFire.png
java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_166_campFire.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(SourceFile:136) [TextureManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SourceFile:104) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SourceFile:92) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:568) [Minecraft.class:?]
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:527) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:815) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_05]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
[17:27:45] [Client thread/ERROR]: Using missing texture, unable to load primevalforest:textures/blocks/portal.png.png
java.io.FileNotFoundException: primevalforest:textures/blocks/portal.png.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(SourceFile:136) [TextureManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SourceFile:104) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SourceFile:92) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:568) [Minecraft.class:?]
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:527) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:815) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_05]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
[17:27:45] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[17:27:45] [Client thread/INFO]: Created: 256x256 textures/items-atlas

SoundSystem shutting down...
    Author: Paul Lamb, www.paulscode.com


Starting up SoundSystem...
Initializing LWJGL OpenAL
    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
OpenAL initialized.

[17:27:46] [sound Library Loader/INFO]: Sound engine started
[17:27:47] [MCO Availability Checker #1/ERROR]: Couldn't connect to Realms
[17:27:47] [server thread/INFO]: Starting integrated minecraft server version 1.7.2
[17:27:47] [server thread/INFO]: Generating keypair
[17:27:47] [server thread/INFO]: Injecting existing block and item data into this server instance
[17:27:48] [server thread/INFO]: Applying holder lookups
[17:27:48] [server thread/INFO]: Holder lookups applied
[17:27:48] [server thread/INFO]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@310eff1a)
[17:27:48] [server thread/INFO]: Loading dimension 6 (New World) (net.minecraft.server.integrated.IntegratedServer@310eff1a)
[17:27:48] [server thread/INFO]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@310eff1a)
[17:27:48] [server thread/INFO]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@310eff1a)
[17:27:48] [server thread/INFO]: Preparing start region for level 0
[17:27:49] [Netty Client IO #0/INFO]: Server protocol version 1
[17:27:49] [Netty IO #1/INFO]: Client protocol version 1
[17:27:49] [Netty IO #1/INFO]: Client attempting to join with 4 mods : [email protected],[email protected],primevalforest@Dev Build 1 - Beta 0.1.0,[email protected]
[17:27:49] [Netty IO #1/INFO]: Attempting connection with missing mods [] at CLIENT
[17:27:49] [Netty Client IO #0/INFO]: Attempting connection with missing mods [] at SERVER
[17:27:49] [server thread/INFO]: [server thread] Server side modded connection established
[17:27:49] [server thread/INFO]: Gamer_ABC[local:E:93b0edef] logged in with entity id 397 at (-1151.0, 69.0, 2909.0)
[17:27:49] [server thread/INFO]: Gamer_ABC joined the game
[17:27:49] [server thread/ERROR]: HandshakeCompletionHandler exception
net.minecraft.util.ReportedException: Exception generating new chunk
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:122) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:139) ~[ChunkProviderServer.class:?]
at net.minecraft.world.World.getChunkFromChunkCoords(World.java:417) ~[World.class:?]
at net.minecraft.world.World.spawnEntityInWorld(World.java:1310) ~[World.class:?]
at net.minecraft.server.management.ServerConfigurationManager.playerLoggedIn(ServerConfigurationManager.java:249) ~[serverConfigurationManager.class:?]
at net.minecraft.server.management.ServerConfigurationManager.a(ServerConfigurationManager.java:124) ~[serverConfigurationManager.class:?]
at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:173) ~[NetworkDispatcher.class:?]
at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeHandshake(NetworkDispatcher.java:446) ~[NetworkDispatcher.class:?]
at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:17) ~[HandshakeCompletionHandler.class:?]
at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:11) ~[HandshakeCompletionHandler.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:72) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197) [NetworkManager.class:?]
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165) [NetworkSystem.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:643) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:531) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) [integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669) [MinecraftServer$2.class:?]
Caused by: java.lang.NullPointerException
at minecraftplaye.primevalforest.world.layer.PFGenLayerBiomes.getInts(PFGenLayerBiomes.java:41) ~[PFGenLayerBiomes.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at minecraftplaye.primevalforest.world.WorldChunkMangerPrimevalForest.getBiomesForGeneration(WorldChunkMangerPrimevalForest.java:149) ~[WorldChunkMangerPrimevalForest.class:?]
at minecraftplaye.primevalforest.world.PFTerrainGenerator.func_147424_a(PFTerrainGenerator.java:133) ~[PFTerrainGenerator.class:?]
at minecraftplaye.primevalforest.world.PFTerrainGenerator.provideChunk(PFTerrainGenerator.java:245) ~[PFTerrainGenerator.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:113) ~[ChunkProviderServer.class:?]
... 26 more
[17:27:49] [Client thread/INFO]: [Client thread] Client side modded connection established
[17:27:49] [server thread/ERROR]: There was a critical exception handling a packet on channel FML
net.minecraft.util.ReportedException: Exception generating new chunk
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:122) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:139) ~[ChunkProviderServer.class:?]
at net.minecraft.world.World.getChunkFromChunkCoords(World.java:417) ~[World.class:?]
at net.minecraft.world.World.spawnEntityInWorld(World.java:1310) ~[World.class:?]
at net.minecraft.server.management.ServerConfigurationManager.playerLoggedIn(ServerConfigurationManager.java:249) ~[serverConfigurationManager.class:?]
at net.minecraft.server.management.ServerConfigurationManager.a(ServerConfigurationManager.java:124) ~[serverConfigurationManager.class:?]
at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:173) ~[NetworkDispatcher.class:?]
at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeHandshake(NetworkDispatcher.java:446) ~[NetworkDispatcher.class:?]
at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:17) ~[HandshakeCompletionHandler.class:?]
at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:11) ~[HandshakeCompletionHandler.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:72) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197) [NetworkManager.class:?]
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165) [NetworkSystem.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:643) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:531) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) [integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669) [MinecraftServer$2.class:?]
Caused by: java.lang.NullPointerException
at minecraftplaye.primevalforest.world.layer.PFGenLayerBiomes.getInts(PFGenLayerBiomes.java:41) ~[PFGenLayerBiomes.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at net.minecraft.world.gen.layer.GenLayerZoom.getInts(SourceFile:20) ~[GenLayerZoom.class:?]
at minecraftplaye.primevalforest.world.WorldChunkMangerPrimevalForest.getBiomesForGeneration(WorldChunkMangerPrimevalForest.java:149) ~[WorldChunkMangerPrimevalForest.class:?]
at minecraftplaye.primevalforest.world.PFTerrainGenerator.func_147424_a(PFTerrainGenerator.java:133) ~[PFTerrainGenerator.class:?]
at minecraftplaye.primevalforest.world.PFTerrainGenerator.provideChunk(PFTerrainGenerator.java:245) ~[PFTerrainGenerator.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:113) ~[ChunkProviderServer.class:?]
... 26 more
[17:27:49] [server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking memory connection
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:181) ~[NetworkSystem.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:643) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:531) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) ~[integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669) [MinecraftServer$2.class:?]
Caused by: java.lang.NullPointerException
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) ~[FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197) ~[NetworkManager.class:?]
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165) ~[NetworkSystem.class:?]
... 5 more
[17:27:49] [server thread/ERROR]: This crash report has been saved to: D:\Patrick\ForgeVersions\run\.\crash-reports\crash-2014-06-04_17.27.49-server.txt
[17:27:49] [server thread/INFO]: Stopping server
[17:27:49] [server thread/INFO]: Saving players
[17:27:49] [server thread/INFO]: Saving worlds
[17:27:49] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[17:27:49] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[17:27:49] [server thread/INFO]: Saving chunks for level 'New World'/The End
[17:27:49] [server thread/INFO]: Saving chunks for level 'New World'/Primeval Forest
---- Minecraft Crash Report ----
// Shall we play a game?

Time: 04.06.14 17:27
Description: Ticking memory connection

java.lang.NullPointerException: Ticking memory connection
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:643)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:531)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@7a662d68
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:643)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:531)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:669)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_05, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 112584856 bytes (107 MB) / 229113856 bytes (218 MB) up to 3810525184 bytes (3634 MB)
JVM Flags: 0 total; 
AABB Pool Size: 5567 (311752 bytes; 0 MB) allocated, 5136 (287616 bytes; 0 MB) used
IntCache: cache: 12, tcache: 93, allocated: 0, tallocated: 1
FML: MCP v9.03 FML v7.2.207.1103 Minecraft Forge 10.12.1.1103 4 mods loaded, 4 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.207.1103} [Forge Mod Loader] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.1.1103} [Minecraft Forge] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
primevalforest{Dev Build 1 - Beta 0.1.0} [Primeval Forest] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 900 (50400 bytes; 0 MB) allocated, 876 (49056 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Gamer_ABC'/397, l='New World', x=-1151,00, y=69,00, z=2909,00]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
#@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-06-04_17.27.49-server.txt
[17:27:49] [Client thread/INFO]: Waiting for the server to terminate/save.
[17:27:49] [server thread/INFO]: Unloading dimension 0
[17:27:49] [server thread/INFO]: Unloading dimension -1
[17:27:49] [server thread/INFO]: Unloading dimension 1
[17:27:49] [server thread/INFO]: Unloading dimension 6
[17:27:49] [server thread/INFO]: Applying holder lookups
[17:27:49] [server thread/INFO]: Holder lookups applied
[17:27:49] [server thread/INFO]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
[17:27:49] [Client thread/INFO]: Server terminated.
AL lib: (EE) alc_cleanup: 1 device not closed

 

 

Developer of Primeval Forest.

Posted

Did you see that:

 

        PFBiomeBase.magicalforest,

        PFBiomeBase.mountains,

        PFBiomeBase.pineForest,

        PFBiomeBase.primevalforest,

        PFBiomeBase.silverwood

 

is whether null or not when the getInts function called?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Yes

        
PFBiomeBase.magicalforest,
       PFBiomeBase.mountains,
        PFBiomeBase.pineForest,
        PFBiomeBase.primevalforest,
        PFBiomeBase.silverwood

its null when the getInts() function is called, but I'm don't know how to fix it (if I load the Biome class in my main class I need to set an biome ID and to put every biome in the main class is not that what I want, only if there is no other way)

 

Developer of Primeval Forest.

Posted

I think you should call the PFBiome.init() method in the main class, not in the constructor of the biome.

It seems that the method is not called when the PFGenLayerBiomes is initialized.

 

* Be careful when you just uses static reference of a class. it might be null, especially when its methods are till not called.

Instead, static method would be better.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

I think you should call the PFBiome.init() method in the main class, not in the constructor of the biome.

It seems that the method is not called when the PFGenLayerBiomes is initialized.

 

* Be careful when you just uses static reference of a class. it might be null, especially when its methods are till not called.

Instead, static method would be better.

 

That gives me this error:

 

---- Minecraft Crash Report ----
// There are four lights!

Time: 05.06.14 16:35
Description: Initializing game

java.lang.NullPointerException: Initializing game
at minecraftplaye.primevalforest.PrimevalForest.load(PrimevalForest.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:527)
at net.minecraft.client.Minecraft.run(Minecraft.java:815)
at net.minecraft.client.main.Main.main(SourceFile:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at minecraftplaye.primevalforest.PrimevalForest.load(PrimevalForest.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:527)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:815)
at net.minecraft.client.main.Main.main(SourceFile:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_05, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 97048640 bytes (92 MB) / 169345024 bytes (161 MB) up to 3810525184 bytes (3634 MB)
JVM Flags: 0 total; 
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.03 FML v7.2.207.1103 Minecraft Forge 10.12.1.1103 4 mods loaded, 4 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{7.2.207.1103} [Forge Mod Loader] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{10.12.1.1103} [Minecraft Forge] (forgeBin-1.7.2-10.12.1.1103.jar) Unloaded->Constructed->Pre-initialized->Initialized
primevalforest{Dev Build 1 - Beta 0.1.0} [Primeval Forest] (bin) Unloaded->Constructed->Pre-initialized->Errored
Launched Version: 1.7
LWJGL: 2.9.0
OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)

 

 

In line 70 of PrimevalForest.class the PFBiomeBase.init() will be called and its crashs with

public static void init()
public void init()

Developer of Primeval Forest.

Posted

I think your static init() method is colliding with the another init() which is not static..

Try change the name of the method.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Then please show your current code.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Then please show your current code.

 

Ok. Oh and a small notice to it, now it worked, because I moved the biomes in the main class, that I can work on other parts of this mod, but well, thats not so nice.

Here it is:

 

PrimevalForest

 

package minecraftplaye.primevalforest;

import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.BiomeDictionary.Type;
import minecraftplaye.primevalforest.blocks.PFBlocks;
import minecraftplaye.primevalforest.configuration.PFConfiguration;
import minecraftplaye.primevalforest.configuration.PFConfigurationIDs;
import minecraftplaye.primevalforest.configuration.PFConfigurationMain;
import minecraftplaye.primevalforest.handler.BonemealHandler;
import minecraftplaye.primevalforest.handler.FFuelHandler;
import minecraftplaye.primevalforest.items.PFItems;
import minecraftplaye.primevalforest.lib.Reference;
import minecraftplaye.primevalforest.proxy.IProxy;
import minecraftplaye.primevalforest.util.RecipeHandler;
import minecraftplaye.primevalforest.world.WorldProviderPrimevalForest;
import minecraftplaye.primevalforest.world.biome.BiomeDeadForest;
import minecraftplaye.primevalforest.world.biome.BiomeMagicalForest;
import minecraftplaye.primevalforest.world.biome.BiomeMountains;
import minecraftplaye.primevalforest.world.biome.BiomePineForest;
import minecraftplaye.primevalforest.world.biome.BiomePrimevalForest;
import minecraftplaye.primevalforest.world.biome.BiomeSilverWood;
import minecraftplaye.primevalforest.world.biome.PFBiomeBase;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = Reference.MODID, name = Reference.MODNAME, version = Reference.VERSION)
public class PrimevalForest
{

@Mod.Instance(Reference.MODID)
public static PrimevalForest instance;

    @SidedProxy(clientSide = Reference.CLIENTPROXYLOCATION, serverSide = Reference.COMMONPROXYLOCATION)
    public static IProxy proxy;
    
    public static String configPath;
    public static boolean creatureCompatibility;
    public static boolean biomeIDConflicts;
    
    // biome 
    //--> must be moved soon (currently causes crashs in biomebase if they are there)
    public static BiomeGenBase primevalforest;
    public static BiomeGenBase magicalforest;
    public static BiomeGenBase silverwood;
    public static BiomeGenBase mountains;
    public static BiomeGenBase pineForest;
    public static BiomeGenBase deadforest;
    
    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    	/** Configuration file */
    	configPath = event.getModConfigurationDirectory() + "/primevalforest/";
    	PFConfiguration.init(configPath);
    	
    	/** Blocks/Items/other stuff */
	PFBlocks.init();

	PFItems.init();
    }
    
    @Mod.EventHandler
    public void load(FMLInitializationEvent event)
    {
    	proxy.registerTileEntities();
    	
    	RecipeHandler.init();
    	
    	MinecraftForge.EVENT_BUS.register(new BonemealHandler());
    	GameRegistry.registerFuelHandler(new FFuelHandler());
    	
	proxy.registerEntities();

	proxy.registerEntityRendering();

	proxy.registerTileEntityRendering();

	// biome stuff
    	primevalforest = (new BiomePrimevalForest(PFConfigurationIDs.idBiomePrimevalForest).setColor(5470985).setTemperatureRainfall(0.95F, 0.9F).setHeight(PFBiomeBase.height_pForest).setBiomeName("Primeval Forest"));
    	magicalforest = (new BiomeMagicalForest(PFConfigurationIDs.idBiomeMagicalForest).setColor(34049320).setTemperatureRainfall(0.8F, 0.4F).setBiomeName("Magical Forest"));
    	silverwood = (new BiomeSilverWood(PFConfigurationIDs.idBiomeSilverwood).setColor(5470985).setTemperatureRainfall(1.4F, 0.9F).setBiomeName("Silver Wood"));
    	mountains = (new BiomeMountains(PFConfigurationIDs.idBiomeMountains).setColor(2432095).setTemperatureRainfall(0.25F, 0.8F).setBiomeName("Mountains"));
    	pineForest = (new BiomePineForest(PFConfigurationIDs.idBiomePineForest).setColor(1103243).setTemperatureRainfall(0.3F, 0.8F).setBiomeName("Pine Forest"));
    	deadforest = (new BiomeDeadForest(PFConfigurationIDs.idBiomeDeadForest).setColor(14238997).setDisableRain().setTemperatureRainfall(2.0F, 0.0F).setBiomeName("Dead Forest"));
    	
    	BiomeDictionary.registerBiomeType(primevalforest, Type.FOREST);
    	BiomeDictionary.registerBiomeType(magicalforest, Type.MAGICAL);
    	BiomeDictionary.registerBiomeType(silverwood, Type.JUNGLE);
    	BiomeDictionary.registerBiomeType(mountains, Type.MOUNTAIN);
    	BiomeDictionary.registerBiomeType(pineForest, Type.WASTELAND);
    	BiomeDictionary.registerBiomeType(deadforest, Type.DESERT);
        
        BiomeDictionary.registerAllBiomes();
    	
	DimensionManager.registerProviderType(PFConfigurationIDs.primevalForestDimID, WorldProviderPrimevalForest.class, PFConfigurationMain.keepLoaded);
    }
    
    @Mod.EventHandler
    public static void postInit(FMLPostInitializationEvent event)
    {
        if (isDimensionUnregistered(PFConfigurationIDs.primevalForestDimID))
        {
            DimensionManager.registerDimension(PFConfigurationIDs.primevalForestDimID, PFConfigurationIDs.primevalForestDimID);
        }
        else
        {
            FMLLog.warning("[Primeval Forest] Primeval Forest detected that the configured dimension id '%d' is being used.  Using backup ID.  It is recommended that you configure this mod to use a unique dimension ID.", new Object[]
                           {
                               Integer.valueOf(PFConfigurationIDs.primevalForestDimID)
                           });
            DimensionManager.registerDimension(PFConfigurationIDs.primevalForestDimID, PFConfigurationIDs.primevalForestDimID);
        }

        biomeIDConflicts = PFBiomeBase.checkForBiomeConflicts();
    }
    
    private static boolean isDimensionUnregistered(int dimID)
    {
        try
        {
            DimensionManager.getProviderType(dimID);
            return false;
        }
        catch (IllegalArgumentException ex)
        {
            return true;
        }
    }
    
    public static void setDimensionID(int dim)
    {
        if (PFConfigurationIDs.primevalForestDimID != dim)
        {
            FMLLog.info("[Primeval Forest] Server has a different dimension ID (%d) for Primeval Forest.  Changing this on the client.  This change will not be saved.", new Object[]
                        {
                            Integer.valueOf(dim)
                        });
            DimensionManager.unregisterDimension(PFConfigurationIDs.primevalForestDimID);
            PFConfigurationIDs.primevalForestDimID = dim;
            DimensionManager.registerDimension(PFConfigurationIDs.primevalForestDimID, PFConfigurationIDs.primevalForestDimID);
        }
    }
}

 

WorldChunkMangerPrimevalForest

 

package minecraftplaye.primevalforest.world;

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

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import minecraftplaye.primevalforest.PrimevalForest;
import minecraftplaye.primevalforest.world.biome.PFBiomeBase;
import minecraftplaye.primevalforest.world.layer.PFGenLayer;
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.util.ReportedException;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeCache;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.IntCache;

public class WorldChunkMangerPrimevalForest extends WorldChunkManager
{
  
    private GenLayer genBiomes;
    /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */
    private GenLayer biomeIndexLayer;
    /** The BiomeCache object for this world. */
    private BiomeCache biomeCache;
    /** A list of biomes that the player can spawn in. */
private List<BiomeGenBase> biomesToSpawnIn;

public WorldChunkMangerPrimevalForest()
{
        this.biomeCache = new BiomeCache(this);
        this.biomesToSpawnIn = new ArrayList<BiomeGenBase>();
        this.biomesToSpawnIn.addAll(allowedBiomes);
}

public WorldChunkMangerPrimevalForest(long seed, WorldType worldType)
{
	this();
	// i changed this to my GenLayerTutorial
	GenLayer[] agenlayer = PFGenLayer.makeTheWorld(seed);
	agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer);
	this.genBiomes = agenlayer[0];
	this.biomeIndexLayer = agenlayer[1];
}

    public WorldChunkMangerPrimevalForest(World world)
    {
        this(world.getSeed(), world.getWorldInfo().getTerrainType());
    }
    
    /**
     * Gets the list of valid biomes for the player to spawn in.
     */
    @Override
public List<BiomeGenBase> getBiomesToSpawnIn()
    {
        return this.biomesToSpawnIn;
    }
    
    /**
     * Returns the BiomeGenBase related to the x, z position on the world.
     */
    @Override
    public BiomeGenBase getBiomeGenAt(int x, int z)
    {
    	BiomeGenBase biome = this.biomeCache.getBiomeGenAt(x, z);
    	
    	if(biome == null)
    	{
    		return PrimevalForest.primevalforest;
    	}
    	
        return biome;
    }
    
    /**
     * Returns a list of rainfall values for the specified blocks. Args: listToReuse, x, z, width, length.
     */
    @Override
    public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length)
    {
        IntCache.resetIntCache();

        if (listToReuse == null || listToReuse.length < width * length)
        {
        	listToReuse = new float[width * length];
        }

        int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);

        for (int i1 = 0; i1 < width * length; ++i1)
        {
            try
            {
                float f = (float)BiomeGenBase.getBiome(aint[i1]).getIntRainfall() / 65536.0F;

                if (f > 1.0F)
                {
                    f = 1.0F;
                }

                listToReuse[i1] = f;
            }
            catch (Throwable throwable)
            {
                CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
                CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock");
                crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1));
                crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length));
                crashreportcategory.addCrashSection("x", Integer.valueOf(x));
                crashreportcategory.addCrashSection("z", Integer.valueOf(z));
                crashreportcategory.addCrashSection("w", Integer.valueOf(width));
                crashreportcategory.addCrashSection("h", Integer.valueOf(length));
                throw new ReportedException(crashreport);
            }
        }

        return listToReuse;
    }
    
    /**
     * Return an adjusted version of a given temperature based on the y height
     */
    @Override
    @SideOnly(Side.CLIENT)
    public float getTemperatureAtHeight(float par1, int par2)
    {
        return par1;
    }

    /**
     * Returns an array of biomes for the location input.
     */
    @Override
    public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
    {
        IntCache.resetIntCache();

        if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
        {
            par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
        }

        int[] aint = this.genBiomes.getInts(par2, par3, par4, par5);

        try
        {
            for (int i = 0; i < par4 * par5; ++i)
            {
            	if(aint[i] >= 0)
            	{
            		par1ArrayOfBiomeGenBase[i] = BiomeGenBase.getBiome(aint[i]);
            	}
            	else
            	{
            		//Change this to a biome
            		par1ArrayOfBiomeGenBase[i] = PrimevalForest.primevalforest;
            	}
            }

            return par1ArrayOfBiomeGenBase;
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock");
            crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length));
            crashreportcategory.addCrashSection("x", Integer.valueOf(par2));
            crashreportcategory.addCrashSection("z", Integer.valueOf(par3));
            crashreportcategory.addCrashSection("w", Integer.valueOf(par4));
            crashreportcategory.addCrashSection("h", Integer.valueOf(par5));
            throw new ReportedException(crashreport);
        }
    }
    
    /**
     * Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the
     * WorldChunkManager Args: oldBiomeList, x, z, width, depth
     */
    @Override
    public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth)
    {
        return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true);
    }

    /**
     * Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
     * don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
     */
    @Override
    public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int y, int width, int length, boolean cacheFlag)
    {
        IntCache.resetIntCache();

        if (listToReuse == null || listToReuse.length < width * length)
        {
        	listToReuse = new BiomeGenBase[width * length];
        }

        if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (y & 15) == 0)
        {
            BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y);
            System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length);
            return listToReuse;
        }
        else
        {
            int[] aint = this.biomeIndexLayer.getInts(x, y, width, length);

            for (int i = 0; i < width * length; ++i)
            {
            	if(aint[i] >= 0)
            	{
                	listToReuse[i] = BiomeGenBase.getBiome(aint[i]);
            	}
            	else
            	{
            		//Change this to a biome
                	listToReuse[i] = PrimevalForest.primevalforest;
            	}
            }

            return listToReuse;
        }
    }
    
    /**
     * checks given Chunk's Biomes against List of allowed ones
     */
    @Override
    @SuppressWarnings("rawtypes")
public boolean areBiomesViable(int x, int y, int z, List par4List)
    {
        IntCache.resetIntCache();
        int l = x - z >> 2;
        int i1 = y - z >> 2;
        int j1 = x + z >> 2;
        int k1 = y + z >> 2;
        int l1 = j1 - l + 1;
        int i2 = k1 - i1 + 1;
        int[] aint = this.genBiomes.getInts(l, i1, l1, i2);

        try
        {
            for (int j2 = 0; j2 < l1 * i2; ++j2)
            {
                BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]);

                if (!par4List.contains(biomegenbase))
                {
                    return false;
                }
            }

            return true;
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer");
            crashreportcategory.addCrashSection("Layer", this.genBiomes.toString());
            crashreportcategory.addCrashSection("x", Integer.valueOf(x));
            crashreportcategory.addCrashSection("z", Integer.valueOf(y));
            crashreportcategory.addCrashSection("radius", Integer.valueOf(z));
            crashreportcategory.addCrashSection("allowed", par4List);
            throw new ReportedException(crashreport);
        }
    }
    
    /**
    * Finds a valid position within a range, that is in one of the listed
    * biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive y
    * positions.
    */
    @Override
    @SuppressWarnings("rawtypes")
public ChunkPosition findBiomePosition(int x, int y, int z, List par4List, Random random)
    {
        IntCache.resetIntCache();
        int l = x - z >> 2;
        int i1 = y - z >> 2;
        int j1 = x + z >> 2;
        int k1 = y + z >> 2;
        int l1 = j1 - l + 1;
        int i2 = k1 - i1 + 1;
        int[] aint = this.genBiomes.getInts(l, i1, l1, i2);
        ChunkPosition chunkposition = null;
        int j2 = 0;

        for (int k2 = 0; k2 < l1 * i2; ++k2)
        {
            int l2 = l + k2 % l1 << 2;
            int i3 = i1 + k2 / l1 << 2;
            BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]);

            if (par4List.contains(biomegenbase) && (chunkposition == null || random.nextInt(j2 + 1) == 0))
            {
                chunkposition = new ChunkPosition(l2, 0, i3);
                ++j2;
            }
        }

        return chunkposition;
    }

    /**
     * Calls the WorldChunkManager's biomeCache.cleanupCache()
     */
    @Override
    public void cleanupCache()
    {
        this.biomeCache.cleanupCache();
    }
}

 

PFGenLayerBiomes

 

package minecraftplaye.primevalforest.world.layer;

import minecraftplaye.primevalforest.PrimevalForest;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.IntCache;

public class PFGenLayerBiomes extends GenLayer 
{

    protected BiomeGenBase[] allowedBiomes =
    {
    	PrimevalForest.magicalforest,
    	PrimevalForest.mountains,
    	PrimevalForest.pineForest,
    	PrimevalForest.primevalforest,
    	PrimevalForest.silverwood,
    	PrimevalForest.deadforest
    };

public PFGenLayerBiomes(long seed, GenLayer genlayer)
{
	super(seed);
	this.parent = genlayer;
}

public PFGenLayerBiomes(long seed)
{
	super(seed);
}

    @Override
    public int[] getInts(int x, int z, int width, int depth)
    {
        int[] dest = IntCache.getIntCache(width * depth);

        for (int dz = 0; dz < depth; dz++)
        {
            for (int dx = 0; dx < width; dx++)
            {
                this.initChunkSeed(dx + x, dz + z);
                dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID;
            }
        }

        return dest;
    }
}

 

PFBiomeBase

 

package minecraftplaye.primevalforest.world.biome;

import cpw.mods.fml.common.FMLLog;
import minecraftplaye.primevalforest.configuration.PFConfigurationIDs;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeDictionary.Type;

public class PFBiomeBase extends BiomeGenBase
{

/** The biome height */
public static final BiomeGenBase.Height height_pForest = new BiomeGenBase.Height(0.3F, 0.6F); 

/** The biome decorator. */

    /*public static BiomeGenBase primevalforest;
    public static BiomeGenBase magicalforest;
    public static BiomeGenBase silverwood;
    public static BiomeGenBase mountains;
    public static BiomeGenBase pineForest;*/

public PFBiomeBase(int biomeId) 
{
	super(biomeId);
	//init();
	//registerWithBiomeDictionary();
	this.rainfall = 0.6F;
}

    public static boolean checkForBiomeConflicts()
    {
        boolean noConflict = true;
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomePrimevalForest);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomeMagicalForest);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomeSilverwood);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomeMountains);
        noConflict &= checkBiomeIDisClearOrOurs(PFConfigurationIDs.idBiomePineForest);

        if (!noConflict)
        {
            FMLLog.warning("[Primeval Forest] Biome ID conflict detected.  Edit the Primeval Forest config to give all biomes unique IDs.", new Object[0]);
        }

        return noConflict;
    }
    
    public static boolean checkBiomeIDisClearOrOurs(int id)
    {
        BiomeGenBase biomeAt = BiomeGenBase.getBiome(id);

        if (biomeAt == null || (biomeAt instanceof PFBiomeBase))
        {
            return true;
        }
        else
        {
            FMLLog.warning("[Primeval Forest] Biome ID conflict.  Biome ID %d contains a biome named %s, but Primeval Forest is set to use that ID.", new Object[]
                           {
                               Integer.valueOf(id), biomeAt.biomeID
                           });
            return false;
        }
    }
    
   /* public static void init()
    {	
    	primevalforest = (new BiomePrimevalForest(PFConfigurationIDs.idBiomePrimevalForest).setColor(5470985).setTemperatureRainfall(0.95F, 0.9F).setHeight(height_pForest).setBiomeName("Primeval Forest"));
    	magicalforest = (new BiomeMagicalForest(PFConfigurationIDs.idBiomeMagicalForest).setColor(34049320).setTemperatureRainfall(0.8F, 0.4F).setHeight(height_LowPlains).setBiomeName("Magical Forest"));
    	silverwood = (new BiomeSilverWood(PFConfigurationIDs.idBiomeSilverwood).setColor(5470985).setTemperatureRainfall(1.4F, 0.9F).setHeight(height_Default).setBiomeName("Silver Wood"));
    	mountains = (new BiomeMountains(PFConfigurationIDs.idBiomeMountains).setColor(2432095).setTemperatureRainfall(0.25F, 0.8F).setHeight(height_MidHills).setBiomeName("Mountains"));
    	pineForest = (new BiomePineForest(PFConfigurationIDs.idBiomePineForest).setColor(1103243).setTemperatureRainfall(0.3F, 0.8F).setHeight(height_MidPlains).setBiomeName("Pine Forest"));
    }
    
    public static void registerWithBiomeDictionary()
    {
    	BiomeDictionary.registerBiomeType(primevalforest, Type.FOREST);
    	BiomeDictionary.registerBiomeType(magicalforest, Type.MAGICAL);
    	BiomeDictionary.registerBiomeType(silverwood, Type.JUNGLE);
    	BiomeDictionary.registerBiomeType(mountains, Type.MOUNTAIN);
    	BiomeDictionary.registerBiomeType(pineForest, Type.WASTELAND);
        
        BiomeDictionary.registerAllBiomes();
    }*/

    /*@Override
    public BiomeDecorator createBiomeDecorator()
    {
        return getModdedBiomeDecorator(new PFBiomeDecorator(this));
    }*/

    /**
     * Gets a WorldGen appropriate for this biome.
     */
    /*public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
    {
        return new WorldGenTallGrass(PFBlocks.silverTallGrass.blockID, 1);
    }*/
}

 

 

I hope that this code will you to find out how I can fix it, so that I can move the biomes back into the PFBiomeBase class.

Bektor

Developer of Primeval Forest.

Posted

Ok. Oh and a small notice to it, now it worked, because I moved the biomes in the main class, that I can work on other parts of this mod, but well, thats not so nice.

Here it is:

[..]

I hope that this code will you to find out how I can fix it, so that I can move the biomes back into the PFBiomeBase class.

Bektor

I would say - it looks fine.  If it works, leave it like that. 

 

I think it works because the order of object creation is now correct, i.e. the BiomeGenBase are initialised before you use them.  If you really want to move them, you need to make sure that they are not null when you use them.  You could consider an initialisation-on-first-use method if you're having trouble, i.e. check if it is null (never used before) and if so, initialise them.

 

But honestly, unless you're making a complicated mod I wouldn't bother.

 

-TGG

Posted

I think this problem is related with the PFBiomeBase.init() is called after the PFGenLayerBiomes is constructed.

Where is the "new PFGenLayerBiomes()"?

and where was the init() method and how did you call it?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

I called the init() method over the constructor of the PFBiomeBase.class and this class is first called in postInit() [but there only the method inside the PFBiomeBase.class that checks for ID-conflicts].

Later its called in WorldChunkMangerPrimevalForest.class, but there only one biome and not the class itself (only the PFBiomeBase.primevalforest). Oh and I only checked if its called in any world classes and if its called in the main class, because I didn't think that its called in any other class, because the rest is mostly Entity, Items, Blocks...

 

And the PFGenLayerBiomes.class is called inside the abstract class PFGenLayer in this method: GenLayer[] makeTheWorld

[GenLayer biomes = new PFGenLayerBiomes(1L);]

 

Well I checked this out in the 1.6 version of my mod, because in which directiony and where the classes will be loaded, there is no difference between 1.6 and 1.7 of my mod and in the class PFGenLayerBiomes and PFGenLayer is no difference between that versions too.

Developer of Primeval Forest.

Posted

Then where the PFGenLayerBiomes.makeTheWorld() is called?

The overall code about that part would be needed i think.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

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