Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • 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

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.

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.