Rework of the Nether Portal building algorithm#297
Draft
fluffyloafie wants to merge 10 commits intomasterfrom
Draft
Rework of the Nether Portal building algorithm#297fluffyloafie wants to merge 10 commits intomasterfrom
fluffyloafie wants to merge 10 commits intomasterfrom
Conversation
- Change the size computation algorithm - Start working on the direction computation
…work properly at all) - Edit error handling values - Add comment on a value for more context
This comment was marked as duplicate.
This comment was marked as duplicate.
- Add detection of the bottom-left corner of the inner frame - Add direction computation - Add size of the inner frame computation - Add openning of the portal if no obstruction within the frame * None of these additions were tested yet, WIP
22c9116 to
d9cdd56
Compare
- Fixed by hand, some might be missing
ac8b962 to
7a5b602
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of today, the Nether Portal can only be built as a 4x5 full frame (with corners), and ignited from a bottom block of the inner frame.
This PR strives to optimize what can be optimized for the portal building algorithm, as well as adding the possibility to build a portal whatever its size, within the bounds set by Mojang (4x5 to 23x23)

It will also try to add corner-less portals support

And support all of that in negative & positive coordinates

EDIT 04-15-2025 (commit): At the moment, the Portal can only be ignited when a bottom obsidian block is lit. If any other block of the frame is ignited, it does nothing (except lighting a fire and... burning things ?)
EDIT 04-16-2025: At the moment, the portal can only be opened with a Flint&Steel (fire igniting the portal in any other way won't open it, only burn your feet)
EDIT 04-17-2025 (commit): with a partial rework of what was done during the previous days, the ignited block can be anywhere within the frame (in theory) by following this method of computation:
First computing which block within the frame was ignited


Then, after computing where the _bottomLeftCorner is, computing the direction & size of the frame, with the only step left being the filling of the portal frame if no obstruction is detected
Also, by only computing everything within the frame, the corners are never taken into account, allowing corner-less portals to be built.