Jump to content

Recommended Posts

Posted

Hello everyone!

    My name is Ablaze. I was impressed by the forum with my last topic. I had 4 replies by the next day of the OP. Anyways, here is my newest problem. I got into modding 3-4 days back. I don't mind if I have a coding error; in the sense a problem in the code. I will Google as much as possible, and rack my brains to figure it out. But this one is a real bad one. It isn't an error. When I run Minecraft through eclipse, this is the log i get:-

 

Aug 28, 2013 10:04:37 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker
2013-08-28 22:04:39 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.2.55.842 for Minecraft 1.6.2 loading
2013-08-28 22:04:39 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_21, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jdk1.7.0_21\jre
2013-08-28 22:04:39 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2013-08-28 22:04:41 [iNFO] [sTDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg
2013-08-28 22:04:42 [iNFO] [sTDOUT] Loaded 107 rules from AccessTransformer config file forge_at.cfg
2013-08-28 22:04:44 [sEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!
2013-08-28 22:04:46 [iNFO] [ForgeModLoader] Launching wrapped minecraft
2013-08-28 22:04:56 [iNFO] [Minecraft-Client] Setting user: Player505
2013-08-28 22:04:56 [iNFO] [Minecraft-Client] (Session ID is null)
2013-08-28 22:05:08 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0
2013-08-28 22:05:13 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default
2013-08-28 22:05:15 [iNFO] [sTDOUT] 
2013-08-28 22:05:15 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-08-28 22:05:15 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-08-28 22:05:15 [iNFO] [sTDOUT]     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2013-08-28 22:05:19 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization
2013-08-28 22:05:19 [iNFO] [sTDOUT] MinecraftForge v9.10.0.842 Initialized
2013-08-28 22:05:19 [iNFO] [ForgeModLoader] MinecraftForge v9.10.0.842 Initialized
2013-08-28 22:05:22 [iNFO] [sTDOUT] Replaced 101 ore recipies
2013-08-28 22:05:23 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization
2013-08-28 22:05:24 [iNFO] [ForgeModLoader] Reading custom logging properties from C:\Users\********\Desktop\forge\mcp\jars\config\logging.properties
2013-08-28 22:05:24 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2013-08-28 22:05:26 [iNFO] [ForgeModLoader] Searching C:\Users\********\Desktop\forge\mcp\jars\mods for mods
2013-08-28 22:05:26 [iNFO] [sTDOUT] OpenAL initialized.
2013-08-28 22:05:26 [iNFO] [sTDOUT] 
2013-08-28 22:06:20 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load
2013-08-28 22:06:20 [iNFO] [mcp] Activating mod mcp
2013-08-28 22:06:20 [iNFO] [FML] Activating mod FML
2013-08-28 22:06:20 [iNFO] [Forge] Activating mod Forge
2013-08-28 22:06:20 [iNFO] [AblazeTheBest_TutorialMod] Activating mod AblazeTheBest_TutorialMod
2013-08-28 22:06:20 [WARNING] [Tutorial Mod] Mod Tutorial Mod is missing a pack.mcmeta file, things may not work well
2013-08-28 22:06:20 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Tutorial Mod
2013-08-28 22:06:21 [iNFO] [sTDOUT] 
2013-08-28 22:06:21 [iNFO] [sTDOUT] SoundSystem shutting down...
2013-08-28 22:06:21 [iNFO] [sTDOUT]     Author: Paul Lamb, www.paulscode.com
2013-08-28 22:06:21 [iNFO] [sTDOUT] 
2013-08-28 22:06:21 [iNFO] [sTDOUT] 
2013-08-28 22:06:21 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-08-28 22:06:21 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-08-28 22:06:21 [iNFO] [sTDOUT]     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2013-08-28 22:06:21 [iNFO] [ForgeModLoader] Registering Forge Packet Handler
2013-08-28 22:06:22 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2013-08-28 22:06:22 [iNFO] [sTDOUT] OpenAL initialized.
2013-08-28 22:06:22 [iNFO] [sTDOUT] 
2013-08-28 22:06:22 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2013-08-28 22:06:34 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods
2013-08-28 22:06:34 [WARNING] [Tutorial Mod] Mod Tutorial Mod is missing a pack.mcmeta file, things may not work well
2013-08-28 22:06:34 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Tutorial Mod
2013-08-28 22:06:35 [iNFO] [sTDOUT] 
2013-08-28 22:06:35 [iNFO] [sTDOUT] SoundSystem shutting down...
2013-08-28 22:06:36 [iNFO] [sTDOUT]     Author: Paul Lamb, www.paulscode.com
2013-08-28 22:06:36 [iNFO] [sTDOUT] 
2013-08-28 22:06:36 [iNFO] [sTDOUT] 
2013-08-28 22:06:36 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-08-28 22:06:36 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-08-28 22:06:36 [iNFO] [sTDOUT]     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2013-08-28 22:06:36 [iNFO] [sTDOUT] OpenAL initialized.
2013-08-28 22:06:36 [iNFO] [sTDOUT] 
2013-08-28 22:07:06 [sEVERE] [Minecraft-Client] Realms: Invalid session id
2013-08-28 22:07:07 [iNFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.2
2013-08-28 22:07:07 [iNFO] [Minecraft-Server] Generating keypair
2013-08-28 22:07:13 [iNFO] [ForgeModLoader] Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@60d0e35f)
2013-08-28 22:07:14 [iNFO] [ForgeModLoader] Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@60d0e35f)
2013-08-28 22:07:15 [iNFO] [ForgeModLoader] Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@60d0e35f)
2013-08-28 22:07:15 [iNFO] [Minecraft-Server] Preparing start region for level 0
2013-08-28 22:07:16 [iNFO] [sTDERR] java.lang.IllegalArgumentException: n must be positive
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at java.util.Random.nextInt(Random.java:300)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at tutorial.EventManager.addOreSpawn(EventManager.java:57)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at tutorial.EventManager.generateSurface(EventManager.java:24)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at tutorial.EventManager.generate(EventManager.java:18)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:103)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:259)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1249)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:292)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:90)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:443)
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2013-08-28 22:07:16 [sEVERE] [Minecraft-Server] Encountered an unexpected exception IllegalArgumentException
java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Random.java:300)
at tutorial.EventManager.addOreSpawn(EventManager.java:57)
at tutorial.EventManager.generateSurface(EventManager.java:24)
at tutorial.EventManager.generate(EventManager.java:18)
at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:103)
at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:259)
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1249)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153)
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:292)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:90)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:443)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2013-08-28 22:07:16 [sEVERE] [Minecraft-Server] This crash report has been saved to: C:\Users\Eehit\Desktop\forge\mcp\jars\.\crash-reports\crash-2013-08-28_22.07.16-server.txt
2013-08-28 22:07:16 [iNFO] [Minecraft-Server] Stopping server
2013-08-28 22:07:16 [iNFO] [Minecraft-Server] Saving players
2013-08-28 22:07:16 [iNFO] [Minecraft-Server] Saving worlds
2013-08-28 22:07:16 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/Overworld
2013-08-28 22:07:17 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/Nether
2013-08-28 22:07:17 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/The End
2013-08-28 22:07:17 [iNFO] [ForgeModLoader] Unloading dimension 0
2013-08-28 22:07:17 [iNFO] [ForgeModLoader] Unloading dimension -1
2013-08-28 22:07:17 [iNFO] [ForgeModLoader] Unloading dimension 1
2013-08-28 22:07:17 [iNFO] [ForgeModLoader] The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded.

 

