This is my first tutorial, so please make suggestions to make it better, and not hate. HOW TO ADD MORE MUSIC DISCS WITH MODLOADER
This tutorial requires that you know basic MCP and ModLoader modding knowledge.
-------------
THE CODE
-------------
In MCP/src/minecraft/net/minecraft/src, make a new file called mod_[yourmodnamehere].
I will call mine mod_musicdiscs for the rest of this tutorials. I will add a mod with 2 music discs, but you can just add more if you want more. Inside the file, add this:
package net.minecraft.src;
import java.util.Random;
public class mod_musicdiscs extends BaseMod
{
public static final Item discExample = new ItemRecord(2003, "Example").setItemName("discExample");
public static final Item discExample2 = new ItemRecord(2004, "Example2").setItemName("discExample2");
public mod_MoreMusicDiscs()
{
discExample.iconIndex = ModLoader.addOverride("/gui/items.png", "/Yourownfolder/discExample.png");
discExample2.iconIndex = ModLoader.addOverride("/gui/items.png", "/Yourownfolder/discExample2.png");
ModLoader.AddName(discExample, "Music Disc");
ModLoader.AddName(discExample2, "Music Disc");
ModLoader.AddRecipe(new ItemStack(mod_musicdiscs.discExample, 1), new Object[] {
"X", "#", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Block.sand
});
ModLoader.AddRecipe(new ItemStack(mod_musicdiscs.discExample2, 1), new Object[] {
"X", "#", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Block.dirt
});
}
public String Version()
{
return "1.7_03";
}
}
Here I will explain what the different parts do:
public class mod_musicdiscs extends BaseMod
Every mod_ class files must extend BaseMod.
public static final Item discExample = new ItemRecord
This defines the new item.
(2003, "Example")
This is an important part of the code. 2003 is the ID, and as you already may know, item IDs is actually ID+256, so that it does not overwrite the block IDs. Item IDs can go up to 32000.
"Example": This is the name of the music file, that will be in resources.
This chooses the name in-game of the Music Discs. The two music discs in the vanilla game is called "Music Disc", so I suggest calling them "Music Disc".
This is the recipe for crafting the music discs. This will make crafting discExample one sand on top of obsidian. I suggest looking into a tutorial for crafting recipes.
public String Version()
{
return "1.7_03";
}
This is the version the mod says it is in modloader.txt.
-------------------------------------
ADDING MUSIC TO THE DISCS
-------------------------------------
This requires AudioMod by Risugami!
First, you need to download/make/find the music that you are gonna use.
(2003, "Example")
Remember this? This was the code you used to make the ID, and the name of the music file.
That means rename the file to Example, or whatever you have written there.
Now for the placement.
Put your music file in resources/mod/streaming in the .minecraft folder, not MCP.
Now your music should play with the disc.
If you get any errors, post them here, and I will look at them.
REMEMBER: If you want to share the mod with others, you must give them the music files, the class file (_mod) and the pictures.
This was made in a hurry, so please leave suggestions or comments that I can use this to make this better.
Crap Sorry if I post twice. I think I forgot to send last time. But how do you make it to where it doesn't say c418? like Now Playing: C414 - Final Level? I need it to say Approaching Nirvana - Final Level
Alright also, Nobody else can use it. I give them everything they need in a nice little organized .rar file and still nothing. here is my code if you want to have a look: http://pastebin.com/snei042a
Alright also, Nobody else can use it. I give them everything they need in a nice little organized .rar file and still nothing. here is my code if you want to have a look: http://pastebin.com/snei042a
Crap Sorry if I post twice. I think I forgot to send last time. But how do you make it to where it doesn't say c418? like Now Playing: C414 - Final Level? I need it to say Approaching Nirvana - Final Level
Also, should I add custom records, so you can make your own?
I'd be nice if you could create the basic file then highlight or astrik the area that need to be changed (maybe make the words to be changed in alll caps for clarity) and then have a READ ME that explained each change and where/how each part should be saved or found.
Also (and I don't know why) my computer keeps blocking access to the download for the mod saying its a trojan. Normally it has no probs with mediafire so idk. If you could upload it on a another file sharing site that'd be nice? Please and thank you ^^
Rollback Post to RevisionRollBack
thenoobfactor: somalia is the most advanced country in the world. They're years past the apocolypse.
Do you have to do it in a specific application, or can I just use Notepad? If I can use Notepad, can you post what format all the files have to be in? Thanks!
HOW TO ADD MORE MUSIC DISCS WITH MODLOADER
-------------
THE CODE
-------------
In MCP/src/minecraft/net/minecraft/src, make a new file called mod_[yourmodnamehere].
I will call mine mod_musicdiscs for the rest of this tutorials. I will add a mod with 2 music discs, but you can just add more if you want more. Inside the file, add this:
Here I will explain what the different parts do:
Every mod_ class files must extend BaseMod.
This defines the new item.
This is an important part of the code. 2003 is the ID, and as you already may know, item IDs is actually ID+256, so that it does not overwrite the block IDs. Item IDs can go up to 32000.
"Example": This is the name of the music file, that will be in resources.
This sets the item name (not in game though).
This chooses the image of the disk.
This chooses the name in-game of the Music Discs. The two music discs in the vanilla game is called "Music Disc", so I suggest calling them "Music Disc".
This is the recipe for crafting the music discs. This will make crafting discExample one sand on top of obsidian. I suggest looking into a tutorial for crafting recipes.
This is the version the mod says it is in modloader.txt.
-------------------------------------
ADDING MUSIC TO THE DISCS
-------------------------------------
This requires AudioMod by Risugami!
First, you need to download/make/find the music that you are gonna use.
Remember this? This was the code you used to make the ID, and the name of the music file.
That means rename the file to Example, or whatever you have written there.
Now for the placement.
Put your music file in resources/mod/streaming in the .minecraft folder, not MCP.
Now your music should play with the disc.
If you get any errors, post them here, and I will look at them.
REMEMBER: If you want to share the mod with others, you must give them the music files, the class file (_mod) and the pictures.
This was made in a hurry, so please leave suggestions or comments that I can use this to make this better.
I will add it in now.
http://pastebin.com/snei042a
http://pastebin.com/snei042a
Yes, I would like to know that also. :smile.gif:
Check out my Minecraft Modding Tutorials!
http://pastebin.com/32XtrRUA
My code: http://pastebin.com/QgjESe2W
Please show me your mod_DubstepRecords.java
I found out i am using java 7 and he is using java 6.
So I recoded in java 6 and worked for me, him, and 2 other friends.
Anyone got any mod suggestions?
Also, should I add custom records, so you can make your own?
The sound of madness
I Stand Alone
Voodoo
I'd be nice if you could create the basic file then highlight or astrik the area that need to be changed (maybe make the words to be changed in alll caps for clarity) and then have a READ ME that explained each change and where/how each part should be saved or found.
Also (and I don't know why) my computer keeps blocking access to the download for the mod saying its a trojan. Normally it has no probs with mediafire so idk. If you could upload it on a another file sharing site that'd be nice? Please and thank you ^^