Posted February 3, 201411 yr For some reason eclipse is saying I need a "{" after my ";". I have no idea why and it is really annoying. My code: http://pastebin.com/80iWMz2S
February 3, 201411 yr Author If I do that it just creates more errors below and does not fix the original error.
February 3, 201411 yr Author If I do that it just creates more errors below Such as? @EventHandler public void preInit(FMLPreInitializationEvent event) { } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); // Ruby Tool Stacks ItemStack rubyStack = new ItemStack(rubyGem); ItemStack rubyStack2 = new ItemStack(rubyGem, 9); ItemStack stickStack = new ItemStack(Item.stick); ItemStack rubySwordStack = new ItemStack(rubySword); ItemStack rubyAxeStack = new ItemStack(rubyAxe); ItemStack rubyPickaxeStack = new ItemStack(rubyPickaxe); ItemStack rubySpadeStack = new ItemStack(rubySpade); ItemStack rubyHoeStack = new ItemStack(rubyHoe); ItemStack rubyBlockStack = new ItemStack(rubyBlock); // Ore Generation GameRegistry.registerWorldGenerator(oreManager); // Ruby Block GameRegistry.registerBlock(rubyBlock, "rubyBlock"); LanguageRegistry.addName(rubyBlock, "Ruby Block"); MinecraftForge.setBlockHarvestLevel(rubyBlock, "pickaxe", 1); // Ruby Ore GameRegistry.registerBlock(rubyOre, "rubyOre"); LanguageRegistry.addName(rubyOre, "Ruby Ore"); MinecraftForge.setBlockHarvestLevel(rubyOre, "pickaxe", 2); // Ruby Gem GameRegistry.registerItem(rubyGem, "rubyGem"); LanguageRegistry.addName(rubyGem, "Ruby"); // Ruby Tools GameRegistry.registerItem(rubySword, "rubySword"); LanguageRegistry.addName(rubySword, "Ruby Sword"); GameRegistry.registerItem(rubyAxe, "rubyAxe"); LanguageRegistry.addName(rubyAxe, "Ruby Axe"); GameRegistry.registerItem(rubyPickaxe, "rubyPickaxe"); LanguageRegistry.addName(rubyPickaxe, "Ruby Pickaxe"); GameRegistry.registerItem(rubySpade, "rubySpade"); LanguageRegistry.addName(rubySpade, "Ruby Spade"); GameRegistry.registerItem(rubyHoe, "rubyHoe"); LanguageRegistry.addName(rubyHoe, "Ruby Hoe"); // Ruby Recipes GameRegistry.addRecipe(rubyBlockStack, "yyy", "yyy", "yyy", 'y', rubyStack); GameRegistry.addShapelessRecipe(rubyStack2, rubyBlockStack); GameRegistry.addRecipe(rubySwordStack, " y ", " y ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyAxeStack, "yy ", "yx ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyPickaxeStack, "yyy", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubySpadeStack, " y ", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyHoeStack, "yy ", " x ", " x ", 'x', stickStack, 'y', rubyStack); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @EventHandler public void preInit(FMLPreInitializationEvent event) <-----Multiple markers at this line - Syntax error on token ")", ; expected - Syntax error on token "(", ; expected { } @EventHandler public void load(FMLInitializationEvent event) <------Multiple markers at this line - Syntax error on token ")", ; expected - Syntax error on token "(", ; expected { proxy.registerRenderers(); // Ruby Tool Stacks ItemStack rubyStack = new ItemStack(rubyGem); ItemStack rubyStack2 = new ItemStack(rubyGem, 9); ItemStack stickStack = new ItemStack(Item.stick); ItemStack rubySwordStack = new ItemStack(rubySword); ItemStack rubyAxeStack = new ItemStack(rubyAxe); ItemStack rubyPickaxeStack = new ItemStack(rubyPickaxe); ItemStack rubySpadeStack = new ItemStack(rubySpade); ItemStack rubyHoeStack = new ItemStack(rubyHoe); ItemStack rubyBlockStack = new ItemStack(rubyBlock); // Ore Generation GameRegistry.registerWorldGenerator(oreManager); // Ruby Block GameRegistry.registerBlock(rubyBlock, "rubyBlock"); LanguageRegistry.addName(rubyBlock, "Ruby Block"); MinecraftForge.setBlockHarvestLevel(rubyBlock, "pickaxe", 1); // Ruby Ore GameRegistry.registerBlock(rubyOre, "rubyOre"); LanguageRegistry.addName(rubyOre, "Ruby Ore"); MinecraftForge.setBlockHarvestLevel(rubyOre, "pickaxe", 2); // Ruby Gem GameRegistry.registerItem(rubyGem, "rubyGem"); LanguageRegistry.addName(rubyGem, "Ruby"); // Ruby Tools GameRegistry.registerItem(rubySword, "rubySword"); LanguageRegistry.addName(rubySword, "Ruby Sword"); GameRegistry.registerItem(rubyAxe, "rubyAxe"); LanguageRegistry.addName(rubyAxe, "Ruby Axe"); GameRegistry.registerItem(rubyPickaxe, "rubyPickaxe"); LanguageRegistry.addName(rubyPickaxe, "Ruby Pickaxe"); GameRegistry.registerItem(rubySpade, "rubySpade"); LanguageRegistry.addName(rubySpade, "Ruby Spade"); GameRegistry.registerItem(rubyHoe, "rubyHoe"); LanguageRegistry.addName(rubyHoe, "Ruby Hoe"); // Ruby Recipes GameRegistry.addRecipe(rubyBlockStack, "yyy", "yyy", "yyy", 'y', rubyStack); GameRegistry.addShapelessRecipe(rubyStack2, rubyBlockStack); GameRegistry.addRecipe(rubySwordStack, " y ", " y ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyAxeStack, "yy ", "yx ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyPickaxeStack, "yyy", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubySpadeStack, " y ", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyHoeStack, "yy ", " x ", " x ", 'x', stickStack, 'y', rubyStack); } @EventHandler public void postInit(FMLPostInitializationEvent event) <--- Multiple markers at this line - Syntax error on token ")", ; expected - Syntax error on token "(", ; expected { } } <------ Syntax error, insert "}" to complete ClassBody
February 3, 201411 yr Can't read the code you posted. It looks like you use same events twice, which isn't good. And you should register things at the FMLPreInitializationEvent.
February 3, 201411 yr @EventHandler public void preInit(FMLPreInitializationEvent event) <-----Multiple markers at this line - Syntax error on token ")", ; expected - Syntax error on token "(", ; expected { } needs to be this @EventHandler public void preInit(FMLPreInitializationEvent event){ } ------------------------------------------------------------------ @EventHandler public void load(FMLInitializationEvent event) <------Multiple markers at this line - Syntax error on token ")", ; expected - Syntax error on token "(", ; expected { proxy.registerRenderers(); // Ruby Tool Stacks ItemStack rubyStack = new ItemStack(rubyGem); ItemStack rubyStack2 = new ItemStack(rubyGem, 9); ItemStack stickStack = new ItemStack(Item.stick); ItemStack rubySwordStack = new ItemStack(rubySword); ItemStack rubyAxeStack = new ItemStack(rubyAxe); ItemStack rubyPickaxeStack = new ItemStack(rubyPickaxe); ItemStack rubySpadeStack = new ItemStack(rubySpade); ItemStack rubyHoeStack = new ItemStack(rubyHoe); ItemStack rubyBlockStack = new ItemStack(rubyBlock); // Ore Generation GameRegistry.registerWorldGenerator(oreManager); // Ruby Block GameRegistry.registerBlock(rubyBlock, "rubyBlock"); LanguageRegistry.addName(rubyBlock, "Ruby Block"); MinecraftForge.setBlockHarvestLevel(rubyBlock, "pickaxe", 1); // Ruby Ore GameRegistry.registerBlock(rubyOre, "rubyOre"); LanguageRegistry.addName(rubyOre, "Ruby Ore"); MinecraftForge.setBlockHarvestLevel(rubyOre, "pickaxe", 2); // Ruby Gem GameRegistry.registerItem(rubyGem, "rubyGem"); LanguageRegistry.addName(rubyGem, "Ruby"); // Ruby Tools GameRegistry.registerItem(rubySword, "rubySword"); LanguageRegistry.addName(rubySword, "Ruby Sword"); GameRegistry.registerItem(rubyAxe, "rubyAxe"); LanguageRegistry.addName(rubyAxe, "Ruby Axe"); GameRegistry.registerItem(rubyPickaxe, "rubyPickaxe"); LanguageRegistry.addName(rubyPickaxe, "Ruby Pickaxe"); GameRegistry.registerItem(rubySpade, "rubySpade"); LanguageRegistry.addName(rubySpade, "Ruby Spade"); GameRegistry.registerItem(rubyHoe, "rubyHoe"); LanguageRegistry.addName(rubyHoe, "Ruby Hoe"); // Ruby Recipes GameRegistry.addRecipe(rubyBlockStack, "yyy", "yyy", "yyy", 'y', rubyStack); GameRegistry.addShapelessRecipe(rubyStack2, rubyBlockStack); GameRegistry.addRecipe(rubySwordStack, " y ", " y ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyAxeStack, "yy ", "yx ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyPickaxeStack, "yyy", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubySpadeStack, " y ", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyHoeStack, "yy ", " x ", " x ", 'x', stickStack, 'y', rubyStack); } needs to be this @EventHandler public void load(FMLInitializationEvent event){ proxy.registerRenderers(); // Ruby Tool Stacks ItemStack rubyStack = new ItemStack(rubyGem); ItemStack rubyStack2 = new ItemStack(rubyGem, 9); ItemStack stickStack = new ItemStack(Item.stick); ItemStack rubySwordStack = new ItemStack(rubySword); ItemStack rubyAxeStack = new ItemStack(rubyAxe); ItemStack rubyPickaxeStack = new ItemStack(rubyPickaxe); ItemStack rubySpadeStack = new ItemStack(rubySpade); ItemStack rubyHoeStack = new ItemStack(rubyHoe); ItemStack rubyBlockStack = new ItemStack(rubyBlock); // Ore Generation GameRegistry.registerWorldGenerator(oreManager); // Ruby Block GameRegistry.registerBlock(rubyBlock, "rubyBlock"); LanguageRegistry.addName(rubyBlock, "Ruby Block"); MinecraftForge.setBlockHarvestLevel(rubyBlock, "pickaxe", 1); // Ruby Ore GameRegistry.registerBlock(rubyOre, "rubyOre"); LanguageRegistry.addName(rubyOre, "Ruby Ore"); MinecraftForge.setBlockHarvestLevel(rubyOre, "pickaxe", 2); // Ruby Gem GameRegistry.registerItem(rubyGem, "rubyGem"); LanguageRegistry.addName(rubyGem, "Ruby"); // Ruby Tools GameRegistry.registerItem(rubySword, "rubySword"); LanguageRegistry.addName(rubySword, "Ruby Sword"); GameRegistry.registerItem(rubyAxe, "rubyAxe"); LanguageRegistry.addName(rubyAxe, "Ruby Axe"); GameRegistry.registerItem(rubyPickaxe, "rubyPickaxe"); LanguageRegistry.addName(rubyPickaxe, "Ruby Pickaxe"); GameRegistry.registerItem(rubySpade, "rubySpade"); LanguageRegistry.addName(rubySpade, "Ruby Spade"); GameRegistry.registerItem(rubyHoe, "rubyHoe"); LanguageRegistry.addName(rubyHoe, "Ruby Hoe"); // Ruby Recipes GameRegistry.addRecipe(rubyBlockStack, "yyy", "yyy", "yyy", 'y', rubyStack); GameRegistry.addShapelessRecipe(rubyStack2, rubyBlockStack); GameRegistry.addRecipe(rubySwordStack, " y ", " y ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyAxeStack, "yy ", "yx ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyPickaxeStack, "yyy", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubySpadeStack, " y ", " x ", " x ", 'x', stickStack, 'y', rubyStack); GameRegistry.addRecipe(rubyHoeStack, "yy ", " x ", " x ", 'x', stickStack, 'y', rubyStack); } Please learn some java because this is bad written java code and Minecraft forge is not a java tutorial place
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.