Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[solved]Working on my mod but cant get smelting to work (1.8.9)


Anora
 Share

Recommended Posts

I been modding for a few days now, learning the hole thing in the processes but I seam to have run into a snag, I don't get an error for it either, I'm trying to make a smelting recipe for my ore but its not working in game

 

here is the code for it.

final float COAL_SMELT_XP = 0.1F;

final float DIAMOND_SMELT_XP = 1.0F;

final float DRAGONITE_ORE_XP = 0.0F;

final int NUMBER_OF_ITEMS = 1;

GameRegistry.addSmelting(Blocks.dragonite_ore, new ItemStack(Items.dragonite_ingot, NUMBER_OF_ITEMS), DRAGONITE_ORE_XP);

 

Link to comment
Share on other sites

First off, are you actually calling the recipes class or wherever this code is in the actual start up? Secondly are both block and item accessible in game? Do they all show up? And try the recipes without finals. It could be something like that. (I doubt it but try) From looking at it the code itself looks fine as to why it would not be working I am unsure.

Link to comment
Share on other sites

Yes I am, should of posted the entire code, both blocks are accessible in startup.

I will give that a try and here's how I actually did it.

 

package anora.guildcraft.main.init;

 

import net.minecraft.item.ItemStack;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class Smelting {

 

public static void init()

{

final float COAL_SMELT_XP = 0.1F;

final float DIAMOND_SMELT_XP = 1.0F;

final float DRAGONITE_ORE_XP = 0.0F;

final int NUMBER_OF_ITEMS = 1;

GameRegistry.addSmelting(Blocks.dragonite_ore, new ItemStack(Items.dragonite_ingot, NUMBER_OF_ITEMS), DRAGONITE_ORE_XP);

}

 

public static void register()

{

 

}

}

Link to comment
Share on other sites

Do you call

Smelting.init()

? If so, show where.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

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
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.

 Share



×
×
  • Create New...

Important Information

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