Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.8] [Unsolved] Tutorial Ore Generation


UnknownAssassin
 Share

Recommended Posts

  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

Tutorial: (I don't know wich version it is for)

http://www.orangetutorial.com/world-generation/#sthash.Gd2RHEjw.Trs4sWIA.dpbs

 

My Problems:

2 Brackets Errors, DimensionID Error, it doesn't know my Block "Modblocks.magicblock",

 

My Code:


package de.unknwownassassin.powerapples;

import java.util.Random;

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 net.minecraftforge.fml.common.IWorldGenerator;

class PowerApplesWorldGeneration implements IWorldGenerator
{

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

    private void GenerateOverworld(Random random, int x, int z, World world)
    {
    }
   
    public void addOreSpawn(Modblocks.magicblock, World world, Random random, int blockXPos, int blockZPos,int minVeinSize, int maxVeinSize, int chancesToSpawn, int minY, int maxY )
    {
        WorldGenMinable minable = new WorldGenMinable(block, (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), Blocks.stone);
        for(int i = 0; i < chancesToSpawn; i++)
        {
            int posX = blockXPos + random.nextInt(16);
            int posY = minY + random.nextInt(maxY - minY);
            int posZ = blockZPos + random.nextInt(16);
            minable.generate(world, random, posX, posY, posZ);
        }
    }
}
[/Code]

Link to comment
Share on other sites

public void addOreSpawn(Modblocks.magicblock, World world, Random random, int blockXPos, int blockZPos,int minVeinSize, int maxVeinSize, int chancesToSpawn, int minY, int maxY )

This is not valid java code. Please learn basic java.
minable.generate(world, random, posX, posY, posZ);

As said above, x, y, z are now combined into one Object of class BlockPos.
Link to comment
Share on other sites

Still 4 Errors but thank you :/

1 Error is the BlockPos, I will look how exactly it works tomorrow


package de.unknwownassassin.powerapples;

import java.util.Random;

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 net.minecraftforge.fml.common.IWorldGenerator;

class PowerApplesWorldGeneration implements IWorldGenerator
{

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

    private void GenerateOverworld(Random random, int x, int z, World world)
    {
    addOreSpawn(ModBlocks.magicblock, world, random, x, z, 2, 8, 20, 0, 30);
    }
   
    public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos,int minVeinSize, int maxVeinSize, int chancesToSpawn, int minY, int maxY )
    {
        WorldGenMinable minable = new WorldGenMinable(block, (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), Blocks.stone);
        for(int i = 0; i < chancesToSpawn; i++)
        {
            int posX = blockXPos + random.nextInt(16);
            int posY = minY + random.nextInt(maxY - minY);
            int posZ = blockZPos + random.nextInt(16);
            minable.generate(world, random, posX, posY, posZ);
        }
    }
}
[/Code]

Link to comment
Share on other sites

So, 3 errors left. Thank you :)

Eclipse marks:

- Modblocks  (Is there anything wrong? I want to use my own block '"magicblock", what do I have to do here?)

- WorldGenMinable minable = new WorldGenMinable...

- And "DimensionId", is still doesn't know that

 


package de.unknwownassassin.powerapples;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.fml.common.IWorldGenerator;

class PowerApplesWorldGeneration implements IWorldGenerator
{

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

    private void GenerateOverworld(Random random, int x, int z, World world)
    {
    addOreSpawn(ModBlocks.magicblock, world, random, x, z, 2, 8, 20, 0, 30);
    }
   
    public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos,int minVeinSize, int maxVeinSize, int chancesToSpawn, int minY, int maxY )
    {
        WorldGenMinable minable = new WorldGenMinable(block, (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), Blocks.stone);
        for(int i = 0; i < chancesToSpawn; i++)
        {
            int posX = blockXPos + random.nextInt(16);
            int posY = minY + random.nextInt(maxY - minY);
            int posZ = blockZPos + random.nextInt(16);
            minable.generate(world,random, new BlockPos(posX,posY,posZ));
        }
    }
}
[/Code]

Link to comment
Share on other sites

world.provider.DimensionId
[/Code]


needs to be [code]world.provider.getDimensionId() as mojang has made it protected

In WorldGenMinable you need to change block in

WorldGenMinable minable = new WorldGenMinable(block, (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), Blocks.stone);
[/Code]


[code]block.getDefaultState()

as it now only accepts an IBlockState

