Crafting recipes are so simple, you can easily learn by looking at the source code of another mod.
I'm just really new to Java Programming, for the most part it all looks like nothing to me. I can pick out a few parts here and there and understand what they have in relation to the rest of the code and stuff that like. But I tried making a mod in 1.6.4 a while ago while watching a video series, and he explained crafting recipes he just didn't explain how to use vanilla items, and I couldn't figure it out myself, like what the names of all the vanilla items are called and stuff
Like, how to use a Vanilla item / block in your own recipe? or changing the Vanilla recipe?
If you want to change a vanilla recipe (for example, to make paper, you need 6 sugar cane instead of 3), this gets pretty complicated for beginners.
No no, not change Vanilla Recipes, I mean add vanilla items to my mod recipe. Like for instance I was trying to make a back bowl of dye, so I was gonna make the crafting recipe a ink sac and a bowl, but I had no idea what the names of either were so I was unable to make the recipe.
No no, not change Vanilla Recipes, I mean add vanilla items to my mod recipe. Like for instance I was trying to make a back bowl of dye, so I was gonna make the crafting recipe a ink sac and a bowl, but I had no idea what the names of either were so I was unable to make the recipe.
Ah, then your situation is very easy
Just use "Items.itemnamehere", or Blocks respectively. Also, if you type "Items.", it should pop up a list of items and blocks respectively.
GameRegistry.addRecipe(new ItemStack(ItemClass.itemName), new Object[] {"AAA", "A A", " ", ('A'), Items.apple});
Ah, okay. I'm still working on blocks but once I get to recipes, I'll come to you if I need more help
EDIT: I'm having trouble with a few other things though, number 1 is I can't get my Texture on my block. I have it in the correct place and it's showing up on eclipse and everything. I also made sure that all the spelling was correct but my block still comes out with Pink and Black squares (I even tried making the block texture name with .png at the end and without it, it still didn't work). My second problem is the Block names comes out as like tile.BlackStone.block or something like that, how do fix that? If anyone is able to help that'd be great! Thanks
Ah, okay. I'm still working on blocks but once I get to recipes, I'll come to you if I need more help
EDIT: I'm having trouble with a few other things though, number 1 is I can't get my Texture on my block. I have it in the correct place and it's showing up on eclipse and everything. I also made sure that all the spelling was correct but my block still comes out with Pink and Black squares (I even tried making the block texture name with .png at the end and without it, it still didn't work). My second problem is the Block names comes out as like tile.BlackStone.block or something like that, how do fix that? If anyone is able to help that'd be great! Thanks
To fix the block name, you'll need to create a file called "en_US.lang" (located in src/main/resources/assets/modid/lang/en_US.lang). Then just type out what you need. For example, tile.blockName.name=Block Name; or item.itemName.name=Item Name; or itemGroup.creativeTabName=Creative Tab)
For your missing texture, put your texture code in a pastebin or something, and I can look at it if you like.
The Meaning of Life, the Universe, and Everything.
Join Date:
4/16/2013
Posts:
56
Minecraft:
Fearnbus25
PSN:
Fearnbus25
Member Details
I'm really sorry, I feel really stupid but I still can't get the item name correct, in the en_US.lang tutorial part he said to put the file in the src/main/java, I tried moving it over to the src/main/resources but it didn't work Here is a picture of how my Eclipse is set up:
I hope you can find out and see if I did something wrong, if you need pictures of anything else let me know
Also how do I get the texture code? I feel like a real noob asking but I"m not sure how to do it
mmh ok.. so i've been following the tutorial steps by step and am now trying to create my first item..yet, i still have loads of errors in the program and i dont know how to fix them :/...
mmh ok.. so i've been following the tutorial steps by step and am now trying to create my first item..yet, i still have loads of errors in the program and i dont know how to fix them :/...
Not Completely sure but I think you just have to hit Shift+Ctrl+O, then it will import all your stuff.
Where is do you define the required code needed for giving it a texture? Could you give me your main class file (if that is where you initialize and register your items).
Crafting recipes are so simple, you can easily learn by looking at the source code of another mod.
I'm just really new to Java Programming, for the most part it all looks like nothing to me. I can pick out a few parts here and there and understand what they have in relation to the rest of the code and stuff that like. But I tried making a mod in 1.6.4 a while ago while watching a video series, and he explained crafting recipes he just didn't explain how to use vanilla items, and I couldn't figure it out myself, like what the names of all the vanilla items are called and stuff
If you want to change a vanilla recipe (for example, to make paper, you need 6 sugar cane instead of 3), this gets pretty complicated for beginners.
No no, not change Vanilla Recipes, I mean add vanilla items to my mod recipe. Like for instance I was trying to make a back bowl of dye, so I was gonna make the crafting recipe a ink sac and a bowl, but I had no idea what the names of either were so I was unable to make the recipe.
Ah, then your situation is very easy
Just use "Items.itemnamehere", or Blocks respectively. Also, if you type "Items.", it should pop up a list of items and blocks respectively.
GameRegistry.addRecipe(new ItemStack(ItemClass.itemName), new Object[] {"AAA", "A A", " ", ('A'), Items.apple});
Ah, okay. I'm still working on blocks but once I get to recipes, I'll come to you if I need more help
EDIT: I'm having trouble with a few other things though, number 1 is I can't get my Texture on my block. I have it in the correct place and it's showing up on eclipse and everything. I also made sure that all the spelling was correct but my block still comes out with Pink and Black squares (I even tried making the block texture name with .png at the end and without it, it still didn't work). My second problem is the Block names comes out as like tile.BlackStone.block or something like that, how do fix that? If anyone is able to help that'd be great! Thanks
To fix the block name, you'll need to create a file called "en_US.lang" (located in src/main/resources/assets/modid/lang/en_US.lang). Then just type out what you need. For example, tile.blockName.name=Block Name; or item.itemName.name=Item Name; or itemGroup.creativeTabName=Creative Tab)
For your missing texture, put your texture code in a pastebin or something, and I can look at it if you like.
I hope you can find out and see if I did something wrong, if you need pictures of anything else let me know
Also how do I get the texture code? I feel like a real noob asking but I"m not sure how to do it
Your assets should be in the resources part. It may work that way, but it is better to put it in resources.
Here is my Blackstone Class file
Not Completely sure but I think you just have to hit Shift+Ctrl+O, then it will import all your stuff.
http://pastebin.com/71PaMxr5
... i think i need to change forge 1.7.2 to 1.7.1 but i dont know how to do so without messing up everything i set up o:
Lol, no problem
http://pastebin.com/71PaMxr5
... i think i need to change forge 1.7.2 to 1.7.1 but i dont know how to do so without messing up everything i set up o:
Upgrade to 1.7.10. That error seems like your missing LWJGL, so I would just restart on 1.7.10 and see if that fixes things.
Where is do you define the required code needed for giving it a texture? Could you give me your main class file (if that is where you initialize and register your items).
And here is the code that the picture is of, I just copied and pasted it here
package gmail.fearnbus25.com;
import gmail.fearnbus25.blocks.BlackStone;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid="FearnBlocks", version="1.0")
public class Main {
public static String FearnBlocks = "modid";
public static String VERSION = "version";
public static CreativeTabs tabname = new CreativeTabs ("FearnBlocks")
{
public Item getTabIconItem()
{
return Items.arrow;
}
};
public static Block BlackStone;
@EventHandler
public void preInit (FMLPreInitializationEvent e)
{
}
@EventHandler
public void init(FMLInitializationEvent e)
{
MinecraftForge.EVENT_BUS.register(new DropHandler());
BlackStone = new BlackStone (Material.rock) .setCreativeTab(tabname) .setBlockName ("BlackStone") .setBlockTextureName (FearnBlocks + ":" + "BlackStone");
GameRegistry.registerBlock(BlackStone, "BlackStone");
}
public void postInit(FMLPostInitializationEvent e)
{
}
}