age-series / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
Other
65 stars 30 forks source link

CCT not copying copper cables or casings #210

Closed dennis-qt closed 2 years ago

dennis-qt commented 4 years ago

When trying to copy a config of a vDC/DC, neither copper cables nor the casing are being copied. This is not limited to the vDC/DC only, since when doing the same with regular DC/DCs, the casing isn't copied as well.

Grissess commented 4 years ago

I think casings may have been a feature I was unaware of when I made the CCT, not to mention that a test for its existence is one sneaky line in the element that I overlooked.

Not moving copper cables likely has to do that they aren't "cables" in the code. Someone changed that, apparently, and that offends this function which expects to find the "cable descriptor" in the SixNode registry. Since copper cables can't be placed in world (yet), they don't appear there. Thus, I see two potential fix paths here:

  1. Modify that function, ad hoc, to accept copper cables for these inventories as well, or
  2. Add user-placeable copper cables.

Thoughts on approach?

dennis-qt commented 4 years ago

I may have found a third option inside the vDC/DC code itself. From what I understand it tells the CCT that there is a cable inside those slots when it's not a real cable to the code. I suppose changing readCableType to readGenDescriptor might work? Same with lines 379 and 380.

jrddunbr commented 4 years ago
  1. I don't see reason to make copper cable placable right now.