and that should fix up everything.

Hopefully

 

If I sound like a jerk it's because I'm tired

Link to comment
Share on other sites

world.provider.DimensionId

 

DimensionID Error fixed, thank you :)

 

block.getDefaultState()

 

Is that what you mean? Eclipse still marks it.

WorldGenMinable minable = new WorldGenMinable(block.getDefaultState(), (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), Blocks.stone);[/Code]

 

And what about Modblocks.magicblock? What do I have to type here?

Thank you :)

 

 

 

[Code]package de.unknwownassassin.powerapples;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.fml.common.IWorldGenerator;

class PowerApplesWorldGeneration implements IWorldGenerator
{

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

    private void GenerateOverworld(Random random, int x, int z, World world)
    {
    addOreSpawn(ModBlocks.magicblock, world, random, x, z, 2, 8, 20, 0, 30);
    }
   
    public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos,int minVeinSize, int maxVeinSize, int chancesToSpawn, int minY, int maxY )
    {
        WorldGenMinable minable = new WorldGenMinable(block.getDefaultState(), (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), Blocks.stone);
        for(int i = 0; i < chancesToSpawn; i++)
        {
            int posX = blockXPos + random.nextInt(16);
            int posY = minY + random.nextInt(maxY - minY);
            int posZ = blockZPos + random.nextInt(16);
            minable.generate(world,random, new BlockPos(posX,posY,posZ));
        }
    }
}[/Code]

 

[Code]package de.unknwownassassin.powerapples;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.fml.common.IWorldGenerator;

class PowerApplesWorldGeneration implements IWorldGenerator
{

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

    private void GenerateOverworld(Random random, int x, int z, World world)
    {
    addOreSpawn(ModBlocks.magicblock, world, random, x, z, 2, 8, 20, 0, 30);
    }
   
    public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos,int minVeinSize, int maxVeinSize, int chancesToSpawn, int minY, int maxY )
    {
        WorldGenMinable minable = new WorldGenMinable(block.getDefaultState(), (minVeinSize + random.nextInt(maxVeinSize - minVeinSize)), Blocks.stone);
        for(int i = 0; i < chancesToSpawn; i++)
        {
            int posX = blockXPos + random.nextInt(16);
            int posY = minY + random.nextInt(maxY - minY);
            int posZ = blockZPos + random.nextInt(16);
            minable.generate(world,random, new BlockPos(posX,posY,posZ));
        }
    }
}[/Code]

Link to comment
Share on other sites

Oh, ModBlocks Class :D, I have to create something? :D I watched the Tutorial again, he didn't say anything about a ModBlocks Class :o


package de.unknwownassassin.powerapples;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.Item;

public class BlockMagicBlock extends Block{

public BlockMagicBlock() {
super(Material.rock);
this.setHardness(3.2F);
this.setHarvestLevel("pickaxe", 2);
}
public int quantityDropped(Random random)
    {
        return 6;
    }
public Item getItemDropped(IBlockState state, Random rand, int fortune)
    {
        return PowerApplesMain.magicdust;
    }
}
[/Code]

 

[Code]package de.unknwownassassin.powerapples;

import de.unknwownassassin.powerapples.ItemDiamondApple;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = PowerApplesMain.MODID, version = PowerApplesMain.VERSION)
public class PowerApplesMain
{
    public static final String MODID = "powerapples";
    public static final String VERSION = "1.1 Alpha";
   
    public static Item diamondapple;
    public static Item obsidianapple;
    public static Item diamonddust;
    public static Item obsidiandust;
    public static Item magicdust;
   
    public static Block magicblock;
   
    public static CreativeTabs PowerApplesTab;
    public static CreativeTabs PowerApplesDustTab;
   
