Minerai qui drope un items
-
public int idDropped(int metadata, Random rand, int fortune) { if(metadata == 0 && rand.nextInt(5) > 3) { return GoldenMain.Ruby.itemID; } else if(metadata == 0) { return 0; } else { return this.blockID; }J’ai mis dans la classe du bloc!
-
return 0; = pas de drop
-
–-- Minecraft Crash Report ----
// Who set us up the TNT?Time: 17/07/14 18:42
Description: Ticking memory connectionjava.lang.NullPointerException
at goldenmod.Blocks.RubyOre.idDropped(RubyOre.java:23)
at net.minecraft.block.Block.getBlockDropped(Block.java:1831)
at net.minecraft.block.Block.dropBlockAsItemWithChance(Block.java:721)
at net.minecraft.block.Block.dropBlockAsItem(Block.java:711)
at net.minecraft.block.Block.harvestBlock(Block.java:1142)
at net.minecraft.item.ItemInWorldManager.tryHarvestBlock(ItemInWorldManager.java:338)
at net.minecraft.item.ItemInWorldManager.uncheckedTryHarvestBlock(ItemInWorldManager.java:238)
at net.minecraft.network.NetServerHandler.handleBlockDig(NetServerHandler.java:501)
at net.minecraft.network.packet.Packet14BlockDig.processPacket(Packet14BlockDig.java:67)
at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141)
at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54)
at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:689)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:585)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)A detailed walkthrough of the error, its code path and all known details is as follows:
– Head –
Stacktrace:
at goldenmod.Blocks.RubyOre.idDropped(RubyOre.java:23)
at net.minecraft.block.Block.getBlockDropped(Block.java:1831)
at net.minecraft.block.Block.dropBlockAsItemWithChance(Block.java:721)
at net.minecraft.block.Block.dropBlockAsItem(Block.java:711)
at net.minecraft.block.Block.harvestBlock(Block.java:1142)
at net.minecraft.item.ItemInWorldManager.tryHarvestBlock(ItemInWorldManager.java:338)
at net.minecraft.item.ItemInWorldManager.uncheckedTryHarvestBlock(ItemInWorldManager.java:238)
at net.minecraft.network.NetServerHandler.handleBlockDig(NetServerHandler.java:501)
at net.minecraft.network.packet.Packet14BlockDig.processPacket(Packet14BlockDig.java:67)
at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141)– Ticking connection –
Details:
Connection: net.minecraft.network.NetServerHandler@579ea8d
Stacktrace:
at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54)
at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:689)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:585)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)– System Details –
Details:
Minecraft Version: 1.6.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_05, Oracle Corporation
Java VM Version: Java HotSpot
64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 648068984 bytes (618 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 658 (36848 bytes; 0 MB) allocated, 490 (27440 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.04 FML v6.2.62.871 Minecraft Forge 9.10.1.871 4 mods loaded, 4 mods active
mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{6.2.62.871} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{9.10.1.871} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
GF{1.0} [GoldenPack] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 152 (8512 bytes; 0 MB) allocated, 105 (5880 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP[‘Player974’/32, l=‘New World’, x=219,30, y=4,00, z=1781,80]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to ‘fml,forge’public class RubyOre extends Block { public RubyOre(int id) { super(id, Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); } public int idDropped(int metadata, Random rand, int fortune) { if(metadata == 0 && rand.nextInt(5) > 3) { return GoldenMain.Ruby.itemID; } else if(metadata == 0) { return 1; } else { return this.blockID; } }Le crash reports que ça me fait + la classe du bloc (sans le package) et les imports
-
Sauf quand sans les packages et les importations les numéros de ligne sont faux, et ça aide pas.
RubyOre.java:23
la ligne 23 de RubyOre, c’est quoi ? -
Non, mais ça sert à rien que tu les voient mais si tu veux…
package goldenmod.Blocks; import goldenmod.GoldenMain; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class RubyOre extends Block { public RubyOre(int id) { super(id, Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); } public int idDropped(int metadata, Random rand, int fortune) { if(metadata == 0 && rand.nextInt(5) > 3) { return GoldenMain.Ruby.itemID; } else if(metadata == 0) { return 1; } else { return this.blockID; } } }Et à la ligne 23: ```java
return GoldenMain.Ruby.itemID;Ou à la ligne 23 de l'autre c'est juste ça: } -
les balise java car la c’est illisible
EDIT: tu as bien enregistrer ton item?
-
Isador je vais finir par vous envoyez le mod si ça continue T_T
Bien sur que mon item est enregistrer:
Dans la classe principaleItem Ruby = new Ruby(5000).setUnlocalizedName("Ruby").setTextureName("forge:ruby"); GameRegistry.registerItem(Ruby, "Ruby"); LanguageRegistry.addName(Ruby, "Ruby");et dans sa classe:
package goldenmod.Items; import goldenmod.GoldenMain; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class Ruby extends Item { public Ruby(int id){ super(id); this.setCreativeTab(CreativeTabs.tabMaterials); setMaxStackSize(64); } } -
envoi toute les classe je vais voir ca
-
Classe principale (main):
package goldenmod; import goldenmod.Items.Ruby; import goldenmod.Items.Sapphire; import goldenmod.Items.Amethyst; import goldenmod.Items.MythrilIngot; import net.minecraft.block.Block; 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.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; 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; import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.relauncher.Side; @Mod(modid="GF", name="GoldenPack", version="1.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) //NE JAMAIS MODIFIER public class GoldenMain { @SidedProxy(clientSide = "goldenmod.ClientProxy", serverSide = "goldenmod.CommonProxy") public static goldenmod.CommonProxy proxy; @Instance("GF") public static GoldenMain instance; public static Block RubyOre, SapphireOre, AmethystOre, RubyBlock, SapphireBlock, AmethystBlock, MythrilOre, MythrilBlock, ObsidianForced, ObsiStairs, DoubleSlabObsi, SingleSlabObsi ; public static Item Ruby, Sapphire, Amethyst, MythrilIngot; @EventHandler public void PreInit(FMLPreInitializationEvent event){ //Configuration GameRegistry.registerWorldGenerator(new WorldGeneratorTutoriel()); if(event.getSide().isClient()) TickRegistry.registerTickHandler(new CustomMenuTickHandler(), Side.CLIENT); //tutomain.Blocks RubyOre = new goldenmod.Blocks.RubyOre(3000).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Ruby Ore").setTextureName("forge:rubyOre"); SapphireOre = new goldenmod.Blocks.SapphireOre(3001).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Sapphire Ore").setTextureName("forge:sapphireOre"); AmethystOre = new goldenmod.Blocks.AmethystOre(3002).setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Amethyst Ore").setTextureName("forge:amethystOre"); MythrilOre = new goldenmod.Blocks.MythrilOre(3003).setHardness(2.0F).setResistance(3.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Mythril Ore").setTextureName("forge:mythril_ore"); RubyBlock = new goldenmod.Blocks.BlockOreStorage(3004).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Ruby Block").setTextureName("forge:rubyBlock"); SapphireBlock = new goldenmod.Blocks.BlockOreStorage(3005).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Sapphire Block").setTextureName("forge:sapphireBlock"); AmethystBlock = new goldenmod.Blocks.BlockOreStorage(3006).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Amethyst Block").setTextureName("forge:amethystBlock"); MythrilBlock = new goldenmod.Blocks.BlockOreStorage(3007).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Mythril Block").setTextureName("forge:mythril_block"); ObsidianForced = new goldenmod.Blocks.BlockObsidianRenfo(3008).setHardness(300.0F).setResistance(2000.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Reinforced Obsidian").setTextureName("forge:obsidianForced"); //tutomain.Items Item Ruby = new Ruby(5000).setUnlocalizedName("Ruby").setTextureName("forge:ruby"); Item Sapphire = new Sapphire(5001).setUnlocalizedName("Sapphire").setTextureName("forge:sapphire"); Item Amethyst = new Amethyst(5002).setUnlocalizedName("Amethyst").setTextureName("forge:amethyst"); Item MythrilIngot = new MythrilIngot(5003).setUnlocalizedName("Mythril Ingot").setTextureName("forge:mythril_ingot"); //Registers.Blocks GameRegistry.registerBlock(RubyOre, "RubyOre"); LanguageRegistry.addName(RubyOre, "Ruby Ore"); GameRegistry.registerBlock(SapphireOre, "SapphireOre"); LanguageRegistry.addName(SapphireOre, "Sapphire Ore"); GameRegistry.registerBlock(AmethystOre, "AmethystOre"); LanguageRegistry.addName(AmethystOre, "Amethyst Ore"); GameRegistry.registerBlock(MythrilOre, "MythrilOre"); LanguageRegistry.addName(MythrilOre, "Mythril Ore"); GameRegistry.registerBlock(RubyBlock, "RubyBlock"); LanguageRegistry.addName(RubyBlock, "Ruby Block"); GameRegistry.registerBlock(SapphireBlock, "SapphireBlock"); LanguageRegistry.addName(SapphireBlock, "Sapphire Block"); GameRegistry.registerBlock(AmethystBlock, "AmethystBlock"); LanguageRegistry.addName(AmethystBlock, "Amethyst Block"); GameRegistry.registerBlock(MythrilBlock, "MythrilBlock"); LanguageRegistry.addName(MythrilBlock, "Mythril Block"); GameRegistry.registerBlock(ObsidianForced, "ObsidianForced"); LanguageRegistry.addName(ObsidianForced, "Reinforced Obsidian"); //Registers.Items GameRegistry.registerItem(Ruby, "Ruby"); LanguageRegistry.addName(Ruby, "Ruby"); GameRegistry.registerItem(Sapphire, "Sapphire"); LanguageRegistry.addName(Sapphire, "Sapphire"); GameRegistry.registerItem(Amethyst, "Amethyst"); LanguageRegistry.addName(Amethyst, "Amethyst"); GameRegistry.registerItem(MythrilIngot, "MythrilIngot"); LanguageRegistry.addName(MythrilIngot, "Mythril Ingot"); } @EventHandler public void PreInit(FMLInitializationEvent Event){ //Render proxy.registerRenderers(); //Recipe //Smelting } @EventHandler public void PostInit(FMLInitializationEvent event){ MinecraftForge.setBlockHarvestLevel(RubyOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(SapphireOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(AmethystOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(MythrilOre, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(RubyBlock, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(SapphireBlock, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(AmethystBlock, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(MythrilBlock, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(ObsidianForced, "pickaxe", 3); } }Rubis (minerai)
package goldenmod.Blocks; import goldenmod.GoldenMain; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class RubyOre extends Block { public RubyOre(int id) { super(id, Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); } public int idDropped(int metadata, Random rand, int fortune) { if(metadata == 0 && rand.nextInt(5) > 3) { return GoldenMain.Ruby.itemID; } else if(metadata == 0) { return 1; } else { return this.blockID; } } }Ruby (Item)
package goldenmod.Items; import goldenmod.GoldenMain; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class Ruby extends Item { public Ruby(int id){ super(id); this.setCreativeTab(CreativeTabs.tabMaterials); setMaxStackSize(64); } }Voilà, tout ce qui est en rapport du rubis! Si tu veux autres chose, dit le moi

-
enleve le Item a Item Ruby = new Ruby(5000).setUnlocalizedName(“Ruby”).setTextureName(“forge:ruby”);
-> Ruby = new Ruby(5000).setUnlocalizedName(“Ruby”).setTextureName(“forge:ruby”);
-
heu ça a marché, ça ma drop de la stone par contre

J’ai relancé et la console n’écris RIEN sauf ça:
juil. 17, 2014 8:08:12 PM net.minecraft.launchwrapper.LogWrapper log
INFOS: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker
Java HotSpot
64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release -
normal ta condition est: si metadata == 0 et rand.nextInt(5) >3 ca dropt l’item, sinon si c’est juste metadata ca retourne 1, 1 c’est l’id de la stone. si tu veux drop a chaque fois fait:
public int idDropped(int metadata, Random rand, int fortune) { if(metadata == 0) { return GoldenMain.Ruby.itemID; else { return this.blockID; } } -
J’ai relancé et la console n’écris RIEN sauf ça:
juil. 17, 2014 8:08:12 PM net.minecraft.launchwrapper.LogWrapper log
INFOS: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker
Java HotSpot
64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
C’est ca qui m’intrigue plutôt alors… -
dans ton bloc met:
public int idDropped(int par1, Random par2Random, int par3) { return ModMain.TonBlock.itemID; } public int quantityDropped(Random par1Random) { return nombreDeLoot; } -
Je ne peux toujours pas lancer, je ne cherche PAS la solution a la stone mais je veux lancer mon MOD
-
pas normal,
renvoi tes code actuel -
package goldenmod; import goldenmod.Items.Ruby; import goldenmod.Items.Sapphire; import goldenmod.Items.Amethyst; import goldenmod.Items.MythrilIngot; import net.minecraft.block.Block; 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.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; 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; import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.relauncher.Side; @Mod(modid="GF", name="GoldenPack", version="1.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) //NE JAMAIS MODIFIER public class GoldenMain { @SidedProxy(clientSide = "goldenmod.ClientProxy", serverSide = "goldenmod.CommonProxy") public static goldenmod.CommonProxy proxy; @Instance("GF") public static GoldenMain instance; public static Block RubyOre, SapphireOre, AmethystOre, RubyBlock, SapphireBlock, AmethystBlock, MythrilOre, MythrilBlock, ObsidianForced, ObsiStairs, DoubleSlabObsi, SingleSlabObsi ; public static Item Ruby, Sapphire, Amethyst, MythrilIngot; @EventHandler public void PreInit(FMLPreInitializationEvent event){ //Configuration GameRegistry.registerWorldGenerator(new WorldGeneratorTutoriel()); if(event.getSide().isClient()) TickRegistry.registerTickHandler(new CustomMenuTickHandler(), Side.CLIENT); //tutomain.Blocks RubyOre = new goldenmod.Blocks.RubyOre(3000).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Ruby Ore").setTextureName("forge:rubyOre"); SapphireOre = new goldenmod.Blocks.SapphireOre(3001).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Sapphire Ore").setTextureName("forge:sapphireOre"); AmethystOre = new goldenmod.Blocks.AmethystOre(3002).setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Amethyst Ore").setTextureName("forge:amethystOre"); MythrilOre = new goldenmod.Blocks.MythrilOre(3003).setHardness(2.0F).setResistance(3.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Mythril Ore").setTextureName("forge:mythril_ore"); RubyBlock = new goldenmod.Blocks.BlockOreStorage(3004).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Ruby Block").setTextureName("forge:rubyBlock"); SapphireBlock = new goldenmod.Blocks.BlockOreStorage(3005).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Sapphire Block").setTextureName("forge:sapphireBlock"); AmethystBlock = new goldenmod.Blocks.BlockOreStorage(3006).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Amethyst Block").setTextureName("forge:amethystBlock"); MythrilBlock = new goldenmod.Blocks.BlockOreStorage(3007).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Mythril Block").setTextureName("forge:mythril_block"); ObsidianForced = new goldenmod.Blocks.BlockObsidianRenfo(3008).setHardness(300.0F).setResistance(2000.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Reinforced Obsidian").setTextureName("forge:obsidianForced"); //tutomain.Items Ruby = new Ruby(5000).setUnlocalizedName("Ruby").setTextureName("forge:ruby"); Sapphire = new Sapphire(5001).setUnlocalizedName("Sapphire").setTextureName("forge:sapphire"); Amethyst = new Amethyst(5002).setUnlocalizedName("Amethyst").setTextureName("forge:amethyst"); MythrilIngot = new MythrilIngot(5003).setUnlocalizedName("Mythril Ingot").setTextureName("forge:mythril_ingot"); //Registers.Blocks GameRegistry.registerBlock(RubyOre, "RubyOre"); LanguageRegistry.addName(RubyOre, "Ruby Ore"); GameRegistry.registerBlock(SapphireOre, "SapphireOre"); LanguageRegistry.addName(SapphireOre, "Sapphire Ore"); GameRegistry.registerBlock(AmethystOre, "AmethystOre"); LanguageRegistry.addName(AmethystOre, "Amethyst Ore"); GameRegistry.registerBlock(MythrilOre, "MythrilOre"); LanguageRegistry.addName(MythrilOre, "Mythril Ore"); GameRegistry.registerBlock(RubyBlock, "RubyBlock"); LanguageRegistry.addName(RubyBlock, "Ruby Block"); GameRegistry.registerBlock(SapphireBlock, "SapphireBlock"); LanguageRegistry.addName(SapphireBlock, "Sapphire Block"); GameRegistry.registerBlock(AmethystBlock, "AmethystBlock"); LanguageRegistry.addName(AmethystBlock, "Amethyst Block"); GameRegistry.registerBlock(MythrilBlock, "MythrilBlock"); LanguageRegistry.addName(MythrilBlock, "Mythril Block"); GameRegistry.registerBlock(ObsidianForced, "ObsidianForced"); LanguageRegistry.addName(ObsidianForced, "Reinforced Obsidian"); //Registers.Items GameRegistry.registerItem(Ruby, "Ruby"); LanguageRegistry.addName(Ruby, "Ruby"); GameRegistry.registerItem(Sapphire, "Sapphire"); LanguageRegistry.addName(Sapphire, "Sapphire"); GameRegistry.registerItem(Amethyst, "Amethyst"); LanguageRegistry.addName(Amethyst, "Amethyst"); GameRegistry.registerItem(MythrilIngot, "MythrilIngot"); LanguageRegistry.addName(MythrilIngot, "Mythril Ingot"); } @EventHandler public void PreInit(FMLInitializationEvent Event){ //Render proxy.registerRenderers(); //Recipe //Smelting } @EventHandler public void PostInit(FMLInitializationEvent event){ MinecraftForge.setBlockHarvestLevel(RubyOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(SapphireOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(AmethystOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(MythrilOre, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(RubyBlock, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(SapphireBlock, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(AmethystBlock, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(MythrilBlock, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(ObsidianForced, "pickaxe", 3); } }package goldenmod.Items; import goldenmod.GoldenMain; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class Ruby extends Item { public Ruby(int id){ super(id); this.setCreativeTab(CreativeTabs.tabMaterials); setMaxStackSize(64); } }package goldenmod.Blocks; import goldenmod.GoldenMain; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class RubyOre extends Block { public RubyOre(int id) { super(id, Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); } public int idDropped(int par1, Random par2Random, int par3) { return GoldenMain.Ruby.itemID; } public int quantityDropped(Random par1Random) { return 1; } } -
Il n’y a pas d’erreur dans ton mods, envoie les logs du jeu.
-
Le problème, ca ne me génère pas de logs ;(
-
Sauf si tu as touché à un réglage, Eclipse ET Minecraft génèrent obligatoirement des logs !
Cherche dans :
ton dossier avec forge > eclipse > logs > normalement tu dois avoir des archives ou directement les logs