I'm trying to create a custom entity (a grenade) using modloader and MCP, but I can't seem to figure out how to give it a unique texture. Everything else works fine, but when I throw the grenade it's invisible, then it explodes. I also want the texture for the thrown grenade to be different from the grenade item itself. Can anyone help me with this?
Im having a armor error. Everything is working correctly but when I play in game the gui item is correct, but when I put the item on the error is it is white. Any help would be fine:)
package net.minecraft.src;
import net.minecraft.client.Minecraft;
public class mod_MoreArmors extends BaseMod
{
public mod_MoreArmors()
{
MoltenHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/MoreArmors/Moltenhelmet.png");
ModLoader.AddName(MoltenHelmet, "Molten Helmet");
ModLoader.AddRecipe(new ItemStack(MoltenHelmet, 1), new Object[] {
"rrr", "rrr", " ", Character.valueOf('r'), Item.bucketLava
});
MoltenBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/MoreArmors/Moltenbody.png");
ModLoader.AddName(MoltenBody, "Molten Chestplate");
ModLoader.AddRecipe(new ItemStack(MoltenBody, 1), new Object[] {
"r r", "rrr", "rrr", Character.valueOf('r'), Item.bucketLava
});
MoltenLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/MoreArmors/Moltenlegs.png");
ModLoader.AddName(MoltenLegs, "Molten Leggings");
ModLoader.AddRecipe(new ItemStack(MoltenLegs, 1), new Object[] {
"rrr", "r r", "r r", Character.valueOf('r'), Item.bucketLava
});
MoltenBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/MoreArmors/Moltenboots.png");
ModLoader.AddName(MoltenBoots, "Molten Boots");
ModLoader.AddRecipe(new ItemStack(MoltenBoots, 1), new Object[] {
" ", "r r", "r r", Character.valueOf('r'), Item.bucketLava
});
}
public String Version()
{
return "Version1.0";
}
public static Item MoltenHelmet = (new ItemArmor(2002, 3, ModLoader.AddArmor("MoltenArmor"), 0)).setItemName("MoltenHelmet");
public static Item MoltenBody = (new ItemArmor(2003, 3, ModLoader.AddArmor("MoltenArmor"), 1)).setItemName("MoltenBody");
public static Item MoltenLegs = (new ItemArmor(2004, 3, ModLoader.AddArmor("MoltenArmor"), 2)).setItemName("MoltenLegs");
public static Item MoltenBoots = (new ItemArmor(2005, 3, ModLoader.AddArmor("MoltenArmor"), 3)).setItemName("MoltenBoots");
}
Make sure ModLoader.AddArmor() had the name of your ..._1.png file
when I use mcp and try to re-obfuscate it it says
== MCP v4.3 ==
== Reobfuscating client ==
!! Can not find client bins !!
== Reobfuscating server ==
> Gathering md5 checksums
> Compacting server bin directory
> Reobfuscating server jar
> Extracting modified classes
Press any key to continue . . .
when I use mcp and try to re-obfuscate it it says
== MCP v4.3 ==
== Reobfuscating client ==
!! Can not find client bins !!
== Reobfuscating server ==
> Gathering md5 checksums
> Compacting server bin directory
> Reobfuscating server jar
> Extracting modified classes
Press any key to continue . . .
src\minecraft\net\minecraft\src\mod_ZirconiumBlock.java:5: cannot find symbol
symbol: class Basemod
public class mod_ZirconiumBlock extends Basemod
^
src\minecraft\net\minecraft\src\mod_ZirconiumBlock.java:5: net.minecraft.src.mod
_ZirconiumBlock is not abstract and does not override abstract method Version()
in net.minecraft.src.mod_ZirconiumBlock
public class mod_ZirconiumBlock extends Basemod
^
src\minecraft\net\minecraft\src\mod_ZirconiumBlock.java:16: return outside metho
d
return "1.7.3";
^
3 errors
==================
> Done in 5.88 seconds
> Recompiling server...
> Done in 5.99 seconds
Press any key to continue . . .
It is saying the return is outside the method. If you look at the method you see you ended the method after the empty parameters with a ';'. So what the computer sees is
It is saying the return is outside the method. If you look at the method you see you ended the method after the empty parameters with a ';'. So what the computer sees is
{
return 1.7.3:
}
not the method it is used in.
please but that in simpler terms i"m quite the noob
I,am trying tofigure this out for my current mod, I will get back to you when I figure it out.
Make sure ModLoader.AddArmor() had the name of your ..._1.png file
I am on my phone now but I can give you an example of how to do this when I'm back on my computer in about an hour.
== MCP v4.3 ==
== Reobfuscating client ==
!! Can not find client bins !!
== Reobfuscating server ==
> Gathering md5 checksums
> Compacting server bin directory
> Reobfuscating server jar
> Extracting modified classes
Press any key to continue . . .
I feel stupid, you need to change itemstack back to item and setContainerItem to setContainerItemStack
You need to recompile first.
I had recompiled it.
oh wait i missed that i guess i don't know how but when i do i get this error
== MCP v4.3 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.6.0_25\bin\javac.exe" -g -verbose -classpath "lib/;l
ib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjg
l_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecra
ft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minec
raft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ZirconiumBlock.java:5: cannot find symbol
symbol: class Basemod
public class mod_ZirconiumBlock extends Basemod
^
src\minecraft\net\minecraft\src\mod_ZirconiumBlock.java:5: net.minecraft.src.mod
_ZirconiumBlock is not abstract and does not override abstract method Version()
in net.minecraft.src.mod_ZirconiumBlock
public class mod_ZirconiumBlock extends Basemod
^
src\minecraft\net\minecraft\src\mod_ZirconiumBlock.java:16: return outside metho
d
return "1.7.3";
^
3 errors
==================
> Done in 5.88 seconds
> Recompiling server...
> Done in 5.99 seconds
Press any key to continue . . .
package net.minecraft.src;
public class mod_ZirconiumBlock extends Basemod
{
public mod_ZirconiumBlock()
{
ModLoader.RegisterBlock( Zirconium );
ModLoader.AddName(Zirconium, "Zirconium" );
Zirconium.blockIndexInTexture = ModLoader.addOverride( "/terrain.png", "/Zirconium.png");
}
public abstract String Version();
{
return "1.7.3";
}
public static final Block Zirconium;
static
{
Zirconium = (new Block(3690, 0, Material.rock)).setHardness(3.0F).setResistance(20F).setStepSound(Block.soundStoneFootstep).setBlockName("Zirconium");
}
}
I'm still getting one error
== MCP v4.3 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.6.0_25\bin\javac.exe" -g -verbose -classpath "lib/;l
ib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjg
l_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecra
ft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minec
raft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ZirconiumBlock.java:16: return outside metho
d
return "1.7.3";
^
1 error
==================
> Done in 6.85 seconds
> Recompiling server...
> Done in 5.60 seconds
Press any key to continue . . .
also when I go check the reobf folder then the minecraft folder nothing is in there after i re-obfuscate
This is because the reobfuscation will only work if the recompile has no errors. I will have the fix in a minute.
okay thenks
please but that in simpler terms i"m quite the noob
Please put that in simpler terms I'm quite the noob
sorry there were too many spelling mistakes for me to leave that alone
please reply i really need help
You need to delete the ';' after public abstract String Version();