    @EventHandler
    public void preinit(FMLPreInitializationEvent event)
    {
    GameRegistry.registerWorldGenerator(new PowerApplesWorldGeneration(), 10);
   
    //PowerApplesTab
    PowerApplesTab = new CreativeTabs("PowerApplesTab")
    {
    @Override
    public Item getTabIconItem()
    {
    return diamondapple;
    }
    };
   
    PowerApplesDustTab = new CreativeTabs("PowerApplesDustTab")
    {
    @Override
    public Item getTabIconItem()
    {
    return diamonddust;
    }
    };
   
    //DiamondApple
    magicdust = new ItemMagicDust().setUnlocalizedName("MagicDust").setCreativeTab(PowerApplesDustTab);
    magicblock = new BlockMagicBlock().setUnlocalizedName("MagicBlock").setCreativeTab(PowerApplesDustTab);
    diamondapple = new ItemDiamondApple(0, false).setUnlocalizedName("DiamondApple").setCreativeTab(PowerApplesTab).setMaxStackSize(1);
    obsidianapple = new ItemObsidianApple(0, false).setUnlocalizedName("ObsidianApple").setCreativeTab(PowerApplesTab).setMaxStackSize(1);
    obsidiandust = new ItemObsidianDust().setUnlocalizedName("ObsidianDust").setCreativeTab(PowerApplesDustTab).setMaxStackSize(1);
    diamonddust = new ItemDiamondDust().setUnlocalizedName("DiamondDust").setCreativeTab(PowerApplesDustTab).setMaxStackSize(1);
    }
   
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    //Crafting Recipes
    GameRegistry.addRecipe(new ItemStack(diamonddust, 1), new Object[]
    {
    "ddd",
    "dmd",
    "ddd",
    Character.valueOf('d'), Items.diamond,
    Character.valueOf('m'), magicdust
    });
   
    GameRegistry.addRecipe(new ItemStack(obsidiandust, 1), new Object[]
    {
    "ooo",
    "omo",
    "ooo",
    Character.valueOf('o'), Blocks.obsidian,
    Character.valueOf('m'), magicdust
    });
   
    GameRegistry.addRecipe(new ItemStack(diamondapple, 1), new Object[]
    {
    "ddd",
    "dad",
    "ddd",
    Character.valueOf('d'), diamonddust,
    Character.valueOf('a'), Items.apple
    });
   
    GameRegistry.addRecipe(new ItemStack(obsidianapple, 1), new Object[]
    {
    "ooo",
    "oao",
    "ooo",
    Character.valueOf('o'), obsidiandust,
    Character.valueOf('a'), Items.apple
    });
   
   
    //Register Items
    GameRegistry.registerItem(magicdust, "MagicDust");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(magicdust, 0, new ModelResourceLocation("powerapples:magicdust", "inventory"));
   
    GameRegistry.registerItem(diamondapple, "DiamondApple");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(diamondapple, 0, new ModelResourceLocation("powerapples:diamondapple", "inventory"));
   
    GameRegistry.registerItem(obsidianapple, "ObsidianApple");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(obsidianapple, 0, new ModelResourceLocation("powerapples:obsidianapple", "inventory"));
   
    GameRegistry.registerItem(diamonddust, "DiamondDust");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(diamonddust, 0, new ModelResourceLocation("powerapples:diamonddust", "inventory"));
   
    GameRegistry.registerItem(obsidiandust, "ObsidianDust");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(obsidiandust, 0, new ModelResourceLocation("powerapples:obsidiandust", "inventory"));
   
    GameRegistry.registerBlock(magicblock, "MagicBlock");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(magicblock), 0, new ModelResourceLocation("powerapples:magicblock", "inventory"));
    }
    @EventHandler
    public void postinit(FMLPostInitializationEvent event)
    {
    }
}
[/Code]

Link to comment
Share on other sites

Minecraft Crash, but Eclipse doesn't  see an error

 

An error occured trying to load a proxy into {serverSide=de.unknownassassin.powerapples.DedicatedServerProxy, clientSide=de.unknownassassin.powerapples.CombinedClientProxy}.de.unknwownassassin.powerapples.PowerApplesMain
java.lang.ClassNotFoundException: de.unknownassassin.powerapples.CombinedClientProxy
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.11.jar:?]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_31]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_31]
at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58) ~[ModClassLoader.class:?]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_31]
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_31]
at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:60) [ProxyInjector.class:?]
at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:494) [FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) [guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) [LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) [LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) [guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:493) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:325) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) [start/:?]
at GradleStart.main(GradleStart.java:45) [start/:?]
Caused by: java.lang.NullPointerException
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.11.jar:?]
... 41 more
Feb 28, 2015 11:31:18 AM com.google.common.eventbus.EventBus$LoggingSubscriberExceptionHandler handleException
SCHWERWIEGEND: Could not dispatch event: FMLMod:powerapples{1.1 Alpha} to public void net.minecraftforge.fml.common.FMLModContainer.constructMod(net.minecraftforge.fml.common.event.FMLConstructionEvent)
java.lang.ClassNotFoundException: de.unknownassassin.powerapples.CombinedClientProxy
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:60)
at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:494)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:493)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:412)
at net.minecraft.client.Minecraft.run(Minecraft.java:325)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.NullPointerException
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
... 41 more

[11:31:18] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue
[11:31:18] [Client thread/ERROR] [FML]:
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{8.0.26.1299} [Forge Mod Loader] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed
Forge{11.14.0.1299} [Minecraft Forge] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed
powerapples{1.1 Alpha} [PowerApples] (bin) Unloaded->Errored
[11:31:18] [Client thread/ERROR] [FML]: The following problems were captured during this phase
[11:31:18] [Client thread/ERROR] [FML]: Caught exception from powerapples
net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: de.unknownassassin.powerapples.CombinedClientProxy
at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:77) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:494) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:493) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:325) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) [start/:?]
at GradleStart.main(GradleStart.java:45) [start/:?]
Caused by: java.lang.ClassNotFoundException: de.unknownassassin.powerapples.CombinedClientProxy
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.11.jar:?]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_31]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_31]
at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_31]
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_31]
at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:60) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
... 35 more
Caused by: java.lang.NullPointerException
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.11.jar:?]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_31]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_31]
at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_31]
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_31]
at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:60) ~[forgeSrc-1.8-11.14.0.1299.jar:?]
... 35 more
[11:31:18] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: ---- Minecraft Crash Report ----
// Shall we play a game?

Time: 28.02.15 11:31
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: de.unknownassassin.powerapples.CombinedClientProxy
at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:77)
at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:494)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:493)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:412)
at net.minecraft.client.Minecraft.run(Minecraft.java:325)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.ClassNotFoundException: de.unknownassassin.powerapples.CombinedClientProxy
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:60)
... 35 more
Caused by: java.lang.NullPointerException
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
... 41 more


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

-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 860907744 bytes (821 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.10 FML v8.0.26.1299 Minecraft Forge 11.14.0.1299 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{8.0.26.1299} [Forge Mod Loader] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed
Forge{11.14.0.1299} [Minecraft Forge] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed
powerapples{1.1 Alpha} [PowerApples] (bin) Unloaded->Errored
[11:31:18] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Marcel\Meine Dateien\PowerApples\eclipse\.\crash-reports\crash-2015-02-28_11.31.18-client.txt
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[/Code]

 

ClientProxy:

 

[Code]package de.unknwownassassin.powerapples.proxies;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class ClientProxy extends CommonProxy {

    @Override
    public void preInit(FMLPreInitializationEvent e) {
        super.preInit(e);
    }

    @Override
    public void init(FMLInitializationEvent e) {
        super.init(e);
    }

    @Override
    public void postInit(FMLPostInitializationEvent e) {
        super.postInit(e);
    }

}
[/Code]

 

Main:

 

[Code]
package de.unknwownassassin.powerapples;

import de.unknwownassassin.powerapples.blocks.BlockMagicBlock;
import de.unknwownassassin.powerapples.blocks.ModBlocks;
import de.unknwownassassin.powerapples.items.ItemDiamondApple;
import de.unknwownassassin.powerapples.items.ItemDiamondDust;
import de.unknwownassassin.powerapples.items.ItemMagicDust;
import de.unknwownassassin.powerapples.items.ItemObsidianApple;
import de.unknwownassassin.powerapples.items.ItemObsidianDust;
import de.unknwownassassin.powerapples.proxies.CommonProxy;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = PowerApplesMain.MODID, version = PowerApplesMain.VERSION)
public class PowerApplesMain
{
    public static final String MODID = "powerapples";
    public static final String VERSION = "1.1 Alpha";
   
    public static Item diamondapple;
    public static Item obsidianapple;
    public static Item diamonddust;
    public static Item obsidiandust;
    public static Item magicdust;
   
    public static Block magicblock;
   
    public static CreativeTabs PowerApplesTab;
    public static CreativeTabs PowerApplesDustTab;
   
    @SidedProxy(clientSide="de.unknownassassin.powerapples.CombinedClientProxy", serverSide="de.unknownassassin.powerapples.DedicatedServerProxy")
    public static CommonProxy proxy;
   
