Basic bootstrap/java error with Mcreator 1.7.5

Started by jovier on

Topic category: Help with MCreator software

Last seen on 09:09, 1. Sep 2017
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Basic bootstrap/java error with Mcreator 1.7.5

Dear all,

I am trying to make a mod with Mcreator 1.7.5, and I decided to start doing only a one block mod. My problem is that when I try to compile, I always get next error. I am starting to think I have some Java setting error, but really I do not know if so or not. It seems to be a very basic problem, can anyone help me? 

Kind regards,

 

warning: [options] bootstrap class path not set in conjunction with -source 1.6 C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\modprueba.java:39: error: cannot find symbol mcreator_blockpapa mcreator_0 = new mcreator_blockpapa(); ^   symbol:   class mcreator_blockpapa   location: class modprueba C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\modprueba.java:39: error: cannot find symbol mcreator_blockpapa mcreator_0 = new mcreator_blockpapa();                                    ^   symbol:   class mcreator_blockpapa   location: class modprueba 2 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.
Last seen on 13:12, 12. Mar 2018
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I would not worry about the
Wed, 08/09/2017 - 14:32

I would not worry about the boot strap warning. It is just because it is a cross version compilation. Usually means you just want to test a little more. I might be able to help but would need to see the whole java statement.

Last seen on 09:09, 1. Sep 2017
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dear Gandy,
Thu, 08/10/2017 - 08:11

Dear Gandy,

Thanks for your help, I feel quite now with your comment about cross version compilation.

About Java statement, I erased that block and created a new one, but result is the same, so I copy again error and then code (but I have not changed anything, I only has tried to compile what Mcreator does after finishing block edition).

It seems to not recognize the created block.

--> compilator output:

warning: [options] bootstrap class path not set in conjunction with -source 1.6 C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\modprueba1.java:39: error: cannot find symbol mcreator_blockj1 mcreator_0 = new mcreator_blockj1(); ^   symbol:   class mcreator_blockj1   location: class modprueba1 C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\modprueba1.java:39: error: cannot find symbol mcreator_blockj1 mcreator_0 = new mcreator_blockj1();                                  ^   symbol:   class mcreator_blockj1   location: class modprueba1 2 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.

_________________________________--> whole code on modprueba1.java:

package mod.mcreator;   import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.IGuiHandler; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.IWorldGenerator; import net.minecraftforge.fml.common.IFuelHandler; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.client.model.obj.OBJLoader;   import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.World; import net.minecraft.item.ItemStack; import net.minecraft.entity.player.EntityPlayer;   import java.util.Random;   @Mod(modid = modprueba1.MODID, version = modprueba1.VERSION) public class modprueba1 implements IFuelHandler, IWorldGenerator {   public static final String MODID = "modprueba1"; public static final String VERSION = "1.0.0";   @SidedProxy(clientSide = "mod.mcreator.ClientProxymodprueba1", serverSide = "mod.mcreator.CommonProxymodprueba1") public static CommonProxymodprueba1 proxy;   @Instance(MODID) public static modprueba1 instance;   mcreator_blockj1 mcreator_0 = new mcreator_blockj1();   @Override public int getBurnTime(ItemStack fuel) { if (mcreator_0.addFuel(fuel) != 0) return mcreator_0.addFuel(fuel); return 0; }   @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {   chunkX = chunkX * 16; chunkZ = chunkZ * 16; if (world.provider.getDimension() == -1) mcreator_0.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_0.generateSurface(world, random, chunkX, chunkZ);   }   @EventHandler public void load(FMLInitializationEvent event) {   GameRegistry.registerFuelHandler(this); GameRegistry.registerWorldGenerator(this, 1); if (event.getSide() == Side.CLIENT) { OBJLoader.INSTANCE.addDomain("modprueba1"); } MinecraftForge.EVENT_BUS.register(new mcreator_GlobalEventsmodprueba1()); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); mcreator_0.load(event); proxy.registerRenderers(this);   }   @EventHandler public void serverLoad(FMLServerStartingEvent event) { mcreator_0.serverLoad(event); }   @EventHandler public void preInit(FMLPreInitializationEvent event) { mcreator_0.instance = this.instance; mcreator_0.preInit(event);   }   public static class GuiHandler implements IGuiHandler { @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { return null; }   @Override public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { return null; } }   }

 

Last seen on 09:09, 1. Sep 2017
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dear all,
Fri, 08/11/2017 - 08:58

Dear all,

After checking forums and web, I have seen that the root problem seems to be the error 'error: cannot find symbol', it commonsly occurs to some people for some reason.

I have tried next: 

1. Create a new block in the same workspace. I do not know if it is important but check that name you give at first creation window at box 'Name of element' must then fit 'Name in GUI' (you will see in following windows'. Note that first letter at 'Name of element' always changes automatically to case, i.e. use exactly same names 'Bloque2' for both fields 'Name of element' and 'Name in GUI'. If you fail first time, maybe then is difficult to propagate change, and blocks never compile (maybe if you restart app or something similar - I have not tested).

2. Export the mod. Now I see that first block I made still fails, I erase it, but second one following notes on point 1, does not fails and I get my first mod .jar file.

Now I need my boss (son, ;-)) permissions for installing it.

Hope it helps.