Jump to content

[SOLVED] Generating an ore makes My Minecraft crash PLEASE HELP


Recommended Posts

when I load a world and generate new chunks or create a new world my minecraft crashes from generateing my new ore in the chunk. as far as I know I've done all my coding correctly. I would appreciate it very greatly if you guys could help me out with this problem. here's my  Main class, Ore Class and Block class, please tell me what I did wrong. if you do I would deeply appreciate it.

 

                                                    Crash Report

[08:22:11] [main/INFO] [GradleStart]: Extra: []

[08:22:11] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Boone.mcfuzz/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]

[08:22:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[08:22:11] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[08:22:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[08:22:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

[08:22:11] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1230 for Minecraft 1.7.10 loading

[08:22:11] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_25, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_25

[08:22:11] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[08:22:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[08:22:11] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin

[08:22:11] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin

[08:22:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[08:22:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

[08:22:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[08:22:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[08:22:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[08:22:12] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[08:22:16] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[08:22:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[08:22:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

[08:22:17] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker

[08:22:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker

[08:22:17] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[08:22:19] [main/INFO]: Setting user: Player78

[08:22:22] [Client thread/INFO]: LWJGL Version: 2.9.1

[08:22:24] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[08:22:24] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1230 Initialized

[08:22:24] [Client thread/INFO] [FML]: Replaced 182 ore recipies

[08:22:24] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[08:22:24] [Client thread/INFO] [FML]: Searching C:\Users\Boone.mcfuzz\Desktop\Olympians Mod\eclipse\mods for mods

[08:22:31] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[08:22:32] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, theolympiansmod] at CLIENT

[08:22:32] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, theolympiansmod] at SERVER

[08:22:33] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:The Olympians Mod

[08:22:33] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[08:22:33] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations

[08:22:33] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[08:22:33] [Client thread/INFO] [FML]: Applying holder lookups

[08:22:33] [Client thread/INFO] [FML]: Holder lookups applied

[08:22:33] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[08:22:33] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...

[08:22:33] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL

[08:22:33] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[08:22:34] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.

[08:22:34] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[08:22:34] [sound Library Loader/INFO]: Sound engine started

[08:22:37] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

[08:22:38] [Client thread/INFO]: Created: 256x256 textures/items-atlas

[08:22:38] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods

[08:22:38] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:The Olympians Mod

[08:22:38] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

[08:22:39] [Client thread/INFO]: Created: 256x256 textures/items-atlas

[08:22:39] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[08:22:39] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...

[08:22:39] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:    Author: Paul Lamb, www.paulscode.com

[08:22:39] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[08:22:39] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[08:22:39] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...

[08:22:39] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL

[08:22:39] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[08:22:39] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.

[08:22:40] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[08:22:40] [sound Library Loader/INFO]: Sound engine started

AL lib: (EE) MMDevApiProc: WaitForSingleObjectEx error: 0x102

AL lib: (EE) MMDevApiProc: WaitForSingleObjectEx error: 0x102

AL lib: (EE) MMDevApiProc: WaitForSingleObjectEx error: 0x102

[18:58:40] [server thread/INFO]: Starting integrated minecraft server version 1.7.10

[18:58:40] [server thread/INFO]: Generating keypair

[18:58:40] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance

[18:58:41] [server thread/INFO] [FML]: Applying holder lookups

[18:58:41] [server thread/INFO] [FML]: Holder lookups applied

[18:58:41] [server thread/INFO] [FML]: Loading dimension 0 (Help) (net.minecraft.server.integrated.IntegratedServer@41807dec)

[18:58:41] [server thread/INFO] [FML]: Loading dimension 1 (Help) (net.minecraft.server.integrated.IntegratedServer@41807dec)

[18:58:41] [server thread/INFO] [FML]: Loading dimension -1 (Help) (net.minecraft.server.integrated.IntegratedServer@41807dec)

[18:58:41] [server thread/INFO]: Preparing start region for level 0

[18:58:42] [server thread/ERROR]: Encountered an unexpected exception

java.lang.IllegalArgumentException: bound must be positive

at java.util.Random.nextInt(Unknown Source) ~[?:1.8.0_25]

at com.OlympiansMod.world.AllOre.addOre(AllOre.java:43) ~[AllOre.class:?]

at com.OlympiansMod.world.AllOre.generateOverworld(AllOre.java:53) ~[AllOre.class:?]

at com.OlympiansMod.world.AllOre.generate(AllOre.java:24) ~[AllOre.class:?]

at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106) ~[GameRegistry.class:?]

at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314) ~[ChunkProviderServer.class:?]

at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157) ~[Chunk.class:?]

at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208) ~[ChunkProviderServer.class:?]

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149) ~[ChunkProviderServer.class:?]

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) ~[ChunkProviderServer.class:?]

at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305) ~[MinecraftServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79) ~[integratedServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) ~[integratedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]

[18:58:42] [server thread/ERROR]: This crash report has been saved to: C:\Users\Boone.mcfuzz\Desktop\Olympians Mod\eclipse\.\crash-reports\crash-2015-04-01_18.58.42-server.txt

[18:58:43] [server thread/INFO] [FML]: Applying holder lookups

[18:58:43] [server thread/INFO] [FML]: Holder lookups applied

[18:58:43] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded.

[18:58:43] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// Uh... Did I do that?

 

Time: 4/1/15 6:58 PM

Description: Exception in server tick loop

 

java.lang.IllegalArgumentException: bound must be positive

at java.util.Random.nextInt(Unknown Source)

at com.OlympiansMod.world.AllOre.addOre(AllOre.java:43)

at com.OlympiansMod.world.AllOre.generateOverworld(AllOre.java:53)

at com.OlympiansMod.world.AllOre.generate(AllOre.java:24)

at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106)

at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314)

at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157)

