Skip to content

Conversation

@benwoo1110
Copy link
Member

@benwoo1110 benwoo1110 commented Nov 20, 2024

ParsedDestination was just like a proxy for DestinationInstance, i realised it was a dumb way of implementing, so i removed it. Need this changes to update multiverse-portals to work with mv5 core.

@benwoo1110 benwoo1110 merged commit e2050c8 into MV5 Nov 21, 2024
2 checks passed
@benwoo1110 benwoo1110 deleted the ben/mv5/improve-destination branch November 21, 2024 03:52

@Contract
public interface Destination<T extends DestinationInstance> {
public interface Destination<D extends Destination<D, T>, T extends DestinationInstance<T, D>> {
Copy link
Member

@dumptruckman dumptruckman Nov 21, 2024

Choose a reason for hiding this comment

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

Not crazy about the recursive generics here. Can you summarize what this is doing? Having some difficulty following.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its just each Destination maps a one DestinationInstance

Copy link
Member Author

@benwoo1110 benwoo1110 Nov 21, 2024

Choose a reason for hiding this comment

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

This is so that ExactDestination.parseDestination() can only return ExactDestinationInstance, then ExactDestinationInstance.getDestination() can only return ExactDestination.

Kinda like a 1 to 1 map thing, where you cant just allow ExactDestination to return any type of DestinationInstance and ExactDestinationInstance cannot be created by any type of Destination only ExactDestination

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants