Gradle issue, can you help me pls?

Started by MrTinigan on Sun, 06/03/2018 - 12:36

Topic category: Bugs and solutions

Last seen on 16:39, 5. Jun 2018
Joined Sep 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Gradle issue, can you help me pls?
Sun, 06/03/2018 - 12:36

well i tryed to save & rebuild an item and it send me that:

 

C:\Users\Alexandre\Desktop\Nouveau dossier (2)\MyMod\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_dragonBall.java:84: error: illegal start of expression
           import net.minecraft.client.resources.I18n; {
           ^
C:\Users\Alexandre\Desktop\Nouveau dossier (2)\MyMod\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_dragonBall.java:84: error: not a statement
           import net.minecraft.client.resources.I18n; {
                                                ^
2 errors

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 16:39, 5. Jun 2018
Joined Sep 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
well missed to say, mcreator…
Sun, 06/03/2018 - 12:41

well missed to say, mcreator ver is 1.7.3 (1.7.10) & the code is:

 

package mod.mcreator;

import net.minecraft.world.World;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.block.Block;

import java.util.Random;
import java.util.List;

import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

@SuppressWarnings("unchecked")
public class mcreator_dragonBall {

    public mcreator_dragonBall() {
    }

    public static Item block;
    public static Object instance;

    public void load() {
    }

    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 {
        block = (new ItemdragonBall(423));
        Item.itemRegistry.addObject(423, "DragonBall", block);

    }

    static class ItemdragonBall extends Item {

        public ItemdragonBall(int par1) {
            setMaxDamage(0);
            maxStackSize = 7;
            setUnlocalizedName("DragonBall");
            setTextureName("DBEarth");
            setCreativeTab(mcreator_dragonBlockUtilityTab.tab);
        }

        public int getItemEnchantability() {
            return 0;
        }

        public int getMaxItemUseDuration(ItemStack par1ItemStack) {
            return 0;
        }

        public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) {
            return 1.0F;
        }

        public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
            list.add("\u00a7aEarth DragonBall");
            list.add("\u00a7cUse at /warp CustomDragon ");
            list.add("\u00a7eMade By MrTinigan");
            list.add("\u00a75For DbFusions");

          par1ItemStack.setStackDisplayName(new TextComponentString(I18n.format(this.getUnlocalizedName()) + "Earth DragonBall").getChatStyle().setColor(TextFormatting.GREEN));  {                 
         
        }          
                    
           import net.minecraft.client.resources.I18n; {

          }
               
           }
    }
}
 

Last seen on 02:38, 21. Feb 2020
Joined Oct 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
remove this toward the…
Tue, 06/26/2018 - 23:46

remove this toward the bottom:
 

import net.minecraft.client.resources.I18n;