Taledus
-
Posts
3 -
Joined
-
Last visited
Posts posted by Taledus
-
-
This was installed yesterday, but I forgot that I moved the forge directory this morning to a more permanent place on my hard drive. I am just going to follow the steps again and start over.
Thanks
-
I have started on the tutorials yesterday. I got everything setup following the tutorials in the wiki. Now I am on http://www.minecraftforge.net/wiki/Basic_Blocks trying to create my first block. I seem to be running into errors by the end of the tutorial, and have even resorted to copy/pasting the code at the bottom to ensure that everything was correct, but still run into the same errors in Generic, GenericBlock, and GenericOre classes:
package tutorial.generic; // This Import list will grow longer with each additional tutorial. // It's not pruned between full class postings, unlike other tutorial code. import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.block.material.Material; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; 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.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="Generic", name="Generic", version="0.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class Generic { // See Basic items tutorial for Generic Ingot public final static Item genericIngot = new GenericItem(5001) .setMaxStackSize(16).setIconIndex(1).setItemName("specificItem"); public final static Block genericDirt = new GenericBlock(500, 0, Material.ground) .setHardness(0.5F).setStepSound(Block.soundGravelFootstep) .setBlockName("genericDirt").setCreativeTab(CreativeTabs.tabDeco); public final static Block genericOre = new GenericOre(501, 1); @Instance("Generic") public static Generic instance; @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") public static CommonProxy proxy; @PreInit public void preInit(FMLPreInitializationEvent event) { // Stub Method } @Init public void load(FMLInitializationEvent event) { // See Basic items tutorial for Generic Ingot LanguageRegistry.addName(genericIngot, "Generic Ingot"); LanguageRegistry.addName(genericDirt, "Generic Dirt"); MinecraftForge.setBlockHarvestLevel(genericDirt, "shovel", 0); GameRegistry.registerBlock(genericDirt, "genericDirt"); LanguageRegistry.addName(genericOre, "Generic Ore"); MinecraftForge.setBlockHarvestLevel(genericOre, "pickaxe", 3); GameRegistry.registerBlock(genericOre, "genericOre"); // End Basic Blocks proxy.registerRenderers(); } @PostInit public void postInit(FMLPostInitializationEvent event) { // Stub Method } }
package tutorial.generic; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class GenericBlock extends Block { public GenericBlock (int id, int texture, Material material) { super(id, texture, material); } @Override public String getTextureFile () { return CommonProxy.BLOCK_PNG; } }
package tutorial.generic; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockOre; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.block.material.Material; public class GenericOre extends BlockOre { public GenericOre(int id, int texture, Material material) { super(id, texture, material); setHardness(4.0F); // 33% harder than diamond setStepSound(Block.soundStoneFootstep); setBlockName("genericOre"); setCreativeTab(CreativeTabs.tabBlock); } @Override public String getTextureFile () { return CommonProxy.BLOCK_PNG; } public int idDropped(int par1, Random random, int par2) { return Generic.genericIngot.itemID; } }
I am also getting this error since I opened back up Eclipse this morning:
Description Resource Path Location Type Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment. Minecraft Build path JRE System Library Problem
In the "Materials" section I am unable to locate net.minecraft.src.Material also. I am not sure if it is because I am new, or if this tutorial was written for a different version of MC, but could really use some advice here.
I just downloaded the most recent releases of both Eclipse and Forge yesterday to start modding, btw.
[1.5.1] noob tutorial issues
in Modder Support
Posted
Okay, I reinstalled everything, and I am still getting the error about JavaSE-1.6. However, per the tutorial:
So, I am using the most recent 1.7. After everything is installed I can launch Minecraft from Eclipse, and everything runs, so I don't guess that the warnings are of much concern.