Draconic Evolution

Draconic Evolution

77M Downloads

Energy Core: Read RF Input/Output via ComputerCraft

Skaronator opened this issue ยท 9 comments

commented

Would be nice if it is possible to read the current input and output of RF energy via ComputerCraft. Can't find any info's if it's already possible but don't think so. Possible names for the commands could be getEnergyInput and getEnergyOutput.

Base information

  • Minecraft version: 1.7.10
  • Minecraft Forge version: 10.13.4.1614
  • Draconic Evolution version: 1.0.2a

Mod Pack

FTBInfinity-2.5.0-1.7.10

commented

I'm pretty sure you can do this..not sure of the lua functions, but ther is definitely OpenComputers and ComputerCraft support..i'll look into ti and reply if I can find the functions

commented

This is already possible =)
It seems there is only getEnergy() and getMaxEnergy(), but using these functions you can write lua code to calculate the rate of input/output. They show up as "draconicevolution_tileenergypylon",

commented

Well I could make a loop and check the difference between the getEnergy() from last run with the current run and make the difference out of those variables but it wouldn't be the I/O per tick since the lua script can't run within a single server tick.

commented

I don't know the CC internal tick rate..but if it's once per second, then just do the camparison and divide the result by 20...I do like this idea though and I wouldn't be suprised to see that this gets implemented. It would definitely be a nice feature to have available through a single call. After looking at the code where the OC/CC code is implemented, it would be maybe 10 lines of code to add it. The issue is that I don't know if brandon is adding anything else to the 1.7.10 version. I'm pretty sure 1.7.10 PRs are only being accepted for game-breaking bugfixes now as 1.7.10 is being phased out in favor of the awesomeness (at least from a dev pov) that is 1.9 =D. If not, the repo is forkable =D. If you have Java/modding experience and just need help/pointers I'd be glad to help you.

commented

Brandon actually plans to add this function at some point, but other issues in the mod and features he was working on so I believe this is planned for future versions

commented

The CC internal tick rate is basically random depends on server tickrate and the complexity of script - so can't do it over that way.

If not, the repo is forkable =D. If you have Java/modding experience and just need help/pointers I'd be glad to help you.

Would do that but don't have any Java experience

commented

Sorry this took so long to locate (was from a while ago.

#260

That may give some insight into some of the things he did get implemented for CC, it is just not very well documented. Somewhere around here there was a person who had actually forked it to try to implement it better, but could not find it.

commented

This will be a thing in 1.9 but until then i recommend doing what greatorator suggested and just monitor changes over time. I would recommend checking each second to get a more accurate reading that will be less affected by the CC tick time the divide by 20 to get the RF/t

commented

Alright thanks @brandon3055!