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

Optimized Alfheim portal multiblock and pylon validation #4469

Merged

Conversation

TheRealWormbo
Copy link
Collaborator

As per #4388, the Alfheim portal block entity remembers its orientation and caches its pylon location until either the number of valid cached pylons drops below the minimum required amount or mana is supposed to be consumed.

There is a functional change with this PR, which should not be relevant in most cases:
If you were to build two intersecting portal structures sharing the core block, the portal would originally prefer the one opening in Z direction, and would jump to the one in X direction only if the other had missing frame blocks.
Now the portal will still prefer the Z direction, if both are an option when opening the portal, but it will no longer jump between the two as the Z portal's frame is broken or repaired. Instead, if the active portal's frame is broken, the portal always shuts down. If it is opened again while the "Z frame" is still broken, it will use the "X frame" instead and stick with that for as long as it stays open, even if the Z frame is repaired later.

Also cleaned up portal particle logic and portal AABB creation code a bit.
@williewillus williewillus merged commit 3ef3a93 into VazkiiMods:1.20.x Oct 29, 2023
1 check passed
@TheRealWormbo TheRealWormbo deleted the 1.20-alfheim-portal-optimization branch October 29, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants