Back! :biggrin.gif: I AM using ModLoader, and I was wondering how to make the sides of my block the same image, but have the top and bottom a different image. As in, all the sides are a face, but the top is just white and the bottom is the same as the top. I literally have NO idea how to do this using modloader. Please help meh! :biggrin.gif:
I Forget how to do that, But I think it has something to do with a code like this:
Which is the code for the Workbench. I saw something where you have to do something with MetaData to do the different sides and top/bottom thing but i'm not sure since I haven't made anything where I needed to do that. If the workbench code isn't for that, I just figured it was since workbench is different from sides and top.
Which is the code for the Workbench. I saw something where you have to do something with MetaData to do the different sides and top/bottom thing but i'm not sure since I haven't made anything where I needed to do that. If the workbench code isn't for that, I just figured it was since workbench is different from sides and top.
Close but no cigar. The workbench has different sides. I will check out the wood.java soon.
New question. This one is MUCH more urgent. Okay, so here's the problem.
I went into every entity(mob), and make them drop more than one item (except the mobs that dont drop anything, just made them drop my mod item)
and, I used this code:
protected void dropFewItems()
{
int i = rand.nextInt(3);
for(int j = 0; j < i; j++)
{
dropItem(Item.arrow.shiftedIndex, 1);
}
i = rand.nextInt(3);
for(int k = 0; k < i; k++)
{
dropItem(Item.bone.shiftedIndex, 1);
}
i = rand.nextInt(3);
for(int k = 0; k < i; k++)
{
dropItem(mod_mobTops.skullUn.blockID, 1);
}
}
(Skeleton was only mob with three drops, most just had two.) And, I recompiled, and got 45 errors. Now, I know that these are probably just simple errors, so I went through. 90% of them were;
EntityWhatevermob.java:w/eline: cannot find symbol
symbol : variable i
location: class.netminecraft.src.EntitiyWhatevermob
i = rand.nextInt(3);
and every piece of the code that involves the variable I. Please help ASAP. Kthx.
Anyway, back to the code. The snippet looks fine. Generally, if you get a lot of similar errors that don't seem to make sense, you probably have a problem earlier in the file that's confused Java beyond the point of no return.
Anyway, back to the code. The snippet looks fine. Generally, if you get a lot of similar errors that don't seem to make sense, you probably have a problem earlier in the file that's confused Java beyond the point of no return.
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.
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.
That's not a name I would ever pick for a block class. It might even confuse ModLoader. In any case, there is no constructor for your mod_OurMods block class.
Okay -- So I'm adding a new mob to the game using ModLoader.
The Prairie Dog.
mod_PDog.java
Now, here's my dilemma.
When I recompiled, I got two errors.
src\minecraft\blah\mod_PDog.java:13: cannot find symbol
symbol: variable map
location: class net.minecraft.src.mod_PDog
map.put(EntityPDog.class, new RenderPDog(new ModelPDog(), 0.5F));
^
-----------------------------------------------------------------------
src\minecraft\blah\ModelPDog.java:10: cannot find symbol
symbol: constructor ModelQuadruped()
location: class net.minecraft.src.ModelQuadruped
super();
^
Now, for the second one that says it can't find ModelQuadruped, I tried changing it to ModelBase, but that just gave me about 33 errors. o.O Please help! :biggrin.gif:
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);
}
}
Now, for the second one that says it can't find ModelQuadruped
No, it is not saying that at all. It clearly states that the constructor was not found, or more specifically, a constructor that takes no arguments. Glancing at ModelQuadruped, all I see is ModelQuadruped(int, float).
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
No, it is not saying that at all. It clearly states that the constructor was not found, or more specifically, a constructor that takes no arguments. Glancing at ModelQuadruped, all I see is ModelQuadruped(int, float).
Here's my ModelPDog file.
package net.minecraft.src;
public class ModelPDog extends ModelQuadruped
{
public ModelPDog()
{
super();
leg2.addBox(-2F, 0F, -2F, 2, 3, 2, 0F);
leg2.setRotationPoint(3F, 21F, 0.8666667F);
I Forget how to do that, But I think it has something to do with a code like this:
Which is the code for the Workbench. I saw something where you have to do something with MetaData to do the different sides and top/bottom thing but i'm not sure since I haven't made anything where I needed to do that. If the workbench code isn't for that, I just figured it was since workbench is different from sides and top.
Close but no cigar. The workbench has different sides. I will check out the wood.java soon.
I went into every entity(mob), and make them drop more than one item (except the mobs that dont drop anything, just made them drop my mod item)
and, I used this code:
{
int i = rand.nextInt(3);
for(int j = 0; j < i; j++)
{
dropItem(Item.arrow.shiftedIndex, 1);
}
i = rand.nextInt(3);
for(int k = 0; k < i; k++)
{
dropItem(Item.bone.shiftedIndex, 1);
}
i = rand.nextInt(3);
for(int k = 0; k < i; k++)
{
dropItem(mod_mobTops.skullUn.blockID, 1);
}
}
(Skeleton was only mob with three drops, most just had two.) And, I recompiled, and got 45 errors. Now, I know that these are probably just simple errors, so I went through. 90% of them were;
EntityWhatevermob.java:w/eline: cannot find symbol
symbol : variable i
location: class.netminecraft.src.EntitiyWhatevermob
i = rand.nextInt(3);
and every piece of the code that involves the variable I. Please help ASAP. Kthx.
So you're changing the drops of EVERY mob?
Compatibility - comshmatability. :smile.gif:
Anyway, back to the code. The snippet looks fine. Generally, if you get a lot of similar errors that don't seem to make sense, you probably have a problem earlier in the file that's confused Java beyond the point of no return.
Me? Or UndecidedTool or whatever his name is.
I lost track... the person modifying every core mob with the "can't find variable i" problem.
yep thats UndecidedTool.
> 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.
I think you're missing a semi-Colon after
I'm not sure though
That's not a name I would ever pick for a block class. It might even confuse ModLoader. In any case, there is no constructor for your mod_OurMods block class.
The Prairie Dog.
mod_PDog.java
Now, here's my dilemma.
When I recompiled, I got two errors.
Now, for the second one that says it can't find ModelQuadruped, I tried changing it to ModelBase, but that just gave me about 33 errors. o.O Please help! :biggrin.gif:
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:
No, it is not saying that at all. It clearly states that the constructor was not found, or more specifically, a constructor that takes no arguments. Glancing at ModelQuadruped, all I see is ModelQuadruped(int, float).
You really don't understand that error?
Here's my ModelPDog file.
public class ModelPDog extends ModelQuadruped
{
public ModelPDog()
{
super();
leg2.addBox(-2F, 0F, -2F, 2, 3, 2, 0F);
leg2.setRotationPoint(3F, 21F, 0.8666667F);
leg2.rotateAngleX = 0F;
leg2.rotateAngleY = 0F;
leg2.rotateAngleZ = 0F;
leg2.mirror = false;
leg1.addBox(-2F, 0F, -2F, 2, 3, 2, 0F);
leg1.setRotationPoint(-0.6F, 21F, 0.6F);
leg1.rotateAngleX = 0F;
leg1.rotateAngleY = 0F;
leg1.rotateAngleZ = 0F;
leg1.mirror = false;
body.addBox(-5F, -10F, -7F, 6, 11, 3, 0F);
body.setRotationPoint(2F, 18.86667F, 5F);
body.rotateAngleX = 0.3067236F;
body.rotateAngleY = 0F;
body.rotateAngleZ = 0F;
body.mirror = false;
tail = new ModelRenderer(0, 0);
tail.addBox(0F, 0F, 0F, 2, 1, 2, 0F);
tail.setRotationPoint(-1F, 19.8F, 0.9333333F);
tail.rotateAngleX = 0.426418F;
tail.rotateAngleY = 0F;
tail.rotateAngleZ = 0F;
tail.mirror = false;
leg3.addBox(0F, 0F, 0F, 2, 3, 2, 0F);
leg3.setRotationPoint(-2.533333F, 13.53333F, -3.8F);
leg3.rotateAngleX = -0.8551081F;
leg3.rotateAngleY = 0F;
leg3.rotateAngleZ = 0F;
leg3.mirror = false;
leg4.addBox(-2F, 0F, -2F, 2, 3, 2, 0F);
leg4.setRotationPoint(2.533333F, 14.8F, -2.666667F);
leg4.rotateAngleX = -0.8179294F;
leg4.rotateAngleY = 0F;
leg4.rotateAngleZ = 0F;
leg4.mirror = false;
head.addBox(-4F, -4F, -8F, 4, 4, 5, 0F);
head.setRotationPoint(2F, 12.8F, 0.5333334F);
head.rotateAngleX = -0.1858931F;
head.rotateAngleY = 0F;
head.rotateAngleZ = 0F;
head.mirror = false;
}
public void render(float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
tail.render(f5);
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5);
}
//fields
public ModelRenderer tail;
}
Is Techne outdated or something? o.O