Eden Ring

Eden Ring

6M Downloads

[bug] the exp bar will be clear when teleport through the portal

Slarper opened this issue ยท 5 comments

commented

Version: the dev environment of latest version.

commented

Description:
When you go through the beautiful portal of copper block and amethyst, and teleport to the eden ring world ( or back to overworld), your exp bar will be clear , and will restore when you restart the game.

commented

Reason:
The teleport code in method serverTick in class paulevs.edenring.blocks.entities.EdenPortalBlockEntity cause this bug.
When we teleport a player to another dimension, we use the vanilla api like this:

player.teleportTo(
							destination,
							exit.getX() + 0.5,
							exit.getY(),
							exit.getZ() + 0.5,
							player.getYRot(),
							player.getXRot()
						);
commented

but the method teleportTo has some vanilla bugs and is exactly the reason of this issue. So I suggest to use fabric api

						FabricDimensions.teleport(
								player,
								destination,
								new PortalInfo(
										new Vec3(
												exit.getX() + 0.5,
												exit.getY(),
												exit.getZ()+0.5
												),
										new Vec3(0,0,0),
										player.getYRot(),
										player.getXRot()
								)
						);

to fix this bug.

commented

I had create the pull request.

commented

I think this was added in 0.5.1, but I forgot to close this