Jump to content

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


Recommended Posts

Posted

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);

 

Posted

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.

Posted

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()

{

 

}

}

Posted

Did that and still didn't work, so I move them back in to my Block and Item Class and now it works

An attempt at keeping my code clean didn't work. but it should of worked witch is odd

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.