13
0

Sound on portal
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2022-03-22 22:38:39 +01:00
Ursprung ac4170d6b0
Commit 65f6789c95

Datei anzeigen

@ -81,8 +81,9 @@ public class TeleportPortal implements PortalHandler {
if (target.getDepth() != 0.0) { if (target.getDepth() != 0.0) {
normalized.setX(1 - portal.normalize(from).getX()); normalized.setX(1 - portal.normalize(from).getX());
} }
player.playSound(player.getLocation(), Sound.BLOCK_ENCHANTMENT_TABLE_USE, 0.25f, 1.0f); Location portalTo = target.denormalize(normalized).toLocation(to.getWorld(), (float) (to.getYaw() - Math.toDegrees(target.getYrotation() - portal.getYrotation())), to.getPitch());
player.teleport(target.denormalize(normalized).toLocation(to.getWorld(), (float) (to.getYaw() - Math.toDegrees(target.getYrotation() - portal.getYrotation())), to.getPitch()), PlayerTeleportEvent.TeleportCause.PLUGIN); player.teleport(portalTo, PlayerTeleportEvent.TeleportCause.PLUGIN);
player.playSound(portalTo, Sound.BLOCK_ENCHANTMENT_TABLE_USE, 0.25f, 1.0f);
} }
@Override @Override