Hello there My name is JapangaTextures
And this is a Modding Tutorial.
I assume you have already Setup MCP With forge.
And have Already Made a Base File
So let's Begin
So here is a Basic Item
Add this:
public static Item RedSphere
Now in the public void load Method add This:
RedSphere = new Item(4000).setUnlocalizedName("RedSphere").setCreativeTab(CreativeTabs.tabMaterials);
LanguageRegistry.addName("RedSphere, "Red Sphere of Awesomeness");
So let's get Started with a Basic Block
Add this code with you're RedSphere
public static Block RedSphereBlock
Than add this to you're Void Method:
RedSphereBlock = new BlockRedSphere(3816, "RedSphereBlock").setUnlocalizedName("RedSphereBlock").setHardness(2.0).setStepSound(Block.soundMetalFootstep).setReistance(10.0F);GameRegistry.registerBlock(RedSphereBlock, "RedSphereBlock");
LanguageRegistry.addName(RedSphereBlock, "Red Sphere Block of Amazingness");
public BlockOreCorundum(int par1, String texture) {
super(par1, Material.rock);
setCreativeTab(CreativeTabs.tabBlock); //place in creative tabs
}
And there is you're Block!
Textures is really Simple
If using 1.5.2
In src/minecraft Create a textures/items
and a textures/blocks folder
And .setUnlocalizedName("BLANK") Is you're texture file
So if it's a block than put the texture file "BLANK" Into /textures/blocks
and Same with item just put it in /textures/items
If you are using 1.6.2
Than create an assets folder in forge/mcp/src i believe If wrong correct me
And then create a minecraft folder inside the assets folder
and Put the textures/blocks and textures/items folder's in the minecraft Folder
Toolsets are Pretty Simple
Just make the Item:
public static Item swordRedSphere
Than add the ToolMaterial:
public static EnumToolMaterial redSphereWeapon = EnumHelper.addToolMaterial(REDSPHERE(3, 1561, 8.0F, 3, 10);
Now we Add this Code under the Load Method
swordRedSphere = new ItemSword(4001, redSphereWeapon).setUnlocalizedName("swordRedSphere").setCreativeTab(CreativeTabs.tabCombat);
LanguageRegistry.addName(swordRedSphere, "Red Sphere Sword of Awesomeness");
Change ItemSword to any of these depending on the tool: ItemPickaxe ItemShovel ItemAxe ItemHoe
And there is you're Sword!!
Colored Item names are Extremeley Simple
Just add this to the LanguageRegistry.addName thingy
LanguageRegistry.addName(swordRedSphere, "
§4Red Sphere Sword of Awesomeness
");
When The Item is Held in Minecraft the Name looks like this:
For Items create an ItemClass for this we will make ItemRedSphere
Be sure in you're Main file to
change
RedSphere = new Item
to
RedSphere = new ItemRedSphere
Now add this Method to ItemRedSphere
public ItemStack onItemRightClick(ItemStack itemstack, EntityPlayer entityplayer)
{
entityplayer.addChatMessage("What is Love Love!");
Now whenever we RightClick our RedSphere it says This:
What is Love Love!
What is Love Love!
In the chat(Says it Twice for some Reason)
You can also use the Color Formats above Just go like:
entityplayer.addChatMessage("
§4
What is Love Love!");
And it will Work
Now if you think you are done than follow These Steps
Goto you're MCP Directory
And Run recompile.bat
If you are on Mac OSX Open terminal and type in cd (Drag in MCP Folder)
Than press Enter
Then type in bash (Drag in recompile.sh)
And let it finish
Keep Terminal Open
Now run reobfuscate_srg.bat
If you want it to work on LAN Or Servers i think
If on Mac OSX Type in bash (Drag in reobfuscate_srg.bat)
Than go into reobf/minecraft And compress the contents inside the reobf/minecraft Folder into a .zip
Then put the textures folder inside the MCP/src Directory and place it into the .zip
Or the assets folder in forge/mcp/src
Might not be correct though.
And this is a Modding Tutorial.
I assume you have already Setup MCP With forge.
And have Already Made a Base File
So let's Begin
So here is a Basic Item
Add this:
public static Item RedSphere
Now in the public void load Method add This:
RedSphere = new Item(4000).setUnlocalizedName("RedSphere").setCreativeTab(CreativeTabs.tabMaterials);
LanguageRegistry.addName("RedSphere, "Red Sphere of Awesomeness");
So let's get Started with a Basic Block
Add this code with you're RedSphere
public static Block RedSphereBlock
Than add this to you're Void Method:
RedSphereBlock = new BlockRedSphere(3816, "RedSphereBlock").setUnlocalizedName("RedSphereBlock").setHardness(2.0).setStepSound(Block.soundMetalFootstep).setReistance(10.0F);GameRegistry.registerBlock(RedSphereBlock, "RedSphereBlock");
LanguageRegistry.addName(RedSphereBlock, "Red Sphere Block of Amazingness");
Now create a BlockRedSphere and add this code:
package Your.Package;
import java.util.Random;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class BlockRedSphere extends Block {
public BlockOreCorundum(int par1, String texture) {
super(par1, Material.rock);
setCreativeTab(CreativeTabs.tabBlock); //place in creative tabs
}
And there is you're Block!
Textures is really Simple
If using 1.5.2
In src/minecraft Create a textures/items
and a textures/blocks folder
And .setUnlocalizedName("BLANK") Is you're texture file
So if it's a block than put the texture file "BLANK" Into /textures/blocks
and Same with item just put it in /textures/items
If you are using 1.6.2
Than create an assets folder in forge/mcp/src i believe If wrong correct me
And then create a minecraft folder inside the assets folder
and Put the textures/blocks and textures/items folder's in the minecraft Folder
Toolsets are Pretty Simple
Just make the Item:
public static Item swordRedSphere
Than add the ToolMaterial:
public static EnumToolMaterial redSphereWeapon = EnumHelper.addToolMaterial(REDSPHERE(3, 1561, 8.0F, 3, 10);
Now we Add this Code under the Load Method
swordRedSphere = new ItemSword(4001, redSphereWeapon).setUnlocalizedName("swordRedSphere").setCreativeTab(CreativeTabs.tabCombat);
LanguageRegistry.addName(swordRedSphere, "Red Sphere Sword of Awesomeness");
Change ItemSword to any of these depending on the tool:
ItemPickaxe
ItemShovel
ItemAxe
ItemHoe
And there is you're Sword!!
Colored Item names are Extremeley Simple
Just add this to the LanguageRegistry.addName thingy
LanguageRegistry.addName(swordRedSphere, "
When The Item is Held in Minecraft the Name looks like this:
Red Sphere Sword of Awesomeness
Works on Blocks,Mobs Everything
For More Formatting Codes
Click Here
Custom Chat Messages are also Extremeley Simple
For Items create an ItemClass for this we will make ItemRedSphere
Be sure in you're Main file to
change
RedSphere = new Item
to
RedSphere = new ItemRedSphere
Now add this Method to ItemRedSphere
public ItemStack onItemRightClick(ItemStack itemstack, EntityPlayer entityplayer)
{
entityplayer.addChatMessage("What is Love Love!");
Now whenever we RightClick our RedSphere it says This:
What is Love Love!
What is Love Love!
In the chat(Says it Twice for some Reason)
You can also use the Color Formats above Just go like:
entityplayer.addChatMessage("
And it will Work
Now if you think you are done than follow These Steps
Goto you're MCP Directory
And Run recompile.bat
If you are on Mac OSX Open terminal and type in cd (Drag in MCP Folder)
Than press Enter
Then type in bash (Drag in recompile.sh)
And let it finish
Keep Terminal Open
Now run reobfuscate_srg.bat
If you want it to work on LAN Or Servers i think
If on Mac OSX Type in bash (Drag in reobfuscate_srg.bat)
Than go into reobf/minecraft And compress the contents inside the reobf/minecraft Folder into a .zip
Then put the textures folder inside the MCP/src Directory and place it into the .zip
Or the assets folder in forge/mcp/src
Might not be correct though.
Than Install forge into you're .jar
And put the .zip into the Mods Folder
You have finished you're mod
Well i don't have the src for this code just lookup how to setup MCP with forge and use this tutorial to actually work on the mod.
Well this tutorial isin't really that great.
I wouldn't follow it as i have no idea for 1.6
If u post ur code like this^ it would help alot
just do code stuff here /code
remember to add [] so it looks like [code]