Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Detect player exiting the End


V10lator
 Share

Recommended Posts

This is my code:
 

@SubscribeEvent(priority=EventPriority.LOWEST)
public void onDimensionChange(PlayerEvent.PlayerChangedDimensionEvent event) {
	LogManager.getLogger("##NAME##").info("PlayerChangedDimensionEvent!");
}


The event gets fired when a player enters the End just fine but when he jumps in the portal after killing the dragon there's no message in the log. What am I doing wrong?

//EDIT: This one works:

@SubscribeEvent(priority=EventPriority.LOWEST)
public void onDimensionChange(EntityTravelToDimensionEvent event) {
	if(event.getEntity() instanceof EntityPlayer)
		LogManager.getLogger("##NAME##").info("PlayerChangedDimensionEvent!");
}

So I guess this is a Forge bug?

Edited by V10lator
Link to comment
Share on other sites

It’s a vanilla thing, the player technically dies - you want PlayerRespawnEvent & check that the Boolean hasConqueredEnd is true

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

4 hours ago, vpontin said:

As a side note: this have a very deep meaning for the ending.....

Yeah, after reading the end credits about ascending to another level of reality or whatever you “die”. Is the rest of your gameplay after this the “afterlife”? Did Mojang intend to add something else after you leave the end but didn’t get around to it? It would be interesting to know why you die and don’t just change dimension.

 

For all that fanciful-ness I think it’s probably just to make you spawn back at your spawn point, rather than near the end portal.

  • Thanks 1

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.