so i just updated my mod but im getting a error on all the smelting reps
ModLoader.addSmelting(Item.bucketWater.shiftedIndex, new ItemStack(salt, 2), 0.0F);
on every shift index i have has an error
so i just updated my mod but im getting a error on all the smelting reps
ModLoader.addSmelting(Item.bucketWater.shiftedIndex, new ItemStack(salt, 2), 0.0F);
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Just where setItemName is when you instantiate your Item class.
From all my understanding of coding, that makes no sense what so ever, but you would know better. How would I do this with a vanilla item? and only in certain recipes?
From all my understanding of coding, that makes no sense what so ever, but you would know better. How would I do this with a vanilla item? and only in certain recipes?
It's a mutator method that is able to change the contents of the Item object by invoking it on the Item's object, so in this case you would just add .setContainerItem(ITEMHERE) to the other mutations that have been added to the item object. I am unsure if it actually works, but there seems to be no issue with the object being final (which seems kind of strange). Just try something like this (but use whichever items you want in place of the example ones instead)
It's a mutator method that is able to change the contents of the Item object by invoking it on the Item's object, so in this case you would just add .setContainerItem(ITEMHERE) to the other mutations that have been added to the item object. I am unsure if it actually works, but there seems to be no issue with the object being final (which seems kind of strange). Just try something like this (but use whichever items you want in place of the example ones instead)
Item.appleGold.setContainerItem(Item.appleRed);
Recompiling worked, but it crashed. A black screen crash so no report.
Recompiling worked, but it crashed. A black screen crash so no report.
Then you aren't able to change the configuration of the main items.
Edit:
The only other thing you could maybe do is use an AccessTransformer and remove the final modifier of the specific Item you want to change, and try modifying it then.
Ok... So Im stumped...
I know what the errors saying, but I just dont know how to make it work...
So here is my 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\BlockEridianOre.java:11: error: cannot find symb
ol
return mod_EridianOreGeneration.EridianOreGenerationBlock.blockID;
^
symbol: variable EridianOreGenerationBlock
location: class mod_EridianOreGeneration
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
And Here's my Codes:
BlockEridianOre:
package net.minecraft.src;
import java.util.Random;
public class BlockEridianOre extends Block
{
public BlockEridianOre(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int i, Random random, int j)
{
return mod_EridianOreGeneration.EridianOreGenerationBlock.blockID;
}
public int quantityDropped(Random random)
{
return 2;
}
}
mod_EridianOreGeneration:
package net.minecraft.src;
import java.util.Random;
public class mod_EridianOreGeneration extends BaseMod
{
public static final Block EridianOre = new Block(200, 0, Material.iron).setBlockName("Eridian Ore").setHardness(5F).setResistance(10F).setCreativeTab(CreativeTabs.tabBlock).setStepSound(Block.soundStoneFootstep);
public void load()
{
EridianOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Eridian Ore.png");
ModLoader.registerBlock(EridianOre);
ModLoader.addName(EridianOre, "Eridian Ore");
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 5; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(EridianOre.blockID, 4)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.4";
}
}
Ok... So Im stumped...
I know what the errors saying, but I just dont know how to make it work...
So here is my 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\BlockEridianOre.java:11: error: cannot find symb
ol
return mod_EridianOreGeneration.EridianOreGenerationBlock.blockID;
^
symbol: variable EridianOreGenerationBlock
location: class mod_EridianOreGeneration
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
And Here's my Codes:
BlockEridianOre:
package net.minecraft.src;
import java.util.Random;
public class BlockEridianOre extends Block
{
public BlockEridianOre(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int i, Random random, int j)
{
return mod_EridianOreGeneration.EridianOreGenerationBlock.blockID;
}
public int quantityDropped(Random random)
{
return 2;
}
}
mod_EridianOreGeneration:
package net.minecraft.src;
import java.util.Random;
public class mod_EridianOreGeneration extends BaseMod
{
public static final Block EridianOre = new Block(200, 0, Material.iron).setBlockName("Eridian Ore").setHardness(5F).setResistance(10F).setCreativeTab(CreativeTabs.tabBlock).setStepSound(Block.soundStoneFootstep);
public void load()
{
EridianOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Eridian Ore.png");
ModLoader.registerBlock(EridianOre);
ModLoader.addName(EridianOre, "Eridian Ore");
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 5; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(EridianOre.blockID, 4)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.4";
}
}
Please Help me
Thanks in Advance.
Your object name is just EridianOre, so you would reference it as
Techguy, sorry to ask, but what happened to the dimension tutorial? I've been waiting for ages now
It's been put on hold until issues are fixed.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
ModLoader.addSmelting(Item.bucketWater.shiftedIndex, new ItemStack(salt, 2), 0.0F);
on every shift index i have has an error
Just where setItemName is, when you instantiate your Item class.
Post the error please.
together they are powerful beyond imagination."
From all my understanding of coding, that makes no sense what so ever, but you would know better. How would I do this with a vanilla item? and only in certain recipes?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIt's a mutator method that is able to change the contents of the Item object by invoking it on the Item's object, so in this case you would just add .setContainerItem(ITEMHERE) to the other mutations that have been added to the item object. I am unsure if it actually works, but there seems to be no issue with the object being final (which seems kind of strange). Just try something like this (but use whichever items you want in place of the example ones instead)
Recompiling worked, but it crashed. A black screen crash so no report.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThen you aren't able to change the configuration of the main items.
Edit:
The only other thing you could maybe do is use an AccessTransformer and remove the final modifier of the specific Item you want to change, and try modifying it then.
I know what the errors saying, but I just dont know how to make it work...
So here is my error:
And Here's my Codes:
BlockEridianOre:
package net.minecraft.src; import java.util.Random; public class BlockEridianOre extends Block { public BlockEridianOre(int i, int j) { super(i, j, Material.iron); } public int idDropped(int i, Random random, int j) { return mod_EridianOreGeneration.EridianOreGenerationBlock.blockID; } public int quantityDropped(Random random) { return 2; } }mod_EridianOreGeneration:
package net.minecraft.src; import java.util.Random; public class mod_EridianOreGeneration extends BaseMod { public static final Block EridianOre = new Block(200, 0, Material.iron).setBlockName("Eridian Ore").setHardness(5F).setResistance(10F).setCreativeTab(CreativeTabs.tabBlock).setStepSound(Block.soundStoneFootstep); public void load() { EridianOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Eridian Ore.png"); ModLoader.registerBlock(EridianOre); ModLoader.addName(EridianOre, "Eridian Ore"); } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { for(int i = 5; i < 7; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(EridianOre.blockID, 4)).generate(world, random, randPosX, randPosY, randPosZ); } } public String getVersion() { return "1.4"; } }Please Help me
Thanks in Advance.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYour object name is just EridianOre, so you would reference it as
hooooooooly crap. Thank you sooooo much.
Im sooooo stupid.
I was like stuck for like 537498573045745809374 hours.
Thanks
1 last thing.
How do you make the ore only mine able by a diamond pick? What do I put and where.
Thanks agian in advance.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWhich OS do you have?
It's been put on hold until issues are fixed.
together they are powerful beyond imagination."
Ok just wanted to know. It's just the world chunk manager I don't know how to make. Everything else is really easy.