Well if you downloaded the latest version today as well, I'd say perhaps whoever we download through is still caching the old file.
edit: I don't think its that, because I tried several versions that should have the new functionality (or at least 2 that should) and neither works.
I'm thinking perhaps I'm just plain doing something wrong, but ... meh.
edit 2:
Looks like the function doesn't decompile properly with the latest MCP, looked through modloader source, and the function is func_21006_b(string, string)
Renaming it while recompiling and only copying over the new files (not overriding the pre-genned modloader files already in minecraft) finally worked.
So what I did was find the function that was supposed to be addOverride (string string)
rename it to be addOverride(string,string) like it was supposed to be (it should be an int function with two string inputs, with the body containing index i and addOverride(string string int)
recompiling, reobfiscating
then copying only my limestoneblock class and my mod class into minecraft.jar
What a chore, but well worth it now that I know what the issue was.
Seems like decompiling only works partially with MCP.
Hry guys, im taking one last shot at this. I asked a while back ,and got replies, but it kind of stopped.
=== Minecraft Coder Pack 2.7 ===
*** minecraft.jar was found, processing
*** Deobfuscating minecraft.jar
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries
*** Unpacking minecraft.jar
*** Fixing minecraft classes
*** Decompiling minecraft classes
No matching files found
No matching files found
*** Repackage minecraft sources
Repackage tool by Searge.
Could not find source directory C:\MCP\sources\minecraft
*** Patching minecraft sources
minecraft_server.jar was not found
*** Renaming methods and fields
+ Opening file conf/classes.csv for reading.
+ Opening file conf/methods.csv for reading.
+ Opening file conf/fields.csv for reading.
+ Opening file conf/minecraft.rgs for reading.
+ Opening file conf/minecraft_server.rgs for reading.
Help. I would LOOVE to mod, but this error has been bugging me for the past month, almost 2.
I included the recipe above and whatever it is below it and this is where the problem probably is. I included those so you could see if I put it in the wrong place.
Mmm, I'm having the EXACT same problem (The error report says my problem is there), and I don't know why. What error exactly did you get?
Here is mine:
[parsing started sources\minecraft\net\minecraft\src\CraftingManager.java]
sources\minecraft\net\minecraft\src\CraftingManager.java:167: '}' expected
"###", "#X#", "#R#", Character.valueOf('#'), Block.cobblestone, Character.valueOf('X'), Item.bow, Character.valueOf('R'), Item.redstone
^
sources\minecraft\net\minecraft\src\CraftingManager.java:168: ';' expected
addRecipe(new ItemStack(Block.example, 1), new Object[] {
^
sources\minecraft\net\minecraft\src\CraftingManager.java:168: ';' expected
addRecipe(new ItemStack(Block.example, 1), new Object[] {
^
sources\minecraft\net\minecraft\src\CraftingManager.java:168: not a statement
addRecipe(new ItemStack(Block.example, 1), new Object[] {
^
sources\minecraft\net\minecraft\src\CraftingManager.java:168: ';' expected
addRecipe(new ItemStack(Block.example, 1), new Object[] {
^
sources\minecraft\net\minecraft\src\CraftingManager.java:169: not a statement
"##", "##", Character.valueOf('#'), Block.dirt
^
sources\minecraft\net\minecraft\src\CraftingManager.java:169: ';' expected
"##", "##", Character.valueOf('#'), Block.dirt
^
sources\minecraft\net\minecraft\src\CraftingManager.java:169: ';' expected
"##", "##", Character.valueOf('#'), Block.dirt
^
sources\minecraft\net\minecraft\src\CraftingManager.java:169: not a statement
"##", "##", Character.valueOf('#'), Block.dirt
^
sources\minecraft\net\minecraft\src\CraftingManager.java:169: ';' expected
"##", "##", Character.valueOf('#'), Block.dirt
^
sources\minecraft\net\minecraft\src\CraftingManager.java:170: illegal start of expression
});
^
[parsing completed 6ms]
11 errors
*** Minecraft Coder Pack Version 2.7 ***
Compiling Minecraft
sources\minecraft\net\minecraft\src\ItemHardHat.java:14: reached end of file whi
le parsing
}
Compiling Minecraft Start Class
Compiling Minecraft Server
=== MCP 2.7 recompile script finished ===
Press any key to continue . . .
Here is what hardhat looks like:
package net.minecraft.src;
public class ItemHardHat extends Item
{
public ItemHardHat(int i)
{
super(i);
maxStackSize = 64;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
}{
}
When I take away the { it says I'm missing one?
*** Minecraft Coder Pack Version 2.7 ***
Compiling Minecraft
sources\minecraft\net\minecraft\src\ItemHardHat.java:13: missing return statemen
t
}
^
1 error
Compiling Minecraft Start Class
Compiling Minecraft Server
=== MCP 2.7 recompile script finished ===
Press any key to continue . . .
All of you having trouble with ModLoader's addOverride(String, String) function was because you did not update the minecraft.rgs file in the conf folder.
I've tested it and ModLoader works perfectly after updating the file with the contents Risugami has listed in his topic.
Next time just read the instructions.
And yes, you can open the file in any text editor. If you didn't know that already, you could have just tried and tested it out.
=== Minecraft Coder Pack 2.7 ===
*** minecraft.jar was found, processing
*** Deobfuscating minecraft.jar
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries
*** Unpacking minecraft.jar
*** Fixing minecraft classes
*** Decompiling minecraft classes
No matching files found
No matching files found
*** Repackage minecraft sources
Repackage tool by Searge.
Could not find source directory C:\MCP\sources\minecraft
*** Patching minecraft sources
minecraft_server.jar was not found
*** Renaming methods and fields
+ Opening file conf/classes.csv for reading.
+ Opening file conf/methods.csv for reading.
+ Opening file conf/fields.csv for reading.
+ Opening file conf/minecraft.rgs for reading.
+ Opening file conf/minecraft_server.rgs for reading.
I hate to be 'that guy', but after three days straight of trying to get a custom skin to work on MC, I've hit my maximum exhaustion point. I've done everything I can imagine from updating modloader files to seeing if it's possible to just use vanilla files to reference a custom skin.
What I'm asking for is either a complete example (not in parts, because I need to see where what goes in proper order) or a proper tutorial on how to reference a custom skin.
I've including the final segment of code I had before I finally threw in the towel. It's probably the worst segment of code I've ever written, but it just proves that I was determined to try anything and everything to get this working.
package net.minecraft.src;
import java.util.Random;
public class mod_longbow extends BaseMod
{
public static mod_longbow = new Itemlongbow(123).(ModLoader.getUniqueSpriteIndex("/gui/items.png")).("examplebow.png");
public static String getAppdata() {
return Minecraft.getPath();
}
public static Itemlongbow();
{
ModLoader.AddName(Itemlongbow, "Longbow");
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(Item.longbow), new Object[]{
"#X ", "# X", "#X ", Character.valueOf('#'), Block.dirt, Character.valueOf('X'), Block.planks
});
}
public void RegisterTextureOverrides()
{
ModLoader.addOverride("/gui/item.png","/gui/examplebow.png");
}
public String Version()
{
return "1.2_02";
}
}
Rollback Post to RevisionRollBack
Active OSes: Win7 Ultimate, Ubuntu 10.04 Desktop; Vista Business, Ubuntu 11.04 (VMs)
I'm probably leaving mcf. Lost interest in staying on this forum, not that anyone really would care.
I made a new mod out of the tutorial. It looks like this:
<insert post>
PLEASE HELP!!!
You need to save block.java into BlockRed.java
Otherwise it doesn't recognize the file.
Actually the problem is that programming languages are case-sensitive, java is one of them.
So if your class is defined as "Redblock", your file must be named "Redblock". You can't name it "RedBlock", because that capitalized B makes a difference.
All of you having trouble with ModLoader's addOverride(String, String) function was because you did not update the minecraft.rgs file in the conf folder.
I've tested it and ModLoader works perfectly after updating the file with the contents Risugami has listed in his topic.
Next time just read the instructions.
And yes, you can open the file in any text editor. If you didn't know that already, you could have just tried and tested it out.
Hmmm... I'll reread the newest version, that definitely looks like I must have been reading the readme in another folder or forum post, rather than the full one in his latest posts.
Cheers.
For MCP users, open conf/minecraft.rgs and replace ".class ModLoader" and ".class BaseMod" sections with the updated mapping below.
derp lol *slaps forhead*
edit: oh and the real reason I came back to reread this thread from last night:
Is there a way to use modloader or other ways to generate unique id's so they don't conflict with other mods? With only like 127 available ID's, I feel extremely claustrophobic.
Is there a way to use modloader or other ways to generate unique id's so they don't conflict with other mods? With only like 127 available ID's, I feel extremely claustrophobic.
You have to generate the 'unique IDs' yourself with some kind of properties or settings file. If the game did it, it would readjust IDs when installing/removing mods, and screw up your inventory.
I have a very basic and easy to use settings manager for this exact purpose (with instructions) on my topic you can use. (Check second post, link is there).
And I believe Roundaround and another modder, smith something, also have a very advanced properties manager. Theirs can do a lot more than mine can do. A lot more.
Either of these would work well for handling IDs within a text file.
Or you can create your own, or think of another way to manage IDs... but I can't think of another way to do it.
Creating a new recipe
1. Open up CraftingManager.java
How do I get CraftingManager.java?
1. Get a compiler program (like Eclipse, NetBeans, etc)
2. Click Open
3. Navigate to the files by using this path: mcp27\sources\minecraft\net\minecraft\src (note that it might be different, depending on OS and file structure)
4. Locate CraftingManager.java (by typing in Search or manually searching)
5. Double click on it (or click on it then click Open)
6. Edit to your leisure
@Nicae
Code doesn't work (although I have checked to make sure it's referencing correctly) and I get about 7-8 errors.
It's more than likely an issue on my end. I've been changing a lot of data around so it's possible that a file (or four) have become nulled/corrupted, I'm referencing something wrong, or I updated the ModLoader file incorrectly (as I found it odd that there was no .basemod segment, and just threw it at the end on the file, but before the .class *** segment).
I'm going to start with a completely clean slate for good measures but I probably won't start again until tomorrow (because I need a break from everything after how today went).
It's nothing against you but I'm in no mood to figure out what went wrong completely.
Rollback Post to RevisionRollBack
Active OSes: Win7 Ultimate, Ubuntu 10.04 Desktop; Vista Business, Ubuntu 11.04 (VMs)
I'm probably leaving mcf. Lost interest in staying on this forum, not that anyone really would care.
Just a quick question (I know this is possible, but I don't know how):
How would one create a settings / ".properties" file that stores different variables (block and item IDs, etc.) and would allow those stored variables to be used in the mod itself?
Thanks for your help,
PROWNE
Rollback Post to RevisionRollBack
While I may be inactive, you can check up on what I'm doing on my website Gamer's Den.
edit: I don't think its that, because I tried several versions that should have the new functionality (or at least 2 that should) and neither works.
I'm thinking perhaps I'm just plain doing something wrong, but ... meh.
edit 2:
Looks like the function doesn't decompile properly with the latest MCP, looked through modloader source, and the function is func_21006_b(string, string)
Renaming it while recompiling and only copying over the new files (not overriding the pre-genned modloader files already in minecraft) finally worked.
So what I did was find the function that was supposed to be addOverride (string string)
rename it to be addOverride(string,string) like it was supposed to be (it should be an int function with two string inputs, with the body containing index i and addOverride(string string int)
recompiling, reobfiscating
then copying only my limestoneblock class and my mod class into minecraft.jar
What a chore, but well worth it now that I know what the issue was.
Seems like decompiling only works partially with MCP.
Help. I would LOOVE to mod, but this error has been bugging me for the past month, almost 2.
Mmm, I'm having the EXACT same problem (The error report says my problem is there), and I don't know why. What error exactly did you get?
Here is mine:
Here is my craftingmanager.java
I hope it's just a minor problem :/
I have no idea how to fix them
Log:
I need help... again. :/
Oh, and if needed, the Source:
you should have a
});
at the end of that addRecipe (its expecting a closing } to your opening {)
Here is what hardhat looks like:
When I take away the { it says I'm missing one?
Help!
Thanks
I'm no Java Genius, and I've barely modded MineCraft at all, but it is this Opening Tag here.
I've tested it and ModLoader works perfectly after updating the file with the contents Risugami has listed in his topic.
Next time just read the instructions.
And yes, you can open the file in any text editor. If you didn't know that already, you could have just tried and tested it out.
What I'm asking for is either a complete example (not in parts, because I need to see where what goes in proper order) or a proper tutorial on how to reference a custom skin.
I've including the final segment of code I had before I finally threw in the towel. It's probably the worst segment of code I've ever written, but it just proves that I was determined to try anything and everything to get this working.
I'm probably leaving mcf. Lost interest in staying on this forum, not that anyone really would care.
that should do it!
(fixed up your code just a smidge there Charrshaman :wink.gif: hope you get your mod workin!)
How do I get CraftingManager.java?
Actually the problem is that programming languages are case-sensitive, java is one of them.
So if your class is defined as "Redblock", your file must be named "Redblock". You can't name it "RedBlock", because that capitalized B makes a difference.
Hmmm... I'll reread the newest version, that definitely looks like I must have been reading the readme in another folder or forum post, rather than the full one in his latest posts.
Cheers.
derp lol *slaps forhead*
edit: oh and the real reason I came back to reread this thread from last night:
Is there a way to use modloader or other ways to generate unique id's so they don't conflict with other mods? With only like 127 available ID's, I feel extremely claustrophobic.
You have to generate the 'unique IDs' yourself with some kind of properties or settings file. If the game did it, it would readjust IDs when installing/removing mods, and screw up your inventory.
I have a very basic and easy to use settings manager for this exact purpose (with instructions) on my topic you can use. (Check second post, link is there).
And I believe Roundaround and another modder, smith something, also have a very advanced properties manager. Theirs can do a lot more than mine can do. A lot more.
Either of these would work well for handling IDs within a text file.
Or you can create your own, or think of another way to manage IDs... but I can't think of another way to do it.
1. Get a compiler program (like Eclipse, NetBeans, etc)
2. Click Open
3. Navigate to the files by using this path: mcp27\sources\minecraft\net\minecraft\src (note that it might be different, depending on OS and file structure)
4. Locate CraftingManager.java (by typing in Search or manually searching)
5. Double click on it (or click on it then click Open)
6. Edit to your leisure
@Nicae
Code doesn't work (although I have checked to make sure it's referencing correctly) and I get about 7-8 errors.
It's more than likely an issue on my end. I've been changing a lot of data around so it's possible that a file (or four) have become nulled/corrupted, I'm referencing something wrong, or I updated the ModLoader file incorrectly (as I found it odd that there was no .basemod segment, and just threw it at the end on the file, but before the .class *** segment).
I'm going to start with a completely clean slate for good measures but I probably won't start again until tomorrow (because I need a break from everything after how today went).
It's nothing against you but I'm in no mood to figure out what went wrong completely.
I'm probably leaving mcf. Lost interest in staying on this forum, not that anyone really would care.
Sorry, you were both wrong.
Also, you don't need "import java.util.Random;" unless you're going to use a 'Random' value.
How would one create a settings / ".properties" file that stores different variables (block and item IDs, etc.) and would allow those stored variables to be used in the mod itself?
Thanks for your help,
PROWNE
How would I go about changing the speed blocks are destroyed to destroy on one click, (cobble, fences, obsidian)?
Which class file, and what would I do? Thanks.