Reactor Logic Adapter Port missing canConnectRedstone still
MyNameIsKodos opened this issue ยท 16 comments
The block itself is solid, but it still needs the IBlockAccess flag canConnectRedstone in order for Project Red framed red alloy and colored insulated wire, and other similiar cables, to be able to connect to it. I promise this is the last time I make an issue regarding this =)
Also just wanted to say that I absolutely love Mekanism (I've been using it since it was a UE mod back in 1.5.2) and I hope to continue to see it grow and progress for some time to come.
Have you done any manual compilations? It might've been fixed in development but they haven't pushed it to their build server as a stable release build.
I've taken a look at the code, and didn't see the flag in it. In the current version, you can place things like red alloy wire (Non-framed) and it works, but I'd like something that looks a bit cleaner. I recently had a similar issue with another mod, and when that particular flag was added, framed insulated wire worked lovely with it =)
ahhh... i assume that by framed you mean stuff like insulated and bundled cable?
Yes. Bundled cable itself wouldn't work, as you have all 16 colors in one, but yes, insulated wire is what I'm going for. I use an addon to Project Red called Project Blue, which lets you have levers, buttons, and lights for all 16 colors in a single block, so you can control and monitor things easier. Example below:
ahhh... I've barely even touched Project Blue so i was unaware. Do you happen to have an example of the flag you're referring to? I know you mentioned another mod added it and that fixed the issue.
bdew-minecraft/generators@907ec52
As you can see in this commit, the import was changed a bit, and the flag itself was added onto the redstone control module block. I would assume (I know little about actual modding, I'm just able to read code and such) that the same could be done for the RLA in Mekanism for it to work.
Kodos: let me try and see what I can do in regards to this. I'm not that great a coder but I'll make sure it's stable before i give you a build to test.
@Kodos-Atoz I've got my code edit in (it's not been submitted as a PR yet as I still need to test the functionality of the code.) I'm testing it as we speak. Currently encountering crashing related to other mods but will make sure that main compatibility is present before uploading it to my server for download and submitting a PR on this repo.
@Kodos-Atoz so in Bdew's mods the insulated/framed ones work directly from bluepower? I've added the same code (slightly modified for mekanism functionality but mostly the same) and yet the blue power ones do not get output. I'll continue testing. Red alloy wire itself works. I've got a few ideas left to try though.
I'm... not sure what you're doing, but I'm referring to Project Red, not Bluepower. Also, it's a simple flag addition, not sure what you needed to modify... I think I'll just wait for aidan's input on this. I would think it's a simple fix.
D'oh! i forgot that I was using Blue Power not Project Blue. Give me about 10 minutes. The code change I made was referring to the function isSideSolid in BlockReactor.java located here: https://github.com/aidancbrady/Mekanism/blob/development/src/main/java/mekanism/generators/common/block/BlockReactor.java <--- I'm of the belief be more safe than sorry. I might've overthought it but I'll let @aidancbrady or @unpairedbracket look it over and decide whether or not I needed to have the modification.
I basically copied the isSideSolid function and changed the function name while leaving the case switch statement in.
and i got it! I'll upload the code to my repo as well so people can see the code change.
But here it is: (Starts at line 353)
@OverRide
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)
{
ReactorBlockType type = ReactorBlockType.get(this, world.getBlockMetadata(x, y, z));
switch(type)
{
case FRAME:
case PORT:
case ADAPTER:
return true;
default:
return false;
}
}
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, ForgeDirection side)
{
ReactorBlockType type = ReactorBlockType.get(this, world.getBlockMetadata(x, y, z));
switch(type)
{
case FRAME:
case PORT:
case ADAPTER:
return true;
case CONTROLLER:
return true;
default:
return false;
}
}
Here I got the system to work:
EDIT: and yes, my taskbar is cluttered to hell.
You've got a piece of red alloy wire (Non-framed) against the facing of hte reactor. With the flag I'm talking about, that piece isn't necessary, and the framed wire would connect on its own. As I said, I'll just wait for Aidan, as it seems there's a miscommunication going on.
Yeah. Probably best. I can't get it even firing up a second server with the flag non-modified. My java knowledge is limited. I don't know where else to put that flag because the block interfacing seems to all be going through BlockReactor.java. But i tried.