Jump to content

[1.6.x/1.5.x] Redstone In Motion (Redpower Frames) 2.3.0.0 (October 8)


jakj

Recommended Posts

The ClassCastException is probably from a mod (Thermal Expansion in this case) that caches XYZ coordinates and doesn't update them on invalidate()/validate(). It assumes the TileEntity at those coordinates is its own and attempts to cast it, but since it is actually JAKJ's carriage TileEntity, it crashes.

Uh, interesting thought... but only TE can fix this then... do you know any other mod with block breakers that doesn't cache it like that?

Link to comment
Share on other sites

The ClassCastException is probably from a mod (Thermal Expansion in this case) that caches XYZ coordinates and doesn't update them on invalidate()/validate(). It assumes the TileEntity at those coordinates is its own and attempts to cast it, but since it is actually JAKJ's carriage TileEntity, it crashes.

Uh, interesting thought... but only TE can fix this then... do you know any other mod with block breakers that doesn't cache it like that?

Link to comment
Share on other sites

Uh, interesting thought... but only TE can fix this then... do you know any other mod with block breakers that doesn't cache it like that?

I haven't tested with horizontal block breaking, but I have had no issues with applied energistics block breakers and frames (example)

The 'beta' version of the next release for 1.6.2 which adds a bunch of neat toys is here

Link to comment
Share on other sites

I haven't tested with horizontal block breaking, but I have had no issues with applied energistics block breakers and frames (example)

Though you're not the guy in the video are you? :D Well anyway, I think I'll just test this again because the first try with AE went terribly wrong... but I'll figure it out I think. Just have to export everything in the network to an enderchest... *noticing enderchest not accepting any items* ... tesseract... *hopefully doesn't crash then* ... Well, should work with 2 ME Fuzzy Export buses for all the items, shouldn't it?

Link to comment
Share on other sites

Though you're not the guy in the video are you? :D Well anyway, I think I'll just test this again because the first try with AE went terribly wrong... but I'll figure it out I think. Just have to export everything in the network to an enderchest... *noticing enderchest not accepting any items* ... tesseract... *hopefully doesn't crash then* ... Well, should work with 2 ME Fuzzy Export buses for all the items, shouldn't it?

Actually I am, the original post where I was showing my quarry off to people is here, I just had a friend post the video for me since I don't use youtube myself (one of those old fashioned give me a written example of what to do for a guide or written text of what something does as a description rather then have to watch a video).

If your using an ender storage ender chest it shouldn't have any problems receiving items, just need to make sure your using a storage bus on it so it's considered someplace to send stuff to applied energistics, and power tesseracts should work fine, in that video I am bringing in power from my IC2 solar power plants on an eternal day mystcraft world via tesseract to power the quarry systems.

The really nice thing about applied energistics systems and block breakers, is all of them that touch eachother are linked, so you only need to connect to a single one with ME cable and they are all linked to the system, no needing pipes to each one, and all item sending is instant, unlike buildcraft pipes (old redpower tubes), so once something is broken its instantly in the ME drive/ender chest, which works especially well with a quarry system.

Link to comment
Share on other sites

Though you're not the guy in the video are you? :D Well anyway, I think I'll just test this again because the first try with AE went terribly wrong... but I'll figure it out I think. Just have to export everything in the network to an enderchest... *noticing enderchest not accepting any items* ... tesseract... *hopefully doesn't crash then* ... Well, should work with 2 ME Fuzzy Export buses for all the items, shouldn't it?

Actually I am, the original post where I was showing my quarry off to people is here, I just had a friend post the video for me since I don't use youtube myself (one of those old fashioned give me a written example of what to do for a guide or written text of what something does as a description rather then have to watch a video).

If your using an ender storage ender chest it shouldn't have any problems receiving items, just need to make sure your using a storage bus on it so it's considered someplace to send stuff to applied energistics, and power tesseracts should work fine, in that video I am bringing in power from my IC2 solar power plants on an eternal day mystcraft world via tesseract to power the quarry systems.

