ZidMC
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Official ModLoader Tutorials: Creating a new Block and Item

Go down

Official ModLoader Tutorials: Creating a new Block and Item Empty Official ModLoader Tutorials: Creating a new Block and Item

Post by skindog163 Sun Oct 02, 2011 11:51 pm

I am having some trouble creating an Item and Block with ModLoader. I am using the Official ModLoader Tutorials; Creating a New Block* and Creating a New Item*. I have run into a bit of trouble, and need some help. Originally, I used your tutorial, and changed a lot of the names in the code. When this didn't work, I simply copied and pasted the code, only making very minor changes, which I do not believe has anything to do with the following errors. I am using terminal on the mac, and when I try to compile the java files into class files, I receive the following errors:

ItemEmerald.java:
:desktop user$ javac ItemEmerald.java
ItemEmerald.java:3: cannot find symbol
symbol: class Item
public class ItemEmerald extends Item {
^
ItemEmerald.java:8: cannot find symbol
symbol : variable maxStackSize
location: class net.minecraft.src.ItemEmerald
maxStackSize = (64);
^
2 errors

BlockEmeraldOre.java:
:desktop user$ javac BlockEmeraldOre.java
BlockEmeraldOre.java:5: cannot find symbol
symbol: class Block
public class BlockEmeraldOre extends Block
^
BlockEmeraldOre.java:10: cannot find symbol
symbol : variable Material
location: class net.minecraft.src.BlockEmeraldOre
super(i, j, Material.iron);
^
BlockEmeraldOre.java:15: package mod_Moreitems does not exist
return mod_Moreitems.emeraldItem.shiftedIndex;
^
3 errors

mod_Moreitems.java:
:desktop user$ javac mod_Moreitems.java
mod_Moreitems.java:20: illegal start of expression
public String Version()
^
mod_Moreitems.java:20: ';' expected
public String Version()
^
2 errors

Most of the errors are just saying that it 'cannot find symbol', so is there anyway around that? Can someone direct me on what I should do, as I am very eager to get minecraft modding!
Any help is greatly appriciated, and thanks in advance. Smile

PS.
I think that the problem could have something to do with the mac? I normally use windows, but since command prompt doesn't have the javac and java commands (I only really care about javac for now), I am stuck with terminal for mac. I have tried to install jdk on my windows computer, however once I do, nothing happens. If someone could direct me what to do with jdk, so I can use javac and java on my windows computer that would be great. Even if compiling the java files on the mac isn't the problem, it would still be better to be able to compile the files on my windows computer.

*
As I am a new member, I am not allowed to post external links, so I'll put them here:
Creating a new Block: https://zidmc.forumotion.com/t8-beginner-creating-a-new-block-22-4-11-14_01-211
Creating a new Item: https://zidmc.forumotion.com/t9-beginner-creating-a-new-item-22-4-11-14_01-211


skindog163
Recruit

Posts : 1
Join date : 2011-10-02

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum