I'll demonstrate how to make an iron axe for this. In your "public void init(FMLIntialializationEvent event)" or whatever you called your "main" function; write:
GameRegistry.addRecipe(new ItemStack(Items.ironAxe, 1), new Object[] {
"XXX",
" Z ",
" Z ",
'X', Items.iron_ingot, 'Z', Items.stick
});
BREAK DOWN:
GameRegistry.addRecipe - Self explanatory: adds a recipe to the game.
(new ItemStack(Items.ironAxe, 1),...) - This line basically tells Minecraft what you want to make. The first one, "Items.ironAxe", is the item you want to make while the "1" is the amount of the Item you want to make.
(... new Object[]) - I honestly am not too sure how to explain this one but the array after Object (this - "[]") basically means this is the object's recipe.
"XXX", " Z ", " Z " - (This is another way to write the recipe but I prefer the one I used earlier) This is just what the crafting recipe is, nothing too special about this other than the structure to make the item.
'X', Items.iron_ingot, 'Z', Items.stick - This defines what the X's and Zs mean and tell Minecraft what item you are using to make the bigger item.
For a shapeless recipe, write (Watermelon slice to watermelon seeds):
GameRegistry.addShapelessRecipe(new ItemStack(Items.watermelon_seeds), new ItemStack(Items.watermelon));
BREAK DOWN:
GameRegistry.addShapelessRecipe - Same thing as above, just registers a shapeless recipe instead of a shaped one (this one lets you plop items in random spots and still get an item).
(new ItemStack(Items.watermelon_seeds), ...) - This is the product you want to be made.
(... new ItemStack(Items.watermelon)); - The reactant inside the crafting table.
NOTE: I may have spelled the items in the recipe products/reactants wrong; I wasn't sitting at my computer that contained the Minecraft code required.
I'm not too sure how to help you here, but looking at other tutorials may help you find your problem! Look at Neale Gaming's tutorials on Minecraft modding (at the time I am writing this, the logs/leaves tutorial is the third video to the right and the tree generation one is the first video on the left; both in the top line).
I'm not too sure how to help you here, but looking at other tutorials may help you find your problem! Look at Neale Gaming's tutorials on Minecraft modding (at the time I am writing this, the logs/leaves tutorial is the third video to the right and the tree generation one is the first video on the left; both in the top line).
thank you so much i have been looking around for this tuts for a month now with no such luck. Now i can finish part of my mod i have been postponeing. Thanks again.
Change the number inside dMInt = dropMultiplier.nextInt(/* The one in here */)+1; To make it drop 50% of the time (the inside number will be 10), you set:
if (event.entityLiving instance of EntitySheep && (dMInt == 1 || dMInt == 2 || dMInt == 3 || dMInt == 4 || dMInt == 5) {...}
Set your dMInt variable to anything that can be divisible by 2 (keep it low so you don't have to write as much).
Minecraft IS NOT PERFECT; by this I mean, it MAY NOT drop 50% of the time because it is a 50% CHANCE; not a 50%-of-the-time-it-drops. A perfect world would have everything drop 50% of the time and the rest nothing. You may hit the "bitter end" and end up having to kill 7/10 sheep rather than 5/10 because Random is random. It might not pick the 5 numbers you set down once each time; it may pick 1, then 8, etc, etc.
thank you so much i have been looking around for this tuts for a month now with no such luck. Now i can finish part of my mod i have been postponeing. Thanks again.
That's deprecated. They've probably removed it in 1.7.10; don't use Language.Registry.addName(Item, "ITEM Name");. (Why I say probably is that I haven't looked at 1.7.10 yet).
That's deprecated. They've probably removed it in 1.7.10; don't use Language.Registry.addName(Item, "ITEM Name");. (Why I say probably is that I haven't looked at 1.7.10 yet).
it works but i agree i dont like it
Rollback Post to RevisionRollBack
I am a musician, artist, gamer, modder, amateur engineer, and programmer. Check out my site! (Sorry if you think it sucks)
Custom Blocks can be ores still. I did a block and made it an ore. All you have to do is the TutorialBlockWorld file and the WorldGenTutorialBlock (tutorialBlock is my example name) and generate the block
Why are we supposed to not put void behind preInit, init, or postinit? Java syntax requires that methods that aren't constructors have a return type or "void" come before the method declaration. What should be put there instead?
I'll demonstrate how to make an iron axe for this. In your "public void init(FMLIntialializationEvent event)" or whatever you called your "main" function; write:
GameRegistry.addRecipe(new ItemStack(Items.ironAxe, 1), new Object[] {
"XXX",
" Z ",
" Z ",
'X', Items.iron_ingot, 'Z', Items.stick
});
BREAK DOWN:
GameRegistry.addRecipe - Self explanatory: adds a recipe to the game.
(new ItemStack(Items.ironAxe, 1),...) - This line basically tells Minecraft what you want to make. The first one, "Items.ironAxe", is the item you want to make while the "1" is the amount of the Item you want to make.
(... new Object[]) - I honestly am not too sure how to explain this one but the array after Object (this - "[]") basically means this is the object's recipe.
"XXX", " Z ", " Z " - (This is another way to write the recipe but I prefer the one I used earlier) This is just what the crafting recipe is, nothing too special about this other than the structure to make the item.
'X', Items.iron_ingot, 'Z', Items.stick - This defines what the X's and Zs mean and tell Minecraft what item you are using to make the bigger item.
For a shapeless recipe, write (Watermelon slice to watermelon seeds):
GameRegistry.addShapelessRecipe(new ItemStack(Items.watermelon_seeds), new ItemStack(Items.watermelon));
BREAK DOWN:
GameRegistry.addShapelessRecipe - Same thing as above, just registers a shapeless recipe instead of a shaped one (this one lets you plop items in random spots and still get an item).
(new ItemStack(Items.watermelon_seeds), ...) - This is the product you want to be made.
(... new ItemStack(Items.watermelon)); - The reactant inside the crafting table.
NOTE: I may have spelled the items in the recipe products/reactants wrong; I wasn't sitting at my computer that contained the Minecraft code required.
YouTube: UnitatoGaming
Minecraft: DOOMsolider45
CEO/Co-Founder of Rinato Games and CEO/Founder of Hybridia Studios
I'm not too sure how to help you here, but looking at other tutorials may help you find your problem! Look at Neale Gaming's tutorials on Minecraft modding (at the time I am writing this, the logs/leaves tutorial is the third video to the right and the tree generation one is the first video on the left; both in the top line).
YouTube: UnitatoGaming
Minecraft: DOOMsolider45
CEO/Co-Founder of Rinato Games and CEO/Founder of Hybridia Studios
thank you so much i have been looking around for this tuts for a month now with no such luck. Now i can finish part of my mod i have been postponeing. Thanks again.
thanks! It finally works
Quite welcome to you all! Glad I could help.
YouTube: UnitatoGaming
Minecraft: DOOMsolider45
CEO/Co-Founder of Rinato Games and CEO/Founder of Hybridia Studios
http://prntscr.com/41zyl9
Dont put void before init, preInit, or postInit, it messes it up
than just put
LanguageRegistry.addName(Item, "ITEM Name")
That's deprecated. They've probably removed it in 1.7.10; don't use Language.Registry.addName(Item, "ITEM Name");. (Why I say probably is that I haven't looked at 1.7.10 yet).
YouTube: UnitatoGaming
Minecraft: DOOMsolider45
CEO/Co-Founder of Rinato Games and CEO/Founder of Hybridia Studios
it works but i agree i dont like it