ha you're totally right
anyway do you know how to make a new kind of fuel with modloader?
For releasing my mod, i'm in grade 9, so i dont have much time making mods :tongue.gif: gotta put more time in studying, high school is something really important to me
I'm making a mod'll be called CityCraft, with things that you can find in a city (cemet,smoke,electricity wires, LED light,.....) if any1 like you can take this as a mod suggestion and make it :biggrin.gif: , then i'll make something else
ha you're totally right
anyway do you know how to make a new kind of fuel with modloader?
For releasing my mod, i'm in grade 9, so i dont have much time making mods :tongue.gif: gotta put more time in studying, high school is something really important to me
I'm making a mod'll be called CityCraft, with things that you can find in a city (cemet,smoke,electricity wires, LED light,.....) if any1 like you can take this as a mod suggestion and make it :biggrin.gif: , then i'll make something else
This function is untested, kaekae found it not me, and I'm not sure that it works.
public static final Item newFuelName = (new ItemFuel(10, 6000)).setItemName("newFuel");
ModLoader.AddAllFuel(int id)
The top line goes into the bit where you declare all your blocks (not the bit that say public mod_whatever, the bit that extends basemod). The bottom line goes in your modloader functions bit.
1. Did you edit EnumToolMaterial to add in LAVA?
2. Did you add all the classes you created or edited to client_obfuscation?
3. Your class is missing something, look at this:
package net.minecraft.src;
public class mod_MoreTools extends BaseMod {
public static final Item lavaPick = new ItemPickaxe(2001, EnumToolMaterial.LAVA).setItemName("lavaPick");
public static final Item dstick = new Item(201).setItemName("dstick");
public String Version() {
return "1.4_01";
}
public mod_MoreTools {
lavaPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/grmods/lavap.png");
dstick.iconIndex = ModLoader.addOverride("/gui/items.png", "/grmods/dstick.png");
ModLoader.AddName(lavaPick, "Lava Pickaxe");
ModLoader.AddName(dstick, "Diamond Stick");
}
}
It should look like this, you forgot to put your ModLoader functions into public mod_yourMod. They have to be in this to register properly. On a side note, you should make dstick higher than 201, you can go up to 32000, so why go low? One more point: remember to add crafting recipes.
*** Minecraft Coder Pack Version 2.11 ***
MCP 2.11 running in C:\Users\Jackson2_2\Desktop\MCP
Compiling Minecraft
sources\minecraft\net\minecraft\src\BlockBloodStone.java:15: cannot find symbol
symbol : class Random
location: class net.minecraft.src.BlockBloodStone
public int idDropped(int i, Random random)
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.11 recompile script finished ===
Press any key to continue . . .
This is what happens if I add Random random behind int i, it doesn't recompile. However, when I remove Random random, it recompiles just fine, but then in game it doesn't work. I believe this is the only thing that was changed, besides the capitalization of mod_netherDust, which has to have Dust capitalized or it won't work.
Hello guys, I have a problem I made a block of redstone no errors ware detected by MCE so I put them into minecraft.jar run minecraft and BAM! black screen
Any Help pls
mod_redblock.java
package net.minecraft.src;
public class mod_redblock extends BaseMod
{
public static final Block redBlock = new BlockRedstone(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("redBlock");
public mod_redblock()
{
ModLoader.RegisterBlock(redBlock);
redBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/redstone_block.png");
ModLoader.AddName(redBlock, "Redstone Block");
}
public String Version()
{
return "1.4_01";
}
}
BlockRedstone.java
package net.minecraft.src;
public class BlockRedstone extends Block
{
protected BlockRedstone(int i, int j)
{
super(i, j, Material.iron);
}
}
*** Minecraft Coder Pack Version 2.11 ***
MCP 2.11 running in C:\Users\Jackson2_2\Desktop\MCP
Compiling Minecraft
sources\minecraft\net\minecraft\src\BlockBloodStone.java:15: cannot find symbol
symbol : class Random
location: class net.minecraft.src.BlockBloodStone
public int idDropped(int i, Random random)
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.11 recompile script finished ===
Press any key to continue . . .
This is what happens if I add Random random behind int i, it doesn't recompile. However, when I remove Random random, it recompiles just fine, but then in game it doesn't work. I believe this is the only thing that was changed, besides the capitalization of mod_netherDust, which has to have Dust capitalized or it won't work.
Have you imported Random? Do you know how? To import random, put this line right below your package declaration:
import java.util.Random;
It has to be exactly that. And it works if you do that, I think.
Hello guys, I have a problem I made a block of redstone no errors ware detected by MCE so I put them into minecraft.jar run minecraft and BAM! black screen
Any Help pls
mod_redblock.java
package net.minecraft.src;
public class mod_redblock extends BaseMod
{
public static final Block redBlock = new BlockRedstone(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("redBlock");
public mod_redblock()
{
ModLoader.RegisterBlock(redBlock);
redBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/redstone_block.png");
ModLoader.AddName(redBlock, "Redstone Block");
}
public String Version()
{
return "1.4_01";
}
}
BlockRedstone.java
package net.minecraft.src;
public class BlockRedstone extends Block
{
protected BlockRedstone(int i, int j)
{
super(i, j, Material.iron);
}
}
1. Did you add modloader to your minecraft.jar when you installed your mod?
2. If you are windows, look in your .minecraft and find ModLoader.txt. Copy it all and show me it. I'm gonna read over your stuff now.
3. Do you have the following picture in:
/mods/redstone_block.png
It won't run unless you have the redstone_block.png picture in the mods folder.
Hi I tried to use your tutorial to make an obsidian ingot. I haven't gotten to the part about smelting the obsidian into an ingot yet. here is my code
package net.minecraft.src;
public class mod_ObsidianPlus extends BaseMod
{
public String Version()
{
return "1.4_04";
}
public static final Item obsidianIngot = new Item(2000).setItemName("obsidianIngot");
public mod_ObsidianPlus()
{
obsidianIngot.iconIndex = ModLoader.addOverride("/gui/items.png","/gui/obsidianingot.png");
ModLoader.AddName(obsidianIngot, "Obsidian Ingot");
}
}
package net.minecraft.src;
public class ItemObsidianIngot extends Item {
public ItemObsidianIngot (int i)
{
super(i);
maxStackSize = 1;
}
}
I put my texture, obsidianingot.png into the gui folder in the minecraft.jar
When i recompile there are no errors but when i use the test_game.bat i get an error that says:
Overriding /gui.items.png with /gui/obsidianingot.png @ 38
jafa.lang.RuntimeException: java.lang.Exception: Image not found: /gui/obsidianingot.png
If anybody can help me figure out why it would be very appriciated.
@Bam I reccomend not usig test game and instead reobfuscating and testing it against your actual game. Then look in ModLoader.txt and copy everything that's in there if it fails.
@Benjo: you must import Random, have you done that?
Just after your package declaration, put this line:
1. Did you edit EnumToolMaterial to add in LAVA?
2. Did you add all the classes you created or edited to client_obfuscation?
3. Your class is missing something, look at this:
package net.minecraft.src;
public class mod_MoreTools extends BaseMod {
public static final Item lavaPick = new ItemPickaxe(2001, EnumToolMaterial.LAVA).setItemName("lavaPick");
public static final Item dstick = new Item(201).setItemName("dstick");
public String Version() {
return "1.4_01";
}
public mod_MoreTools {
lavaPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/grmods/lavap.png");
dstick.iconIndex = ModLoader.addOverride("/gui/items.png", "/grmods/dstick.png");
ModLoader.AddName(lavaPick, "Lava Pickaxe");
ModLoader.AddName(dstick, "Diamond Stick");
}
}
It should look like this, you forgot to put your ModLoader functions into public mod_yourMod. They have to be in this to register properly. On a side note, you should make dstick higher than 201, you can go up to 32000, so why go low? One more point: remember to add crafting recipes.
I added LAVA to EnumToolMaterial.
I now get an error on "public mod_MoreTools"
Syntax error on token "public", class expected after this token
I added the files to the conf/client_obfuscation.txt, but they don't show up in the /final_out/minecraft folder.
Added in import java.util.Random;, recompiled fine, everything works, still doesn't drop my item.
BlockBloodStone:
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.Random;
public class BlockBloodStone extends Block
{
public BlockBloodStone(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i)
{
return mod_NetherDust.netherDust.shiftedIndex;
}
}
mod_NetherDust:
package net.minecraft.src;
public class mod_NetherDust extends BaseMod
{
public mod_NetherDust()
{
netherDust.iconIndex = ModLoader.addOverride("/gui/items.png", "/NetherDust/NetherDust.png");
ModLoader.AddName(netherDust, "NetherDust");
}
public String Version()
{
return "1.4_01";
}
public static final Item netherDust = new ItemNetherDust(2000).setItemName("netherdust");
static
{
}
}
If you can't get it try just copying my classes on over.
EDIT: Take a look at the way you declare your netherDust item. You're saying it's a new ItemNetherDust, when it should really be a new Item, or else you would have to have another class ItemNetherDust for it to read from.
Thank you very much for telling saying that I should run it on my normal Minecraft. I had no idea and was at a complete loss because the code was correct and it refused to work when I ran the test_game.bat
Thank you very much for telling saying that I should run it on my normal Minecraft. I had no idea and was at a complete loss because the code was correct and it refused to work when I ran the test_game.bat
Hey! I completed my Malachite ore Mod and reobfuscated it. It reobfuscated fine, but when I installed it, I got the black (after the Mojang logo). I thought I found the problem, so I fixed it and now I get this error when I try to reobf:
*** Minecraft Coder Pack Version 2.11 ***
MCP 2.11 running in C:\Users\Ben\Desktop\MCP\ModLoader\Malachite Ore
+ Obfuscating client.
ERROR : Class file for net/minecraft/src/ not found. Please check your compilati
on logs for errors.
+ Obfuscating server.
=== MCP 2.11 reobfuscation script finished ===
Press any key to continue . . .
Please can somebody help me :biggrin.gif:
you didn't recompile it. recompile it, then reobfuscate.
anyway do you know how to make a new kind of fuel with modloader?
For releasing my mod, i'm in grade 9, so i dont have much time making mods :tongue.gif: gotta put more time in studying, high school is something really important to me
I'm making a mod'll be called CityCraft, with things that you can find in a city (cemet,smoke,electricity wires, LED light,.....) if any1 like you can take this as a mod suggestion and make it :biggrin.gif: , then i'll make something else
This function is untested, kaekae found it not me, and I'm not sure that it works.
The top line goes into the bit where you declare all your blocks (not the bit that say public mod_whatever, the bit that extends basemod). The bottom line goes in your modloader functions bit.
Compiler Error:
mod_MoreTools
2. Did you add all the classes you created or edited to client_obfuscation?
3. Your class is missing something, look at this:
It should look like this, you forgot to put your ModLoader functions into public mod_yourMod. They have to be in this to register properly. On a side note, you should make dstick higher than 201, you can go up to 32000, so why go low? One more point: remember to add crafting recipes.
This is what happens if I add Random random behind int i, it doesn't recompile. However, when I remove Random random, it recompiles just fine, but then in game it doesn't work. I believe this is the only thing that was changed, besides the capitalization of mod_netherDust, which has to have Dust capitalized or it won't work.
Any Help pls
mod_redblock.java
BlockRedstone.java
Have you imported Random? Do you know how? To import random, put this line right below your package declaration:
import java.util.Random;
It has to be exactly that. And it works if you do that, I think.
1. Did you add modloader to your minecraft.jar when you installed your mod?
2. If you are windows, look in your .minecraft and find ModLoader.txt. Copy it all and show me it. I'm gonna read over your stuff now.
3. Do you have the following picture in:
/mods/redstone_block.png
It won't run unless you have the redstone_block.png picture in the mods folder.
Heh here take this
Thanks :biggrin.gif:
I put my texture, obsidianingot.png into the gui folder in the minecraft.jar
When i recompile there are no errors but when i use the test_game.bat i get an error that says:
Overriding /gui.items.png with /gui/obsidianingot.png @ 38
jafa.lang.RuntimeException: java.lang.Exception: Image not found: /gui/obsidianingot.png
If anybody can help me figure out why it would be very appriciated.
@Benjo: you must import Random, have you done that?
Just after your package declaration, put this line:
import java.util.Random;
That should fix it.
I added LAVA to EnumToolMaterial.
I now get an error on "public mod_MoreTools"
I added the files to the conf/client_obfuscation.txt, but they don't show up in the /final_out/minecraft folder.
BlockBloodStone:
mod_NetherDust:
:/
Where it says public mod_MoreTools {
It should say public mod_MoreTools() {
Sorry
@shoop: just compare yours to mine here, check everydetail:
viewtopic.php?f=1036&t=281004&start=30#p4009071
Because mine worked perfectly
If you can't get it try just copying my classes on over.
EDIT: Take a look at the way you declare your netherDust item. You're saying it's a new ItemNetherDust, when it should really be a new Item, or else you would have to have another class ItemNetherDust for it to read from.
@Benjo: I'm here to help :biggrin.gif:
Thank you very much for telling saying that I should run it on my normal Minecraft. I had no idea and was at a complete loss because the code was correct and it refused to work when I ran the test_game.bat
Once again thanks for the help
That's okay I'm here to help :biggrin.gif:
you didn't recompile it. recompile it, then reobfuscate.