Hey Everyone! Its me aleshgames, today i'm going to teach how to code minecraft using forge. I will not be doing the basic stuff or how to set up. This is random code that you may like to have on your mod Enjoy!!!
Extended Tool Tips
Extended Tool Tips is and additional description to your item. When you hopper over the item it will show you the information
Add this to your ItemClass File
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean i)
{
list.add("\u00A71LOL");
Change the 1 in
\u00A71
For different color text!!
0 - Black 1 - Dark Blue 2 - Dark Green 3 - Cyan 4 - Dark Red 5 - Purple 6 - Gold 7 - Gray 8 - Dark Gray 9 - Blue a - Green b - Aqua c - Red d - Pink e - Yellow f -White
Enchanted Glow on Items
This very easy the only thing that you have to add to your ItemClass is this:
public boolean hasEffect(ItemStack par1ItemStack) {
return true;
}
Generating Item in Chest
This another easy tutorial the only think that you have to add to you ModClass is this:
ChestGenHooks.addItem(ChestGenHooks.VILLAGE_BLACKSMITH, new WeightedRandomChestContent(new ItemStack(itemTutorial), 1, 5, 18));
Block Drops
Ones again this is an easy tutorial just add this to your BlockClass:
public int idDropped(int i, Random rand, int j){
return Item.stick; //the block that you want to be droped example, return Item.stick
}
public int quantityDropped(Random rand){
return 6; //how much of it is it going to drop example, return 6
}
Hey Everyone! Its me aleshgames, today i'm going to teach how to code minecraft using forge. I will not be doing the basic stuff or how to set up. This is random code that you may like to have on your mod
Extended Tool Tips
Add this to your ItemClass File
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean i) { list.add("\u00A71LOL");Change the 1 in
\u00A71
For different color text!!
0 - Black
1 - Dark Blue
2 - Dark Green
3 - Cyan
4 - Dark Red
5 - Purple
6 - Gold
7 - Gray
8 - Dark Gray
9 - Blue
a - Green
b - Aqua
c - Red
d - Pink
e - Yellow
f - White
Enchanted Glow on Items
public boolean hasEffect(ItemStack par1ItemStack) { return true; }Generating Item in Chest
Block Drops
public int idDropped(int i, Random rand, int j){ return Item.stick; //the block that you want to be droped example, return Item.stick } public int quantityDropped(Random rand){ return 6; //how much of it is it going to drop example, return 6 }Request in the comments for Ideas for Tutorials
-
View User Profile
-
View Posts
-
Send Message
Curse Premium|..____|....|.| .................|..__.\(_)...............................|.| .........|..\/..| ........|.|
|.|__..__.._|.|_._.__.__._.______|.|..|.|_..__._._.__.___...___.._ __...__|.|___.______|.\ / |.___...__|.|
|..__|.\.\/./.__|.'__/._`.|______|.|..|.|.|/ _` |.'_.`._ \ /._.\|.'_.\ / _` /.__|______|.|\/|.|/._.\ /._`.|
|.|____.>..<| |_|.|.|.(_|.|......|.|__|.| |.(_| |.| |.|.|.|.(_).|.|.|.|.(_|.\__.\......|.|..|.|.(_).|.(_|.|
|______/_/\_\\__|_|..\__,_|......|_____/|_|\__,_|_| |_| |_|\___/|_| |_|\__,_|___/......|_|..|_|\___/.\__,_|
[/pre]