See the last line? I.E. - The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded.

 

Here is all my code :-

 

Tutorial.java

 

package tutorial;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.potion.Potion;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = Tutorial.modid, name = "Tutorial Mod", version = "1.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Tutorial {
public static final String modid = "AblazeTheBest_TutorialMod";

public static Block fieryIndestuctibleBlock;

public static Block arkmanditeOre;

public static Item fieryFood; 

public static Item arkmanditeIngot;

EventManager eventmanager = new EventManager();
@EventHandler
public void load(FMLInitializationEvent event)
{
	fieryIndestuctibleBlock = new BlockTutorialBlock(500, Material.rock).setUnlocalizedName("fieryIndestuctibleBlock");
	GameRegistry.registerBlock(fieryIndestuctibleBlock, modid + fieryIndestuctibleBlock.getUnlocalizedName().substring(5));
	LanguageRegistry.addName(fieryIndestuctibleBlock, "Fiery Indestructible Block");

	arkmanditeOre = new BlockArkmanditeOre(501, Material.rock).setUnlocalizedName("arkmanditeOre");
	GameRegistry.registerBlock(arkmanditeOre, modid + arkmanditeOre.getUnlocalizedName().substring(5));
	LanguageRegistry.addName(arkmanditeOre, "Arkmandite Ore");

	arkmanditeIngot = new ItemArkmanditeIngot(5001).setUnlocalizedName("arkmanditeIngot");
	GameRegistry.registerItem(arkmanditeIngot, modid + arkmanditeIngot.getUnlocalizedName().substring(5));

	fieryFood = new ItemTutorial(5000, 3, 12.0f, false).setPotionEffect(Potion.fireResistance.id, 5, 0, 0.9f);
	fieryFood.setUnlocalizedName("fieryFood");
	GameRegistry.registerItem(fieryFood, modid + fieryFood.getUnlocalizedName().substring(5));
	LanguageRegistry.addName(fieryFood, "Fiery Food");

	GameRegistry.registerWorldGenerator(eventmanager);

	TutorialCrafting.loadRecipes();

}
}

 

