@drewfly, Are you sure you tried the latest one? His first try didn't work and you posted back, his second one looks right, and there was never any response from you :wink.gif:
@cowmonkey, Do you have the armor-being-worn .png file where it should be?
@drewfly, Great stuff! Hopefully Chewy can help you with it again, I might be able to, in the morning
@cowmonkey, EDIT:
You have this:
public static Item tankitehelmet = (new ItemArmorTankite(3047, 1, 5, 0)).setItemName("Tankitehelmet");
public static Item tankitebody = (new ItemArmorTankite(3048, 1, 5, 1)).setItemName("Tankitebody");
public static Item tankitelegs = (new ItemArmorTankite(3049, 1, 5, 2)).setItemName("Tankitelegs");
public static Item tankiteboots = (new ItemArmorTankite(3050, 1, 5, 3)).setItemName("Tankiteboots");
Try this:
public static Item tankitehelmet = new ItemArmor(3047, 1, ModLoader.AddArmor("tankiteArmor"), 0).setItemName("Tankitehelmet");
public static Item tankitebody = new ItemArmor(3048, 1, ModLoader.AddArmor("tankiteArmor"), 1).setItemName("Tankitebody");
public static Item tankitelegs = new ItemArmor(3049, 1, ModLoader.AddArmor("titaniumArmor"), 2).setItemName("Tankitelegs");
public static Item tankiteboots = new ItemArmor(3050, 1, ModLoader.AddArmor("tankiteArmor"), 3).setItemName("Tankiteboots");
That should work, unless I made a stupid mistake :tongue.gif: And sorry for not getting back. I lost this thread :sad.gif:
:sad.gif: it didn't work, all that happened is got these 8 errors:
== MCP v4.1 ==
> Recompiling client...
javac -g -verbose -classpath "lib/:lib/*:jars/bin/minecraft.jar:jars/bin/jinput.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/minecraft/isom/*.java src/minecraft/net/minecraft/src/*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/mod_Tankite.java:93: AddArmor(java.lang.String) in net.minecraft.src.ModLoader cannot be applied to (java.lang.String,int)
public static Item tankitehelmet = new ItemArmor(3047, 1, ModLoader.AddArmor("tankiteArmor", 0)).setItemName("tankitehelmet");
^
src/minecraft/net/minecraft/src/mod_Tankite.java:93: internal error; cannot instantiate net.minecraft.src.ItemArmor.<init> at net.minecraft.src.ItemArmor to ()
public static Item tankitehelmet = new ItemArmor(3047, 1, ModLoader.AddArmor("tankiteArmor", 0)).setItemName("tankitehelmet");
^
src/minecraft/net/minecraft/src/mod_Tankite.java:94: AddArmor(java.lang.String) in net.minecraft.src.ModLoader cannot be applied to (java.lang.String,int)
public static Item tankitebody = new ItemArmor(3048, 1, ModLoader.AddArmor("tankiteArmor", 1)).setItemName("tankitebody");
^
src/minecraft/net/minecraft/src/mod_Tankite.java:94: internal error; cannot instantiate net.minecraft.src.ItemArmor.<init> at net.minecraft.src.ItemArmor to ()
public static Item tankitebody = new ItemArmor(3048, 1, ModLoader.AddArmor("tankiteArmor", 1)).setItemName("tankitebody");
^
src/minecraft/net/minecraft/src/mod_Tankite.java:95: AddArmor(java.lang.String) in net.minecraft.src.ModLoader cannot be applied to (java.lang.String,int)
public static Item tankitelegs = new ItemArmor(3049, 1, ModLoader.AddArmor("tankiteArmor", 2)).setItemName("tankitelegs");
^
src/minecraft/net/minecraft/src/mod_Tankite.java:95: internal error; cannot instantiate net.minecraft.src.ItemArmor.<init> at net.minecraft.src.ItemArmor to ()
public static Item tankitelegs = new ItemArmor(3049, 1, ModLoader.AddArmor("tankiteArmor", 2)).setItemName("tankitelegs");
^
src/minecraft/net/minecraft/src/mod_Tankite.java:96: AddArmor(java.lang.String) in net.minecraft.src.ModLoader cannot be applied to (java.lang.String,int)
public static Item tankiteboots = new ItemArmor(3050, 1, ModLoader.AddArmor("tankiteArmor", 3)).setItemName("tankiteboots");
^
src/minecraft/net/minecraft/src/mod_Tankite.java:96: internal error; cannot instantiate net.minecraft.src.ItemArmor.<init> at net.minecraft.src.ItemArmor to ()
public static Item tankiteboots = new ItemArmor(3050, 1, ModLoader.AddArmor("tankiteArmor", 3)).setItemName("tankiteboots");
^
8 errors
==================
> Done in 28.79 seconds
> Recompiling server...
!! Can not find server sources !!
i may have done something wrong :0
You didn't close ModLoader.AddArmor in the right spot:
public static Item tankitehelmet = new ItemArmor(3047, 1, ModLoader.AddArmor("tankiteArmor"), 0).setItemName("Tankitehelmet");
public static Item tankitebody = new ItemArmor(3048, 1, ModLoader.AddArmor("tankiteArmor"), 1).setItemName("Tankitebody");
public static Item tankitelegs = new ItemArmor(3049, 1, ModLoader.AddArmor("titaniumArmor"), 2).setItemName("Tankitelegs");
public static Item tankiteboots = new ItemArmor(3050, 1, ModLoader.AddArmor("tankiteArmor"), 3).setItemName("Tankiteboots");
@drewfly, Don't wait up for me, I haven't figured it out yet, and this weekend is very busy for me. Apologies, and if you don't have it within 4-5 days, I will take a much better look at it.
For this tutorial, I will assume you have completed:
[*:y0diubmk]Creating a new Block
[*:y0diubmk]Creating a new Item
[*:y0diubmk]Creating a new Tool Set
[*:y0diubmk]Converted your EmeraldOre to an actual ore which drops the emerald item
Now, here goes the tutorial!
Adding a new recipe is the easiest function I know of in ModLoader- and the easiest to get an error over. Here's the base of the function:
ModLoader.AddRecipe(new ItemStack(ItemYouWantToProduce, ItemAmountForProducing), new Object[] {
"XXX", "XXX", "XXX" Character.valueOf('X'), The block/Item you want X to be
});
You can just use that as a base for all your recipes, it goes directly under AddNames. Just in case you don't understand, here's a basic recipe:
Note how it only says emeraldItem but says Item.stick? That's because the stick item is created within the Item.java file. So, you may need to use Block.anyblock or Item.anyitem in your recipes.
Heres all the recipes I made for my class (including the block which you make from emeralds which you won't have made in these tutorials):
Well first off, if you updated, there is no way it would work :smile.gif:
Secondly, I've not seen world generation like this...Are you really able to generate both tankiteore and tankite?
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 40; i++)
{
int randPosX = chunkX + rand.nextInt(20);
int randPosY = rand.nextInt(200);
int randPosZ = chunkZ = rand.nextInt(20);
(new WorldGenMinable(tankiteore.blockID, 30)).generate(world, rand, randPosX , randPosY , randPosZ);
(new WorldGenMinable(tankite.blockID, 5)).generate(world, rand, randPosX , randPosY , randPosZ);
randPosY should equal 128, right? Since the world is 128 blocks high? I would guess this is your problem.
Well first off, if you updated, there is no way it would work :smile.gif:
Secondly, I've not seen world generation like this...Are you really able to generate both tankiteore and tankite?
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 40; i++)
{
int randPosX = chunkX + rand.nextInt(20);
int randPosY = rand.nextInt(200);
int randPosZ = chunkZ = rand.nextInt(20);
(new WorldGenMinable(tankiteore.blockID, 30)).generate(world, rand, randPosX , randPosY , randPosZ);
(new WorldGenMinable(tankite.blockID, 5)).generate(world, rand, randPosX , randPosY , randPosZ);
randPosY should equal 128, right? Since the world is 128 blocks high? I would guess this is your problem.
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 40; i++)
{
int randPosX = chunkX + rand.nextInt(20);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ = rand.nextInt(20);
(new WorldGenMinable(tankiteore.blockID, 30)).generate(world, rand, randPosX , randPosY , randPosZ);
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 40; i++)
{
int randPosX = chunkX + rand.nextInt(20);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ = rand.nextInt(20);
(new WorldGenMinable(tankite.blockID,5)).generate(world, rand, randPosX , randPosY , randPosZ);
}
The above code I just fixed will make it spawn anywhere in the world, not just deep down. 128 like Limbless said, means it can spawn anywhere, including on grass or snow and such above ground.
Rollback Post to RevisionRollBack
Our memories these days, just so terrible, I mean, I asked this old lady, about this magic book.. I forgot the rest but Watermelons are good.
Oh if your problem is with incompatibility, Notch may have changed coding slightly in 1.7.2, we will have to wait for MCP to update. You can try to make it work, but you'd have a higher chance of it working when everything is updated to 1.7.2.
Rollback Post to RevisionRollBack
Our memories these days, just so terrible, I mean, I asked this old lady, about this magic book.. I forgot the rest but Watermelons are good.
@cowmonkey, Do you have the armor-being-worn .png file where it should be?
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
@cowmonkey, EDIT:
You have this:
Try this:
That should work, unless I made a stupid mistake :tongue.gif: And sorry for not getting back. I lost this thread :sad.gif:
also you did make a mistake, you typed titanium instead of tankite, but i will fix that :smile.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
i may have done something wrong :0
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
You didn't close ModLoader.AddArmor in the right spot:
@drewfly, Don't wait up for me, I haven't figured it out yet, and this weekend is very busy for me. Apologies, and if you don't have it within 4-5 days, I will take a much better look at it.
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
the armour is perfect and i have no errors!
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Hey i need help making new tools and I followed the tutorial but I keep getting errors so i deleted those codes and I need help.
there is no error, it just isnt there :sad.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
mod_tankite:
do you want any more codes? reply and i will give the codes you want :smile.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Secondly, I've not seen world generation like this...Are you really able to generate both tankiteore and tankite?
randPosY should equal 128, right? Since the world is 128 blocks high? I would guess this is your problem.
The above code I just fixed will make it spawn anywhere in the world, not just deep down. 128 like Limbless said, means it can spawn anywhere, including on grass or snow and such above ground.
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
i really have no idea... :sad.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3