Jump to content

[1.12.2] Make an Item stay inside the furnace


SeanOMik

Recommended Posts

I have a pan that would be filled with dough. This would be put into the furnace and cooked to receive bread, but the pan would be disintegrated. And the point of this mod into be "realistic". So would it be possible to make the item stay inside the furnace, but not the crafting grid. I know how to make it stay in the crafting grid but not in the furnace.

Developer of "A Realistic Foods Mod"

Link to comment
Share on other sites

You can't make it stay in the Inventory because of how furnaces work, but you can make the furnace drop your pan when it smelts your pan filled with dough into bread

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

29 minutes ago, Cadiboo said:

You can't make it stay in the Inventory because of how furnaces work, but you can make the furnace drop your pan when it smelts your pan filled with dough into bread

Ya that's what I mean, but how could I do that?

Developer of "A Realistic Foods Mod"

Link to comment
Share on other sites

3 minutes ago, SeanOMik said:

Ya that's what I mean, but how could I do that?

I believe there a couple posts on here about how to do it. I think it has something to do with hooking into the furnace's onBake event, checking if its your item that was cooked and dropping the pan if it was

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

4 minutes ago, Cadiboo said:

I believe there a couple posts on here about how to do it. I think it has something to do with hooking into the furnace's onBake event, checking if its your item that was cooked and dropping the pan if it was

I couldn't find anything on it.

Developer of "A Realistic Foods Mod"

Link to comment
Share on other sites

Wow, this is REALLY old, and probably completely obsolete, but here it is

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

12 minutes ago, Cadiboo said:

Wow, this is REALLY old, and probably completely obsolete, but here it is

 

Yeah seems like it is completely obsolete, this function:

GameRegistry.registerCraftingHandler(new CraftingHandler());

Does not exist anymore.

Developer of "A Realistic Foods Mod"

Link to comment
Share on other sites

4 hours ago, Cadiboo said:

I believe there a couple posts on here about how to do it. I think it has something to do with hooking into the furnace's onBake event, checking if its your item that was cooked and dropping the pan if it was

 

public static void onSmelt(final ItemSmeltedEvent event) {
	if(event.smelting.getItem() instanceof ItemPanWithDough)
		//spawn in item;	
}

Look at how the furnace normally drops its items when broken.

I would however recommend making your own furnace (oven?) that supports having fuel,  pan and dough, pan, and bread in it all at the same time

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

8 hours ago, Cadiboo said:

 


public static void onSmelt(final ItemSmeltedEvent event) {
	if(event.smelting.getItem() instanceof ItemPanWithDough)
		//spawn in item;	
}

Look at how the furnace normally drops its items when broken.

I would however recommend making your own furnace (oven?) that supports having fuel,  pan and dough, pan, and bread in it all at the same time

Yeah, I actually just finished one last night and everything with it seems to work, so I'm gonna try adding that functionality now. But where would I put that function, in my tile entity?

Edited by SeanOMik

Developer of "A Realistic Foods Mod"

Link to comment
Share on other sites

20 hours ago, SeanOMik said:

Yeah, I actually just finished one last night and everything with it seems to work, so I'm gonna try adding that functionality now. But where would I put that function, in my tile entity?

in your Main mod class or in your common Event Subscriber class

I forgot @SubscribeEvent

heres what the code should look like

@Mod.EventBusSubscriber(modid = Reference.ID)
public class CommonEventSubscriber {

  @SubscribeEvent
  //having the method be static is IMPORTANT
  public static void onSmelt(final ItemSmeltedEvent event) {
      if(event.smelting.getItem() instanceof ItemPanWithDough)
          //spawn in item;	
  }

}

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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