Non résolu Problème génération biome
-
Essaie de retirer ton biome : desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeTest, 40));
-
dans ma class principal j’ai cela :
public static BiomeGenBase biometest;
dans le PreInit :
biometest = new BiomeTest(137).setBiomeName(“giant”).setDisableRain().setTemperatureRainfall(1.2F, 0.9F).setEnableSnow();
BiomeDictionary.registerBiomeType(biometest, Type.FOREST);
BiomeManager.addSpawnBiome(biometest);et dans le postInit :
WorldType CUSTOM = new WorldTypeTest(3, “giant”);
je vais essayer de comprendre ^^
les deux lignes, dans le else aussi ?
merci en tout cas
EDIT : en supprimant les lignes, le jeu se lance donc ça vient donc de ces lignes.
-
D’ailleurs pourquoi ajouter un biome de type forêt à une liste de biomes du désert ?
-
car je connais pas le biomes mountains ^^ puis le deseert, cest le plus grand
-
Envoi la classe du biome
-
ok, voila la class
biometest :
package fr.craftesys.craftesys.generation; import java.util.Random; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntitySlime; import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.init.Blocks; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraft.world.gen.feature.WorldGenerator; public class BiomeTest extends BiomeGenBase { public BiomeTest(int id) { super(id); this.setHeight(height_Default); this.spawnableCreatureList.add(new SpawnListEntry(EntitySlime.class, 5, 2, 10)); this.spawnableCreatureList.add(new SpawnListEntry(EntityZombie.class, 6, 3, 9)); this.spawnableCreatureList.add(new SpawnListEntry(EntitySkeleton.class, 7, 4, 8)); this.spawnableCreatureList.add(new SpawnListEntry(EntitySpider.class, 8, 5, 7)); this.theBiomeDecorator.treesPerChunk = 5; this.theBiomeDecorator.grassPerChunk = 2; this.theBiomeDecorator.bigMushroomsPerChunk = 2; this.topBlock = Blocks.redstone_block; this.fillerBlock = Blocks.redstone_block; } public WorldGenerator getRandomWorldGenForTrees(Random par1Random) { return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenTrees(false, 4, 2, 2, false) : (par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : new WorldGenTrees(false, 4, 0, 0, false))); } }
-
Tu as regardé si l’ID n’était pas déjà enregistrée ?
-
Non mais j’avais essayé je crois avec 137, je suis pas devant le PC :/. Et je pense pas que l’id 137 existe en biome
-
ça n’a rien changé, j’ai essayé 137 91 158 et d’autres, j’ai toujours le même problème.
crash report :
–-- Minecraft Crash Report ---- // But it works on my machine. Time: 23/06/16 12:58 Description: Exception initializing level java.lang.NullPointerException: Exception initializing level at fr.craftesys.craftesys.generation.BiomeTestLayer.getInts(BiomeTestLayer.java:96) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerBiomeEdge.getInts(GenLayerBiomeEdge.java:21) at net.minecraft.world.gen.layer.GenLayerHills.getInts(GenLayerHills.java:26) at net.minecraft.world.gen.layer.GenLayerRareBiome.getInts(GenLayerRareBiome.java:21) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerAddIsland.getInts(GenLayerAddIsland.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerShore.getInts(GenLayerShore.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerSmooth.getInts(GenLayerSmooth.java:23) at net.minecraft.world.gen.layer.GenLayerRiverMix.getInts(GenLayerRiverMix.java:35) at net.minecraft.world.biome.WorldChunkManager.findBiomePosition(WorldChunkManager.java:250) at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:777) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) at net.minecraft.world.World.<init>(World.java:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:63) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at fr.craftesys.craftesys.generation.BiomeTestLayer.getInts(BiomeTestLayer.java:96) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerBiomeEdge.getInts(GenLayerBiomeEdge.java:21) at net.minecraft.world.gen.layer.GenLayerHills.getInts(GenLayerHills.java:26) at net.minecraft.world.gen.layer.GenLayerRareBiome.getInts(GenLayerRareBiome.java:21) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerAddIsland.getInts(GenLayerAddIsland.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerShore.getInts(GenLayerShore.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerSmooth.getInts(GenLayerSmooth.java:23) at net.minecraft.world.gen.layer.GenLayerRiverMix.getInts(GenLayerRiverMix.java:35) at net.minecraft.world.biome.WorldChunkManager.findBiomePosition(WorldChunkManager.java:250) at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:777) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) -- Affected level -- Details: Level name: New Worldhtrhrt All players: 0 total; [] Chunk stats: ServerChunkCache: 0 Drop: 0 Level seed: 8420371465480511657 Level generator: ID 04 - giant, ver 0\. 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:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:63) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 898137968 bytes (856 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 4, tallocated: 19 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAA craftesys{1.0.0} [craftesys] (bin) GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 0 / 8; [] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' ```</init></init></init></init>
-
NPE sur getInts à la ligne 96 de la classe BiomeTestLayer, l’objet sur lequel tu exécute getInts est null, comme dit dans la vidéo que Robin a tourné hier, demande-toi si c’est normal, si ça l’est alors null-check sinon débrouille-toi pour qu’elle ne soit pas null
-
ok, juste, ça marche comment le nullPointerException ? ^^
-
@‘BrokenSwing’:
NPE sur getInts à la ligne 96 de la classe BiomeTestLayer, l’objet sur lequel tu exécute getInts est null, comme dit dans la vidéo que Robin a tourné hier, demande-toi si c’est normal, si ça l’est alors null-check sinon débrouille-toi pour qu’elle ne soit pas null
Ton objet est null, faut que tu fasse un truc
-
donc je met le if getints != nul …. après le .biomeID de la ligne 96 ?
-
Non, ça ne va pas résoudre le problème, le problème est que dans ceci : ```java
aint1[j1 + i1 * par3] = ((BiomeEntry)WeightedRandom
.getItem(this
.desertBiomes, (int)(this
.nextLong(WeightedRandom
.getTotalWeight(this
.desertBiomes) / 10) * 10)))
.biome
.biomeID; -
je peux pas mettre avant, pas possible d’intercaller entre le .biome et le .biomeID donc je le mets après plutôt non ?
EDIT : quand ça crash, j’ai cette ligne qui flood dans la console d’éclipse :
[15:36:13] [Server thread/INFO] [STDOUT]: [fr.craftesys.craftesys.generation.BiomeTestLayer:getInts:99]: [net.minecraftforge.common.BiomeManager$BiomeEntry@2769654f, net.minecraftforge.common.BiomeManager$BiomeEntry@a18d0fb, net.minecraftforge.common.BiomeManager$BiomeEntry@6cf63935, net.minecraftforge.common.BiomeManager$BiomeEntry@494081ee]
et j’ai aucun print dans la console
j’ai essayé de mettre un breakpoint a la ligne ou j’essaye de print, juste après le .biomeID et j’ai ce crash (un peu plus long)
–-- Minecraft Crash Report ---- // I feel sad now :( Time: 23/06/16 15:42 Description: Exception preparing structure feature java.lang.NullPointerException: Exception preparing structure feature at fr.craftesys.craftesys.generation.BiomeTestLayer.getInts(BiomeTestLayer.java:96) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerBiomeEdge.getInts(GenLayerBiomeEdge.java:21) at net.minecraft.world.gen.layer.GenLayerHills.getInts(GenLayerHills.java:26) at net.minecraft.world.gen.layer.GenLayerRareBiome.getInts(GenLayerRareBiome.java:21) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerAddIsland.getInts(GenLayerAddIsland.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerShore.getInts(GenLayerShore.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerSmooth.getInts(GenLayerSmooth.java:23) at net.minecraft.world.gen.layer.GenLayerRiverMix.getInts(GenLayerRiverMix.java:35) at net.minecraft.world.biome.WorldChunkManager.findBiomePosition(WorldChunkManager.java:250) at net.minecraft.world.gen.structure.MapGenStronghold.canSpawnStructureAtCoords(MapGenStronghold.java:96) at net.minecraft.world.gen.structure.MapGenStructure.func_151538_a(MapGenStructure.java:43) at net.minecraft.world.gen.MapGenBase.func_151539_a(MapGenBase.java:33) at net.minecraft.world.gen.ChunkProviderGenerate.provideChunk(ChunkProviderGenerate.java:239) at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:190) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:221) at net.minecraft.world.World.getChunkFromChunkCoords(World.java:482) at net.minecraft.world.World.getBlock(World.java:387) at net.minecraft.world.World.isAirBlock(World.java:410) at net.minecraft.world.World.getTopBlock(World.java:371) at net.minecraft.world.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:93) at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:794) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) at net.minecraft.world.World.<init>(World.java:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:63) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at fr.craftesys.craftesys.generation.BiomeTestLayer.getInts(BiomeTestLayer.java:96) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerBiomeEdge.getInts(GenLayerBiomeEdge.java:21) at net.minecraft.world.gen.layer.GenLayerHills.getInts(GenLayerHills.java:26) at net.minecraft.world.gen.layer.GenLayerRareBiome.getInts(GenLayerRareBiome.java:21) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerAddIsland.getInts(GenLayerAddIsland.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerShore.getInts(GenLayerShore.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerSmooth.getInts(GenLayerSmooth.java:23) at net.minecraft.world.gen.layer.GenLayerRiverMix.getInts(GenLayerRiverMix.java:35) at net.minecraft.world.biome.WorldChunkManager.findBiomePosition(WorldChunkManager.java:250) at net.minecraft.world.gen.structure.MapGenStronghold.canSpawnStructureAtCoords(MapGenStronghold.java:96) -- Feature being prepared -- Details: Is feature chunk: ~~ERROR~~ NullPointerException: null Chunk location: -8,-8 Chunk pos hash: -30064771080 Structure type: net.minecraft.world.gen.structure.MapGenStronghold Stacktrace: at net.minecraft.world.gen.structure.MapGenStructure.func_151538_a(MapGenStructure.java:43) at net.minecraft.world.gen.MapGenBase.func_151539_a(MapGenBase.java:33) at net.minecraft.world.gen.ChunkProviderGenerate.provideChunk(ChunkProviderGenerate.java:239) -- Chunk to be generated -- Details: Location: 0,0 Position hash: 0 Generator: RandomLevelSource Stacktrace: at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:190) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:221) at net.minecraft.world.World.getChunkFromChunkCoords(World.java:482) -- Requested block coordinates -- Details: Found chunk: true Location: World: (0,64,0), Chunk: (at 0,4,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) Stacktrace: at net.minecraft.world.World.getBlock(World.java:387) at net.minecraft.world.World.isAirBlock(World.java:410) at net.minecraft.world.World.getTopBlock(World.java:371) at net.minecraft.world.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:93) at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:794) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) -- Affected level -- Details: Level name: New Worldfefzefze All players: 0 total; [] Chunk stats: ServerChunkCache: 0 Drop: 0 Level seed: -4967345144104824855 Level generator: ID 04 - giant, ver 0\. 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:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:63) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 890647008 bytes (849 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 25, tcache: 75, allocated: 4, tallocated: 19 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAA craftesys{1.0.0} [craftesys] (bin) GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 0 / 8; [] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' ```</init></init></init></init>
-
Je parlais de le mettre avant la ligne ou il y a le “aint1[j1 + i1 * par3] = ((BiomeEntry)WeightedRandom”, mais en tout cas la liste a l’air bonne, don retire le /10 et * 10.
-
toujours pas ::(
–-- Minecraft Crash Report ---- // I'm sorry, Dave. Time: 23/06/16 17:37 Description: Exception initializing level java.lang.NullPointerException: Exception initializing level at fr.craftesys.craftesys.generation.BiomeTestLayer.getInts(BiomeTestLayer.java:97) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerBiomeEdge.getInts(GenLayerBiomeEdge.java:21) at net.minecraft.world.gen.layer.GenLayerHills.getInts(GenLayerHills.java:26) at net.minecraft.world.gen.layer.GenLayerRareBiome.getInts(GenLayerRareBiome.java:21) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerAddIsland.getInts(GenLayerAddIsland.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerShore.getInts(GenLayerShore.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerSmooth.getInts(GenLayerSmooth.java:23) at net.minecraft.world.gen.layer.GenLayerRiverMix.getInts(GenLayerRiverMix.java:35) at net.minecraft.world.biome.WorldChunkManager.findBiomePosition(WorldChunkManager.java:250) at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:777) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) at net.minecraft.world.World.<init>(World.java:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:63) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at fr.craftesys.craftesys.generation.BiomeTestLayer.getInts(BiomeTestLayer.java:97) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerBiomeEdge.getInts(GenLayerBiomeEdge.java:21) at net.minecraft.world.gen.layer.GenLayerHills.getInts(GenLayerHills.java:26) at net.minecraft.world.gen.layer.GenLayerRareBiome.getInts(GenLayerRareBiome.java:21) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerAddIsland.getInts(GenLayerAddIsland.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerShore.getInts(GenLayerShore.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerZoom.getInts(GenLayerZoom.java:23) at net.minecraft.world.gen.layer.GenLayerSmooth.getInts(GenLayerSmooth.java:23) at net.minecraft.world.gen.layer.GenLayerRiverMix.getInts(GenLayerRiverMix.java:35) at net.minecraft.world.biome.WorldChunkManager.findBiomePosition(WorldChunkManager.java:250) at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:777) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) -- Affected level -- Details: Level name: New Worldgergg All players: 0 total; [] Chunk stats: ServerChunkCache: 0 Drop: 0 Level seed: 5599626093747522092 Level generator: ID 04 - giant, ver 0\. 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:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:63) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 888162432 bytes (847 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 4, tallocated: 19 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAA craftesys{1.0.0} [craftesys] (bin) GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 0 / 8; [] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge'
et ma class :
package fr.craftesys.craftesys.generation; import java.util.ArrayList; import java.util.List; import net.minecraft.util.WeightedRandom; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.layer.GenLayer; import net.minecraft.world.gen.layer.IntCache; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.common.BiomeManager.BiomeEntry; public class BiomeTestLayer extends GenLayer { private List <biomeentry>desertBiomes = new ArrayList<biomeentry>(); private List <biomeentry>warmBiomes = new ArrayList<biomeentry>(); private List <biomeentry>coolBiomes = new ArrayList<biomeentry>(); private List <biomeentry>icyBiomes = new ArrayList<biomeentry>(); public BiomeTestLayer(long par1, GenLayer layer, WorldType worldType) { super(par1); this.parent = layer; this.desertBiomes.addAll(BiomeManager.desertBiomes); this.warmBiomes.addAll(BiomeManager.warmBiomes); this.coolBiomes.addAll(BiomeManager.coolBiomes); this.icyBiomes.addAll(BiomeManager.icyBiomes); if (worldType == WorldType.DEFAULT) { desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 10)); desertBiomes.add(new BiomeEntry(BiomeGenBase.forest, 10)); desertBiomes.add(new BiomeEntry(BiomeGenBase.extremeHills, 10)); desertBiomes.add(new BiomeEntry(BiomeGenBase.swampland, 10)); desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10)); desertBiomes.add(new BiomeEntry(BiomeGenBase.taiga, 10)); desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeTest, 50)); } else { desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 30)); desertBiomes.add(new BiomeEntry(BiomeGenBase.savanna, 20)); desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10)); desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeTest, 50)); } } public int[] getInts(int par1, int par2, int par3, int par4) { int[] aint = this.parent.getInts(par1, par2, par3, par4); int[] aint1 = IntCache.getIntCache(par3 * par4); for (int i1 = 0; i1 < par4; ++i1) { for (int j1 = 0; j1 < par3; ++j1) { this.initChunkSeed((long)(j1 + par1), (long)(i1 + par2)); int k1 = aint[j1 + i1 * par3]; int l1 = (k1 & 3840) >> 8; k1 &= -3841; if (isBiomeOceanic(k1)) { aint1[j1 + i1 * par3] = k1; } else if (k1 == BiomeGenBase.mushroomIsland.biomeID) { aint1[j1 + i1 * par3] = k1; } else if (k1 == 1) { if (l1 > 0) { if (this.nextInt(3) == 0) { aint1[j1 + i1 * par3] = BiomeGenBase.mesaPlateau.biomeID; } else { aint1[j1 + i1 * par3] = BiomeGenBase.mesaPlateau_F.biomeID; } } else { System.out.println(desertBiomes); aint1[j1 + i1 * par3] = ((BiomeEntry)WeightedRandom .getItem(this .desertBiomes, (int)(this .nextLong(WeightedRandom .getTotalWeight(this .desertBiomes))))) .biome .biomeID; } } else if (k1 == 2) { if (l1 > 0) { aint1[j1 + i1 * par3] = BiomeGenBase.jungle.biomeID; } else { aint1[j1 + i1 * par3] = ((BiomeEntry)WeightedRandom.getItem(this.warmBiomes, (int)(this.nextLong(WeightedRandom.getTotalWeight(this.warmBiomes) / 10) * 10))).biome.biomeID; } } else if (k1 == 3) { if (l1 > 0) { aint1[j1 + i1 * par3] = BiomeGenBase.megaTaiga.biomeID; } else { aint1[j1 + i1 * par3] = ((BiomeEntry)WeightedRandom.getItem(this.coolBiomes, (int)(this.nextLong(WeightedRandom.getTotalWeight(this.coolBiomes) / 10) * 10))).biome.biomeID; } } else if (k1 == 4) { aint1[j1 + i1 * par3] = ((BiomeEntry)WeightedRandom.getItem(this.icyBiomes, (int)(this.nextLong(WeightedRandom.getTotalWeight(this.icyBiomes) / 10) * 10))).biome.biomeID; } else { aint1[j1 + i1 * par3] = BiomeGenBase.mushroomIsland.biomeID; } } } return aint1; } }
note à l’avenir, ne pas register deux fois le même biome dans deux class différentes
autre petite question, j’ai ajouté cela dans ma class :
public int getBiomeGrassColor()
{return 0xFF0C00;
}mais l’herbe ne change pas de couleur</biomeentry></biomeentry></biomeentry></biomeentry></biomeentry></biomeentry></biomeentry></biomeentry></init></init></init></init>
-
Fais une recherche sur le forum, plusieurs personnes ont déjà eu ce problème
-
Change ça :
System.out.println(desertBiomes); aint1[j1 + i1 * par3] = ((BiomeEntry)WeightedRandom .getItem(this .desertBiomes, (int)(this .nextLong(WeightedRandom .getTotalWeight(this .desertBiomes))))) .biome .biomeID;
par ça :
BiomeGenBase biome = ((BiomeEntry)WeightedRandom.getItem(this.desertBiomes, (int)(this.nextLong(WeightedRandom.getTotalWeight(this.desertBiomes))))).biome; if(biome == null) biome = leBiomeQueTuVeuxMettreSiçaRisqueDePlanter(MetUnBiomeDeLaCatégorieDesDésets).biomeID; aint1[j1 + i1 * par3] = biome.biomeID;
Et pour la couleur, met un @Override au dessus de la fonction.
-
sauf que quand je met le override, la fonction ne passe pas et me dit de supprimer le @Override
si je met ça :
BiomeGenBase biome = ((BiomeEntry)WeightedRandom.getItem(this.desertBiomes, (int)(this.nextLong(WeightedRandom.getTotalWeight(this.desertBiomes))))).biome;
if(biome == null) biome = (BiomeGenBase)(desertBiomes).biomeID;
aint1[j1 + i1 * par3] = biome.biomeID;alors le biomeID est en erreur