BlockTutorialBlock.java:-

 

package tutorial;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class BlockTutorialBlock extends Block{

public BlockTutorialBlock(int id, Material material) {
	super(id, material);
	this.setCreativeTab(CreativeTabs.tabBlock);
	this.setHardness(2.0f);
	this.setResistance(18000000.0f);
}

@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
	this.blockIcon = par1IconRegister.registerIcon(Tutorial.modid + ":" + (this.getUnlocalizedName().substring(5)));
}

}

 

ItemTutorial.java:-

 

package tutorial;

import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemFood;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class ItemTutorial extends ItemFood{

public ItemTutorial(int id, int hunger, float saturation, boolean wolfFood) {
	super(id, hunger, saturation, wolfFood);
	this.setCreativeTab(CreativeTabs.tabFood);
}

@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
	this.itemIcon = par1IconRegister.registerIcon(Tutorial.modid + ":" + (this.getUnlocalizedName().substring(5)));
}

}

 

TutorialCrafting.java:-

 

package tutorial;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import cpw.mods.fml.common.registry.GameRegistry;

public class TutorialCrafting {

public static void loadRecipes() {
	GameRegistry.addRecipe(new ItemStack(Tutorial.fieryFood, 3), new Object[]{
		"CXC",
		" C ",
		'C', Block.obsidian, 'X', Item.blazePowder
	});

	FurnaceRecipes.smelting().addSmelting(Tutorial.fieryIndestuctibleBlock.blockID, new ItemStack(Tutorial.fieryFood), 0.5f);

}

}

 

EventManager.java:-

 

package tutorial;

import java.util.Random;

import net.minecraft.block.Block;
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 EventManager implements IWorldGenerator{

@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
		IChunkProvider chunkGenerator, IChunkProvider chunkProvider) 
{
	switch(world.provider.dimensionId) {
            case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16);
	}
}


private void generateSurface(World world, Random random, int x, int z) {
	this.addOreSpawn(Tutorial.arkmanditeOre, world, random, x, z, 16, 16, 2 + random.nextInt(3), 6, 40, 20);
}



/**
 * Adds an Ore Spawn to Minecraft. Simply register all Ores to spawn with this method in your Generation method in your IWorldGeneration extending Class
 *
 * @param The Block to spawn
 * @param The World to spawn in
 * @param A Random object for retrieving random positions within the world to spawn the Block
 * @param An int for passing the X-Coordinate for the Generation method
 * @param An int for passing the Z-Coordinate for the Generation method
 * @param An int for setting the maximum X-Coordinate values for spawning on the X-Axis on a Per-Chunk basis
 * @param An int for setting the maximum Z-Coordinate values for spawning on the Z-Axis on a Per-Chunk basis
 * @param An int for setting the maximum size of a vein
 * @param An int for the Number of chances available for the Block to spawn per-chunk
 * @param An int for the minimum Y-Coordinate height at which this block may spawn
 * @param An int for the maximum Y-Coordinate height at which this block may spawn
 **/
public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chancesToSpawn, int minY, int maxY)
{
       int maxPossY = minY + (maxY - 1);
       assert maxY > minY: "The maximum Y must be greater than the Minimum Y";
       assert maxX > 0 && maxX <= 16: "addOreSpawn: The Maximum X must be greater than 0 and less than 16";
       assert minY > 0: "addOreSpawn: The Minimum Y must be greater than 0";
       assert maxY < 256 && maxY > 0: "addOreSpawn: The Maximum Y must be less than 256 but greater than 0";
       assert maxZ > 0 && maxZ <= 16: "addOreSpawn: The Maximum Z must be greater than 0 and less than 16";
      
       int diffBtwnMinMaxY = maxY - minY;
       for(int x = 0; x < chancesToSpawn; x++)
       {
             int posX = blockXPos + random.nextInt(maxX);
             int posY = minY + random.nextInt(diffBtwnMinMaxY);
             int posZ = blockZPos + random.nextInt(maxZ);
             (new WorldGenMinable(block.blockID, maxVeinSize)).generate(world, random, posX, posY, posZ);
       }
}

}

 