at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119)

at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305)

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79)

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:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 8.1 (amd64) version 6.3

Java Version: 1.8.0_25, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 876415304 bytes (835 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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: 13, tallocated: 95

FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

theolympiansmod{0.1} [The Olympians Mod] (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'

[18:58:43] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-04-01_18.58.42-server.txt

AL lib: (EE) alc_cleanup: 1 device not closed

Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

                                                                                      MainClass

 

package com.OlympiansMod.Main;

 

import com.OlympiansMod.Block.ModBlocks;

import com.OlympiansMod.Item.ModItems;

import com.OlympiansMod.lib.Refstrings;

import com.OlympiansMod.world.MWorld;

 

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

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 = Refstrings.MODID , name = Refstrings.NAME , version = Refstrings.VERSION)

public class MainRegistry {

 

@SidedProxy(clientSide = Refstrings.CLIENTSIDE , serverSide = Refstrings.SERVERSIDE)

public static ServerProxy proxy;

 

@EventHandler

public static void PreLoad(FMLPreInitializationEvent PreEvent) {

ModItems.MainRegistry();

        ModBlocks.MainRegistry();

        MWorld.mainRegistry();

        CraftingManager.mainRegistry();

        proxy.registerRenderInfo();

 

}

@EventHandler

public static void Load(FMLInitializationEvent event) {

 

}

@EventHandler

public static void PostLoad(FMLPostInitializationEvent PostEvent) {

 

}

 

}

 

 

                                                                                        Block Class

 

package com.OlympiansMod.Block;

 

import com.OlympiansMod.lib.Refstrings;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

import cpw.mods.fml.common.registry.GameRegistry;

 

public class ModBlocks {

 

public static void MainRegistry() {

initializeBlock();

registerBlock();

}

 

public static Block CBronzeBlock;

public static Block CBronzeOre;

 

 

public static void initializeBlock() {

CBronzeBlock = new CBronzeBlock(Material.iron).setBlockName("CBronzeBlock").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName(Refstrings.MODID + ":CBronzeBlock").setHardness(3);

CBronzeOre = new CBronzeOre(Material.iron).setBlockName("CBronzeOre").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName(Refstrings.MODID + ":CBronzeOre").setHardness(4).setLightLevel((float) 5);

}

 

public static void registerBlock() {

GameRegistry.registerBlock(CBronzeBlock, CBronzeBlock.getUnlocalizedName());

GameRegistry.registerBlock(CBronzeOre, CBronzeOre.getUnlocalizedName());

}

 

}

 

                                                                                    Main world gen Class

package com.OlympiansMod.world;

 

import cpw.mods.fml.common.IWorldGenerator;

import cpw.mods.fml.common.registry.GameRegistry;

 

public class MWorld {

public static void mainRegistry(){

initializeWorldGen();

}

public static void initializeWorldGen(){

registerWorldGen(new AllOre(), 1);

 

}

public static void registerWorldGen(IWorldGenerator worldGenClass, int weightedProbability){

GameRegistry.registerWorldGenerator(worldGenClass, weightedProbability);

}

 

}

 

                                                                                      Ore Generator Class

 

package com.OlympiansMod.world;

 

import java.util.Random;

 

import com.OlympiansMod.Block.ModBlocks;

 

import net.minecraft.block.Block;

import net.minecraft.init.Blocks;

import net.minecraft.world.World;

import net.minecraft.world.chunk.IChunkProvider;

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

import cpw.mods.fml.common.IWorldGenerator;

 

public class AllOre implements IWorldGenerator {

 

@Override

public void generate(Random random, int chunkX, int chunkZ, World world,

IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {

        switch(world.provider.dimensionId){

        case -1:

            generateNether(random, chunkX * 16, chunkZ * 16, world);

            break;

        case 0:

            generateOverworld(random, chunkX * 16, chunkZ * 16, world);

            break;

        case 1:

            generateEnd(random, chunkX * 16, chunkZ * 16, world);

            break;

           

            }

           

         

    }

 

    private void addOre(Block block, Block blockspawn, Random random, World world, int posX, int posZ, int minY, int maxY, int minVien, int maxVien, int spawnChance){

    for(int i = 0; i < spawnChance; i++){

    int defaultChunkSize = 16;

   

    int xPos = posX + random.nextInt(defaultChunkSize);

    int yPos = maxY + random.nextInt(maxY - minY);

    int zPos = posZ + random.nextInt(defaultChunkSize);

   

    new WorldGenMinable(block, (minVien + random.nextInt(maxVien - minVien)), blockspawn).generate(world, random, xPos, yPos, zPos);

    }

    }

 

private void generateEnd(Random random, int chunkX, int chunkZ, World world) {

 

 

}

 

private void generateOverworld(Random random, int chunkX, int chunkZ, World world) {

addOre(ModBlocks.CBronzeOre, Blocks.diamond_ore, random, world, chunkX, chunkZ, 5, 10, 5, 5, 5);

                                                                 

}

 

private void generateNether(Random random, int chunkX, int chunkZ, World world) {

 

 

}

 

}

 

 

Thank you for your time.

 

 

Im serious don't look at it!!

Link to comment
Share on other sites

[18:58:42] [server thread/ERROR]: Encountered an unexpected exception

java.lang.IllegalArgumentException: bound must be positive

  at java.util.Random.nextInt(Unknown Source) ~[?:1.8.0_25]

  at com.OlympiansMod.world.AllOre.addOre(AllOre.java:43) ~[AllOre.class:?]

 

 

Looks like you tried to supply rand.nextInt(...) with a negative value.

Also:

 int yPos = maxY + random.nextInt(maxY - minY);

Shouldn't that be minY + rand(max-min)?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Next time, please in case your code in "code" and "/code". It becomes quite difficult to read otherwise.

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Link to comment
Share on other sites

yes, thank you for your time, but from my understanding I'm not charging Random.nextInt with any negative charge. so what is causing it to be Charged negatively ??? also thank you I fixed my error yPos = maxY + random.nextInt(maxY - minY) and changed it to minY, but the problem still exists, so apparently there was an error before that line of code. tell me what else I can do to stop Random.nextInt from being charged negatively. Thank you for your help.           

Im serious don't look at it!!

Link to comment
Share on other sites

Check if maxVien - minVien is negative. You might miswrite the parameters.

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

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

Link to comment
Share on other sites

how exactly do I make it not negative?

Make
max

greater than

min

.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

OMG I AM SO STUPID. I cannot believe that I didn't see this before. wow. I will definitely learn from this experience. I had tried this before but then my AllOre class wouldn't load so I had to re- code it from some internal errors.

 

but thank you all for your time I greatly appreciate it. -BoonieQuafter-CrAfTeR

 

I did this but it didn't solve the problem of being able to not experience chunk problems, I can only log in if I turn my render distance down to two chunks, or else it immediately crashes, plus I get extreme lag(meaning I have to wait ten minutes for 1 chunk to load).

Im serious don't look at it!!

Link to comment
Share on other sites

ok now I've fixed the crashing problem now I cant play my mod without it lagging so bad that when I walk onto a new chunk I fall into the void. so please how should I fix this, I want my mod to be playable, should I make it spawn less frequently? will it not lag after being uploaded? should I make the default chunk size smaller?

Please Help

Im serious don't look at it!!

Link to comment
Share on other sites

Sorry I thought I posted the updated code xD. and I did it because I want it to pass as a diamond ore, like it will have the same properties. any way here is the updated code.

 

package com.OlympiansMod.world;

 

import java.util.Random;

 

import com.OlympiansMod.Block.ModBlocks;

 

import net.minecraft.block.Block;

import net.minecraft.init.Blocks;

import net.minecraft.world.World;

import net.minecraft.world.chunk.IChunkProvider;

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

import cpw.mods.fml.common.IWorldGenerator;

 

public class AllOre implements IWorldGenerator {

 

@Override

public void generate(Random random, int chunkX, int chunkZ, World world,

IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {

switch(world.provider.dimensionId){

case -1:

generateNether(random, chunkX * 16, chunkZ * 16, world);

break;

case 0:

generateOverworld(random, chunkX * 16, chunkZ * 16, world);

break;

case 1:

generateEnd(random, chunkX * 16, chunkZ * 16, world);

}

 

}

private void addOre(Block block, Block blockspawn, Random random, World world, int posX, int posZ, int minY, int maxY, int minVien, int maxVien, int spawnChance){

for(int i = 0; i < spawnChance; i++){

int defaultChunkSize = 16;

 

int xPos = posX + random.nextInt(defaultChunkSize);

int yPos = minY + random.nextInt(maxY - minY);

int zPos = posZ + random.nextInt(defaultChunkSize);

 

new WorldGenMinable(block, (minVien + random.nextInt(maxVien - minVien)), blockspawn).generate(world, random, xPos, yPos, zPos);

}

}

 

private void generateEnd(Random random, int chunkX, int chunkZ, World world) {

 

 

}

 

private void generateOverworld(Random random, int chunkX, int chunkZ, World world) {

addOre(ModBlocks.CBronzeOre, Blocks.stone, random, world, chunkX, chunkZ, 5, 20, 2, 6, 12);

 

}

 

private void generateNether(Random random, int chunkX, int chunkZ, World world) {

 

 

}

 

}

 

Im serious don't look at it!!

Link to comment
Share on other sites

  • 1 year later...
  • Guest locked this topic
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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