By looking at only 5 mods' source codes (three of which didn't help (ThermalFoundation, IronChest, Forestry (super complicated code), the ones that helped were Galacticraft and OreDictionaryConverter)), I finally figured out how to use the ore dictionary. I hope you can add this to the main thread sometime.
To register an ore, you simply have to do the following in the preInit method we put in the main class:
OreDictionary.registerOre("oreDictName", new ItemStack(ModItems.itemName, 1, 0));
To add a recipe using the Ore Dictionary, we must first have an item in our mod and it must have an ore dictionary value. We currently have itemName registered as oreDictName. Let's make a recipe in which an item with the ore dict entry of "oreDictName" turns into testBlock.
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.testBlock), new Object[] {new ItemStack(ModItems.itemName,1,OreDictionary.WILDCARD_VALUE)}); Never mind.
For this to be done, you will have to import the following:
Main class: net.minecraftforge.oredict.OreDictionary, net.minecraft.item.ItemStack, yourmoddir.init.ModItems
Recipes: All of the above, cpw.mods.fml.common.registry.GameRegistry
My explanation is not great, I hope you can simplify it. There's also the flui- NO NO NO NO NO NO
public class ModBlocks
{
public static Block DragonOre = new BlockDragonOre();
public static void init()
{
com.alex99cao.mythicallengend.help.RegisterHelper.registerBlock(DragonOre);
}
}
OMFG im having TONS of trouble! When you said"Then type “git clone {paste the github link your copied here}” well... THATS WHAT I DID. It did not work it said "The filename, directory name, or volume label syntax is incorrect." Please help!
Somtimes it says " '"git' is not recognized as an internal or external command,
operable program or batch file." PLEASE HELP.
OMFG im having TONS of trouble! When you said"Then type “git clone {paste the github link your copied here}” well... THATS WHAT I DID. It did not work it said "The filename, directory name, or volume label syntax is incorrect." Please help!
Somtimes it says " '"git' is not recognized as an internal or external command,
operable program or batch file." PLEASE HELP.
Ok I just thought the hoe had less class in it then like a pickaxe because the hoe is not used for anything why would mojang bother with making it have a similar class to a pick? I will try this though.
I imported "Item" with net.minecraft.item.Item and it fixed half of the errors. But I still have the errors of "the items cannot be resolved to a type" on the highlighted "enchantedjewelItem.
public class ModBlocks
{
public static Block DragonOre = new BlockDragonOre();
public static void init()
{
com.alex99cao.mythicallengend.help.RegisterHelper.registerBlock(DragonOre);
}
}
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumBy looking at only 5 mods' source codes (three of which didn't help (ThermalFoundation, IronChest, Forestry (super complicated code), the ones that helped were Galacticraft and OreDictionaryConverter)), I finally figured out how to use the ore dictionary. I hope you can add this to the main thread sometime.
To register an ore, you simply have to do the following in the preInit method we put in the main class:
OreDictionary.registerOre("oreDictName", new ItemStack(ModItems.itemName, 1, 0));
To add a recipe using the Ore Dictionary, we must first have an item in our mod and it must have an ore dictionary value. We currently have itemName registered as oreDictName. Let's make a recipe in which an item with the ore dict entry of "oreDictName" turns into testBlock.GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.testBlock), new Object[] {new ItemStack(ModItems.itemName,1,OreDictionary.WILDCARD_VALUE)});Never mind.For this to be done, you will have to import the following:
Main class: net.minecraftforge.oredict.OreDictionary, net.minecraft.item.ItemStack, yourmoddir.init.ModItems
Recipes: All of the above, cpw.mods.fml.common.registry.GameRegistry
My explanation is not great, I hope you can simplify it. There's also the flui- NO NO NO NO NO NO
Probably not.
Are you sure it is installed correctly?
The tool material determines how effective a tool will be. Just make your class extend the respective tool.
got git working
DiDDnT open cmd with git enabled
DERPDERPDERPDERP!!!!
good tutorials though
i got "gradlew is not an internal or external command BLAH BLAH BLAH!"
HELP ME PLEASE
anyone please help
package com.alex99cao.mythicallegend.init;
import com.alex99cao.mythicallegend.blocks.BlockDragonOre;
import com.alex99cao.mythicallengend.help.RegisterHelper;
import net.minecraft.block.Block;
public class ModBlocks
{
public static Block DragonOre = new BlockDragonOre();
public static void init()
{
com.alex99cao.mythicallengend.help.RegisterHelper.registerBlock(DragonOre);
}
}
item.DragonicIngot.name=Dragonic Ingot
tile.DragonOre.name=Dragon Ore
Your not running the command in the right folder.
what folder do i run it in?
we created alot of new folders and there are heaps of old ones!
i look through #6 -- en_US.lang File i follow everything it said on the file, but my block still shown as tile.null.name
The folder with the forge stuff in it.
Post your en_US.lang file.
I want to say, you forgot to set your unlocalizedName for your block.
public class ModBlocks
{
public static Block dragonOre = new BlockDragonOre().setUnlocalizedName("dragonOre");
public static void init()
{
com.alex99cao.mythicallengend.help.RegisterHelper.registerBlock(dragonOre);
}
}
Also,if you copy/paste my text, make sure to change your
tile.DragonOre.name=Dragon Ore
to lowecase
tile.dragonOre.name=Dragon Ore
Try this.
HELPHELPHELPHELP
"the term 'gradlew' is not recognized as the name of a cmdlet, function, script file, or operable program"
I've already told you - you are not running the command in the right place.
OMFG im having TONS of trouble! When you said"Then type “git clone {paste the github link your copied here}” well... THATS WHAT I DID. It did not work it said "The filename, directory name, or volume label syntax is incorrect." Please help!
Somtimes it says " '"git' is not recognized as an internal or external command,
or batch file." PLEASE HELP.
operable program
You need to install git.
Ok I just thought the hoe had less class in it then like a pickaxe because the hoe is not used for anything why would mojang bother with making it have a similar class to a pick? I will try this though.
I imported "Item" with net.minecraft.item.Item and it fixed half of the errors. But I still have the errors of "the items cannot be resolved to a type" on the highlighted "enchantedjewelItem.
Maybe you should just remove the git section of the first tutorial, that seems to confuse a lot of people
here is my en_US.lang file
name of the package - assets.mythicallegend.lang
name of the file - en_US.lang
inside the file - tile.DragonOre.name=Dragon Ore
item.DragonicIngot.name=Dragonic Ingot
my en_US.file should be the same
tile.DragonOre.name=Dragon Ore
item.DragonicIngot.name=Dragonic Ingot
and here is my modblock.java
package com.alex99cao.mythicallegend.init;
import com.alex99cao.mythicallegend.blocks.BlockDragonOre;
import com.alex99cao.mythicallengend.help.RegisterHelper;
import net.minecraft.block.Block;
public class ModBlocks
{
public static Block DragonOre = new BlockDragonOre();
public static void init()
{
com.alex99cao.mythicallengend.help.RegisterHelper.registerBlock(DragonOre);
}
}
and here is my BlockDragonOre.java
package com.alex99cao.mythicallegend.blocks;
import com.alex99cao.mythicallengend.help.Reference;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
public class BlockDragonOre extends Block
{
public BlockDragonOre()
{
super(Material.iron);
setCreativeTab(CreativeTabs.tabBlock);
setBlockTextureName(Reference.MODID + ":" + getUnlocalizedName().substring(5));
setCreativeTab(CreativeTabs.tabBlock);
}
}
where did i do wrong is still showing the block as tile.null.name