Skip to content

Conversation

C1oky
Copy link

@C1oky C1oky commented Jun 11, 2020

When building 4 frame enders for the portal in a row, the error java.lang.StackOverflowError popped up: null
Снимок экрана (1848)

LOG:

2020-06-11 20:25:04.165 [main] FATAL - Exception happened while ticking server
java.lang.StackOverflowError: null
at java.lang.StrictMath.floor(Unknown Source) ~[?:1.8.0_231]
at java.lang.Math.floor(Unknown Source) ~[?:1.8.0_231]
at cn.nukkit.math.Vector3.getFloorX(Vector3.java:44) ~[nukkit-1.0-SNAPSHOT.jar:?]
at cn.nukkit.level.Level.getBlock(Level.java:1507) ~[nukkit-1.0-SNAPSHOT.jar:?]
at cn.nukkit.block.BlockEndPortalFrame.searchCenter(BlockEndPortalFrame.java:123) ~[nukkit-1.0-SNAPSHOT.jar:?]
at cn.nukkit.block.BlockEndPortalFrame.searchCenter(BlockEndPortalFrame.java:127) ~[nukkit-1.0-SNAPSHOT.jar:?]
at cn.nukkit.block.BlockEndPortalFrame.searchCenter(BlockEndPortalFrame.java:127) ~[nukkit-1.0-SNAPSHOT.jar:?]

for (int i = 0; i < 4; i++) {
for (int j = -1; j <= 1; j++) {
Block side = this.getSide(BlockFace.fromHorizontalIndex(i), 2).getSide(BlockFace.fromHorizontalIndex((i + 1) % 4), j);
if (this.isCompletedPortal(side)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also check the direction of the frame block.

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.

2 participants