add computercraft integration to mekanisim v10
Opened this issue ยท 19 comments
older versions of mekanisim had computercraft intergation, a fork of computercraft exists for 1.16.1, the forked version of computercraft worked with mekanisim in 1.12.2, however it doesn't list anything in mekanisim v10 as a component. is this something to do with mekanism or the computercraft fork? it would be awesome to see mekanisim having support for the computercraft fork.
this is the fork i'm referring to: https://www.curseforge.com/minecraft/mc-mods/cc-tweaked
The comment in this issue just before your first comment.
Ah yes (duh), should have spotted that thanks (feel free to delete my comments).
I am posting this here since this is what I found when googling mekanism cc tweaked
.
If you are trying to control a fission reactor with a computer, the block your computer interact with MUST be the Fission Reactor Logic Adapter. I spend like 1 hour trying to figure this one out ๐คฃ.
This is something I am planning on looking into some eventually for V10.1, though no idea when that will be (hopefully sometime this year)
Adding to this, CC:T has generic peripherals (originally a Plethora feature) which allow CC computers to move fluids and items between blocks. A user on the CC:T discord has reported that they could not use generic peripherals to push/pull water into a Mekanism tank, ideally Mekanism should support generic peripherals.
See: https://discord.com/channels/477910221872824320/477911902152949771/785880193121255474
Modpack used: All The Mods 6
I already have a system that is similar the the LuaFunction stuff in mind, except that isn't as strict, and also is abstracted so that if OC updates we can also relatively easily re-add our integration for that.
One thing I noticed with this is that the Wired Modem can connect to any block of a multiblock structure that has capabilities (Energy, Fluids, etc..).
While I don't think that this is a problem, it does look kind of weird that it is able to attach to any block of a multiblock structure.
I also noticed it wouldn't be too hard to (re-)implement the features from Mekanism v9, especially not with the new @LuaFunction
annotation provided by CC:Tweaked. (The image is a basic example, it does bypass the injection rate limits, but that's because I did not add any safety checks)
I would be up for adding the CC integrations back, but I'm not entirely sure if there is a certain structure that the current developers had in mind when adding this, as there are already a few files in the source.
I noticed the getEnergy() and getEnergyCapacity() methods cap out at one basic induction cell regardless of what type of cell or how many cells there are in the Induction Matrix. Would there be a way to fix that?
Given the fact that those methods are currently auto added generics by CC, yes this in theory will be fixed when I get around to implementing this for 10.1.
Generally, all methods that would allow you to do, what a player would usually be able to do (aside from configuring security), and get information that players would be able to get would be extremely welcome and appreciated.
This includes but not limited to general things such as:
- Changing the Side Config, Transporter Config
- Accessing all quantities inside of the machine
- Measuring the amount of FE (probably a good energy quantity default) required by the machine to run at full capacity, max output, input, etc
- Toggling the redstone detection
Honestly there's many things you could do for this integration but I think the more power they have the better.
V.10.1 is in development. Pupnewfster develops a lot on the system. But the release of V.10.1 can take up to 2 months+-(information from the discord server)
This should be basically working on the 10.1 branch now there is still a decent amount of cleanup I want to do, and I haven't tested the majority of the method implementations yet, but for a list of the methods hat have been added (and in theory should work) this can be seen here. There are two sheets, a 1.16 one (for stuff I implemented in 10.1) and a 1.12 sheet that can basically be ignored that is mostly just my notes on what methods we exposed in 1.12 and if I thought it was worth keeping them or not.
Rough copy paste of what I put on discord in our announcement's channel so that people who find this issue via github can see as well:
For people who use/used ComputerCraft (or OpenComputers for that matter even though it is not updated past 1.12); it would be of use if you could in a structured manner add comments here stating what methods (both in terms of setters and getters) would be helpful for the various tiles (or type of tiles) for Mekanism's integration to have when I look into reimplementing compat with CC for Mek v10.1. Given I haven't really ever bothered using CC or OC, so while I can probably look at some of the things we exposed back in 1.12, I can't really get a sense of what other things might be useful that we didn't used to have. (Such as being able to control the side config be of any use?)
Methods for Reactors:
- getEnergyPerTick()
- getStoredEnergy
- activateReactor()
- stopReactor()
- getCoolant()
- getFuel()
- getWaste()
- getHeatedCoolant()
- getTemperatureInCelcius()
- getTemperatureInKelvin()
- getHeatingRate()
- getBurnRate()
- getDamage()
- setBurnRate()
- getBoilEfficiency()
Most of them are for the Fission Reactor(I do not know a lot about the Fusion Reactor).
Energy Cubes/Matrix:
- getTransferRate()
- getStoredEnergy()
Teleporter
- setFrequency()
- getFrequency()
- removeFrequency()
events: - teleportEvent
I have found that many mekanism devices support the redstone comparator.
my opinion is that it would be enough to add only a logic adapter for other multiblock structures.
a beautiful example is the reactor logic adapter.
reactor logic adapter only lacks analog mod (0-15 signal strength).
the problem with the turbine's redstone comparator is that it only detects the state of steam.
the analog redstone output of the stored energy signals is very missing.
EDIT:
I did a test using RFTools Control.
I found that using eval: get in RF machine integer version
can be read the amount of energy from cubes, inductive matrix and turbine.
Directly cube, matrix through induction port and turbine through turbine valve.
I use Mekanism 10.0.15.441 and RFTool Control 4.0.6 for minecraft 1.16.3.
Result: I currently use minecraft redstone elements to control power generation.
I will use RFTool Control for the reactor and the turbine.