BlockArkmanditeOre.java:-

 

package tutorial;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;

public class BlockArkmanditeOre extends Block{

public BlockArkmanditeOre(int id, Material material) {
	super(id, material);
	this.setCreativeTab(CreativeTabs.tabBlock);
	this.setHardness(6.0F);
	this.setResistance(5.0F);
}

@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
	this.blockIcon = par1IconRegister.registerIcon(Tutorial.modid + ":" + (this.getUnlocalizedName().substring(5)));
}

}

 

ItemArkmanditeIngot.java:-

 

package tutorial;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class ItemArkmanditeIngot extends Item{

public ItemArkmanditeIngot(int id) {
	super(id);
	this.setCreativeTab(CreativeTabs.tabMaterials);
}

@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
	this.itemIcon = par1IconRegister.registerIcon(Tutorial.modid + ":" + (this.getUnlocalizedName().substring(5)));
}

}

 

Please help me and reply if you can.

 

Thanking you,

Yours sincerely,

Ablaze.

Add me on Skype: AblazeTheBest. Send a message saying "#HeyAblaze"

 

Currently: Making a mod!

Posted

2013-08-28 22:07:16 [iNFO] [sTDERR] java.lang.IllegalArgumentException: n must be positive
2013-08-28 22:07:16 [iNFO] [sTDERR] 	at java.util.Random.nextInt(Random.java:300)

 

Looks like you're trying to get a random number based on a negative integer on line 57 in Events Manager

 

2013-08-28 22:07:16 [iNFO] [sTDERR] 	at tutorial.EventManager.addOreSpawn(EventManager.java:57)

Posted

ok first, how to read logs

 

what youre looking for isnt what you stated

 

what youre looking for is thsi:

  Quote

2013-08-28 22:07:16 [iNFO] [sTDERR] java.lang.IllegalArgumentException: n must be positive

2013-08-28 22:07:16 [iNFO] [sTDERR] at java.util.Random.nextInt(Random.java:300)

2013-08-28 22:07:16 [iNFO] [sTDERR] at tutorial.EventManager.addOreSpawn(EventManager.java:57)

2013-08-28 22:07:16 [iNFO] [sTDERR] at tutorial.EventManager.generateSurface(EventManager.java:24)

2013-08-28 22:07:16 [iNFO] [sTDERR] at tutorial.EventManager.generate(EventManager.java:18)

2013-08-28 22:07:16 [iNFO] [sTDERR] at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:103)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:259)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1249)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:292)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:90)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:443)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

so lets start by what this means

 

all the "at package.name.classname.method(File.java: line#)"

is called the stack trace, it says where and how the program crash.

in your case it says:

  Quote
java.lang.IllegalArgumentException

meaning you called a method with soemthign that shouldn't be

its followed by:

  Quote
n must be positive

which explain why its not a legal argument

and with the stack trace:

  Quote
at java.util.Random.nextInt(Random.java:300)

its in file java.util.Random in methdo nextInt in the file Random.java at line 300

and thsi method is called from:

  Quote
at tutorial.EventManager.addOreSpawn(EventManager.java:57)

which is YOUR class (always assume that everything under java.* is correct and working, always assume that YOU are not using the code properlly)

so its in file EventManager.java at line 57 and its in method addOreSpawn

which btw is called from:

  Quote
at tutorial.EventManager.generateSurface(EventManager.java:24)

generateSurface line 24 in file EventManager, but we assume that your code is fucking up ...

 

line 57 of EventManager (well actually 57+- 2 lines):

int posX = blockXPos + random.nextInt(maxX);
int posY = minY + random.nextInt(diffBtwnMinMaxY);
int posZ = blockZPos + random.nextInt(maxZ);

remember i dont have line numbers and im not goign to count them

so one of these receives a number under 0 (remember earlier: n must be positive)

you can clearly see that by doign a println right before calling those

System.out.println("value of maxX: "+maxX);
int posX = blockXPos + random.nextInt(maxX);
System.out.println("value of diffBtwnMinMaxY: "+diffBtwnMinMaxY);
int posY = minY + random.nextInt(diffBtwnMinMaxY);
System.out.println("value of maxZ: "+maxZ);
int posZ = blockZPos + random.nextInt(maxZ);

 

