So I have this mod down to 2 errors, I am trying to add Emeralds to the game, and make Emerald Ingots, Blocks Armor, tools, etc. I have made emeralds spawn in a separate file, but it gives me these errors, I have been referencing an existing mod to make this, said mod works.
src\minecraft\net\minecraft\src\EmeraldMaterial.java:8: classes cannot directly
extend java.lang.Enum
public final class EmeraldMaterial extends Enum
^
src\minecraft\net\minecraft\src\EmeraldMaterial.java:24: cannot find symbol
symbol : constructor Enum(java.lang.String,int,java.lang.String,int)
location: class java.lang.Enum
super(s, i);
^
2 errors
==================
> Done in 48.50 seconds
> Recompiling server...
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
public final class EmeraldMaterial extends Enum
{
public static EmeraldMaterial[] values()
{
return (EmeraldMaterial[])$VALUES.clone();
}
public static EmeraldMaterial valueOf(String s)
{
return (EmeraldMaterial)Enum.valueOf(net.minecraft.src.EmeraldMaterial.class, s);
}
private EmeraldMaterial(String s, int i, String s1, int j, int k, int l, float f,
int i1)
{
super(s, i);
harvestLevel = k;
maxUses = l;
efficiencyOnProperMaterial = f;
damageVsEntity = i1;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
public static final EmeraldMaterial GEMERALD;
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
private static final EmeraldMaterial $VALUES[]; /* synthetic field */
static
{
GEMERALD = new EmeraldMaterial("GEMERALD", 0, "GEMERALD", 10, 4, 2500, 12F, 4);
$VALUES = (new EmeraldMaterial[] {
GEMERALD
});
}
}
And that is the code. Any help will be appreciated.
Good point, I'll be sure to change that, and now I have these errors :sad.gif:
I have made a few simple mods, new recipes, items, blocks, so I am not a complete idiot..
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:3: class EmeraldOre is publ
ic, should be declared in a file named EmeraldOre.java
public class EmeraldOre extends Block
^
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:5: missing method body, or
declare abstract
protected EmeraldOre(int i, int j);
^
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:7: call to super must be fi
rst statement in constructor
super(i, j, Material.rock);
^
3 errors
Code again:
package net.minecraft.src;
public class EmeraldOre extends Block
{
protected EmeraldOre(int i, int j);
{
super(i, j, Material.rock);
}
}
So I am trying to create a new ore with Modloader, I can't figure out how to resolve this last error, here is the error message: == MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:5: invalid method declarati
on; return type required
protected EmeraldOre(int i, int j)
^
1 error
And here is the code: package net.minecraft.src;
public class mod_OurMods extends Block
{
protected EmeraldOre(int i, int j)
{
super(i, j, Material.rock);
}
}
There is another file named, mod_OurMods, which has the ore generation and stuff in it.
Everytime I try to make a mod with modloader I get errors. I have followed multiple tutorials on this site, but they all wind up with errors, anyone have any answers to why this always happens? I have made a few mods, without modloader, successfully.
I have made a few simple mods, like new items and new recipes before, those work, and now I have been working through this tutorial, everything was working fine until I got to making things with Mod Loader, I have no idea what I have done wrong, but here are the errors I got:
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_SuperBlock.java:3: class mod_OurMods is publ
ic, should be declared in a file named mod_OurMods.java
public class mod_OurMods extends BaseMod //Note It extends basemod (part of mod
loader) not block
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:3: cannot find symbol
symbol: class BaseMod
public class mod_OurMods extends BaseMod //Note It extends basemod (part of mod
loader) not block
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:9: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
SuperBlock = (new Block(100, ModLoader.addOverride("/terrain.png", "/Hippa/Super
Block.png"), Material.rock)).setHardness(1.5F).setLightValue(1.0F).setStepSound(
Block.soundGravelFootstep).setBlockName("SuperBlock");
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:14: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
ModLoader.AddName(SuperBlock, "Super Block"); //This is setting the ingame hove
r name.
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:16: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
ModLoader.RegisterBlock(SuperBlock); //Don't question, just do
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:18: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
ModLoader.AddRecipe(new ItemStack(SuperBlock, 1), new Object[] {
^
6 errors
==================
> Done in 43.94 seconds
> Recompiling server...
> Done in 57.77 seconds
Press any key to continue . . .
I am trying to make a new armor, but having issues, the game allows it to be put into the armor slot, but doesn't put anything onto the character, can someone tell me the file name that allows armor to be put onto the character?
0
0
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\EmeraldMaterial.java:8: classes cannot directly
extend java.lang.Enum
public final class EmeraldMaterial extends Enum
^
src\minecraft\net\minecraft\src\EmeraldMaterial.java:24: cannot find symbol
symbol : constructor Enum(java.lang.String,int,java.lang.String,int)
location: class java.lang.Enum
super(s, i);
^
2 errors
==================
> Done in 48.50 seconds
> Recompiling server...
And that is the code. Any help will be appreciated.
0
0
I wish that making brick blocks didn't take so long.
0
0
I have made a few simple mods, new recipes, items, blocks, so I am not a complete idiot..
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:3: class EmeraldOre is publ
ic, should be declared in a file named EmeraldOre.java
public class EmeraldOre extends Block
^
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:5: missing method body, or
declare abstract
protected EmeraldOre(int i, int j);
^
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:7: call to super must be fi
rst statement in constructor
super(i, j, Material.rock);
^
3 errors
Code again:
0
Rules: No double posting
That's about it, I'll Start it off:
Once
0
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BlockEmeraldOre.java:5: invalid method declarati
on; return type required
protected EmeraldOre(int i, int j)
^
1 error
And here is the code: package net.minecraft.src;
public class mod_OurMods extends Block
{
protected EmeraldOre(int i, int j)
{
super(i, j, Material.rock);
}
}
There is another file named, mod_OurMods, which has the ore generation and stuff in it.
0
0
0
0
0
0
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_SuperBlock.java:3: class mod_OurMods is publ
ic, should be declared in a file named mod_OurMods.java
public class mod_OurMods extends BaseMod //Note It extends basemod (part of mod
loader) not block
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:3: cannot find symbol
symbol: class BaseMod
public class mod_OurMods extends BaseMod //Note It extends basemod (part of mod
loader) not block
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:9: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
SuperBlock = (new Block(100, ModLoader.addOverride("/terrain.png", "/Hippa/Super
Block.png"), Material.rock)).setHardness(1.5F).setLightValue(1.0F).setStepSound(
Block.soundGravelFootstep).setBlockName("SuperBlock");
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:14: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
ModLoader.AddName(SuperBlock, "Super Block"); //This is setting the ingame hove
r name.
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:16: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
ModLoader.RegisterBlock(SuperBlock); //Don't question, just do
^
src\minecraft\net\minecraft\src\mod_SuperBlock.java:18: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_OurMods
ModLoader.AddRecipe(new ItemStack(SuperBlock, 1), new Object[] {
^
6 errors
==================
> Done in 43.94 seconds
> Recompiling server...
> Done in 57.77 seconds
Press any key to continue . . .
0