[13:59] CONFLICT @ 26
[13:59] Exception in thread "main" java.lang.ExceptionInInitializerError
[13:59] at net.minecraft.src.StatCollector.<clinit>(StatCollector.java:28)
[13:59] at net.minecraft.src.StatList.<clinit>(StatList.java:23)
[13:59] at net.minecraft.src.Block.<clinit>(Block.java:999)
[13:59] at net.minecraft.src.TextureWaterFX.<init>(TextureWaterFX.java:22)
[13:59] at net.minecraft.client.Minecraft.<init>(Minecraft.java:210)
[13:59] at net.minecraft.src.MinecraftImpl.<init>(MinecraftImpl.java:21)
[13:59] at net.minecraft.client.Minecraft.startMainThread(Minecraft.java:1955)
[13:59] at net.minecraft.client.Minecraft.startMainThread1(Minecraft.java:1941)
[13:59] at net.minecraft.client.Minecraft.main(Minecraft.java:2001)
[13:59] at Start.main(Start.java:25)
[13:59] Caused by: java.lang.NullPointerException
[13:59] at java.util.Properties$LineReader.readLine(Properties.java:418)
[13:59] at java.util.Properties.load0(Properties.java:337)
[13:59] at java.util.Properties.load(Properties.java:325)
[13:59] at net.minecraft.src.StringTranslate.<init>(StringTranslate.java:22)
[13:59] at net.minecraft.src.StringTranslate.<clinit>(StringTranslate.java:13)
[13:59] ... 10 more
what do i do it wont work.
That really doesn't help anybody trying to help you. Either refer to the first page and trace your errors from the provided guides, or post your code for us to help you.
ok so im making a mod that just edits the Block.java file. How would i make this modloader compatable?
Anything which modifies a core class is going to conflict with one mod or another. The Block class is one of the core classes of the game and as such will affect many mods. To make it compatible with mod loader, decompile the mod loader modded Block.class and merge your code with it. Recompile. Then you have a compatible version - you will need both your mod and modloader to run that class then.
Hey guys, I need help, I have been stuck on the 'Making an Item with ModLoader' tutorial for a while now. :sad.gif: Here is my coding for mod_CabbageItem:
package net.minecraft.src;
public class mod_CabbageItem extends BaseMod
{
public mod_CabbageItem()
{
ModLoader.AddName(cabbageItem, "Cabbage");
}
public static final Item cabbageItem;
static
{
cabbageItem = (new ItemCabbage(4001, 11)).setIconIndex(ModLoader.addOverride("/gui/items.png", "HealingHeart.png")).setItemName("cabbageItem");
}
public String Version()
{
return "1";
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(cabbageItem), new Object[]{
" X ", "###", Character.valueOf('#'), Item.stick, Character.valueOf('X'), Item.porkCooked
});
}}
and here is my coding for ItemCabbage:
package net.minecraft.src;
public class ItemCabbage extends Item
{
private int healAmount;
public ItemCabbage (int i, int j)
{
super(i);
healAmount= j;
maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
itemstack.stackSize--;
entityplayer.heal(healAmount);
return itemstack;
}}
and the problem is I can't find out the error it just goes to a white screen when I run it through eclipse. I have tried Re-Installing minecraft and mcp but it keeps stopping on the white screen.
-Edit- It says this in the eclipse console: Failed to load mod from "mod_CabbageItem.class"
Hey guys, I need help, I have been stuck on the 'Making an Item with ModLoader' tutorial for a while now. :sad.gif: Here is my coding for mod_CabbageItem:
package net.minecraft.src;
public class mod_CabbageItem extends BaseMod
{
public mod_CabbageItem()
{
ModLoader.AddName(cabbageItem, "Cabbage");
}
public static final Item cabbageItem;
static
{
cabbageItem = (new ItemCabbage(4001, 11)).setIconIndex(ModLoader.addOverride("/gui/items.png", "HealingHeart.png")).setItemName("cabbageItem");
}
public String Version()
{
return "1";
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(cabbageItem), new Object[]{
" X ", "###", Character.valueOf('#'), Item.stick, Character.valueOf('X'), Item.porkCooked
});
}}
and here is my coding for ItemCabbage:
package net.minecraft.src;
public class ItemCabbage extends Item
{
private int healAmount;
public ItemCabbage (int i, int j)
{
super(i);
healAmount= j;
maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
itemstack.stackSize--;
entityplayer.heal(healAmount);
return itemstack;
}}
and the problem is I can't find out the error it just goes to a white screen when I run it through eclipse. I have tried Re-Installing minecraft and mcp but it keeps stopping on the white screen.
-Edit- It says this in the eclipse console: Failed to load mod from "mod_CabbageItem.class"
Your mod_CabbageItem coding is all over the place.. the reason its not loading correctly is because its calling for everything in the wrong sequence and area. Your ItemCabbage file looks fine, just your mod_** one. Refer to my code and try to set it up like mine, it makes it much simpler to read:
public class mod_Eggnog extends BaseMod
{
//Declare Eggnog
public static final Item m_Eggnog = new Eggnog(700, 9)
.setItemName("m_Eggnog");
public String getVersion()
{
return "1.0.0";
}
public void load() { }
public mod_Eggnog()
{
ModLoader.AddName(m_Eggnog, "Eggnog"); //Eggnog
m_Eggnog.iconIndex = ModLoader.addOverride("/gui/items.png", "/ICTextures/eggnog.png");
ModLoader.AddRecipe(new ItemStack(m_Eggnog, 2), new Object []{" p " , "ses" , " m " ,
Character.valueOf('m'), Item.bucketMilk
, Character.valueOf('e'), Item.egg , Character.valueOf('p'), Block.pumpkin , Character.valueOf('s'), Item.sugar});
}
}
Thank You :laugh.gif: :biggrin.gif:
I got it to work I thought I did my coding right :huh.gif: it says to do it that way in the tut.
Thanks again I give you:
-edit- How do I get it to be eaten like regular food?
Thank You :laugh.gif: :biggrin.gif:
I got it to work I thought I did my coding right :huh.gif: it says to do it that way in the tut.
Thanks again I give you:
-edit- How do I get it to be eaten like regular food?
Yikes! Glad I didn't learn off this tut originally then :huh.gif:..
For the food part, referring back to my mod_Eggnog file, the number nine (700, 9) at the end of this...:
//Declare Eggnog
public static final Item m_Eggnog = new Eggnog(700, 9) //here
.setItemName("m_Eggnog");
...is how many hunger your food item will replenish. Remember, even though in-game you only have 10 "drumstick" hunger, Minecraft coding goes by a heal amount of 20, so 9 really equals four and a half hunger replenished.. 4 = 2 hunger, 2 = 1 hunger, 1.5 = 1/2 hunger, and so on. That should be all you need to do in your mod_** file.
I'll give you my Eggnog file as well to base your work off of. (I should have coded it ItemEggnog, but I forgot to do so.. oh well). Follow it, and you should be able to eat your food as an item to replenish hunger! There should NOT be a variable of "healAmount" in this code; the "9" in the mod_** file will do its part, providing you extend your Item file properly with ItemFood.
package net.minecraft.src;
import java.util.Random;
public class Eggnog extends ItemFood
{
public Eggnog(int i, int j)
{
super(i, j, false);
maxStackSize = 16;
}
public ItemStack onFoodEaten(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
itemstack.stackSize--;
entityplayer.getFoodStats().addStatsFrom(this);
world.playSoundAtEntity(entityplayer, "random.burp", 0.5F, world.rand.nextFloat() * 0.1F + 0.9F);
return itemstack;
}
}
I'm making a new block, but how can I change its texture? I don't want to use a default texture of Minecraft, and I also wonder if there's a way to use a seperate .png file. Please answer back, this is my only resource for questions. I kinda knew how to do some of this already, but nowhere else can I ask, because everywhere else on the internet is just Modloader tutorials. I find it dumb using a mod to make a mod.
I'm making a new block, but how can I change its texture? I don't want to use a default texture of Minecraft, and I also wonder if there's a way to use a seperate .png file. Please answer back, this is my only resource for questions. I kinda knew how to do some of this already, but nowhere else can I ask, because everywhere else on the internet is just Modloader tutorials. I find it dumb using a mod to make a mod.
You need to use ModLoader to add new textures away from the item or terrain .png. I recommend you go to other tutorials, these are quite outdated.
Ok, I just want to inquire as to wether JDK6 is still required or wether it now requires JDK7?
I wanted to check and make sure, just incase this part hasn't been updated in a while or something.
Ok, thanks for the tutorials, I look forward to a response. :3
Ok, I just want to inquire as to wether JDK6 is still required or wether it now requires JDK7?
I wanted to check and make sure, just incase this part hasn't been updated in a while or something.
Ok, thanks for the tutorials, I look forward to a response. :3
I recommend using JDK 6, so your mods will work on systems with Java 7 as well as Java 6.
How do you make two mods compatible? Or better, I have permission from a friend on here too use his ores mod to make my weapons mod compatible. I can't even figure out how to get his class files open to start! Once I have his files in eclipse I'm sure I can figure out the rest. Help please?
is this the right way of making a recipe because I'm getting an error on .AddRecipe
ModLoader.AddRecipe = new ItemStack(mod_OreFrenzy.RubyPickaxe.shiftedIndex, 1)[ new object[]{
"###"," X "," X ", Character.ValueOf ("#"), mod_OreFrenzy.RubyItem.shiftedIndex, Character.ValueOf ("X"), Item.stick}
];
I could be totally wrong but i'd say your character value of # is wrong. It should be something like Item.Ruby or whatever you named the item.
To open it with Eclipse i think you should put the class files in the mcp/jars/bin/minecraft.jar and then decompile. Then you will find them in your src folder. Im not very sure, tho. And for the recipe code its exactly right if you put item.ItemName minecraft will search the item in item.java in src and thats why you write mod_yourmoname.itemname so it will search the item in your mod_modname.java. It also works if you write it in CraftingManager.java. Hope this helped :smile.gif:
Yep, I talked to a friend about it. Thanks tho!
I'm getting a bug with my mod on smp. Both the client and server classes for my mod_chess are extending basemodmp and I deleted all the modloader.addname lines on the server class. When I go to test it on my server I give myself the items with TMI and they show up, they work, everything is good. But when I put the recipe into a crafting table to make the items it won't let me. The finished product is just "unclickable"
That really doesn't help anybody trying to help you. Either refer to the first page and trace your errors from the provided guides, or post your code for us to help you.
Anything which modifies a core class is going to conflict with one mod or another. The Block class is one of the core classes of the game and as such will affect many mods. To make it compatible with mod loader, decompile the mod loader modded Block.class and merge your code with it. Recompile. Then you have a compatible version - you will need both your mod and modloader to run that class then.
It wont work! What do I do?
and here is my coding for ItemCabbage:
and the problem is I can't find out the error it just goes to a white screen when I run it through eclipse. I have tried Re-Installing minecraft and mcp but it keeps stopping on the white screen.
-Edit- It says this in the eclipse console: Failed to load mod from "mod_CabbageItem.class"
Your mod_CabbageItem coding is all over the place.. the reason its not loading correctly is because its calling for everything in the wrong sequence and area. Your ItemCabbage file looks fine, just your mod_** one. Refer to my code and try to set it up like mine, it makes it much simpler to read:
Hope I helped!
I got it to work I thought I did my coding right :huh.gif: it says to do it that way in the tut.
Thanks again I give you:
-edit- How do I get it to be eaten like regular food?
Yikes! Glad I didn't learn off this tut originally then :huh.gif:..
For the food part, referring back to my mod_Eggnog file, the number nine (700, 9) at the end of this...:
...is how many hunger your food item will replenish. Remember, even though in-game you only have 10 "drumstick" hunger, Minecraft coding goes by a heal amount of 20, so 9 really equals four and a half hunger replenished.. 4 = 2 hunger, 2 = 1 hunger, 1.5 = 1/2 hunger, and so on. That should be all you need to do in your mod_** file.
I'll give you my Eggnog file as well to base your work off of. (I should have coded it ItemEggnog, but I forgot to do so.. oh well). Follow it, and you should be able to eat your food as an item to replenish hunger! There should NOT be a variable of "healAmount" in this code; the "9" in the mod_** file will do its part, providing you extend your Item file properly with ItemFood.
Cheers :biggrin.gif:
package net.minecraft.src;
public class ItemSonicScrewdriver extends Item
{
public ItemSonicScrewdriver
(int i)
{
super(i);
maxStackSize = 64;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
return null;
}
}
because for my programming midterm project I am making a mod and I'm having issues
-----------------------------------------------------
Here is a version of "How to add a new recipe" for dummies made by me, KevinTehPro, another dummie!!
Original Post: http://mcmodhelping.weebly.com/1/post/2012/01/recipe11-adding-new-recipe-to-mc-on-the-crafting-table.html
Alrite... So here is the guide. I hope I get recognized...
You need to use ModLoader to add new textures away from the item or terrain .png. I recommend you go to other tutorials, these are quite outdated.
Ok, I just want to inquire as to wether JDK6 is still required or wether it now requires JDK7?
I wanted to check and make sure, just incase this part hasn't been updated in a while or something.
Ok, thanks for the tutorials, I look forward to a response. :3
I recommend using JDK 6, so your mods will work on systems with Java 7 as well as Java 6.
Click it! ^
I could be totally wrong but i'd say your character value of # is wrong. It should be something like Item.Ruby or whatever you named the item.
My crafting
Makes Flinter
Its EXPLODES! :biggrin.gif:
dylanrox44
Helping people.
Yep, I talked to a friend about it. Thanks tho!
I'm getting a bug with my mod on smp. Both the client and server classes for my mod_chess are extending basemodmp and I deleted all the modloader.addname lines on the server class. When I go to test it on my server I give myself the items with TMI and they show up, they work, everything is good. But when I put the recipe into a crafting table to make the items it won't let me. The finished product is just "unclickable"