now if you run thsi the logs will look like this:

  Quote

"value of maxX: 3

value of diffBtwnMinMaxY: -1

value of maxZ:  5

2013-08-28 22:07:16 [iNFO] [sTDERR] java.lang.IllegalArgumentException: n must be positive

2013-08-28 22:07:16 [iNFO] [sTDERR] at java.util.Random.nextInt(Random.java:300)

2013-08-28 22:07:16 [iNFO] [sTDERR] at tutorial.EventManager.addOreSpawn(EventManager.java:57)

2013-08-28 22:07:16 [iNFO] [sTDERR] at tutorial.EventManager.generateSurface(EventManager.java:24)

2013-08-28 22:07:16 [iNFO] [sTDERR] at tutorial.EventManager.generate(EventManager.java:18)

2013-08-28 22:07:16 [iNFO] [sTDERR] at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:103)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:259)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1249)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:292)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:90)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:443)

2013-08-28 22:07:16 [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

so you know that yes you are fucking up somewhere

btw i made up those numbers, i dont know what the actual output will be

 

since you know you are sending negative numbers to the method nextInt you have to find why you are arriving at these resutl and how to fix it

 

gl hf

 

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • 2 months later...

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

    • When i try to start minecraft forge 1.20.1 an error appears an the launcher shows the error 1, i don't know what's that :   "failed to initialize graphics window with current settings" "Timed out trying to setup the Game Window"
    • Also add the client log after trying to join  
    • We’ve got a fantastic deal for new users—just use the acw696499 Temu coupon code to unlock massive savings across Temu’s global marketplace. This code offers maximum benefits to shoppers in the USA, Canada, and major European countries. With the Temu coupon $100 off and Temu 100 off coupon code, you can enjoy generous discounts and exclusive offers. It’s your key to smart shopping without compromising on quality. What Is The Coupon Code For Temu $100 Off? Everyone loves a great deal, and Temu makes it even better with this limited-time offer. Whether you're a new or existing customer, the Temu coupon $100 off or $100 off Temu coupon is the real deal to watch. acw696499: Flat $100 off on your first purchase as a welcome bonus. acw696499: Access a $100 coupon pack with multiple-use options. acw696499: Exclusive $100 flat discount for new customers on sign-up. acw696499: Extra $100 promo code for existing customers. acw696499: Valid for all users in the USA and Canada for a $100 off coupon experience. Temu Coupon Code $100 Off For New Users In 2025 If you're just starting out with Temu, this deal is tailor-made for you. The Temu coupon $100 off and Temu coupon code $100 off are designed specifically to give new users an exceptional start. acw696499: Flat $100 discount for all new users. acw696499: Get a $100 coupon bundle instantly after registering. acw696499: Up to $100 coupon bundle usable over multiple orders. acw696499: Free shipping to 68 countries, making your first purchase even sweeter. acw696499: Enjoy an extra 30% off on any product as a first-time user. How To Redeem The Temu Coupon $100 Off For New Customers? Using the Temu $100 coupon and Temu $100 off coupon code for new users is easy: Download the Temu app or visit the Temu website. Register as a new user with your email or phone number. Go to the coupon section and enter code acw696499. Browse and add your favorite items to the cart. Apply the coupon at checkout to redeem your discount. Temu Coupon $100 Off For Existing Customers Temu doesn’t just stop at new users. Even returning shoppers can make the most of the Temu $100 coupon codes for existing users and Temu coupon $100 off for existing customers free shipping benefits. acw696499: $100 extra discount for existing Temu users. acw696499: Unlock a $100 coupon bundle for multiple purchases. acw696499: Get a free gift with express shipping throughout the USA and Canada. acw696499: Enjoy an extra 30% off on top of existing discounts. acw696499: Free shipping to 68 countries with no strings attached. How To Use The Temu Coupon Code $100 Off For Existing Customers? To use the Temu coupon code $100 off and Temu coupon $100 off code as an existing user: Log into your Temu account via app or website. Go to the ‘Coupons & Promotions’ section. Enter acw696499 in the coupon code box. Shop for your desired products. Apply the code during checkout to enjoy the savings. Latest Temu Coupon $100 Off First Order Your first order with Temu just got a whole lot more exciting. When you use the Temu coupon code $100 off first order, Temu coupon code first order, or Temu coupon code $100 off first time user, big savings await. acw696499: Flat $100 discount on your first order. acw696499: Activate your $100 Temu coupon code with ease. acw696499: Receive up to $100 worth of coupons for multiple purchases. acw696499: Enjoy free shipping across 68 countries. acw696499: Add 30% off on your first purchase. How To Find The Temu Coupon Code $100 Off? If you're searching for a Temu coupon $100 off or even a verified Temu coupon $100 off Reddit code, we’ve got you covered. Simply sign up for the Temu newsletter to get exclusive coupons straight to your inbox. You can also follow Temu’s official pages on Instagram, Facebook, or Twitter for surprise promo codes. For guaranteed and working coupons, visit any trusted coupon site—you’ll always find the best deals like acw696499 there. Is Temu $100 Off Coupon Legit? Yes, the Temu $100 Off Coupon Legit offer is 100% real. Our Temu 100 off coupon legit code—acw696499—has been tested and verified by thousands of users. You can safely use this code for $100 off on your first order and enjoy discounts on recurring purchases too. There’s no expiry date, and the code is valid globally. How Does Temu $100 Off Coupon Work? The Temu coupon code $100 off first-time user and Temu coupon codes 100 off offers work by instantly applying discounts to your cart. Once you sign up and apply the coupon code, Temu automatically adjusts the pricing to reflect your savings. Whether it’s a flat $100 off or a bundle, the discounts will apply across eligible items at checkout. How To Earn Temu $100 Coupons As A New Customer? To earn the Temu coupon code $100 off or 100 off Temu coupon code as a new customer, simply sign up on the Temu app or website. Enter the code acw696499 during registration or at checkout, and you’ll instantly unlock $100 worth of coupons. These can be applied over multiple orders, maximizing your benefits as a newcomer. What Are The Advantages Of Using The Temu Coupon $100 Off? The Temu coupon code 100 off and Temu coupon code $100 off offers bring many great benefits: $100 discount on the first order. $100 coupon bundle for multiple uses. Up to 70% discount on trending items. Extra 30% off for existing customers. Up to 90% off on selected categories. Free gift for new users. Free delivery to 68 countries. Temu $100 Discount Code And Free Gift For New And Existing Customers Using the Temu $100 off coupon code or $100 off Temu coupon code gives you unmatched savings and perks. Whether you’re a new or returning customer, you’ll love the benefits. acw696499: Enjoy a $100 discount on your very first order. acw696499: Get an extra 30% off on all purchases. acw696499: Free gift exclusively for new Temu users. acw696499: Up to 70% off across all product categories. acw696499: Free gift and free shipping in 68 countries, including the USA and UK. Pros And Cons Of Using The Temu Coupon Code $100 Off This Month Take advantage of the Temu coupon $100 off code and Temu 100 off coupon deals with these pros and cons: Pros: Massive $100 discount on eligible purchases. Works for both new and existing users. Stackable with other Temu offers. Valid in 68 countries worldwide. Comes with free shipping and gifts. Cons: Only valid through the app or website. May not apply to some sale items. Terms And Conditions Of Using The Temu Coupon $100 Off In 2025 Please read these Temu coupon code $100 off free shipping and latest Temu coupon code $100 off terms: Our coupon code acw696499 does not have an expiration date. The code is valid for both new and existing users. No minimum purchase is required to use this code. It applies across 68 countries worldwide. Free shipping and gifts are included. Final Note: Use The Latest Temu Coupon Code $100 Off Unlock unbeatable value with the Temu coupon code $100 off today. Whether you're new or returning, the savings are just one click away. Enjoy great deals, exclusive bundles, and premium products with our Temu coupon $100 off. Shop smart and save more every time. FAQs Of Temu $100 Off Coupon  Is the Temu $100 off coupon available to everyone? Yes, both new and existing users in supported countries can access the $100 off offer using code acw696499.  How can I ensure my Temu coupon works? Use a trusted and verified code like acw696499 and follow the redemption steps properly at checkout. Does the Temu $100 coupon expire? No, our exclusive code acw696499 has no expiration date and can be used anytime.  Can I combine the $100 coupon with other discounts? Yes, Temu allows coupon stacking, so you can combine acw696499 with other ongoing deals.  Is the Temu $100 off coupon valid worldwide? Absolutely. The acw696499 code is valid in 68 countries, including the USA, Canada, and Europe.
    • So I tried joining it, but they disconnect me immediately after it opens. Here's the log after closing the server: https://mclo.gs/5Bp0Mno
    • We have this Mc Server but some people aren't able to connect and are getting this error This is the Debug.log https://mclo.gs/EoekqaK 
  • Topics

×
×
  • Create New...

Important Information

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