The really nice thing about applied energistics systems and block breakers, is all of them that touch eachother are linked, so you only need to connect to a single one with ME cable and they are all linked to the system, no needing pipes to each one, and all item sending is instant, unlike buildcraft pipes (old redpower tubes), so once something is broken its instantly in the ME drive/ender chest, which works especially well with a quarry system.

Link to comment
Share on other sites

"Whose fault is this?"/"At whom should I yell?" is a complex question in this case. First, I haven't actually decompiled TE to check it out, so I'm operating simply on logic and precedence based on behaviour and experience. That said, here are the actual possibilities:

1) An undiscovered bug in my code that is fucking things up.

2) An issue with caching in the other mod.

3) An unexpected low-level interaction with vanilla.

1) is my fault, 2) is his fault, and 3) is both of our faults (since modding is unofficial and unsupported). In the case of 1), yell at me. In the case of 3), yell at me first. In the case of 2).....you can't yell at anyone. The reason for this is that mods (should be) based on vanilla. As in, your mod should be balanced against vanilla and coded against vanilla, unless it's some sort of expansion mod for another mod which obviously would require that mod (like extra bees would require forestry).

As much as *technically* it is the fault of the other modder for doing lazy cache manipulation...that cache manipulation is valid in vanilla. Analogy time: Every morning, Susan puts her husband's watch on the bathroom sink so he remembers to wear it. Every morning, Joseph completely forgets about his watch until he sees it on the bathroom sink, and then puts it on. One morning, their son Peter decides (for whatever reason) to grab the watch from the bathroom sink and put it on the nightstand instead. Joseph never sees the watch, so he never remembers the watch, so he gets to work, and then goes "wait, what the fuck time is it" and is annoyed for the day.

Who should Joseph's boss yell at for his lack of productivity due to distraction? Susan (vanilla) correctly did what she always does. Joseph (TE) carried on with the expectation that Susan (vanilla) would do what she always does, because he had no reason to suspect otherwise. Peter (RIM) was just trying to be helpful.

Obviously, Peter's the one who moved the watch...but Joseph is the one that just assumed subconsciously that it would be provided to him instead of going "hey wait, where's my watch". And Susan had nothing to do with the whole thing: It's between Joseph and Peter.

Since I feel that 2) is likely what's going on, there are only two possibilities:

1) Convince (gently) the other modder to do better caching.

2) Wait for me to (eventually, presumably before we all die of old age) write specific code to post-manipulate the other mod's cache myself so it stays valid (or, at least, not invalid).

Link to comment
Share on other sites

Well, according to where in the code that happened, all of the stuff in the world already got put back in its spots, so you (should) have lost no data. Which also makes the crash silly, because as I say, everything already got put back in the world.

That word "cache" in the TE code, though: What an awful word when it comes to this mod. On its own, not so bad: *IF* the other programmer has done his job and properly manages the cache on validate()/invalidate(). Quite a few times, though, that doesn't happen: Blocks aren't *supposed* to move around, after all, and modding is a giant hackjob anyway, so a good few modders make assumptions that are fine for vanilla code but not after I finish screwing around with their stuff.

At a wild guess, it's making assumptions about how the cache is structured, and it crashes or doesn't based on what just so happened to be in what spots before and after, and also in which direction it moved, meaning that sometimes, after motion, accidentally its cache is still semi-valid (or at least, has the right slots open even if the slots contain old stuff). Smells like a situation where the cache is updated on block break instead of on invalidate. A pity.

This is going to have to go on my list of "will fix if can, but don't hold your breath" because it's really the paradox of "he did it wrong because he doesn't properly clean up" and "he didn't do it wrong because vanilla doesn't cause him to have to properly clean up".

Actually, there's more to it than validate/invalidate - it's not a simple matter of "cleaning up." Conduits are ridiculously, absurdly complex multiblock structures and they shouldn't be moved. Period. I'm not sure if there's a fix or not, but I'm not inclined to find one due to the performance hit that constantly moving a multiblock structure is going to result in.

Link to comment
Share on other sites

