Added P2P tunnel part for OpenComputers. #579

Closed
wants to merge 6 commits into
from

Projects

None yet

3 participants

@fnuecke
Contributor
fnuecke commented Dec 11, 2014

As discussed with @FireBall1725 on IRC, here's a PR adding a P2P tunnel part for OpenComputers networking.

Tested with and without OC, in dev-env and normal MC via vanilla launcher.

One thing that needs specific review are the adjusted enums. I believe the ones where I did not append the entry to the end to be order irrelevant, but verification of that is needed.

@yueh
Member
yueh commented Dec 11, 2014

I would consider the API and localization currently under lockdown until it is finally merged. Otherwise it just makes things more complicated.

The code style does not look like it is matching our.
For example we do not prefix fields with _ (this is not PHP or Python and missing visibility), the import order is wrong and is there a reason why you are using fqdns for the classes?

@fnuecke
Contributor
fnuecke commented Dec 11, 2014

Made the requested changes.

I would consider the API and localization currently under lockdown until it is finally merged.

Any ETA on that? Just so I know whether to keep my hacky third-party implementation in OC itself for now.

@thatsIch
Member

resync please

@fnuecke
Contributor
fnuecke commented Dec 13, 2014

Cool, done! Also re-tested for good measure.

@thatsIch thatsIch and 1 other commented on an outdated diff Dec 13, 2014
src/main/java/appeng/integration/modules/OC.java
+package appeng.integration.modules;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+import appeng.api.AEApi;
+import appeng.api.config.TunnelType;
+import appeng.api.features.IP2PTunnelRegistry;
+import appeng.integration.BaseModule;
+import cpw.mods.fml.common.registry.GameRegistry;
+import li.cil.oc.api.Items;
+
+public class OC extends BaseModule
+{
+
+ public static OC instance;
+
@thatsIch
thatsIch Dec 13, 2014 Member

whats the point of this variable? I dont see any usage on it, be it writing nor reading

@fnuecke
fnuecke Dec 14, 2014 Contributor

I just copied the RF module and adjusted that, it also has that variable. I assumed it'd be something filled in by the integration system. Will remove.

@thatsIch
Member

Looks fine to me, if you redo the import orders. codeformat/consistent.importorder has a priority list map

@fnuecke
Contributor
fnuecke commented Dec 14, 2014

consistent.importorder

Ah, missed that, importing the code style only showed XML files, so I just oriented myself on other files for the import order. Will take a look.

@fnuecke
Contributor
fnuecke commented Dec 14, 2014

Updated.

@fnuecke
Contributor
fnuecke commented Dec 14, 2014

Aaand, the one time I push while testing it and not after it breaks... the instance field seems to be required. Doesn't work if I remove it (so I added it back).

@thatsIch thatsIch and 1 other commented on an outdated diff Dec 16, 2014
src/main/java/appeng/integration/IntegrationType.java
@@ -59,8 +59,10 @@
Mekanism(IntegrationSide.BOTH, "Mekanism", "Mekanism"),
ImmibisMicroblocks(IntegrationSide.BOTH, "ImmibisMicroblocks", "ImmibisMicroblocks"),
-
- BetterStorage(IntegrationSide.BOTH, "BetterStorage", "betterstorage" );
+
+ BetterStorage(IntegrationSide.BOTH, "BetterStorage", "betterstorage" ),
+
+ OC(IntegrationSide.BOTH, "OpenComputers", "OpenComputers");
@thatsIch
thatsIch Dec 16, 2014 Member

Maybe its better to use a better qualified name here so it will not clash in the future

Suggestion: use OpenComputers as enum value

@fnuecke
fnuecke Dec 16, 2014 Contributor

Done.

@thatsIch
Member

We will pull it into the rv3 branch

@thatsIch
Member
thatsIch commented May 5, 2015

we would pull this into rv3 now,
not sure if anything particular new was added on your side.

Else I can do the rabase on it.

thatsIch and others added some commits May 5, 2015
@fnuecke
Contributor
fnuecke commented May 6, 2015

Great! I'll update it to the current state of the rv2 branch and check if it's still working.

@thatsIch
Member
thatsIch commented May 6, 2015

rebase it against the master (this will be the future rv3)

@fnuecke
Contributor
fnuecke commented May 7, 2015

Oops, messed that up. Will make a new PR against master.

@fnuecke fnuecke closed this May 7, 2015
@thatsIch
Member
thatsIch commented May 7, 2015

welcome to github :D

@fnuecke
Contributor
fnuecke commented May 7, 2015

Haha, yeah. I pretty much expected that to horribly fail, admittedly :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment