mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-28 11:29:11 +00:00
1.19.4
still WIP
This commit is contained in:
32
patches/api/0008-Slice-Smooth-Teleports.patch
Normal file
32
patches/api/0008-Slice-Smooth-Teleports.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cryptite <cryptite@gmail.com>
|
||||
Date: Sat, 13 Aug 2022 08:58:21 -0500
|
||||
Subject: [PATCH] Slice: Smooth Teleports
|
||||
|
||||
Original license: MIT
|
||||
Original project: https://github.com/Cryptite/Slice
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 9b1390c60bb8a5777a93676ad878b3bee1e8fd4e..cc2be9366a671112e30578e5a470bdc4790e05ed 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2895,6 +2895,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
String getClientBrandName();
|
||||
// Paper end
|
||||
|
||||
+ /**
|
||||
+ * This abuses some of how Minecraft works and allows teleporting a player to another world without
|
||||
+ * triggering typical respawn packets. All of natural state of chunk resends, entity adds/removes, etc still
|
||||
+ * happen but the visual "refresh" of a world change is hidden. Depending on the destination location/world,
|
||||
+ * this can act as a "smooth teleport" to a world if the new world is very similar looking to the old one.
|
||||
+ *
|
||||
+ * @param location New location to teleport this Player to
|
||||
+ */
|
||||
+ // Slice start
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ void teleportWithoutRespawn(Location location);
|
||||
+ // Slice end
|
||||
+
|
||||
// Paper start - Teleport API
|
||||
/**
|
||||
* Sets the player's rotation.
|
||||
Reference in New Issue
Block a user