Anyway, yes. Instead of soundGravelFootstep, you need Block.soundGravelFootstep. And the same thing with the stone sound. Just put "Block." infront of it
Help, I was trying to start an explosives mod by first creating a fuse, but I got this:
Mods loaded: 2 ModLoader 1.2.5 mod_fuse 1.2.5
Minecraft has crashed! ----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 2055c871 -------- Generated 7/9/12 9:14 PM
Minecraft: Minecraft 1.2.5 OS: Windows Vista (x86) version 6.0 Java: 1.7.0_05, Oracle Corporation VM: Java HotSpotâ„¢ Client VM (mixed mode), Oracle Corporation LWJGL: 2.4.2 OpenGL: GeForce 7150M / nForce 630M/PCI/SSE2/3DNOW! version 2.1.1, NVIDIA Corporation
java.lang.ClassCastException: net.minecraft.src.Item cannot be cast to java.lang.Character at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:371) at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412) at net.minecraft.src.mod_fuse.load(mod_fuse.java:11) at net.minecraft.src.ModLoader.init(ModLoader.java:856) at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157) at net.minecraft.src.RenderManager.<init>(RenderManager.java:85) at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12) at net.minecraft.client.Minecraft.startGame(Minecraft.java:424) at net.minecraft.client.Minecraft.run(Minecraft.java:786) at java.lang.Thread.run(Thread.java:722) --- END ERROR REPORT 1748318c ----------
Can you please explain this to me?
That is an error with your recipe. I can't help any further without seeing your code.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Are you using Forge? If not, you need to edit BlockFire and add in a
setBurnRate(mod_Name.nameHere.blockID, 14, 78);
line for your block.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Okay, so I'll ''repost'' my post with my error report and stuff with less spoilers this time.
Error Report
src\minecraft\net\minecraft\src\mod_DatMod.java:80: error: cannot find symbol
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
^
symbol: class Random
location: class mod_DatMod
src\minecraft\net\minecraft\src\BlockStar.java:18: error: cannot find symbol
if (blockID == Block.StarBlock.blockID)
^
symbol: variable StarBlock
location: class Block
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
And here's the concerned class files:
-mod_***-
package net.minecraft.src;
public class mod_DatMod extends BaseMod
{
public static final Block RubyOre = new BlockRubyOre(160, 0).setBlockName("rubyore").setHardness(3F).setResistance(5F);
public static final Block SapphireOre = new BlockSapphireOre(161, 0).setBlockName("sapphireore").setHardness(3F).setResistance(5F);
public static final Block EmeraldOre = new BlockEmeraldOre(162, 0).setBlockName("emeraldore").setHardness(3F).setResistance(5F);
public static final Block RubyBlock = new Block(163, 0, Material.iron).setBlockName("rubyblock").setHardness(3F).setResistance(10F);
public static final Block SapphireBlock = new Block(164, 0, Material.iron).setBlockName("sapphireblock").setHardness(3F).setResistance(10F);
public static final Block EmeraldBlock = new Block(165, 0, Material.iron).setBlockName("emeradblock").setHardness(3F).setResistance(10F);
public static final Block CoalBlock = new Block(166, 0, Material.rock).setBlockName("coalblock").setHardness(3F).setResistance(5F);
public static final Block RedstoneBlock = new Block(167, 0, Material.rock).setBlockName("redstoneblock").setHardness(3F).setResistance(5F);
public static final Block StarBlock = new BlockStar(168, 0).setBlockName("starblock").setHardness(60F).setResistance(3000F).setLightValue(1F);
public static final Item Ruby = new Item(960).setItemName("ruby");
public static final Item Sapphire = new Item(961).setItemName("sapphire");
public static final Item Emeraude = new Item(962).setItemName("emeraude");
public static final Item StarPiece = new Item(963).setItemName("starpiece");
public static final Item Star = new Item(964).setItemName("star");
public void load()
{
RubyOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RubyOre.png");
ModLoader.registerBlock(RubyOre);
ModLoader.addName(RubyOre, "Ruby Ore");
SapphireOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/SapphireOre.png");
ModLoader.registerBlock(SapphireOre);
ModLoader.addName(SapphireOre, "Sapphire Ore");
EmeraldOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/EmeraldOre.png");
ModLoader.registerBlock(EmeraldOre);
ModLoader.addName(EmeraldOre, "Emerald Ore");
RubyBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RubyBlock.png");
ModLoader.registerBlock(RubyBlock);
ModLoader.addName(RubyBlock, "Block of Ruby");
ModLoader.addRecipe(new ItemStack(RubyBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.dirt});
SapphireBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/SapphireBlock.png");
ModLoader.registerBlock(SapphireBlock);
ModLoader.addName(SapphireBlock, "Block of Sapphire");
ModLoader.addRecipe(new ItemStack(SapphireBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.cobblestone});
EmeraldBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/EmeraldBlock.png");
ModLoader.registerBlock(EmeraldBlock);
ModLoader.addName(EmeraldBlock, "Block of Emerald");
ModLoader.addRecipe(new ItemStack(EmeraldBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.wood});
CoalBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/CoalBlock.png");
ModLoader.registerBlock(CoalBlock);
ModLoader.addName(CoalBlock, "Block of Coal");
ModLoader.addRecipe(new ItemStack(CoalBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.sand});
RedstoneBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RedstoneBlock.png");
ModLoader.registerBlock(RedstoneBlock);
ModLoader.addName(RedstoneBlock, "Block of Redstone");
ModLoader.addRecipe(new ItemStack(RedstoneBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.sandStone});
StarBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/StarMeteor.png");
ModLoader.registerBlock(StarBlock);
ModLoader.addName(StarBlock, "Big Star");
Ruby.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Ruby.png");
ModLoader.addName(Ruby, "Ruby");
Sapphire.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Sapphire.png");
ModLoader.addName(Sapphire, "Sapphire");
Emeraude.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Emerald.png");
ModLoader.addName(Emeraude, "Emerald");
StarPiece.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/StarPiece.png");
ModLoader.addName(StarPiece, "Star Piece");
Star.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Star.png");
ModLoader.addName(Star, "Star");
ModLoader.addRecipe(new ItemStack(Star, 1), new Object [] {" # ", "# #", "# #", Character.valueOf('#'), Block.plantYellow});
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(60);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(RubyOre.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}
-BlockStar-
package net.minecraft.src;
import java.util.Random;
public class BlockStar extends Block
{
public BlockStar(int par1, int par2)
{
super(par1, par2, Material.iron);
}
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_DatMod.StarPiece.shiftedIndex;
}
public int quantityDropped(Random par1Random)
{
if (blockID == Block.StarBlock.blockID)
{
return 1 + par1Random.nextInt(2);
}
else
{
return 1;
}
}
}
X 64 for the person who helps!
EDIT:
I think I won't post anything else from now...
I just saw ''The Meaning of Life, the Universe, and Everyting...''
That is an error with your recipe. I can't help any further without seeing your code.
Never mind, I fixed it! It's because I wasn't paying close attention and did one symbol ('#') to represent silk and gunpowder. Doesn't turn out too good
package net.minecraft.src;
import java.util.Random;
public class BlockStar extends Block
{
public BlockStar(int par1, int par2)
{
super(par1, par2, Material.iron);
}
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_DatMod.StarPiece.shiftedIndex;
}
public int quantityDropped(Random par1Random)
{
if (blockID == mod_DatMod.StarBlock.blockID)
{
return 1 + par1Random.nextInt(2);
}
else
{
return 1;
}
}
}
You have the StarBlock created in mod_DatMod class, not in Block class.
It should work and now, where are my diamonds ?
Thank you! It works perfectly!
The ony things that I should change are the ore generation and the crafting recipes.
I will then add the tools and weapons and the star blocks generation. Oh, and...
...your diamonds! I won't spam with diamonds, so: X 576
Craft your own blocks, I'm too lazy to do so.
Man, your tutorials are awesome! But I'm havinga some problems. I tryed to create a block, a mob and a biome with ModLoader, and when I recompile it seems to be fine, but when I try to test it ingame, it isn't there. The block doesn't exist, the mob never spawn, and the biome.. well, it isn't there. Can you help me ?
Maybe I can help you with the block. First off, you executed startclient.bat, right? For making your mod work in your Minecraft there's another thing to do. What do you mean the block doesn't exist? Make an easy crafting recipe, for testing first. Like 1 block of dirt gives you your new block. If it doesn't work, post the code in <code.> </code.> tags, it makes it much easier to fins errors. And delete the . from the tags to make it work
The recipe is pretty simple. I rewrite the code only with the block and it is still not working. After recompiling, I start the starclient, I create a new world, I get a block of dirt and try to create my block, and it doesn't happen.
My mod_test code:
package net.minecraft.src;
public class mod_teste extends BaseMod
{
public string version()
{
return "1.2.5."
}
public static final BlockTestBlock = new Block(225,0,Material.stone).setHardness(2.5F).setResistance(20F).setLightValue(20F).setBlockName("TestBlock");
{
slipperiness = 1.2F;
}
public void()
{
ModLoader.addname(testblock,"Test Block")
ModLoader.register(testblock)
superblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/russo/testblock.png");
ModLoader.addRecipe(new ItemStack(testblock,1), new Object []
{ "X", 'X', Block.dirt});
}
}
Well, I must have made a big mistake since I started ''trying to mod'' yesterday. If you could help me I'd be very thankful
The recipe is pretty simple. I rewrite the code only with the block and it is still not working. After recompiling, I start the starclient, I create a new world, I get a block of dirt and try to create my block, and it doesn't happen.
My mod_test code:
package net.minecraft.src;
public class mod_teste extends BaseMod
{
public string version()
{
return "1.2.5."
}
public static final BlockTestBlock = new Block(225,0,Material.stone).setHardness(2.5F).setResistance(20F).setLightValue(20F).setBlockName("TestBlock");
{
slipperiness = 1.2F;
}
public void()
{
ModLoader.addname(testblock,"Test Block")
ModLoader.register(testblock)
superblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/russo/testblock.png");
ModLoader.addRecipe(new ItemStack(testblock,1), new Object []
{ "X", 'X', Block.dirt});
}
}
Well, I must have made a big mistake since I started ''trying to mod'' yesterday. If you could help me I'd be very thankful
I see the problem, you didn't use the Character.valueOf() before Block.dirt, so that line should look like this:
ModLoader.addRecipe(new ItemStack(testblock,1), new Object [] { "X", 'X', Character.valueOf('X'), Block.dirt});
That should help
Edit: I see you have an extra X in there, if you want to craft with one dirt block it should actually be:
ModLoader.addRecipe(new ItemStack(testblock,1), new Object [] { "X", Character.valueOf('X'), Block.dirt});
I'll post the corrected version, and I'll explain your errors on the // comments, these do not affect the code
package net.minecraft.src;
public class mod_teste extends BaseMod
{
public string getVersion() //You didn't write get
{
return "1.2.5."
}
public static final Block testblock = new Block(225,0,Material.rock).setHardness(2.5F).setResistance(20F).setLightValue(20F).setBlockName("TestBlock"); //Space between Block and testblock missing and material.stone is not a valid material
{
slipperiness = 1.2F;
}
public void load() //load() missing
{
ModLoader.addName(testblock,"Test Block");// ; missing and capital A on addName
ModLoader.registerBlock(testblock); // ; missing Block on registerBlock
testblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/russo/testblock.png"); //if you call it testblock don't call it super block
ModLoader.addRecipe(new ItemStack(testblock,1), new Object []
{ "X", Character.valueOf('X'), Block.dirt}); // Character.valueOf missing
}
}
Maybe I missed some errors to explain, but I think it should work now Take care and don't forget ; () and capital letters and/or spaces, everything matters!
Wow i missed a lot in that I'm still new to modding though so its okay... right? lol
well, since I'm here, I can't seem to find a way to create a new ingot... eclipse keeps telling me ItemIngot doesn't exist... Anyone know what I put it as to make an ingot?
(sorry if its confusing, its not too easy for me to explain )
The Line 'O' Code:
public static final Item MyNewIngot = new ItemIngot(5000).setItemName("MyNewIngot");
What kind of base class are you trying to override? A block, item? If it is a block you can just use:
public void load()
{
Block.dirt = new BlockYourClassName(id, txt);
}
You can't override Block.dirt like that; it's a final variable, so it cannot be set to a different object once it's been initialized. You would have to either edit the Block class (to make Block.dirt not be final) or BlockDirt (to simply put your changes in that file).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAnyway, yes. Instead of soundGravelFootstep, you need Block.soundGravelFootstep. And the same thing with the stone sound. Just put "Block." infront of it
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThat is an error with your recipe. I can't help any further without seeing your code.
together they are powerful beyond imagination."
-Monkey
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHow do you make blocks flammable?In the NPC's class, make it extend EntityMob and not EntityCreature.
Are you using Forge? If not, you need to edit BlockFire and add in a
line for your block.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumBut it's also funny as I came across something similar:
public static void addBurnable(int blockID, int encourageFire, int chanceToCatch) { Block.fire.setBurnRate(mod_YourMod.Block.blockID, 30, 60); }The only problem is that setBurnRate is private :/public void load() [Syntax error on token(s), misplaced construct(s)]
public boolean onTickInGame(float f, Minecraft minecraft) [Illegal modifier for parameter onTickInGame; only final is permitted]
public boolean onTickInGame(float f, Minecraft minecraft) [Syntax error on ",", ; expected]
public boolean onTickInGame(float f, Minecraft minecraft) [Syntax error on ")", ; expected]
creativeInventory = null; [creativeInventory cannot be resolved to a variable]
return true; [void methods cannot return a value]
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen) [duplicate local variable f]
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen) [duplicate loacal variable minecraft]
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen) [Syntax error on ")", ; expected]
if((guiscreen instanceof GuiContainerCreative) && !(creativeInventory instanceof GuiContainerCreative) && !minecraft.theWorld.isRemote) [creativeInventory cannot be resolved to a variable]
int i = 0; [duplicate local variable i]
creativeInventory = guiscreen; [creativeInventory cannot be resolved as a variable]
return true; [void methods cannot return a value]
private static GuiScreen creativeInventory; [Illegal modifier for parameter creativeInventory; only final is permitted]
PLEASE HELP!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumError Report
src\minecraft\net\minecraft\src\mod_DatMod.java:80: error: cannot find symbol public void generateSurface(World world, Random random, int chunkX, int chunkZ) ^ symbol: class Random location: class mod_DatMod src\minecraft\net\minecraft\src\BlockStar.java:18: error: cannot find symbol if (blockID == Block.StarBlock.blockID) ^ symbol: variable StarBlock location: class Block Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors-mod_***-
package net.minecraft.src; public class mod_DatMod extends BaseMod { public static final Block RubyOre = new BlockRubyOre(160, 0).setBlockName("rubyore").setHardness(3F).setResistance(5F); public static final Block SapphireOre = new BlockSapphireOre(161, 0).setBlockName("sapphireore").setHardness(3F).setResistance(5F); public static final Block EmeraldOre = new BlockEmeraldOre(162, 0).setBlockName("emeraldore").setHardness(3F).setResistance(5F); public static final Block RubyBlock = new Block(163, 0, Material.iron).setBlockName("rubyblock").setHardness(3F).setResistance(10F); public static final Block SapphireBlock = new Block(164, 0, Material.iron).setBlockName("sapphireblock").setHardness(3F).setResistance(10F); public static final Block EmeraldBlock = new Block(165, 0, Material.iron).setBlockName("emeradblock").setHardness(3F).setResistance(10F); public static final Block CoalBlock = new Block(166, 0, Material.rock).setBlockName("coalblock").setHardness(3F).setResistance(5F); public static final Block RedstoneBlock = new Block(167, 0, Material.rock).setBlockName("redstoneblock").setHardness(3F).setResistance(5F); public static final Block StarBlock = new BlockStar(168, 0).setBlockName("starblock").setHardness(60F).setResistance(3000F).setLightValue(1F); public static final Item Ruby = new Item(960).setItemName("ruby"); public static final Item Sapphire = new Item(961).setItemName("sapphire"); public static final Item Emeraude = new Item(962).setItemName("emeraude"); public static final Item StarPiece = new Item(963).setItemName("starpiece"); public static final Item Star = new Item(964).setItemName("star"); public void load() { RubyOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RubyOre.png"); ModLoader.registerBlock(RubyOre); ModLoader.addName(RubyOre, "Ruby Ore"); SapphireOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/SapphireOre.png"); ModLoader.registerBlock(SapphireOre); ModLoader.addName(SapphireOre, "Sapphire Ore"); EmeraldOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/EmeraldOre.png"); ModLoader.registerBlock(EmeraldOre); ModLoader.addName(EmeraldOre, "Emerald Ore"); RubyBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RubyBlock.png"); ModLoader.registerBlock(RubyBlock); ModLoader.addName(RubyBlock, "Block of Ruby"); ModLoader.addRecipe(new ItemStack(RubyBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.dirt}); SapphireBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/SapphireBlock.png"); ModLoader.registerBlock(SapphireBlock); ModLoader.addName(SapphireBlock, "Block of Sapphire"); ModLoader.addRecipe(new ItemStack(SapphireBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.cobblestone}); EmeraldBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/EmeraldBlock.png"); ModLoader.registerBlock(EmeraldBlock); ModLoader.addName(EmeraldBlock, "Block of Emerald"); ModLoader.addRecipe(new ItemStack(EmeraldBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.wood}); CoalBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/CoalBlock.png"); ModLoader.registerBlock(CoalBlock); ModLoader.addName(CoalBlock, "Block of Coal"); ModLoader.addRecipe(new ItemStack(CoalBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.sand}); RedstoneBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RedstoneBlock.png"); ModLoader.registerBlock(RedstoneBlock); ModLoader.addName(RedstoneBlock, "Block of Redstone"); ModLoader.addRecipe(new ItemStack(RedstoneBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.sandStone}); StarBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/StarMeteor.png"); ModLoader.registerBlock(StarBlock); ModLoader.addName(StarBlock, "Big Star"); Ruby.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Ruby.png"); ModLoader.addName(Ruby, "Ruby"); Sapphire.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Sapphire.png"); ModLoader.addName(Sapphire, "Sapphire"); Emeraude.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Emerald.png"); ModLoader.addName(Emeraude, "Emerald"); StarPiece.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/StarPiece.png"); ModLoader.addName(StarPiece, "Star Piece"); Star.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Star.png"); ModLoader.addName(Star, "Star"); ModLoader.addRecipe(new ItemStack(Star, 1), new Object [] {" # ", "# #", "# #", Character.valueOf('#'), Block.plantYellow}); } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { for(int i = 0; i < 7; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(60); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(RubyOre.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ); } } public String getVersion() { return "1.2.5"; } }package net.minecraft.src; import java.util.Random; public class BlockStar extends Block { public BlockStar(int par1, int par2) { super(par1, par2, Material.iron); } public int idDropped(int par1, Random par2Random, int par3) { return mod_DatMod.StarPiece.shiftedIndex; } public int quantityDropped(Random par1Random) { if (blockID == Block.StarBlock.blockID) { return 1 + par1Random.nextInt(2); } else { return 1; } } }EDIT:
I think I won't post anything else from now...
I just saw ''The Meaning of Life, the Universe, and Everyting...''
Never mind, I fixed it! It's because I wasn't paying close attention and did one symbol ('#') to represent silk and gunpowder. Doesn't turn out too good
Thank you! It works perfectly!
The ony things that I should change are the ore generation and the crafting recipes.
I will then add the tools and weapons and the star blocks generation. Oh, and...
...your diamonds! I won't spam with diamonds, so:
Craft your own blocks, I'm too lazy to do so.
The recipe is pretty simple. I rewrite the code only with the block and it is still not working. After recompiling, I start the starclient, I create a new world, I get a block of dirt and try to create my block, and it doesn't happen.
My mod_test code:
package net.minecraft.src; public class mod_teste extends BaseMod { public string version() { return "1.2.5." } public static final BlockTestBlock = new Block(225,0,Material.stone).setHardness(2.5F).setResistance(20F).setLightValue(20F).setBlockName("TestBlock"); { slipperiness = 1.2F; } public void() { ModLoader.addname(testblock,"Test Block") ModLoader.register(testblock) superblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/russo/testblock.png"); ModLoader.addRecipe(new ItemStack(testblock,1), new Object [] { "X", 'X', Block.dirt}); } }Well, I must have made a big mistake since I started ''trying to mod'' yesterday. If you could help me I'd be very thankful
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI see the problem, you didn't use the Character.valueOf() before Block.dirt, so that line should look like this:
ModLoader.addRecipe(new ItemStack(testblock,1), new Object [] { "X", 'X', Character.valueOf('X'), Block.dirt});That should help
Edit: I see you have an extra X in there, if you want to craft with one dirt block it should actually be:
ModLoader.addRecipe(new ItemStack(testblock,1), new Object [] { "X", Character.valueOf('X'), Block.dirt});My Bad
The code:
package net.minecraft.src; public class mod_teste extends BaseMod { public string getVersion() { return "1.2.5." } public static final Block TestBlock = new Block(225,0,Material.rock).setHardness(2.5F).setResistance(20F).setLightValue(20F).setBlockName("Test Block"); { slipperiness = 1.2F; } public void load() { ModLoader.addName(testblock,"Test Block") ModLoader.registerBlock(testblock) superblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/russo/testblock.png"); ModLoader.addRecipe(new ItemStack(testblock,1), new Object [] { "X", 'X', Character.valueOf('X'), Block.dirt}); } }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWow i missed a lot in that
well, since I'm here, I can't seem to find a way to create a new ingot... eclipse keeps telling me ItemIngot doesn't exist... Anyone know what I put it as to make an ingot?
(sorry if its confusing, its not too easy for me to explain
The Line 'O' Code:
public static final Item MyNewIngot = new ItemIngot(5000).setItemName("MyNewIngot");You can't override Block.dirt like that; it's a final variable, so it cannot be set to a different object once it's been initialized. You would have to either edit the Block class (to make Block.dirt not be final) or BlockDirt (to simply put your changes in that file).