Ok so.. umm how do you add your mod item into the smelting recipe....
Ill show you wat I mean XD
mod_Eridian:
package net.minecraft.src;
public class mod_Eridian extends BaseMod
{
public static final Item EridianItem = new ItemEridian(5320).setItemName("Eridian");
public String getVersion()
{
return "Eridian";
}
public void load()
{
ModLoader.addName(EridianItem, "Eridian");
ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(Item.Eridian, 1), 4.0F);
}
}
ItemEridian: (Dont think you need this part but whateves.)
package net.minecraft.src;
public class ItemEridian extends Item
{
protected ItemEridian(int par1)
{
super(par1);
setCreativeTab(CreativeTabs.tabMaterials);
iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Eridian.png");
}
}
Error:
== MCP 7.25 (data: 7.25, client: 1.4.6, server: 1.4.6) ==
# found ff, ff patches, srgs, name csvs, doc csvs, param csvs, renumber csv, ast
yle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_07\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Eridian.java:15: error: cannot find symbol
ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(Item.Eridian, 1
), 4.0F);
^
symbol: variable Eridian
location: class Item
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
I know what the error says and all but I just dont know what variable or whatever to use...
Thanks.
when you use blocks and items from your mod you put mod_yourmodsname. in front of the item/block instead of Item. or Block.
when you use blocks and items from your mod you put mod_yourmodsname. in front of the item/block instead of Item. or Block.
Ok, so I do that and I get the error saying this:
== MCP 7.25 (data: 7.25, client: 1.4.6, server: 1.4.6) ==
# found ff, ff patches, srgs, name csvs, doc csvs, param csvs, renumber csv, ast
yle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_07\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Eridian.java:15: error: cannot find symbol
ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(mod_Eridian, 1)
, 4.0F);
^
symbol: variable mod_Eridian
location: class mod_Eridian
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Im sure I just did something so stupid lol.
mod_Eridian:
package net.minecraft.src;
public class mod_Eridian extends BaseMod
{
public static final Item EridianItem = new ItemEridian(5320).setItemName("Eridian");
public String getVersion()
{
return "Eridian";
}
public void load()
{
ModLoader.addName(EridianItem, "Eridian");
ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(mod_Eridian, 1), 4.0F);
}
}
ok well i went an entirely different direction with this i downloaded eclipse but the error continues to pop up on me, i know with eclipse you have to put in into the eclipse/client/bin folder but it still can't seem to find it.... could the PATH variables have anything to do with it or do those have no effect at all on it?
BTW changed all the names in the thing to test to see if that was the error as well... still get it...
on a second note... if anyone would be willing to help i talk on skype briefly and just show the problem via. screenshare to see if that would help figure out the issue... because as of right now... it has me stumped...
ok well i went an entirely different direction with this i downloaded eclipse but the error continues to pop up on me, i know with eclipse you have to put in into the eclipse/client/bin folder but it still can't seem to find it.... could the PATH variables have anything to do with it or do those have no effect at all on it?
BTW changed all the names in the thing to test to see if that was the error as well... still get it...
on a second note... if anyone would be willing to help i talk on skype briefly and just show the problem via. screenshare to see if that would help figure out the issue... because as of right now... it has me stumped...
as for the eclipse issue if figured out what i was doing i was putting them in the minecraft folder, but not into the bin (derp) so it wasn't seeing the pix
great tutorial again and thanks for the help
Rollback Post to RevisionRollBack
You are right to fear the darkness, for i am always hunting you
I hate to ask another question but i am having an issue with creating a plant:
package net.minecraft.src;
import java.util.Random;
public class BlockCornPlant extends Block
{
int numberOfStages = 4;//the amount of stages this crop has
protected BlockCornPlant(int par1)
{
super(par1, 0, Material.plants);
this.setTickRandomly(true);
this.setCreativeTab((CreativeTabs)null);
}
protected boolean canThisPlantGrowOnThisBlockID(int par1)//only grows on sand
{
return par1 == Block.tilledField.blockID;
}
public boolean canBlockStay(World par1World, int par2, int par3, int par4)
{
return this.canThisPlantGrowOnThisBlockID(par1World.getBlockId(par2, par3 - 1, par4));
}
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)//block grows
{
int growspeed = 5;//make it higher to grow slower make it lower to grow faster can't be lower than 1 it will also glitch up at 1
int var6 = par1World.getBlockMetadata(par2, par3, par4);
if (var6 < numberOfStages-1 && par5Random.nextInt(growspeed) == 0)
{
++var6;
par1World.setBlockAndMetadataWithNotify(par2, par3, par4, this.blockID, var6);
}
super.updateTick(par1World, par2, par3, par4, par5Random);
}
public int getBlockTextureFromSideAndMetadata(int par1, int stage)//gets the image depending on the stage
{
switch(stage)
{
case 0:{return mod_Culinary.stage1;}
case 1:{return mod_Culinary.stage2;}
case 2:{return mod_Culinary.stage3;}
case 3:{return mod_Culinary.stage4;}
default:{return 0;}
}
}
public int quantityDropped(Random par1Random)//the amount to drop
{
return par1Random.nextInt(2)+3;
}
public int idPicked(World par1World, int par2, int par3, int par4)
{
return mod_Culinary.CornSeeds.shiftedIndex;
}
public int idDropped(int par1, Random par2Random, int par3)//the item it drops only drop if its fully grown
{
return par1 == numberOfStages-1 ? Item.Corn.shiftedIndex : 0;//replace gunpowder with the item your plant drops
}
}
I am having an issue
return mod_Culinary.CornSeeds.shiftedIndex; here saying that it cannot be resolve and or isn't a field
return par1 == numberOfStages-1 ? Item.ItemCorn.shiftedIndex : 0;
is saying the same thing... i have a corn item created but i don't know what that means or how to fix it...
i have a mod_ file set up and it works fine its just this one... i don't know if its because its out of date (with the update) or if its just me not understanding.....
again.. sorry for all the questions just trying to learn
Rollback Post to RevisionRollBack
You are right to fear the darkness, for i am always hunting you
Ok, so I do that and I get the error saying this:
Im sure I just did something so stupid lol.
mod_Eridian:
package net.minecraft.src; public class mod_Eridian extends BaseMod { public static final Item EridianItem = new ItemEridian(5320).setItemName("Eridian"); public String getVersion() { return "Eridian"; } public void load() { ModLoader.addName(EridianItem, "Eridian"); ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(mod_Eridian, 1), 4.0F); } }Thanks in advance.
BTW changed all the names in the thing to test to see if that was the error as well... still get it...
on a second note... if anyone would be willing to help i talk on skype briefly and just show the problem via. screenshare to see if that would help figure out the issue... because as of right now... it has me stumped...
You are right to fear the darkness, for i am always hunting you
mod_Eridian.EridianItem
I knew I missed something super obvious.
Thank you so much.
You are right to fear the darkness, for i am always hunting you
as for the eclipse issue if figured out what i was doing i was putting them in the minecraft folder, but not into the bin (derp) so it wasn't seeing the pix
great tutorial again and thanks for the help
You are right to fear the darkness, for i am always hunting you
package net.minecraft.src; import java.util.Random; public class BlockCornPlant extends Block { int numberOfStages = 4;//the amount of stages this crop has protected BlockCornPlant(int par1) { super(par1, 0, Material.plants); this.setTickRandomly(true); this.setCreativeTab((CreativeTabs)null); } protected boolean canThisPlantGrowOnThisBlockID(int par1)//only grows on sand { return par1 == Block.tilledField.blockID; } public boolean canBlockStay(World par1World, int par2, int par3, int par4) { return this.canThisPlantGrowOnThisBlockID(par1World.getBlockId(par2, par3 - 1, par4)); } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)//block grows { int growspeed = 5;//make it higher to grow slower make it lower to grow faster can't be lower than 1 it will also glitch up at 1 int var6 = par1World.getBlockMetadata(par2, par3, par4); if (var6 < numberOfStages-1 && par5Random.nextInt(growspeed) == 0) { ++var6; par1World.setBlockAndMetadataWithNotify(par2, par3, par4, this.blockID, var6); } super.updateTick(par1World, par2, par3, par4, par5Random); } public int getBlockTextureFromSideAndMetadata(int par1, int stage)//gets the image depending on the stage { switch(stage) { case 0:{return mod_Culinary.stage1;} case 1:{return mod_Culinary.stage2;} case 2:{return mod_Culinary.stage3;} case 3:{return mod_Culinary.stage4;} default:{return 0;} } } public int quantityDropped(Random par1Random)//the amount to drop { return par1Random.nextInt(2)+3; } public int idPicked(World par1World, int par2, int par3, int par4) { return mod_Culinary.CornSeeds.shiftedIndex; } public int idDropped(int par1, Random par2Random, int par3)//the item it drops only drop if its fully grown { return par1 == numberOfStages-1 ? Item.Corn.shiftedIndex : 0;//replace gunpowder with the item your plant drops } }I am having an issue
return mod_Culinary.CornSeeds.shiftedIndex; here saying that it cannot be resolve and or isn't a field
return par1 == numberOfStages-1 ? Item.ItemCorn.shiftedIndex : 0;
is saying the same thing... i have a corn item created but i don't know what that means or how to fix it...
i have a mod_ file set up and it works fine its just this one... i don't know if its because its out of date (with the update) or if its just me not understanding.....
again.. sorry for all the questions just trying to learn
You are right to fear the darkness, for i am always hunting you
Bleach Mod
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-
View User Profile
-
View Posts
-
Send Message
Curse Premium( i named the block wrong. its grass not dirt
package net.minecraft.src; import java.util.Random; public class BlockCobaltdirt extends Block { protected BlockCobaltdirt(int par1) { super(par1, Material.grass); this.blockIndexInTexture = 1; this.setTickRandomly(true); this.setCreativeTab(CreativeTabs.tabBlock); } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2) { par1World.setBlockWithNotify(par2, par3, par4, Block.dirt.blockID); } else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { for (int var6 = 0; var6 < 4; ++var6) { int var7 = par2 + par5Random.nextInt(3) - 1; int var8 = par3 + par5Random.nextInt(5) - 3; int var9 = par4 + par5Random.nextInt(3) - 1; int var10 = par1World.getBlockId(var7, var8 + 1, var9); if (par1World.getBlockId(var7, var8, var9) == Block.dirt.blockID && par1World.getBlockLightValue(var7, var8 + 1, var9) >= 4 && Block.lightOpacity[var10] <= 2) { par1World.setBlockWithNotify(var7, var8, var9, mod_Cobalt.cobaltdirt.blockID); } } } } } public int getBlockTextureFromSideAndMetadata(int i, int j) { return getBlockTextureFromSide(i); } public int getBlockTextureFromSide(int i) { if (i == 0) { return mod_Cobalt.cobaltdirtbottom; } if (i == 1) { return mod_Cobalt.cobaltdirttop; } else { return mod_Cobalt.cobaltdirtside; } } public int idDropped(int par1, Random par2Random, int par3) { return Block.dirt.idDropped(0, par2Random, par3); } }Planet Minecraft: GLStudios
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumname.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/name.png"); //for blocks
name.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/name.png"); //for items
or do you mean
2. where did i have to put the pictures for the blocks?:
make a folder named "mods" in mcp/eclipse/client/bin
if use the code above
Thanks, I thought you unarchived minecraft.jar, then put pics inside. thx!
Planet Minecraft: GLStudios
Planet Minecraft: GLStudios