Mrgreen33gamer's [1.6.1\1.6.2\1.6.4\]Forge/ModLoader Modding Tutorials
Poll: Is helpful
Ended Feb 16, 2015
Poll: Do you want to make Bukkit Plugins
Ended Feb 16, 2015
Poll: Forge Dimension?
Ended Feb 16, 2015
Ended Feb 16, 2015
Ended Feb 16, 2015
Ended Feb 16, 2015
ummm, thats a little to much but i have nothing else to do all day, this is a pretty long code so i'll need extra support for this one...
Um, the part that says "2013, MyDisk" the MyDisk is the name of the music like, MyDisk.ogg
in your case change the MyDisk to bleed.ogg
Hope it helped.
Slab and stairs will be a SNAP!
NetherGenMinale
Generation code in mod_
Again edit to your mod
THE REPORT:
THE CODE:
mod_Boogatite
BlockBoogatiteOre
BlockBoogatiteBlock
ItemBoogatite
P.S. I haven't put in textures in yet, but another mod I made didn't have textures when I ran it in Minecraft, and it worked fine
In the ModLoader.addArmor take of the "_" at the end and if that does not work send me the entire modding folder for me to download.
Dude your a life savior, why would I ignore nether ore generation. Your awesome, if someone asked me to put up a code a will of it works and your worked very well. Thanks.
Here is my code:
my mod_test class
package net.minecraft.src;
import java.util.Random;
public class mod_test extends BaseMod
{
public static final Block Rubyore = new Block(160,Material.ground).getIndirectPowerOutput("rubyore").setCreativeTab(CreativeTabs.tabBlock).setHardness(5F).setResistance(6F).setLightValue(0.375F).setStepSound(Block.soundStoneFootstep);
public static final Item ruby = new Item(4000).setCreativeTab(CreativeTabs.tabMaterials).setUnlocalizedName("ruby");
public String getVersion()
{
return "test";
}
public void load()
{
ModLoader.registerBlock(Rubyore);//registers the block
ModLoader.addName(Rubyore, "Ruby Ore");
ModLoader.addName(ruby, "Ruby");//sets the name of the item
}
public void generateSurface(World world, Random random, int i, int j)
{
for(int k = 0; k < 5; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(30);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(Rubyore.blockID, 6)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
}
My BlockRubyOre Class:
package net.minecraft.src;
import java.util.Random;
public class BlockRubyOre extends Block
{
public BlockRubyOre(int par1)
{
super(par1, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public int idDropped(int i, Random par2Random, int j)
{
return mod_test.ruby.itemID;
}
}
In the public static final block take off the material, you all ready have that in your blockNAME classMake sure that the item and block show up in game or creative tab.
It didn't work, so here's my mcp folder (Please tell me the changes):
https://www.dropbox.com/sh/x6fhh85ieq6s00x/g8ywbwq4Qk
I'm kind of busy but ill look thru the codes when I'm done
Now try the code!
And you need to create a new Class called ItemRuby.
Thanks! also how do i set it so it can be only broken by a certain pickaxe (like iron) and how fast it breaks?
I'll try to give you a code.
The armor does not go in textures, the folders go like this:
Eclipse/client/bin/armor/NAME_1.png and NAME_2.png
There are two png files
in the method ModLoader.addArmor("NAME");
there is no underscore and just copy the diamond armor from the jar file and put them in your armor folder and name them
NAME_1.png and NAME_2.png
i dont have the armor folder should i make it?
package net.minecraft.src;
import java.util.Random;
public class mod_test extends BaseMod
{
public static final Block Rubyore = new BlockRubyOre(160).getIndirectPowerOutput("rubyore").setCreativeTab(CreativeTabs.tabBlock).setHardness(5F).setResistance(6F).setLightValue(0.375F).setStepSound(Block.soundStoneFootstep);
public static final Item ruby = new ItemRuby(161).setCreativeTab(CreativeTabs.tabMaterials).setUnlocalizedName("ruby");
public static final Item RPick = new ItemPickaxe(2107, EnumToolMaterial.RUBY).setUnlocalizedName("rpick");
public static final Item RShovel = new ItemSpade(2108, EnumToolMaterial.RUBY).setUnlocalizedName("rshovel");
public static final Item RHoe= new ItemHoe(2109, EnumToolMaterial.RUBY).setUnlocalizedName("rhoe");
public static final Item RSword = new ItemSword(2110, EnumToolMaterial.RUBY).setUnlocalizedName("rsword");
public static final Item RAxe = new ItemAxe(2111, EnumToolMaterial.RUBY).setUnlocalizedName("raxe");
public static final Item RubyBody = (new ItemArmor(2200, EnumArmorMaterial.RUBY ,6,1 ).setUnlocalizedName("rubybody"));
public static final Item RubyHelmet = (new ItemArmor(2201,EnumArmorMaterial.RUBY ,6,0 ).setUnlocalizedName("rubyhelm"));
public static final Item RubyPants = (new ItemArmor(2202,EnumArmorMaterial.RUBY ,6,2 ).setUnlocalizedName("rubypants"));
public static final Item RubyBoots = (new ItemArmor(2203,EnumArmorMaterial.RUBY, 6, 3 ).setUnlocalizedName("rubyboots"));
public String getVersion()
{
return "test";
}
public void load()
{
//Ruby Chestplate
ModLoader.addName(RubyBody, "Ruby Chestplate");
ModLoader.addRecipe(new ItemStack(RubyBody,1), new Object[]{ "* *", "***", "***", Character.valueOf('*'), mod_test.ruby});
//Ruby Helmet
ModLoader.addName(RubyHelmet, "Ruby Helmet");
ModLoader.addRecipe(new ItemStack(RubyHelmet,1), new Object[]{ "***", "* *", Character.valueOf('*'), mod_test.ruby});
//Ruby Pants
ModLoader.addName(RubyPants, "Ruby Leggings");
ModLoader.addRecipe(new ItemStack(RubyPants,1), new Object[]{ "***", "* *", "* *", Character.valueOf('*'), mod_test.ruby});
//Ruby Boots
ModLoader.addName(RubyBoots, "Ruby Boots");
ModLoader.addRecipe(new ItemStack(RubyBoots,1), new Object[]{ "* *", "* *", Character.valueOf('*'), mod_test.ruby});
ModLoader.addArmor("ruby");
//Ruby Pickaxe
ModLoader.addName(RPick, "Ruby Pickaxe");
ModLoader.addRecipe(new ItemStack(RPick, 1), new Object[]{"***", " X ", " X ",('X'), Item.stick, ('*'), mod_test.ruby});
//Ruby Shovel
ModLoader.addName(RShovel, "Ruby Shovel");
ModLoader.addRecipe(new ItemStack(RShovel, 1), new Object[]{" * ", " X ", " X ",('X'), Item.stick, ('*'), mod_test.ruby});
//Ruby Hoe
ModLoader.addName(RHoe, "Ruby Hoe");
ModLoader.addRecipe(new ItemStack(RHoe, 1), new Object[]{"** ", " X ", " X ",('X'), Item.stick, ('*'), mod_test.ruby});
//Ruby Sword
ModLoader.addName(RSword, "Ruby Sword");
ModLoader.addRecipe(new ItemStack(RSword, 1), new Object[]{" * ", " * ", " X ", ('X'), Item.stick, ('*'), mod_test.ruby});
//Ruby Axe
ModLoader.addName(RAxe, "Ruby Axe");
ModLoader.addRecipe(new ItemStack(RAxe, 1), new Object[]{ "** ", "*X ", " X ", ('X'), Item.stick, ('*'), mod_test.ruby});
//Ruby Ore
ModLoader.registerBlock(Rubyore);
ModLoader.addName(Rubyore, "Ruby Ore");
//Ruby
ModLoader.addName(ruby, "Ruby");
}
public void generateSurface(World world, Random random, int i, int j)
{
for(int k = 0; k < 5; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(30);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(Rubyore.blockID, 6)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
}