trollworkout Posted October 19, 2016 Share Posted October 19, 2016 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? Quote 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 More sharing options...
Draco18s Posted October 19, 2016 Share Posted October 19, 2016 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 Quote 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. Link to comment Share on other sites More sharing options...
trollworkout Posted October 19, 2016 Author Share Posted October 19, 2016 Apparently to enable updateTick which is actually what I use you need to have setRandomTick(true) . YEAHHHH LOGIC!!! 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 Quote 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 More sharing options...
Draco18s Posted October 19, 2016 Share Posted October 19, 2016 ...no, that's not how that works. You need to schedule the first tick yourself onBlockPlaced. Quote 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. Link to comment Share on other sites More sharing options...
trollworkout Posted October 19, 2016 Author Share Posted October 19, 2016 Yeah that's what I did! I schedule the first one 60 ticks then at the end up tickUpdate i schedule it again Quote 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 More sharing options...
Recommended Posts
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.