Jump to content

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


jakj

Recommended Posts

I did, but I didn't read anything indicating that. I'm probably just blind - not really used to... "parsing" twitter, so I find it confusing most of the time.

Oh well, as long as Forge keeps working...

It's possible I've misunderstood, but I doubt it. The basic gist of it is, AbrarSyed has taken MCP and absorbed it into his Gradle project, and the "just MCP" method of modding is nearing its death, as MCP is just hanging on long enough for the Forge/Gradle system to become stable and replace it. And Forge is taking great pains to drive everyone away from doing anything anywhere at any time *except* with Forge, including base-class editing (even if Forge-compatible), so if you ever again want to work outside of Forge's limitations, you're going to have to learn a whole bunch of bullshit including Gradle internals and Scala, as well as set up the full development environments, to be able to recompile Forge piecemeal. Either that, or hope the Forge gods smile upon your tiny efforts and accept your pull request.

Overall, except for fringe cases, it's fine. The big mods will keep working because Forge accepts their pull requests like a fat man accepts chocolate cheesecake, and the majority of the rest of modders already don't need anything that Forge doesn't provide. And mods like mine, where I just copy and paste vanilla code into my mod and rewrite it instead of editing base classes, will also be fine.

Link to comment
Share on other sites

That's the Buildcraft reflection code erroring out. It's harmless: It just means Buildcraft pipes behave strangely and don't re-initialize immediately (takes a quarter of a second) after motion, which is a problem only if you're trying to shove things into them immediately after motion.

Go in your config on the server:

"Dirty Hacks" {

    B:"Attempt to hyper-reinitialize Buildcraft pipes after motion"=true

}

Change that to "false".

Would this also fix the crash when trying to move a platform in a myst age?

http://pastebin.com/PcnfvA7p

