Jump to content

-=[Solved]=- Furnace[crafting] broken -- Blocks dropping [blocks] broken


Recommended Posts

Posted

I have a problem with my mod. My smelting recipe will not work and when i break any of my blocks they will not work. I did have them working before now. I have spent time trying to fix this. All my programming work is here: https://gist.github.com/anonymous/cfa108e13001a6d77554

 

All the textures are working.

 

EDIT: could this be because of the java JDE build path file? I have an error when programming for my mod project in eclipse. It says that this build path may not be compatible with your project, or something similar. Can this build path be fixed. Do I have too new of a JDE or  an old version of JDE and i need to update. I really need to get this fixed. Thank you is advanced

Posted

If your blocks drops themselves it is unnecessary to override the method "getItemDropped", you could delete it because they will always drop themselves. Have you tried to harvest the blocks with the proper tool?

It's strange that GameRegistry.addSmelting doesn't works, it seems like it doesn't register the smelting recipe.

Try to use this instead:

 

FurnaceRecipes.smelting().func_151394_a(new ItemStack(bauxite), new ItemStack(aluminumIngot), 0.7F);

Posted

Sadly, neither of those solutions worked. Thankyou for your help.

 

I did mine it with the proper tool. I have it set to mine at stone level and it did not. neither did iron or diamond.

 

I

Posted

I've just found a solution. You should remove your ModBlock and ModItems classes and register your blocks directly in the preLoad event. Your new main class would be:

package com.jacob814.NanoTech_Engin;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;

import com.jacob814.NanoTech_Engin.blocks.Blockbauxite;
import com.jacob814.NanoTech_Engin.blocks.BlockcopperOre;
import com.jacob814.NanoTech_Engin.blocks.BlocktinOre;
import com.jacob814.NanoTech_Engin.help.Reference;
import com.jacob814.NanoTech_Engin.items.ItemAluminumIngot;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = Reference.MODID, version = Reference.VERSION)
public class NanoTech_Main 
{
public static Block bauxite;

public static Block tinOre;

public static Block copperOre;

public static Item aluminumIngot;

@EventHandler
public void preInit(FMLPreInitializationEvent event) 
{	
	bauxite = new Blockbauxite().setBlockName("bauxite");
	GameRegistry.registerBlock(bauxite, bauxite.getUnlocalizedName().substring(5));

	tinOre = new BlocktinOre().setBlockName("tinOre");
	GameRegistry.registerBlock(tinOre, tinOre.getUnlocalizedName().substring(5));

	copperOre = new BlockcopperOre().setBlockName("copperOre");
	GameRegistry.registerBlock(copperOre, copperOre.getUnlocalizedName().substring(5));

	aluminumIngot = new ItemAluminumIngot().setUnlocalizedName("aluminumIngot");
	GameRegistry.registerItem(aluminumIngot, aluminumIngot.getUnlocalizedName().substring(5));


	GameRegistry.addSmelting(bauxite, new ItemStack(aluminumIngot), 0.7F);
}

}

 

Now both the smelting and the drop of the blocks works fine. I hope I heleped you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.