1

Ore Generation Help

TeamPyro's Avatar TeamPyro10/29/12 1:06 am
1 emeralds 217 4
10/29/2012 7:51 pm
TeamPyro's Avatar TeamPyro
I have two file that are conflicting, please help, ASAP.
The first is mainfile:

package piccoMod.common;

import net.minecraft.src.Block;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
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 = "Picco_PiccoMod", name = "The Picco Mod",version = "0.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Mainfile
{
private static final String clientSide = null;
public static Block redstoneBlock;
public static Item tangitegem;
public static Block tangiteBlock;
public static Block tangiteore;

@SidedProxy(clientSide = "Mainfile.client.ClientProxyTutorial", serverSide = "piccoMod.common.tangiteworldgenerator")
public static tangiteworldgenerator proxy;

@Init
public void load(FMLInitializationEvent event) {
}
{
//Ores\\


tangiteore = new Blocktangiteore(504, 2).setBlockName("tangiteore");
GameRegistry.registerBlock(tangiteore);
LanguageRegistry.addName(tangiteore, "Tangenite Ore");


//-----------------------
//Blocks\\
redstoneBlock = new BlockredstoneBlock(501, 0).setStepSound(Block.soundMetalFootstep).setBlockName("redstoneBlock");

GameRegistry.registerBlock(redstoneBlock);
LanguageRegistry.addName(redstoneBlock, "Block of Redstone");

tangiteBlock = new BlocktangiteBlock(503, 1).setStepSound(Block.soundMetalFootstep).setBlockName("tangiteBlock");
GameRegistry.registerBlock(tangiteBlock);

LanguageRegistry.addName(tangiteBlock, "Block of Tangenite");


//-----------------------
//Items\\
tangitegem = new Itemtangitegem(502, 0).setItemName("tangitegem");

LanguageRegistry.addName(tangitegem, "Tangenite Gem");



//-----------------------
//Recipes\\
GameRegistry.addRecipe(new ItemStack(Mainfile.redstoneBlock, 1), new Object[]
{"XXX", "XXX", "XXX", 'X', Item.redstone
});
GameRegistry.addShapelessRecipe(new ItemStack(Item.redstone, 9), new Object[] {new ItemStack(redstoneBlock)});

//SP\\
GameRegistry.addRecipe(new ItemStack(Mainfile.tangiteBlock, 1), new Object[]
{"XXX", "XXX", "XXX", 'X', tangitegem});

GameRegistry.addShapelessRecipe(new ItemStack(Mainfile.tangitegem, 9), new Object[] {new ItemStack(tangiteBlock)});

GameRegistry.addSmelting(tangiteore.blockID, new ItemStack(tangitegem), 1.5F);
}{;
//EndingStuff
GameRegistry.registerWorldGenerator(new tangiteworldgenerator());
}
}


The 2nd is the generation file

package piccoMod.common;

import java.util.Random;

import net.minecraft.src.IChunkProvider;
import net.minecraft.src.World;
import net.minecraft.src.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
public class tangiteworldgenerator implements IWorldGenerator{


public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){



switch (world.provider.dimensionId){

case -1: generateNether(world, random, chunkX*16, chunkZ*16);
case 0: generateSurface(world, random, chunkX*16, chunkZ*16);

}
}
public void generateSurface(World world, Random random, int blockX, int blockZ){

{
{

int Xcoord = blockX + random.nextInt(16);
int Ycoord = random.nextInt(32);
int Zcoord = blockZ + random.nextInt(16);
(new WorldGenMinable(Mainfile.tangiteore.blockID, 3)).generate(world, random, Xcoord, Ycoord, Zcoord);}}

}

public void generateNether(World world, Random random, int blockX, int blockZ){


}




public void registerRenderThings() {
}}


Finally, the error I get:

Minecraft has crashed!
----------------------

Minecraft has stopped running because it encountered a problem; Failed to start game
This error has been saved to C:\Users\John\Desktop\PiccoMod\jars\.\crash-reports\crash-2012-10-28_22.05.26-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.



--- BEGIN ERROR REPORT 81111ec4 --------
Generated 10/28/12 10:05 PM

- Minecraft Version: 1.4.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_09, Oracle Corporation
- Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 799315160 bytes (762 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
- FML: MCP v7.19 FML v4.2.6.422 Minecraft Forge 6.0.1.341 4 mods loaded, 4 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
Picco_PiccoMod [The Picco Mod] (bin) Unloaded->Errored
- LWJGL: 2.4.2
- OpenGL: GeForce GTX 660M/PCIe/SSE2 GL version 4.2.0, NVIDIA Corporation
- Is Modded: Definitely; 'forge,fml'
- Type: Client
- Texture Pack: Default
- Profiler Position: N/A (disabled)
- Vec3 Pool Size: ~ERROR~ NullPointerException: null

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: Mainfile.client.ClientProxyTutorial
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:52)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:414)
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:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:143)
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:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:401)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:150)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:420)
at net.minecraft.client.Minecraft.run(Minecraft.java:752)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Mainfile.client.ClientProxyTutorial
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:123)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:38)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:33)
... 26 more
Caused by: java.lang.NullPointerException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.minecraftforge.transformers.EventTransformer.transform(EventTransformer.java:30)
at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:162)
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:116)
... 32 more
--- END ERROR REPORT f9f254c8 ----------
Posted by TeamPyro's Avatar
TeamPyro
Level 8 : Apprentice Architect
35

Create an account or sign in to comment.

4

1
10/29/2012 7:51 pm
Level 8 : Apprentice Architect
TeamPyro
TeamPyro's Avatar
It still crashes
1
10/29/2012 7:47 pm
Level 8 : Apprentice Architect
TeamPyro
TeamPyro's Avatar
All you changed was the nextInt(8), right?
1
10/29/2012 7:24 pm
Level 19 : Journeyman Modder
Uncraftables
Uncraftables's Avatar
I normally use:

int Xcoord = blockX + random.nextInt(8);
int Ycoord = random.nextInt(32);
int Zcoord = blockZ + random.nextInt(8);
(new WorldGenMinable(Mainfile.tangiteore.blockID, 3)).generate(world, random, Xcoord, Ycoord, Zcoord);}}

Instead of:

int Xcoord = blockX + random.nextInt(16);
int Ycoord = random.nextInt(32);
int Zcoord = blockZ + random.nextInt(16);
(new WorldGenMinable(Mainfile.tangiteore.blockID, 3)).generate(world, random, Xcoord, Ycoord, Zcoord);}}
1
10/29/2012 11:15 am
Level 8 : Apprentice Architect
TeamPyro
TeamPyro's Avatar
Boo-ump
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome