[Help] I know where the error is... but i cannot spot it

Started by oblisgr on Tue, 11/29/2016 - 18:53

Topic category: Help with MCreator modding

Last seen on 14:42, 5. Jan 2017
Joined Mar 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
[Help] I know where the error is... but i cannot spot it
Tue, 11/29/2016 - 18:54 (edited)

Can you help me spot my error? 

Thanks i advance.

I get:

warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Pylo\MCreator171\forge\build\sources\main\java\mod\mcreator\mcreator_schematics.java:56: error: cannot find symbol
Battleaxe001Schematic = (new ItemBattleaxe001SchematicItem(444));
                             ^
  symbol:   class ItemBattleaxe001SchematicItem
  location: class mcreator_schematics
C:\Pylo\MCreator171\forge\build\sources\main\java\mod\mcreator\mcreator_schematics.java:57: error: cannot find symbol
Battleaxe002Schematic = (new ItemBattleaxe002SchematicItem(445));
                             ^
  symbol:   class ItemBattleaxe002SchematicItem
  location: class mcreator_schematics
C:\Pylo\MCreator171\forge\build\sources\main\java\mod\mcreator\mcreator_schematics.java:58: error: cannot find symbol
Battleaxe003Schematic = (new ItemBattleaxe003SchematicItem(446));
                             ^
  symbol:   class ItemBattleaxe003SchematicItem
  location: class mcreator_schematics
Note: C:\Pylo\MCreator171\forge\build\sources\main\java\mod\mcreator\mcreator_schematics.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
1 warning

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraft.world.World;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.Minecraft;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.Block;

import java.util.Random;

@SuppressWarnings("unchecked")
public class mcreator_schematics {

public mcreator_schematics() {}

public static Item Battleaxe001Schematic;
public static Item Battleaxe002Schematic;
public static Item Battleaxe003Schematic;
public static Item Battleaxe004Schematic;
public static Item Battleaxe005Schematic;
public static Item Battleaxe006Schematic;
public static Item Battleaxe007Schematic;
public static Item Battleaxe008Schematic;
public static Item Battleaxe009Schematic;
public static Item Battleaxe010Schematic;
public static Item Battleaxe011Schematic;
public static Item Battleaxe012Schematic;

public static Object instance;

public void load(FMLInitializationEvent event) {
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe001Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe001_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe002Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe002_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe003Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe003_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe004Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe004_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe005Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe005_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe006Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe006_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe007Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe007_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe008Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe008_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe009Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe009_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe010Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe010_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe011Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe011_Schematic", "inventory"));
if (event.getSide() == Side.CLIENT)Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Battleaxe012Schematic, 0, new ModelResourceLocation("Schematics:0blisgr_Battleaxe012_Schematic", "inventory"));
}

static {
Battleaxe001Schematic = (new ItemBattleaxe001SchematicItem(444));
Battleaxe002Schematic = (new ItemBattleaxe002SchematicItem(445));
Battleaxe003Schematic = (new ItemBattleaxe003SchematicItem(446));
Battleaxe004Schematic = (new ItemBattleaxe004SchematicItem(447));
Battleaxe005Schematic = (new ItemBattleaxe005SchematicItem(448));
Battleaxe006Schematic = (new ItemBattleaxe006SchematicItem(449));
Battleaxe007Schematic = (new ItemBattleaxe007SchematicItem(410));
Battleaxe008Schematic = (new ItemBattleaxe008SchematicItem(411));
Battleaxe009Schematic = (new ItemBattleaxe009SchematicItem(412));
Battleaxe010Schematic = (new ItemBattleaxe010SchematicItem(413));
Battleaxe011Schematic = (new ItemBattleaxe011SchematicItem(414));
Battleaxe012Schematic = (new ItemBattleaxe012SchematicItem(415));
}

public void generateNether(World world, Random random, int chunkX, int chunkZ) {}
public void generateSurface(World world, Random random, int chunkX, int chunkZ) {}
public int addFuel(ItemStack fuel) {return 0;}
public void serverLoad(FMLServerStartingEvent event) {}
public void preInit(FMLPreInitializationEvent event) {}
public void registerRenderers() {}

static class Itembattleaxe009SchematicItem extends Item {
public Itembattleaxe009SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe001_Schematic");GameRegistry.registerItem(this, "Battleaxe001SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class Itembattleaxe002SchematicItem extends Item {
public Itembattleaxe002SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe002_Schematic");GameRegistry.registerItem(this, "Battleaxe002SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class Itembattleaxe003SchematicItem extends Item {
public Itembattleaxe003SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe003_Schematic");GameRegistry.registerItem(this, "Battleaxe003SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe004SchematicItem extends Item {
public ItemBattleaxe004SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe004_Schematic");GameRegistry.registerItem(this, "Battleaxe004SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe005SchematicItem extends Item {
public ItemBattleaxe005SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe005_Schematic");GameRegistry.registerItem(this, "Battleaxe005SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe006SchematicItem extends Item {
public ItemBattleaxe006SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe006_Schematic");GameRegistry.registerItem(this, "Battleaxe006SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe007SchematicItem extends Item {
public ItemBattleaxe007SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe007_Schematic");GameRegistry.registerItem(this, "Battleaxe007SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe008SchematicItem extends Item {
public ItemBattleaxe008SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe008_Schematic");GameRegistry.registerItem(this, "Battleaxe008SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe009SchematicItem extends Item {
public ItemBattleaxe009SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe009_Schematic");GameRegistry.registerItem(this, "Battleaxe009SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe010SchematicItem extends Item {
public ItemBattleaxe010SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe010_Schematic");GameRegistry.registerItem(this, "Battleaxe010SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe011SchematicItem extends Item {
public ItemBattleaxe011SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe011_Schematic");GameRegistry.registerItem(this, "Battleaxe011SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

static class ItemBattleaxe012SchematicItem extends Item {
public ItemBattleaxe012SchematicItem(int par1) {setMaxDamage(0);maxStackSize = 1;
setUnlocalizedName("Battleaxe012_Schematic");GameRegistry.registerItem(this, "Battleaxe012SchematicItem");
setCreativeTab(CreativeTabs.MISC);
}
@Override
public int getItemEnchantability() {return 0;}
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {return 0;}
@Override
public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {return 1.0F;}
}

}

Edited by oblisgr on Tue, 11/29/2016 - 18:54
Last seen on 10:51, 12. Mar 2017
Joined Sep 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Phew... I'm at least not the
Tue, 11/29/2016 - 19:15

Phew... I'm at least not the only one. This probably has to do with MCreator not registering blocks and such properly in the 'Code' menu of the program (where it has to compile the mod from). I got it a few times aswell and at some point I had to reinstall the program to fix it (since it has gotten that worse), but most of the times restarting your pc or MCreator will fix this when you make some edits, e.g. changing some of the values (that you've gotten wrong when creating it, for example) or textures (with a more detailed one) or even changing nothing (a so-called 'null' or 'dummy' edit).
 

Have you reported it as bug yet? Otherwise I could do it aswell, if you don't mind. :)