I have not noticed any console spam (but I wasn't looking for it), and they seem to work fine in the overworld, but rebuild the same setup in a myst age and it won't even move a full block before crashing a server.

Link to comment
Share on other sites

Would this also fix the crash when trying to move a platform in a myst age?

http://pastebin.com/PcnfvA7p

I have not noticed any console spam (but I wasn't looking for it), and they seem to work fine in the overworld, but rebuild the same setup in a myst age and it won't even move a full block before crashing a server.

Sweet Mary and Joseph, that is the gnarliest crash log I have in my life ever seen. I can tell you right this moment that I will never be able to figure out *that* one. Multithreaded synchronization, socket manipulation, and Lua closures, all in the same crash, without even giving me a single line of my own code as a reference, or even as a starting point? Nope. First time anyone's mentioned Mystcraft crashes, too. Nope, nope, nope, no idea.

Link to comment
Share on other sites

Greetings fellow RIM'ers :-)

I have created a small 'API' to make working with the controllers a little easier and I wanted to share with people.

This API adds two programs to your computers:-

Program 1 - The 'api' rim

This allows you to make a simple call from within your programs to move carriages about and can be used thus.

rim.Move([connection type],[connected side],[direction to move],[distance to move],{controller ID})

Syntax for commands:

Connection type: net = Wired Modem, direct = in direct contact

Connected side: left, right, top etc. Where either the wired modem is for 'net mode' or where the controller is for 'direct mode'

direction to move: north, south, east, west, up or down

distance to move: number of blocks to move

controller ID: the ID number of the carriage controller on a wired network. When you enable a wired modem on a carriage controller you will see a chat message of "JAKJ_RIM_CarriageController_1" or similar. you just need the '1' from this message

You can omit this perimeter if you are using 'direct mode'

Examples:

rim.Move("direct","back","north",3) - using the controller on the back of the computer, moves the carriage 3 blocks north

rim.Move("net","back","north,3,0) - Using the modem on the back of the computer, tells controller 0 to move it's carriage 3 blocks north

Program 2 - rimm (Redstone In Motion Manual)

This program allows for manual control of a carriage controller using the arrow keys + home and end.

There is a UI that walks you though the process.

to use this just type rimm and press enter on a computer

if you are running 1.6 versions of computer craft you can simply unzip this file into your resource packs folder and all computers will have the two programs.

If you are on an earlier version you will need to 'hack' them into the computer craft mod archive or use another way that I don't know.. create a disk in game then copy them into the saves/{world}/computer/disk/{id}

Hope you like it / find it useful. I need to do some work error handling when you call controllers that are not there etc but it's pretty functional as is...

Link to comment
Share on other sites

While I'm here, could anyone explain how I would go about creating a lua program for CC so the computer reboots properly and continues executing its code? I've tried different loops but they all seem to either fail after the first turn, or the computers stop executing the code, but the program itself is still running.

Edit:

Back in 1.5.2, I used this code to supply a redstone signal from a computer to the old wireless redstone mod receivers, I've tried the same code going straight to the Carriage in 1.6.4, however it does not work, but moving the carriage with a lever or redstone torch does work.

local nCount = 12

local nPeriod =2.0

if redstone.getInput("right") then

for n = 1, nCount do

redstone.setOutput("back", true)

sleep(nPeriod/2)

redstone.setOutput("back", false)

sleep(nPeriod/2)

end

end

if redstone.getInput("front") then

for n = 1, nCount do

redstone.setOutput("left", true)

sleep(nPeriod/2)

redstone.setOutput("left", false)

sleep(nPeriod/2)

end

end

Its basically a redstone clock from a computer, you can use redstone or some sort of redstone cable to supply the signal, but I cannot get it to work with the carriages. I have tried timers, which work and are essentially the same thing, but the computer version does not work. Any help would be great.

Link to comment
Share on other sites

SciFi, thanks for the API, is there any way to get the Carriage Controller to move with the frame. Whenever I use the API, the Carriage stays put. Thanks again :D

If you open the 'rim' file in notepad ({minecraftDIR}/resourcepaks/rimapi/assets/computercraft/lua/rom/apis) and scroll down about half way, look for the function Move (... statement, about 21 lines down from there you will find a line that reads "local anchor = true --Change if you want the motor to also move."

follow the instructions :-)

if you want both you could create a copy of the file, mod the original and then rename the copy to say 'rima'. This way calling rim.Move will have the controller move with the carriage and calling rima.Move will have the controller stay where it is

I may include this in the download in the future but for now this is the quickest route for you

Hope that helps.

Link to comment
Share on other sites

While I'm here, could anyone explain how I would go about creating a lua program for CC so the computer reboots properly and continues executing its code? I've tried different loops but they all seem to either fail after the first turn, or the computers stop executing the code, but the program itself is still running.

If I'm understanding what you need, then you will need to use saved files on the drive, write to them what you want and then read from them to have the startup program know what to do when it comes back up.

LezChap and I both have examples of programs that work fine/continue what they were doing after computers come up from rebooting on the last forum page (79), though they have the full code for writing & reading from the file pasted whereas I didn't include that code in my examples.

Link to comment
Share on other sites

Well, it seems it is also happening in the overworld as well. This one seems a bit more tot he point:

http://pastebin.com/AJyAcZHA

Interesting. According to that error, the mod is crashing because it is retrieving a tile entity that does not exist and trying to act on it. However, the line of code immediately preceeding that crashing line is the line that creates the tile entity that is being retrieved. And it can't be crashing on any other part of that line, because if it were, the crash would have instead happened on an earlier line in that function.

Somehow, the creation of the tile entity is failing. Without seeing your actual Forge log, I can't tell if it's printing out any other sort of error that might tell me why.

Link to comment
Share on other sites

Im getting in console some index out of bounds array error, On the client it looks like its related in someway to rei's minimap but im not sure. forge log doesnt show anything of the error.

No, it's not the Rei stuff: That's just Rei's lazy programming, polling blocks that don't exist. Hmm.

Link to comment
Share on other sites

Hey! I love your mod, but since I updated to thermal expansion 1.6.4 I get this error http://pastebin.com/XKwHbWPu

I unfortunately can't tell you when, it's just happening out of nowhere...

Please give this error some love, or my Frame-Quarry will be very, very sad :(

Is this an occasional thing or a frequent thing? Definitely started happening only when you upgraded TE and not at all before?

Link to comment
Share on other sites

Is this an occasional thing or a frequent thing? Definitely started happening only when you upgraded TE and not at all before?

Well, I actually noticed that first when using TE, but I have not played with RiM that much before. Though, as you can see from the crash report, it has something to do with the TE-Pipes updating something and also your Carriage Spectre updating blocks around them. A frequent thing? it has happened 2 times now, but both in my survival world, so I'm rather upset :D but not really frequent, no; Although it happened in a very short time twice, which I would definately refer to as "frequent".

Link to comment
Share on other sites

Well, I actually noticed that first when using TE, but I have not played with RiM that much before. Though, as you can see from the crash report, it has something to do with the TE-Pipes updating something and also your Carriage Spectre updating blocks around them. A frequent thing? it has happened 2 times now, but both in my survival world, so I'm rather upset :D but not really frequent, no; Although it happened in a very short time twice, which I would definately refer to as "frequent".

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

Link to comment
Share on other sites

Ok, just revisited my mine [quick notice, these frames are F***** fast^^] and I think kinda got it now... the frames probably went wrong because the TE block breakers and itemducts had partially disappeared (it may have had something to do with the lava all around, but that's another story), maybe even while the movement was happening, and my tesseract transformed into cobblestone, which I'm really lucky about. Cobblestone is so rare these days...

Anyway, it was probably just related to the lava destroying the stuff and (invalidating???) the blocks, or because the frames tried to move lava. I remember my last crash now: It was nothing similar, just the same setup I guess, because the frames were invisible a.k.a the Spectres and there was nothing broken or lava all around. I may get the crash report for that one too, I'll just have to search my hard drive a bit... Hang on!

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.

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