Actually, there's more to it than validate/invalidate - it's not a simple matter of "cleaning up." Conduits are ridiculously, absurdly complex multiblock structures and they shouldn't be moved. Period. I'm not sure if there's a fix or not, but I'm not inclined to find one due to the performance hit that constantly moving a multiblock structure is going to result in.

Well, I have no idea about the particular complexity of your multiblock structure, but plenty of them move around just fine (even CJ's, and he hates them being moved especially).

You have to support some way of clearing out the cache when a block is broken, though. Can you not take the code that runs when a block is broken and run it also when invalidation happens? There wouldn't be any risk of staleness, because when it's put back down, the full "I just got loaded from disk" routine runs on the blocks, and they are all in place (even with their tile entities) before any of your code gets a chance to run. All of the notifyBlockChange and what-not happens after everything is in its new position.

Link to comment
Share on other sites

Well, I have no idea about the particular complexity of your multiblock structure, but plenty of them move around just fine (even CJ's, and he hates them being moved especially).

You have to support some way of clearing out the cache when a block is broken, though. Can you not take the code that runs when a block is broken and run it also when invalidation happens? There wouldn't be any risk of staleness, because when it's put back down, the full "I just got loaded from disk" routine runs on the blocks, and they are all in place (even with their tile entities) before any of your code gets a chance to run. All of the notifyBlockChange and what-not happens after everything is in its new position.

Actually we already properly clear our cache and clean up after ourselves, I just went back through the code and verified. We can't even find the line number referred to in that crash log - that's an older beta it seems. But even in our old ones, we were fine.

I'll see what the cause of this is, but if your frames work as elegantly as you claim, this actually shouldn't happen, despite the enormous and unjustifiable computational strain.

Conduits are getting a complete rewrite for FMP, so we'll see how they behave after that.

Link to comment
Share on other sites

Actually we already properly clear our cache and clean up after ourselves, I just went back through the code and verified. We can't even find the line number referred to in that crash log - that's an older beta it seems. But even in our old ones, we were fine.

I'll see what the cause of this is, but if your frames work as elegantly as you claim, this actually shouldn't happen, despite the enormous and unjustifiable computational strain.

Conduits are getting a complete rewrite for FMP, so we'll see how they behave after that.

"unjustifiable" only when you don't consider the generality involved: My method works by default with the majority of blocks because it uses in-game mechanisms and duplicates Minecraft's code as much as possible. It's not "better" than Redpower's method: It's different, and lets me not have to write special code for the majority of mods, especially ones that implement deliberate counter-measures against their blocks being moved.

(That said, the way I propagate lighting updates is dreadful and may account for the majority of time spent moving blocks.)

I don't claim to have no bug causing this issue: I simply claim that, at this moment, I think I have none such, with regard to the actual blocks being moved. I'm absolutely open to finding out I'm wrong, though, if you do determine your code handles the cleanup properly.

Link to comment
Share on other sites

Thankies, I have a few of those quarries built around my world/mystcraft ages, usually I just carry a wireless turtle on me for the purpose of remote controlling the quarry (in blah... blah, you know what you wrote ;)

I hope you didn't get it wrong, I didn't say there was anything bad about you or the video... I was just kind of (surprised???) that it could have been you in the video. I don't know...

Anyway, I think I watched something similar on another channel, and copied it almost exactly, but it just wasn't working at all. Then, I watched your video and tried the enderchest version: as I said, enderchest was not accepting anything, AND THEN finally: I figured you'd have to use a disk drive... dude thanks for that. A lot, to be honest :) Amazi-Quarry, or so... really awesome job ^^

Now I just need to figure out, why the export bus I set up at home doesn't output to a chest. (yes, I definitely set all the items to export, so you don't ask :P) I spent countless.. well minutes in fact .. on that, can anyone help me?

Link to comment
Share on other sites

Actually we already properly clear our cache and clean up after ourselves, I just went back through the code and verified. We can't even find the line number referred to in that crash log - that's an older beta it seems. But even in our old ones, we were fine.

I'll see what the cause of this is, but if your frames work as elegantly as you claim, this actually shouldn't happen, despite the enormous and unjustifiable computational strain.

Conduits are getting a complete rewrite for FMP, so we'll see how they behave after that.