    @EventHandler
    public void preinit(FMLPreInitializationEvent event)
    {
    this.proxy.preInit(event);
   
    GameRegistry.registerWorldGenerator(new PowerApplesWorldGeneration(), 10);
   
    ModBlocks.createBlocks();
   
    //PowerApplesTab
    PowerApplesTab = new CreativeTabs("PowerApplesTab")
    {
    @Override
    public Item getTabIconItem()
    {
    return diamondapple;
    }
    };
   
    PowerApplesDustTab = new CreativeTabs("PowerApplesDustTab")
    {
    @Override
    public Item getTabIconItem()
    {
    return diamonddust;
    }
    };
   
    //DiamondApple
    magicdust = new ItemMagicDust().setUnlocalizedName("MagicDust").setCreativeTab(PowerApplesDustTab);
    magicblock = new BlockMagicBlock().setUnlocalizedName("MagicBlock").setCreativeTab(PowerApplesDustTab);
    diamondapple = new ItemDiamondApple(0, false).setUnlocalizedName("DiamondApple").setCreativeTab(PowerApplesTab).setMaxStackSize(1);
    obsidianapple = new ItemObsidianApple(0, false).setUnlocalizedName("ObsidianApple").setCreativeTab(PowerApplesTab).setMaxStackSize(1);
    obsidiandust = new ItemObsidianDust().setUnlocalizedName("ObsidianDust").setCreativeTab(PowerApplesDustTab).setMaxStackSize(1);
    diamonddust = new ItemDiamondDust().setUnlocalizedName("DiamondDust").setCreativeTab(PowerApplesDustTab).setMaxStackSize(1);
    }
   
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    this.proxy.init(event);
   
    //Crafting Recipes
    GameRegistry.addRecipe(new ItemStack(diamonddust, 1), new Object[]
    {
    "ddd",
    "dmd",
    "ddd",
    Character.valueOf('d'), Items.diamond,
    Character.valueOf('m'), magicdust
    });
   
    GameRegistry.addRecipe(new ItemStack(obsidiandust, 1), new Object[]
    {
    "ooo",
    "omo",
    "ooo",
    Character.valueOf('o'), Blocks.obsidian,
    Character.valueOf('m'), magicdust
    });
   
    GameRegistry.addRecipe(new ItemStack(diamondapple, 1), new Object[]
    {
    "ddd",
    "dad",
    "ddd",
    Character.valueOf('d'), diamonddust,
    Character.valueOf('a'), Items.apple
    });
   
    GameRegistry.addRecipe(new ItemStack(obsidianapple, 1), new Object[]
    {
    "ooo",
    "oao",
    "ooo",
    Character.valueOf('o'), obsidiandust,
    Character.valueOf('a'), Items.apple
    });
   
   
    //Register Items
    GameRegistry.registerItem(magicdust, "MagicDust");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(magicdust, 0, new ModelResourceLocation("powerapples:magicdust", "inventory"));
   
    GameRegistry.registerItem(diamondapple, "DiamondApple");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(diamondapple, 0, new ModelResourceLocation("powerapples:diamondapple", "inventory"));
   
    GameRegistry.registerItem(obsidianapple, "ObsidianApple");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(obsidianapple, 0, new ModelResourceLocation("powerapples:obsidianapple", "inventory"));
   
    GameRegistry.registerItem(diamonddust, "DiamondDust");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(diamonddust, 0, new ModelResourceLocation("powerapples:diamonddust", "inventory"));
   
    GameRegistry.registerItem(obsidiandust, "ObsidianDust");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(obsidiandust, 0, new ModelResourceLocation("powerapples:obsidiandust", "inventory"));
   
    GameRegistry.registerBlock(magicblock, "MagicBlock");
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(magicblock), 0, new ModelResourceLocation("powerapples:magicblock", "inventory"));
    }
    @EventHandler
    public void postinit(FMLPostInitializationEvent event)
    {
    this.proxy.postInit(event);
    }
}

[/Code]

 

ServerProxy:

 

The Same

 

CommonProxy:

 

[Code]package de.unknwownassassin.powerapples.proxies;

import de.unknwownassassin.powerapples.blocks.ModBlocks;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class CommonProxy {

    public void preInit(FMLPreInitializationEvent e) {
    }

    public void init(FMLInitializationEvent e)
    {
    ModBlocks.createBlocks();
    }

    public void postInit(FMLPostInitializationEvent e) {
    }
}[/Code]

Link to comment
Share on other sites

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
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.

 Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.