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

Prevent obsidian platform generate in The End #787

Merged
merged 5 commits into from
Jan 8, 2024
Merged

Prevent obsidian platform generate in The End #787

merged 5 commits into from
Jan 8, 2024

Conversation

DreamVoid
Copy link
Contributor

@DreamVoid DreamVoid commented Jan 7, 2024

Fix #779
It works well.
Also fixed player not being in the correct location after teleported. (Old behavior players will be teleported inside the block)

2024-01-07_15 55 06

setCanCreatePortal may be incompatible with 1.15-, but it seems possible to abandon 1.15-?

image

@@ -62,6 +62,8 @@ public void onPlayerPortal(PlayerPortalEvent event) {
event.setCancelled(true);
return;
}
location.setY(location.getY() + 1);
event.setCanCreatePortal(false);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
event.setCanCreatePortal(false);
if(XMaterial.supports(16)) event.setCanCreatePortal(false);

We could do this to try maintain 1.15- This wont fix the obsidian platform for 1.15, but atleast it will still be somewhat supported

Copy link
Contributor Author

@DreamVoid DreamVoid Jan 8, 2024

Choose a reason for hiding this comment

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

Original code even doesn't support 1.16- ¯_(ツ)_/¯
Because java.lang.NoSuchFieldError: NETHER_WASTES
So I also fix this.

@PeachesMLG PeachesMLG merged commit 03e1833 into Iridium-Development:master Jan 8, 2024
2 checks passed
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.

Obsidian platform abnormally generate
2 participants