I'm really sorry, but I have a crash log that says something else: http://pastebin.com/aMZZfwzM

Just downloaded the new beta 5 minutes ago, testet exactly the same setup... well you can see what came along. It always happens when both TE and RiM update nearby blocks. I'm not a coder, but I just noticed that it could be that rather than the cache improperly clearing up.

Link to comment
Share on other sites

That is definitely a lack of a null check in TE code. The question to be determined is whether that null check missing is a flaw in TE, or if a flaw in my code is causing expected state to be invalid that otherwise could never be invalid.

Link to comment
Share on other sites

That is definitely a lack of a null check in TE code. The question to be determined is whether that null check missing is a flaw in TE, or if a flaw in my code is causing expected state to be invalid that otherwise could never be invalid.

Oh, ok.. you mean, that if there's no block, it doesn't update the ones nearby... seems obvious ^^ :P

Link to comment
Share on other sites

I hope you didn't get it wrong, I didn't say there was anything bad about you or the video... I was just kind of (surprised???) that it could have been you in the video. I don't know...

No worries, I'm just a pretty bad video maker is all, that was actually the first time I really recorded anything.

Anyway, I think I watched something similar on another channel, and copied it almost exactly, but it just wasn't working at all. Then, I watched your video and tried the enderchest version: as I said, enderchest was not accepting anything, AND THEN finally: I figured you'd have to use a disk drive... dude thanks for that. A lot, to be honest :) Amazi-Quarry, or so... really awesome job ^^

Now I just need to figure out, why the export bus I set up at home doesn't output to a chest. (yes, I definitely set all the items to export, so you don't ask :P) I spent countless.. well minutes in fact .. on that, can anyone help me?

Thanks, it was fun designing that quarry and the software to run it.

The disk drive does work but you don't have to use one, I just recorded another video that I hope might help a little (I would have had it this morning, but I haven't played in awhile and decided to take the 1.6+ jump, so getting mods, solving conflicts, finding a power converter mod that actually works with 1.6 so IC advanced solars can have their power sent somewhere without using cables etc.. took up most of the day, that and remaking a little base and the quarry).

It is here, essentially I tried to show in the beginning how a fuzzy import bus set to not care about damage values, with a redstone signal will pull out stucks from the ender chest into the main AE system in the base.

Once on the platform I tried to show the basic layout with all the AE block breakers and just the one cable needing to connect to them, which goes to the controller with a drive attached on priority 10, with a fuzzy storage bus on the ender chest on priority 20.

Essentially, everything will fill up the chest and then anything that can't fit gets sent to the drive, I used the wireless remote to show how the stuff was pulled out of the ender into the base AE system when I used the wireless redstone remote on the quarry, and the remainder that hadn't fit in the chest in the drive on the quarry.

Now if I had it set so that the import bus on the chest in the base was always working and not just when getting a signal, the chest probably wouldn't fill up in the first place, so everything that was quarried would go right to the AE system at home rather then any leftovers getting shunted to the drive on the quarry.

Main thing about AE is not being confused with the storage bus vs import bus vs export bus, storage bus makes whatever it is put on considered a "container" for AE storage (so put the ender chest you want stuff stored in), import bus is to pull things out of a container into an AE system (so put on the chest you want to pull stuff out of), and the export bus is to pull things out of an AE system into another container like a chest, so you wouldn't want to use an export bus on an enderchest unless you wanted to pull things out of AE storage and put them into the chest.

Edit: And apologies to jakj since that wall of text has almost nothing to do with your mod besides it being demonstrated using a frame quarry.

Link to comment
Share on other sites

WAAAY too long ;)

Ok, so I assume you just use a storage bus? Well, that's easy... And has the priority to be 20 or something else?

Though what you said last was somehow confusing me: you said, that I wouldn't want to use an export

bus unless I want to insert stuff from my AE network into the enderchest/ or actually I use a tesseract ;)

But I want to do just that! :P I want the stuff from my Quarry in my AESystem in a chest so I can process it with the TE machines.

Sorry, but I still don't really know what to do :P

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...