Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CC Networking Cable p2p tunnel #702

Merged
merged 9 commits into from
Jan 21, 2025

Conversation

zyxkad
Copy link
Collaborator

@zyxkad zyxkad commented Jan 20, 2025

PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION

  • Please check if the PR fulfills these requirements
  • What kind of change does this PR introduce? (Bug fix, feature, ...)
    Feature

  • What is the new behavior (if this is a feature change)?
    Register AE2 p2p cable to forward cc:t connections

  • Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?)
    No

  • Other information:
    P2P tunnel item module is required

close IntelligenceModding/Advanced-Peripherals-Features#104

@zyxkad zyxkad marked this pull request as draft January 20, 2025 15:13
@SirEndii SirEndii changed the title add cable p2p tunnel add CC Networking Cable p2p tunnel Jan 20, 2025
Copy link
Contributor

github-actions bot commented Jan 20, 2025

Build Preview

badge

You can find files attached to the below linked Workflow Run URL (Logs).

Name Link
Commit 499abef
Logs https://github.com/IntelligenceModding/AdvancedPeripherals/actions/runs/12896885038
Jar Files AdvancedPeripherals PR 702
Expires At 2025-04-21T22:15:10Z

@zyxkad
Copy link
Collaborator Author

zyxkad commented Jan 20, 2025

I'm marking this as draft because it needs more test on edge cases.
@SirEndii You can review this if you want (and check why the item module is not rendering)

@zyxkad zyxkad requested a review from SirEndii January 20, 2025 15:20
@SirEndii
Copy link
Member

So I tried to check how AE2 adds the item model
It does not seem that it tries to do that the same way it creates the block model. So I checked the resources from AE2 itself, there aren't any block models but the p2p item models. So I just created one in the following commit

SirEndii and others added 2 commits January 20, 2025 23:30
peripheral_detach event will be trigger twice when ME network shutdown somehow
@zyxkad
Copy link
Collaborator Author

zyxkad commented Jan 21, 2025

Currently if you change the ME network (e.g. place one more cell/cable), existing peripherals will always detach and reattach.
I need to check if ME is reconstructing P2P parts when it's network changed, and if there are anyway to avoid the detach/attach

@zyxkad zyxkad marked this pull request as ready for review January 21, 2025 21:25
@zyxkad zyxkad requested a review from SirEndii January 21, 2025 21:37
@@ -67,4 +69,11 @@ public void commonSetup(FMLCommonSetupEvent event) {
});
}

public void onLoadComplete(FMLLoadCompleteEvent event) {
event.enqueueWork(() -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we maybe want to put this into the APAddons class or into the Integration class direclty

Do we even need a Integration class if the run method is not used? Maybe we want to re-organize that

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to do that in Integration.run(), but Integration runs before items get registered...
I'll move them to Registries

Copy link
Member

@SirEndii SirEndii Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is weird
Should happen after item registration

@zyxkad zyxkad merged commit 708c1c7 into IntelligenceModding:dev/0.8 Jan 21, 2025
4 checks passed
@zyxkad zyxkad deleted the p2p-feature branch January 21, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants