Jump to content

1.11 furnace hooks. how do i tap into a furnace the easy way?


trollworkout

Recommended Posts

Right now I am looking for FurnaceTileEntity and I just manually check every second to see if a a new item got smelted comparing previous items to new items. Not ideal but is the only way I found.

 

is there some kind of event that fires when a new item gets smelted? 

 

also what about fuel hooks?

 

the only way I can figure this out is by tapping into the TileEntity and directly changing the properties of the Furnace.

 

i am asking if there is a better way to handle furnaces other than checking every second for changes the hardcore way.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Right now I am looking for FurnaceTileEntity and I just manually check every second to see if a a new item got smelted comparing previous items to new items. Not ideal but is the only way I found.

 

is there some kind of event that fires when a new item gets smelted? 

 

also what about fuel hooks?

 

the only way I can figure this out is by tapping into the TileEntity and directly changing the properties of the Furnace.

 

i am asking if there is a better way to do this.

What is your goal?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

In fact i have 3 goals!!

 

GOAL 1: Every  single time a Furnace situated right beside  (on the same level N S E W) my Deposits VAT produces a new Iron or Gold ingot  then have the Deposits Vat produce a random deposit.

 

I go this working. I do this is I get the FurnaceTileEntity and I check every 40 ticks for output and do stuff if output is more than before. WORKS but feels kinda the long way around.  Is there a better way?

 

GOAL 2: When I place a Steam Heater block near a Furnace increase cook speed and provide fuel to the furnace meaning that it won't need coal no more.

 

This may work by tapiing into the furnace tile entity and provide it fuel by manually adding fuel every dozen ticks or so keeping even affecting cook time.

 

GOAL 3: When I place Steam heater have the Furnace produce steamed meat instead of regular meat. And when I got Billows placed have the furnace able to produce Wrought Iron. If no billows Wrought Iron cannot be produced.

 

Now GOAL 3 seems to be impossible without some next level hooks. Essentially it means the Furnace has a selective recipe that only works if there's a Billows attached. 

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

In fact i have 3 goals!!

 

GOAL 1: Every  single time a Furnace situated right beside  (on the same level N S E W) my Deposits VAT produces a new Iron or Gold ingot  then have the Deposits Vat produce a random deposit.

 

I go this working. I do this is I get the FurnaceTileEntity and I check every 40 ticks for output and do stuff if output is more than before. WORKS but feels kinda the long way around.  Is there a better way?

 

GOAL 2: When I place a Steam Heater block near a Furnace increase cook speed and provide fuel to the furnace meaning that it won't need coal no more.

 

This may work by tapiing into the furnace tile entity and provide it fuel by manually adding fuel every dozen ticks or so keeping even affecting cook time.

 

GOAL 3: When I place Steam heater have the Furnace produce steamed meat instead of regular meat. And when I got Billows placed have the furnace able to produce Wrought Iron. If no billows Wrought Iron cannot be produced.

 

Now GOAL 3 seems to be impossible without some next level hooks. Essentially it means the Furnace has a selective recipe that only works if there's a Billows attached.

Goal two can be accomplished via Reflection, but goal 1 and 3 are not possible with events right now at least not the way you want. You could use ItemSmeltedEvent which is fired when the player takes items from the furnace output slot. So basically you will need to put in a PR for a CanSmeltItemEvent and a SmeltingResultEvent. And Goal one is being done in the best way possible as of right now.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Ok thanks for the help.

 

1 is done right now I m gonna stick with that I got i think is the only way i figured this out

 

2. i gotta figure out this reflection

 

for 3 i'm gonna have to make some crazy stuff  because i wanna keep furnace compatible with any other mod. most other mods will expect furnace to be a FurnaceBlock with a FurnaceTileEntity attached to it.

 

I am thinking I may have to create a custom furnace that extends FurnaceBlock and a custom tile entity that extends FurnaceTileEntity but add my own hooks into it. And perhaps either  put my own furnace whenever i place my custom blocks around it OR just fully replace the furnace altogether via alias. Not many mods replace vanilla blocks. I already replace Cauldron and I may also do it to Furnace because is very common block to tap into and it really REALLY needs more hooks.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Ok thanks for the help.

 

1 is done right now I m gonna stick with that I got i think is the only way i figured this out

 

2. i gotta figure out this reflection

 

for 3 i'm gonna have to make some crazy stuff  because i wanna keep furnace compatible with any other mod. most other mods will expect furnace to be a FurnaceBlock with a FurnaceTileEntity attached to it.

 

I am thinking I may have to create a custom furnace that extends FurnaceBlock and a custom tile entity that extends FurnaceTileEntity but add my own hooks into it. And perhaps either  put my own furnace whenever i place my custom blocks around it OR just fully replace the furnace altogether via alias. Not many mods replace vanilla blocks. I already replace Cauldron and I may also do it to Furnace because is very common block to tap into and it really REALLY needs more hooks.

You can create a custom block that extends BlockFurnace and TileEntityFurnace and just use the BlocPlacedEvent to override it.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.