I don't understand when I open Eclipse and some of the errors listed say EntityNameHere cannot be resolved to a type. What does that mean exactly? And it doesn't tell me what I should do to fix it.
Not to be obnoxious, but bumping this because it might have been lost on the previous page and I'm desperate for help.
Another thing has been added to my problem. After giving up and just deleting the class files from my src folder, I recompiled and they were just added to my folder again! How do I delete them? Or fix them? Please.
Mine was on a diff page dont mean to spam but here is my error, my classes have no errors but its giving me this when I start minecraft. java.lang.StringIndexOutOfBoundsException: String index out of range: 8 at java.lang.String.charAt(Unknown Source) at fr.a(SourceFile:549) at ModLoader.addRecipe(ModLoader.java:401) at mod_Chisel.load(mod_Chisel.java:11) at ModLoader.init(ModLoader.java:891) at ModLoader.addAllRenderers(ModLoader.java:189) at ahu.<init>(ahu.java:77) at ahu.<clinit>(ahu.java:8) at net.minecraft.client.Minecraft.a(SourceFile:273) at net.minecraft.client.Minecraft.run(SourceFile:657) at java.lang.Thread.run(Unknown Source)
Mine was on a diff page dont mean to spam but here is my error, my classes have no errors but its giving me this when I start minecraft. java.lang.StringIndexOutOfBoundsException: String index out of range: 8 at java.lang.String.charAt(Unknown Source) at fr.a(SourceFile:549) at ModLoader.addRecipe(ModLoader.java:401) at mod_Chisel.load(mod_Chisel.java:11) at ModLoader.init(ModLoader.java:891) at ModLoader.addAllRenderers(ModLoader.java:189) at ahu.<init>(ahu.java:77) at ahu.<clinit>(ahu.java:8) at net.minecraft.client.Minecraft.a(SourceFile:273) at net.minecraft.client.Minecraft.run(SourceFile:657) at java.lang.Thread.run(Unknown Source)
Make sure each row of the recipe has an equal amount of spaces in it.
I maked something: I created a new project named Block1Test1 and I maked what said in tutorial.
I hope this images help:
-the classes what I maked was in net.minecraft.src us mod_GeBlock and GeBlock.
Don't create a new project. Create all new classes in the Client project.
Hi @TechGuy543 , i cant find the code you did a while ago for me which was the switch statement.
The switch statement i am wanting is on the sound that the mob makes.
PLease can you re-post it for me?
Thanks
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hello I have no errors in my mod after u helped me fix it but now its doing this....
its replacing those with the texture of my new block what is the problem? And it appears my chisel recipie isnt working but it will be in-game every item icon is gone.
mod_chisel
package net.minecraft.src;
public class mod_chisel extends BaseMod
{
public static final Item chisel = new Item(2112).setItemName("Chisel");
public class mod_stone1 extends BaseMod
{
public static final Block stone1 = new Block(160, 0, Material.rock).setBlockName("stone1").setHardness(3F).setResistance(4F).setLightValue(1F);
Is there a way to give your NPC totally random textures? It doesn't have to have anything to do with who they are, like cats or villagers. I tried that switch statement you gave THeo_sA80 but nothing changed
public String getTexture()
{
int texture = 1;
String textureFile;
switch (texture)
{
case 1: textureFile = "/elf.png";
case 2: textureFile = "/elffemale.png";
}
return super.getTexture();
}
Try making it return textureFile instead of super.
Hello I have no errors in my mod after u helped me fix it but now its doing this....
its replacing those with the texture of my new block what is the problem? And it appears my chisel recipie isnt working but it will be in-game every item icon is gone.
mod_chisel
package net.minecraft.src;
public class mod_chisel extends BaseMod
{
public static final Item chisel = new Item(2112).setItemName("Chisel");
public class mod_stone1 extends BaseMod
{
public static final Block stone1 = new Block(160, 0, Material.rock).setBlockName("stone1").setHardness(3F).setResistance(4F).setLightValue(1F);
Please use code tags or I will not help. It makes it so much easier to read the code using them.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm trying to load in a mob with techne but when I load my game the mob's SHAPE appears-- but not it's texture.
I loaded the texture in on techne and it worked, and I also have my path to it clearly written in the code. Why is it not loading in?
Another thing has been added to my problem. After giving up and just deleting the class files from my src folder, I recompiled and they were just added to my folder again! How do I delete them? Or fix them? Please.
I tried to make it return textureFile instead of super, but it gives me errors saying "The local variable textureFile may not have been initialized", and when Eclipse initializes it for me, it changes the String code to "String textureFile = null;" instead of "String textureFile;". If I run the game at that point, the mob has the second texture, but not the first. What do I do? If you know the answer, please send me it to me as a private message, I will be going away for two weeks now, without internet. And I don't want to get home to like 50 unread pages and don't know if my answer is in it or not Y'all go have a nice time now!
I'm trying to load in a mob with techne but when I load my game the mob's SHAPE appears-- but not it's texture.
I loaded the texture in on techne and it worked, and I also have my path to it clearly written in the code. Why is it not loading in?
Tech my problem was fixed with the recipe but it seems it replaced every item with a invisible block and I cant see any of the items.
Backup your classes from src. Put them elsewhere out of the MCP folder. Then run cleanup.bat. Get a fresh jar and download a new ModLoader. Put ModLoader in the jar and delete meta-inf. Decompile again and put your classes back into src and run the game.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Or perhaps you're looking at a bunch of outdated tutorials, most of which have a single capital letter out of place. GenerateSurface should now be generateSurface.
I've got 2 ores, 1 flower, and a nether ore all generating just fine in 1.2.5.
Your entire question was based around the texture. Maybe you should post the code where you mentioned you have the path to it "clearly written in the code". I see no such code.
no need to be sorry. Please excuse me if I sound rude or anything. I should probably be sleeping right now.
Anyways, where exactly are you placing this texture file?If these textures work anything like Item or Block textures, they need to be placed in your MCP directory > bin > minecraft. In your case, yours would be placed in your MCP directory > bin > minecraft > mob. (The mob folder is something you'll need to create in there. Ignore the other files/folders in there...)
no need to be sorry. Please excuse me if I sound rude or anything. I should probably be sleeping right now.
Anyways, where exactly are you placing this texture file?If these textures work anything like Item or Block textures, they need to be placed in your MCP directory > bin > minecraft. In your case, yours would be placed in your MCP directory > bin > minecraft > mob. (The mob folder is something you'll need to create in there. Ignore the other files/folders in there...)
You, sir, have saved my life.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
It got the same error. Whenever I try to install JDK it says it has errors finding %APPDATA% or something like that.
SOLUTION!
"Error 1606. Could not access network location %APPDATA%"
DARN IT
Another thing has been added to my problem. After giving up and just deleting the class files from my src folder, I recompiled and they were just added to my folder again! How do I delete them? Or fix them? Please.
# 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_05\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\RenderGiantSheep.java:12: error: cannot find sym
bol
this(par1ModelGiantSheep, par2, 1.0F);
^
symbol: variable par1ModelGiantSheep
location: class RenderGiantSheep
src\minecraft\net\minecraft\src\RenderGiantSheep.java:13: error: cannot find sym
bol
modelGiantSheepMain = par1ModelGiantSheep;
^
symbol: variable par1ModelGiantSheep
location: class RenderGiantSheep
src\minecraft\net\minecraft\src\RenderGiantSheep.java:18: error: cannot find sym
bol
super(par1ModelGiantSheep, par2);
^
symbol: variable par1ModelGiantSheep
location: class RenderGiantSheep
src\minecraft\net\minecraft\src\RenderGiantSheep.java:19: error: cannot find sym
bol
modelGiantSheepMain = par1ModelGiantSheep;
^
symbol: variable par1ModelGiantSheep
location: class RenderGiantSheep
4 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BiomeGenTest.java:12: error: cannot find symbol
topBlock = (byte)Block.blockTest.blockID;
^
symbol: variable blockTest
location: class Block
src\minecraft\net\minecraft\src\BiomeGenTest.java:13: error: cannot find symbol
fillerBlock = (byte)Block.blockTest.blockID;
^
symbol: variable blockTest
location: class Block
java.lang.StringIndexOutOfBoundsException: String index out of range: 8
at java.lang.String.charAt(Unknown Source)
at fr.a(SourceFile:549)
at ModLoader.addRecipe(ModLoader.java:401)
at mod_Chisel.load(mod_Chisel.java:11)
at ModLoader.init(ModLoader.java:891)
at ModLoader.addAllRenderers(ModLoader.java:189)
at ahu.<init>(ahu.java:77)
at ahu.<clinit>(ahu.java:8)
at net.minecraft.client.Minecraft.a(SourceFile:273)
at net.minecraft.client.Minecraft.run(SourceFile:657)
at java.lang.Thread.run(Unknown Source)
http://raptr.com/UrbanNinja6?src=em_gamesm" target=""
Your block doesn't exist in Block.java so you don't reference to it being there. You reference it to your mod_ class.
Make sure each row of the recipe has an equal amount of spaces in it.
Don't create a new project. Create all new classes in the Client project.
And why not?
Link
together they are powerful beyond imagination."
its replacing those with the texture of my new block what is the problem? And it appears my chisel recipie isnt working but it will be in-game every item icon is gone.
mod_chisel
package net.minecraft.src;
public class mod_chisel extends BaseMod
{
public static final Item chisel = new Item(2112).setItemName("Chisel");
public void load()
{
chisel.iconIndex = ModLoader.addOverride("/gui/items.png", "/dec/chisel.png");
ModLoader.addName(chisel , "chisel");
ModLoader.addRecipe(new ItemStack(chisel, 1), new Object [] {"# ", " % ", " ", Character.valueOf('#'), Block.wood, Character.valueOf('%'), Item.ingotIron});
}
public String getVersion()
{
return "1.2.5";
}
}
mod_stone1
package net.minecraft.src;
public class mod_stone1 extends BaseMod
{
public static final Block stone1 = new Block(160, 0, Material.rock).setBlockName("stone1").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
stone1.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/dec/1.png");
ModLoader.registerBlock(stone1);
ModLoader.addName(stone1, "StoneDecoration");
ModLoader.addRecipe(new ItemStack(stone1, 1), new Object [] {"%%%", " # ", "%%%", Character.valueOf('#'), mod_chisel.chisel, Character.valueOf('%'), Block.stone});
}
public String getVersion()
{
return "1.2.5";
}
}
Try making it return textureFile instead of super.
Use one mod_ class. You need to have an equal amount of spaces in the recipe. If a row isn't needed then just leave it out.
ModLoader.addRecipe(new ItemStack(chisel, 1), new Object [] {"# ", "% ", Character.valueOf('#'), Block.wood, Character.valueOf('%'), Item.ingotIron});Please use code tags or I will not help. It makes it so much easier to read the code using them.
together they are powerful beyond imagination."
I loaded the texture in on techne and it worked, and I also have my path to it clearly written in the code. Why is it not loading in?
You need to run the cleanup file. That will delete anything that has been modded from the original 'vanilla' version of Minecraft.
http://www.youtube.com/user/pancakesimone
You must use a lowercase on the mod_ prefix. Otherwise it will not be loaded.
PM'd you.
Post your code.
Backup your classes from src. Put them elsewhere out of the MCP folder. Then run cleanup.bat. Get a fresh jar and download a new ModLoader. Put ModLoader in the jar and delete meta-inf. Decompile again and put your classes back into src and run the game.
together they are powerful beyond imagination."
Here's my code:
package net.minecraft.src; public class ModelPiggie extends ModelBase { //fields ModelRenderer head; ModelRenderer body; ModelRenderer leg1; ModelRenderer leg2; ModelRenderer leg3; ModelRenderer leg4; public ModelPiggie() { textureWidth = 256; textureHeight = 128; head = new ModelRenderer(this, 0, 0); head.addBox(-4F, -4F, -8F, 16, 16, 16); head.setRotationPoint(0F, -12F, -13F); head.setTextureSize(256, 128); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 28, 8); body.addBox(-5F, -10F, -7F, 20, 32, 16); body.setRotationPoint(0F, 3F, 3F); body.setTextureSize(256, 128); body.mirror = true; setRotation(body, 1.570796F, 0F, 0F); leg1 = new ModelRenderer(this, 0, 16); leg1.addBox(-2F, 0F, -2F, 8, 12, 8); leg1.setRotationPoint(-4F, 10F, 17F); leg1.setTextureSize(256, 128); leg1.mirror = true; setRotation(leg1, 0F, 0F, 0F); leg2 = new ModelRenderer(this, 0, 16); leg2.addBox(-2F, 0F, -2F, 8, 12, 8); leg2.setRotationPoint(10F, 10F, 19F); leg2.setTextureSize(256, 128); leg2.mirror = true; setRotation(leg2, 0F, 0F, 0F); leg3 = new ModelRenderer(this, 0, 16); leg3.addBox(-2F, 18F, -2F, 8, 12, 8); leg3.setRotationPoint(-3F, -8F, -5F); leg3.setTextureSize(256, 128); leg3.mirror = true; setRotation(leg3, 0F, 0F, 0F); leg4 = new ModelRenderer(this, 0, 16); leg4.addBox(-2F, 0F, -2F, 8, 12, 8); leg4.setRotationPoint(9F, 10F, -5F); leg4.setTextureSize(256, 128); leg4.mirror = true; setRotation(leg4, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); head.render(f5); body.render(f5); leg1.render(f5); leg2.render(f5); leg3.render(f5); leg4.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5); } }-
View User Profile
-
View Posts
-
Send Message
Retired StaffOr perhaps you're looking at a bunch of outdated tutorials, most of which have a single capital letter out of place. GenerateSurface should now be generateSurface.
I've got 2 ores, 1 flower, and a nether ore all generating just fine in 1.2.5.
Your entire question was based around the texture. Maybe you should post the code where you mentioned you have the path to it "clearly written in the code". I see no such code.
package net.minecraft.src; import java.util.Random; public class EntityPiggie extends EntityCreature { public EntityPiggie(World world) { super(world); texture = "mob/piggie.png"; moveSpeed = 0.5F; isImmuneToFire = false; } 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() { return Item.ingotIron.shiftedIndex; } protected boolean canDespawn() { return false; } }-
View User Profile
-
View Posts
-
Send Message
Retired Staffno need to be sorry. Please excuse me if I sound rude or anything. I should probably be sleeping right now.
Anyways, where exactly are you placing this texture file? If these textures work anything like Item or Block textures, they need to be placed in your MCP directory > bin > minecraft. In your case, yours would be placed in your MCP directory > bin > minecraft > mob. (The mob folder is something you'll need to create in there. Ignore the other files/folders in there...)
You, sir, have saved my life.