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

Posted

this is what my cod looks like:

package Eclipse7.RedDiamonds.common;

 

import Eclipse7.RedDiamonds.armor.RedDiamondArmor;

import Eclipse7.RedDiamonds.item.ItemRedDiamond;

import Eclipse7.RedDiamonds.item.ItemRedDiamondAxe;

import Eclipse7.RedDiamonds.item.ItemRedDiamondHoe;

import Eclipse7.RedDiamonds.item.ItemRedDiamondPickaxe;

import Eclipse7.RedDiamonds.item.ItemRedDiamondShovel;

import Eclipse7.RedDiamonds.item.ItemRedDiamondSword;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.item.EnumArmorMaterial;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.registry.GameRegistry;

import Eclipse7.RedDiamonds.block.*;

import net.minecraftforge.common.EnumHelper;

 

@Mod(modid = "RedDiamonds", name ="RedDiamonds", version = "0.1 Alpha")

 

public class RedDiamonds {

//EnumMaterials

public static EnumToolMaterial toolRedDiamond = EnumHelper.addToolMaterial("REDDIAMOND", 3, 2000, 12.0F, 4.0F, 30);

public static EnumArmorMaterial armorRedDiamond = EnumHelper.addArmorMaterial("REDDIAMOND", 40, new int [] {4, 8, 7, 4}, 30);

//Registrations

public static Item RedDiamondPickaxe = new ItemRedDiamondPickaxe(2000, toolRedDiamond).setUnlocalizedName("RedDiamondPickaxe");

public static Item RedDiamondSword = new ItemRedDiamondSword(2001, toolRedDiamond).setUnlocalizedName("RedDiamondSword");

public static Item RedDiamondShovel = new ItemRedDiamondShovel(2002, toolRedDiamond).setUnlocalizedName("RedDiamondShovel");

public static Item RedDiamondAxe = new ItemRedDiamondAxe(2003, toolRedDiamond).setUnlocalizedName("RedDiamondAxe");

public static Item RedDiamondHoe = new ItemRedDiamondHoe(2004, toolRedDiamond).setUnlocalizedName("RedDiamondHoe");

public static Block RedDiamondBlock = new BlockRedDiamondBlock(1000, Material.iron).setUnlocalizedName("RedDiamondBlock");

public static Item RedDiamond =new ItemRedDiamond(2005).setUnlocalizedName("RedDiamond");

public static Item RedDiamondHelmet = new RedDiamondArmor(2006, armorRedDiamond, 0, 0, "reddiamond").setUnlocalizedName("RedDiamondHelmet");

public static Item RedDiamondChestplate = new RedDiamondArmor(2007, armorRedDiamond, 0, 1, "reddiamond").setUnlocalizedName("RedDiamondChestplate");

public static Item RedDiamondLeggings = new RedDiamondArmor(2008, armorRedDiamond, 0, 2, "reddiamond").setUnlocalizedName("RedDiamondLeggings");

public static Item RedDiamondBoots = new RedDiamondArmor(2009, armorRedDiamond, 0, 3, "reddiamond").setUnlocalizedName("RedDiamondBoots");

 

 

 

 

 

LanguageRegistry.addName(RedDiamondBlock= ("RedDiamond Block");

 

GameRegistry.addRecipe(new ItemStack(RedDiamondPickaxe, 1) new Object [] {

"***", " X ", " X ", 'X', Item.stick, '*', RedDiamond

});

GameRegistry.addRecipe(new ItemStack(RedDiamondSword, 1), new Object [] {

" * ", " * ", " X ", '*', Item.stick, 'X', RedDiamond

};

GameRegistry.addRecipe(new ItemStack(RedDiamondShovel, 1), new Object [] {

" * ", " X ", " X ", 'X', Item.stick, '*', RedDiamond

});

GameRegistry.addRecipe = new ItemStack(RedDiamondAxe, 1, new Object [] {

"** ", "*X ", " X ", 'X', Item.stick, '*', RedDiamond

});

GameRegistry.addRecipe(new ItemStack(RedDiamondHoe, 1), new Object [] {

"** ", " X ", " X ", 'X', Item.stick, '*', RedDiamond

});

GameRegistry.addRecipe(new ItemStack (RedDiamondBlock), new Object [] {

"XXX", "XXX", "XXX", 'X', RedDiamond

})

GameRegistry.addRecipe(new ItemStack(RedDiamond), new Object [] {

"XXX", "X*X", "XXX", 'X', Item.redstone, '*', Item.diamond

});

GameRegistry.addRecipe(new ItemStack(RedDiamondChestplate), new Object [] {

"X X", "XXX", "XXX", 'X', RedDiamond

});

GameRegistry.addRecipe(new ItemStack(RedDiamondLeggings), new Object [] {

"XXX", "X X", "X X"

});

GameRegistry.addRecipe(new ItemStack(RedDiamondBoots), new Object [] {

"X X", "X X", 'X', RedDiamond

};

 

};

my errors:

[iNFO] [sTDOUT] java.lang.Error: Unresolved compilation problems:

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", delete this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "addRecipe", = expected after this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ")", AssignmentOperator expected after this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", = expected

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ",", invalid AssignmentOperator

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", = expected

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ")", delete this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "addRecipe", VariableDeclaratorId expected after this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", = expected

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ")", delete this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", = expected

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ")", delete this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "GameRegistry", delete this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", = expected

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ")", delete this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", = expected

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ")", delete this token

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token(s), misplaced construct(s)

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token "(", = expected

2013-08-18 20:28:08 [iNFO] [sTDOUT] Syntax error on token ",", invalid AssignmentOperator

 

 

Please use the spoiler tags....

 

 

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Your mod writed FULLY wrong. There are MEGATONS of errors. Just follow tutorials.

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

You can't just dump code into a class declaration; it has to be inside a method or part of a field assignment (core Java concept I guess you could say). Your mistakes are when you try to register the crafting recipes in the middle of your mod class. Try working through the tutorials like PlatonCraft said... Also might want to work on your Java

I like to make mods, just like you. Here's one worth checking out

<the more you know>

well you CAN run code staticly using this format

public class MyClass{
public static int member1;
public static float member2;
{
    member1 = 5;
    member2 = member1*2;
}

 

which is valid ... but yeah java syntax error shouldnt get to us

</the more you know>

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

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.