Prevent softlocked end exit portal generation#6525
Conversation
|
i don't know if min-build-height is the best default here. The min-build-height might be quite far from the main island in terms of y level. |
|
I used min height to stay closer to vanilla's low generation (although that doesn't entirely make sense). Sea level (is there a sea in the end? 🤔 ) might be a better idea, since the dragon perches above the exit end portal every now and then, and fighting her that low seems a bit inconvenient, especially since arrows can't hit her in that stage. Would like to hear someone else's opinion about this as well. |
Yea I also played around with it. Tho purging is pretty horrible when using min-build height as the dragon takes forever to fly down. |
That's what I was going for here, wanted to make the game finish-able without altering vanilla too much. |
|
I think an additional check should be added so that it the End Exit still fails to spawn correctly, then it would instead try to spawn one where the dragon died (essentially a fallback to the pre-1.9 behavior.) Alternatively, one could also move the portal to spawn at a nearby location other than 0,0 if the blocks at 0,0 aren't available. And if all of that still doesn't work? Maybe replace the void blocks beneath Y = 0 (or Y = –64, post caves-and-cliffs) with End Exit blocks as a final (albeit inelegant) fallback once the Ender Dragon is dead. They could be hidden by a simple black fog so that you can't really see them until you're touching them. |
|
I don't think another check is needed. If the portal has somehow magically disappears in between entering the end and killing the dragon, the game already spawns back the portal, which should be enough, even for these edge-case seeds. |
2eb14a3 to
49c2064
Compare

As shown in this video, there are minecraft seeds, such as 4717237, where no block generates in the end at 0,0. Because of this, the exit end portal will be placed at a negative coordinate, causing the bottom two blocks of the exit portal to be cut off. When beating the dragon, the game tries to place the actual end portal blocks at Y=-1, which isn't possible. Because of this, after beating the dragon, players are stuck in the end until they kill themselves. This PR ensures the exit portal fully spawns above Y > 0, to prevent these types of softlocks.