the public static final for the item declaration in mod_ class doesnt work eclipse makes me get rid of the public static in public static final. what do i do??
If I want to make a mob with the shape of a pig, can I just use the vanilla pig's model and render file? And if so, where could I make him wear an iron helmet
Yes, you could do that. But making it wear an iron helmet, you would need to use your own model, and possibly render classes.
Uhmm, this looks like a good tutorial because I just started today. I decompiled the jars succesfully. And I wanted to download Eclipse because you said its recommended. I have one question though, in here http://www.eclipse.org/downloads/. It has lots of dowloads, which should I pick, Eclipse IDE for Java EE Developers, or Eclipse IDE for Java Developers? I surely don't want to be downloading the wrong thing. Thank you in advanced.
Some people use the one for Java EE Developers. I just use Eclipse for Java Developers and it works fine. I suggest using it over the EE version.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I managed to solve my problem. It wasn't MCPather at all, it was the way I compressed the files XD
But now I have another problem. In this mod I'm making, I wan't at least 6 NPCs. The first one works fine. Spawns, spawns in the right place, that kind of stuff. But when I added in the second one, I got a whopping 41 or so errors!
mod_PocketGodIslander.java
package net.minecraft.src;
import java.util.Map;
public class mod_PocketGodIslanders extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityOoga.class, "Ooga", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityOoga.class, 5, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.desert
});
}
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.desert
});
}
public void addRenderer(Map map)
{
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntityOoga.java
package net.minecraft.src;
import java.util.Random;
public class EntityOoga extends EntityCreature
{
public EntityOoga(World world)
{
super(world);
texture = "/mobs/Ooga.png";
moveSpeed = 0.5F;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
int GiftNum = rand.nextInt(3);
int Gift = 0;
if(GiftNum==1)
{Gift = Item.bone.shiftedIndex;}
else if(GiftNum==2)
{Gift = Item.porkRaw.shiftedIndex;}
else {Gift = Item.porkRaw.shiftedIndex;}
return Gift;
}
protected boolean canDespawn()
{
return false;
}
}
EntityKlik.java
package net.minecraft.src;
import java.util.Random;
public class EntityKlik extends EntityCreature
{
public EntityKlik(World world)
{
super(world);
texture = "/mobs/Klik.png";
moveSpeed = 0.5F;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
int GiftNum = rand.nextInt(2);
int Gift = 0;
if(GiftNum==1)
{Gift = Item.stick.shiftedIndex;}
if(GiftNum==2)
{Gift = Item.porkRaw.shiftedIndex;}
return Gift;
}
protected boolean canDespawn()
{
return false;
}
}
And the errors while recompiling :/
== MCP 6.1 (data: 6.1, client: 1.2.4, server: 1.2.4) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: illegal s
tart of type
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: ';' expec
ted
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: illegal s
tart of type
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: ';' expec
ted
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: <identifi
er> expected
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: <identifi
er> expected
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: ')' expec
ted
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:20: error: not a sta
tement
BiomeGenBase.ocean,
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:20: error: ';' expec
ted
BiomeGenBase.ocean,
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:21: error: not a sta
tement
BiomeGenBase.desert
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:21: error: ';' expec
ted
BiomeGenBase.desert
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:22: error: illegal s
tart of type
});
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:25: error: class, in
terface, or enum expected
public void addRenderer(Map map)
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: <identifi
er> expected
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: ')' expec
ted
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: ';' expec
ted
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: <identifi
er> expected
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: ';' expec
ted
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: <identifi
er> expected
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: <identifi
er> expected
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: <identifi
er> expected
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: illegal s
tart of type
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: ')' expec
ted
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: ';' expec
ted
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: illegal s
tart of type
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: ';' expec
ted
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:32: error: class, in
terface, or enum expected
public String getVersion()
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:35: error: class, in
terface, or enum expected
}
^
41 errors
==================
== Recompiling server ==
> Cleaning bin
> Recompiling
- Done in 4.88 seconds
Press any key to continue . . .
I'm stuck :/
Edit: BTW, I know my MCP says it's 1.2.4. I don't know why but all the mods seem to run fine (apart from this one )
I managed to solve my problem. It wasn't MCPather at all, it was the way I compressed the files XD
But now I have another problem. In this mod I'm making, I wan't at least 6 NPCs. The first one works fine. Spawns, spawns in the right place, that kind of stuff. But when I added in the second one, I got a whopping 41 or so errors!
mod_PocketGodIslander.java
package net.minecraft.src;
import java.util.Map;
public class mod_PocketGodIslanders extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityOoga.class, "Ooga", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityOoga.class, 5, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.desert
});
}
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.desert
});
}
public void addRenderer(Map map)
{
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntityOoga.java
package net.minecraft.src;
import java.util.Random;
public class EntityOoga extends EntityCreature
{
public EntityOoga(World world)
{
super(world);
texture = "/mobs/Ooga.png";
moveSpeed = 0.5F;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
int GiftNum = rand.nextInt(3);
int Gift = 0;
if(GiftNum==1)
{Gift = Item.bone.shiftedIndex;}
else if(GiftNum==2)
{Gift = Item.porkRaw.shiftedIndex;}
else {Gift = Item.porkRaw.shiftedIndex;}
return Gift;
}
protected boolean canDespawn()
{
return false;
}
}
EntityKlik.java
package net.minecraft.src;
import java.util.Random;
public class EntityKlik extends EntityCreature
{
public EntityKlik(World world)
{
super(world);
texture = "/mobs/Klik.png";
moveSpeed = 0.5F;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
int GiftNum = rand.nextInt(2);
int Gift = 0;
if(GiftNum==1)
{Gift = Item.stick.shiftedIndex;}
if(GiftNum==2)
{Gift = Item.porkRaw.shiftedIndex;}
return Gift;
}
protected boolean canDespawn()
{
return false;
}
}
And the errors while recompiling :/
== MCP 6.1 (data: 6.1, client: 1.2.4, server: 1.2.4) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: illegal s
tart of type
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: ';' expec
ted
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: illegal s
tart of type
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: <identifi
er> expected
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:17: error: ';' expec
ted
ModLoader.registerEntityID(EntityKlik.class, "Klik", ModLoader.g
etUniqueEntityId());
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: <identifi
er> expected
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: <identifi
er> expected
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: illegal s
tart of type
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:18: error: ')' expec
ted
ModLoader.addSpawn(EntityKlik.class, 5, 1, 1, EnumCreatureType.c
reature, new BiomeGenBase[]
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:20: error: not a sta
tement
BiomeGenBase.ocean,
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:20: error: ';' expec
ted
BiomeGenBase.ocean,
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:21: error: not a sta
tement
BiomeGenBase.desert
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:21: error: ';' expec
ted
BiomeGenBase.desert
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:22: error: illegal s
tart of type
});
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:25: error: class, in
terface, or enum expected
public void addRenderer(Map map)
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: <identifi
er> expected
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: ')' expec
ted
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: ';' expec
ted
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: <identifi
er> expected
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: ';' expec
ted
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: illegal s
tart of type
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:27: error: <identifi
er> expected
map.put(EntityOoga.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: <identifi
er> expected
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: <identifi
er> expected
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: illegal s
tart of type
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: ')' expec
ted
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: ';' expec
ted
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: illegal s
tart of type
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:28: error: ';' expec
ted
map.put(EntityKlik.class, new RenderBiped(new ModelBiped(), 0.5F
));
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:32: error: class, in
terface, or enum expected
public String getVersion()
^
src\minecraft\net\minecraft\src\mod_PocketGodIslanders.java:35: error: class, in
terface, or enum expected
}
^
41 errors
==================
== Recompiling server ==
> Cleaning bin
> Recompiling
- Done in 4.88 seconds
Press any key to continue . . .
I'm stuck :/
Edit: BTW, I know my MCP says it's 1.2.4. I don't know why but all the mods seem to run fine (apart from this one )
The code for EntityKlik is outside of the load() method.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm using eclipse, and it doesn't show any errors. When I run minecraft, I get:
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:398)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412)
at net.minecraft.src.mod_DiamondDust.load(mod_DiamondDust.java:122)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:680)
I'm using eclipse, and it doesn't show any errors. When I run minecraft, I get:
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:398)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412)
at net.minecraft.src.mod_DiamondDust.load(mod_DiamondDust.java:122)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:680)
Put it right above your getVersion() string.
example
public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int a = 0; a < 12; a++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(69);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(****.blockID, 10)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return("1.2.5");
}
}
You need to post the entire class and the error. Don't use quick fix.
error report:
java.lang.Error: Unresolved compilation problem:
Illegal modifier for the variable Pokeball; only final is permitted
at net.minecraft.src.mod_Pokemon.<init>(mod_Pokemon.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT d2142b8d ----------
Class:
package net.minecraft.src;
// 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
import java.util.*;
public class mod_Pokemon extends BaseMod
{
{
//oran berry
public static final Item OranBerry = new ItemFood(5002, 4, 1F, false).setItemName("anynamehere");
OranBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/oranBerry.png");
ModLoader.addName(OranBerry, "oranBerry ");
//pokedex
public static final Item Pokedex = new Itempokedex(5001).setItemName("Pokedex");
Pokedex.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokedex.png");
ModLoader.addName(Pokedex, "pokedex");
ModLoader.addRecipe(new ItemStack(Pokedex, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//pokeball
public static final Item Pokeball = new ItemPokeball(5000).setItemName("pokeball");
Pokeball.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokeball.png");
ModLoader.addName(Pokeball, "pokeball");
ModLoader.addRecipe(new ItemStack(Pokeball, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//mobs
ModLoader.registerEntityID(EntityAron.class, "Aron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityLairon.class, "Lairon", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityAggron.class, "Aggron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityWailmer.class, "wailmer", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailmer.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityWailord.class, "wailord", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailord.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityTailow.class, "taillow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityTailow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySwellow.class, "swellow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySwellow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySlugma.class, "Slugma", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySlugma.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityMagcargo.class, "magcargo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityMagcargo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityOnix.class, "onix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityOnix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySteelix.class, "steelix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySteelix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityWingul.class, "Wingul", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWingul.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityPelliper.class, "Pelliper", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityPelliper.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityLotad.class, "Lotad", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLotad.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLudicolo.class, "Ludicolo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLudicolo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLombre.class, "Lombre", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLombre.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySeedot.class, "Seedot", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySeedot.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityNuzleaf.class, "Nuzleaf", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityNuzleaf.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityShiftry.class, "Shiftry", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityShiftry.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
}
// RENDERERS
public void AddRenderer(Map map)
{
map.put(EntityAron.class, new RenderAron(new ModelAron(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLairon.class, new RenderLairon(new ModelLarion(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityAggron.class, new RenderAggron(new ModelAggron(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailmer.class, new RenderWailmer(new ModelWailmer(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailord.class, new RenderWaillord(new ModelWailord(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityTailow.class, new RenderTailow(new ModelTaillow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySwellow.class, new RenderSwellow(new ModelSwellow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySlugma.class, new RenderSlugma(new ModelSlugma(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityMagcargo.class, new RenderMagcargo(new ModelMagcargo(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityOnix.class, new RenderOnix(new Modelonix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySteelix.class, new RenderSteelix(new ModelSteelix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWingul.class, new RenderWingul(new ModelWingul(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityPelliper.class, new RenderPelliper(new ModelPelliper(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLotad.class, new RenderLotad(new ModelLotad(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLudicolo.class, new RenderLudicolo(new ModelLudicolo(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySeedot.class, new RenderSeedot(new ModelSeedot(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityNuzleaf.class, new RenderNuzleaf(new ModelNuzleaf(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityShiftry.class, new RenderShiftry(new ModelShiftry(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
}
public String Version()
{
return "|Legnaks pokemon mod"; // Put here anything you like after that it will show up in the modloader logs.
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return "1.2.5";
}
@Override
public void load() {
}
}
Multiple ores?
Just copy the *for* statement and paste it below the other one but keep it in the *generateSurface* just change the values and name of each ore to your liking. :]
Should work fine.
To simplify your code instead of doing:
..., new Object[]
{"###" Character.valueOf('#'), *BLOCKNAME*});
Do
... new Object []
{"###" '#', *BLOCKNAME*}
Ex:
To simplify your code instead of doing:
..., new Object[]
{"###" Character.valueOf('#'), *BLOCKNAME*});
Do
... new Object []
{"###" '#', *BLOCKNAME*}
Ex:
If you can't understand it, then reading every page at this link is all I can suggest.
Post your code.
Try asking in Mod Development. I'm all out of ideas.
Yes, you could do that. But making it wear an iron helmet, you would need to use your own model, and possibly render classes.
Post your Blockblockname class please. The error would be very helpful too.
Some people use the one for Java EE Developers. I just use Eclipse for Java Developers and it works fine. I suggest using it over the EE version.
together they are powerful beyond imagination."
But now I have another problem. In this mod I'm making, I wan't at least 6 NPCs. The first one works fine. Spawns, spawns in the right place, that kind of stuff. But when I added in the second one, I got a whopping 41 or so errors!
mod_PocketGodIslander.java
EntityOoga.java
EntityKlik.java
And the errors while recompiling :/
I'm stuck :/
Edit: BTW, I know my MCP says it's 1.2.4. I don't know why but all the mods seem to run fine (apart from this one )
The code for EntityKlik is outside of the load() method.
Mod Development
together they are powerful beyond imagination."
And yeah, I'm not the best at debugging my code :/
Here:
You need to post the entire class and the error. Don't use quick fix.
together they are powerful beyond imagination."
I'm fairly sure you need to break each case.
together they are powerful beyond imagination."
would be able to help with these?
Dual wielding.
Creating new inventory slots.
creating new movement animations.
AI coding.
thanx.
So, I'm trying to make chainmail armor craftable. I do have a chainlink item, etc..
This is my code:
I'm using eclipse, and it doesn't show any errors. When I run minecraft, I get:
Any help?
Try
Assuming you only got those exceptions after adding your recipe..
Thanks!
EDIT: Just tested: It worked.
example
error report:
java.lang.Error: Unresolved compilation problem:
Illegal modifier for the variable Pokeball; only final is permitted
at net.minecraft.src.mod_Pokemon.<init>(mod_Pokemon.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT d2142b8d ----------
Multiple ores?
Just copy the *for* statement and paste it below the other one but keep it in the *generateSurface* just change the values and name of each ore to your liking. :]
Should work fine.
My code is this:
but the recipes that get added to the game are
http://imgur.com/VqAxV
http://imgur.com/qDwoZ
..., new Object[]
{"###" Character.valueOf('#'), *BLOCKNAME*});
Do
... new Object []
{"###" '#', *BLOCKNAME*}
Ex:
I have no idea why, but the recipe suddenly works. Thanks!
If they are different items, I may be able to help you.
As in... making a furnace like block?