Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I got a block VAT that checks nearby FURNACE and do stuff IF smelting the right items.

 

IF nearby FURNACE smelting Iron ore do X  PER Iron ore smelted.

IF  nearby FURNACE smelting Gold ore do Y PER Gold ore smelted.

 

 

The way I figured it out is to enable random tick and to schedule updates at block placement every 60 ticks which is like 2 sec. So every 2 seconds I'm polling the inventory of nearby Furnaces see if they are doing anything. Note that my system actually works is just runs all the time when the chunk is load even if Furnace is off  doesn't matter it will keep on polling. Works but seems a bit wasteful.

 

Is there any other way say some event fired whenever the furnace finishes smelting something? Or can I tap into it somehow create my own custom event listener for that specific furnace to check if anything is finished smelting?

 

Any thoughts or suggestions?

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.

enable random tick

and

to schedule updates at block placement every 60 ticks

 

Random ticks are not scheduled ticks.  Literally.

 

Is there any other way say some event fired whenever the furnace finishes smelting something? Or can I tap into it somehow create my own custom event listener for that specific furnace to check if anything is finished smelting?

 

I mean...you could go look at TileEntityFurnace....

But no, there is not

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Apparently to enable updateTick which is actually what I use you need to have setRandomTick(true)  . YEAHHHH LOGIC!!! :D

 

Not but seriously. When you set random ticking you enable ticking in general. Otherwise is disabled. So updateTick() function starts working.

 

So atBlockPlaced I schedule an update tick and after that I just use updateTick and ignore randomTick function

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.

...no, that's not how that works.  You need to schedule the first tick yourself onBlockPlaced.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Yeah that's what I did!  I schedule the first one 60 ticks then at the end up tickUpdate i schedule it again :)

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.