work and compile errors

This commit is contained in:
Jake Potrebic 2023-09-21 19:31:59 -07:00
parent 7b29d1f4c5
commit 78a003ee89
No known key found for this signature in database
GPG Key ID: ECE0B3C133C016C5
93 changed files with 305 additions and 295 deletions

View File

@ -3455,10 +3455,10 @@ index 516d7fc7812aac343782861d0d567f54aa578c2a..00000000000000000000000000000000
- // Spigot end - // Spigot end
-} -}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e5a54a2f35d83f8c7a5f2b6512b86481aa7f9f51..5ae3750e3d88b1c60c982b7108ff6b820375ab99 100644 index e5a54a2f35d83f8c7a5f2b6512b86481aa7f9f51..c54d478035f7782074c00f870d41da8283fec538 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2346,7 +2346,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2346,7 +2346,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Deprecated // Paper @Deprecated // Paper
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
@ -3466,6 +3466,11 @@ index e5a54a2f35d83f8c7a5f2b6512b86481aa7f9f51..5ae3750e3d88b1c60c982b7108ff6b82
+ } + }
+ +
+ // Paper start + // Paper start
+ /**
+ * @return the player's ping
+ * @deprecated use {@link Player#getPing()}
+ */
+ @Deprecated
+ public int getPing() { + public int getPing() {
+ throw new UnsupportedOperationException( "Not supported yet." ); + throw new UnsupportedOperationException( "Not supported yet." );
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 5ae3750e3d88b1c60c982b7108ff6b820375ab99..e48c12b84d00169f17bc2ac3aca5ffa74c8b7c43 100644 index c54d478035f7782074c00f870d41da8283fec538..f21183cd5491b09e4543839252aed1ea10ddf849 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2198,6 +2198,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2198,6 +2198,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -75,7 +75,7 @@ index 5357291ff0f2f20bd87ab9f6e57f6a4f6ff65226..887aa6217583d224d66f6d238ac269c2
public class Spigot { public class Spigot {
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e48c12b84d00169f17bc2ac3aca5ffa74c8b7c43..c8347316f6c54916e07a6f7086b99775c4d2c802 100644 index f21183cd5491b09e4543839252aed1ea10ddf849..f9b9e0269b3a9402c5be1c1c2007956415ff708a 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2212,6 +2212,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2212,6 +2212,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -76,7 +76,7 @@ index 124e88e512d24b6ff7ace3cf7d5a6adf4c2bb40d..ccc825a2ea43bb84a5a08dff00c4d8ec
* Gets the name of the update folder. The update folder is used to safely * Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load. * update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c8347316f6c54916e07a6f7086b99775c4d2c802..ad516f99f7f5345c567acbb9dfa54bad0896f4a0 100644 index f9b9e0269b3a9402c5be1c1c2007956415ff708a..284bb156c4430a9a8afce0a7dffa96722b8c29cc 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1041,6 +1041,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1041,6 +1041,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -432,7 +432,7 @@ index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb90
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ad516f99f7f5345c567acbb9dfa54bad0896f4a0..02febdfdd45ee79b659fed23a54886371feded0f 100644 index 284bb156c4430a9a8afce0a7dffa96722b8c29cc..d5746291dd0cfc32591482945040e992ad1efb8e 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1075,6 +1075,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1075,6 +1075,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 02febdfdd45ee79b659fed23a54886371feded0f..a63a4053c8a17284cd302db1fb6b6b673310ae44 100644 index d5746291dd0cfc32591482945040e992ad1efb8e..e12d28143a213abdc0552a15e82cacecc414ca26 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1655,7 +1655,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1655,7 +1655,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a63a4053c8a17284cd302db1fb6b6b673310ae44..f9ff1d74d58e50a8e46698e4704fe3c32390af8a 100644 index e12d28143a213abdc0552a15e82cacecc414ca26..3954f40b23536fec495585a8b14e82d092d62e39 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1042,6 +1042,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1042,6 +1042,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -405,7 +405,7 @@ index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218
@Override @Override
public int getConversionTime(); public int getConversionTime();
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f9ff1d74d58e50a8e46698e4704fe3c32390af8a..7c97450f9fe2eebe03a1c30eb080d3d3624eefb8 100644 index 3954f40b23536fec495585a8b14e82d092d62e39..264c6bdeb2f1f0d937e4356d761a3264a1c4d58a 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -431,15 +431,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -431,15 +431,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
+ +
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7c97450f9fe2eebe03a1c30eb080d3d3624eefb8..f69d918381f706c21a55e2604564714cb74cba54 100644 index 264c6bdeb2f1f0d937e4356d761a3264a1c4d58a..f9239eae50b86f54f0cd8c604d2ba9468fc5f33b 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -51,7 +51,7 @@ import org.jetbrains.annotations.Nullable; @@ -51,7 +51,7 @@ import org.jetbrains.annotations.Nullable;

View File

@ -10,7 +10,7 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added. Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f69d918381f706c21a55e2604564714cb74cba54..90e7a703934697875edc3c3ca892cc51c598fac1 100644 index f9239eae50b86f54f0cd8c604d2ba9468fc5f33b..9dca8fc727b727063d9ca50fdd8f6452173a5cd4 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1368,6 +1368,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1368,6 +1368,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -93,7 +93,7 @@ index 016cee903c7179baf711984503d1d0793d40c5c5..064edd612885b2ea4b35001a864503b5
/** /**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 90e7a703934697875edc3c3ca892cc51c598fac1..e7ea7a93f7377c25c2786612f1c6123682e8a0da 100644 index 9dca8fc727b727063d9ca50fdd8f6452173a5cd4..ccd80734cf5641455fd9d9b63238739987e225da 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2678,6 +2678,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2678,6 +2678,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -36,7 +36,7 @@ index abdca9fe5acc90f167219eb769ece66c35682bb1..b3aa3dc6aa5afbc36cc86741b4cba56f
/** /**
* Make the entity drop the item in their hand. * Make the entity drop the item in their hand.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e7ea7a93f7377c25c2786612f1c6123682e8a0da..a8213398be954a6cebef8658e62600e0fffe1759 100644 index ccd80734cf5641455fd9d9b63238739987e225da..bca4794a67c369b0bb882e56f489ed952488b2c5 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2523,10 +2523,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2523,10 +2523,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -74,7 +74,7 @@ index 12349910297a75c00e64f6ccc7981aeeeb43ecd3..8f2f3e0ac5266f571b62a754921422bb
/** /**
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will * Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a8213398be954a6cebef8658e62600e0fffe1759..01555373317beafc506f1c7559f7107cd738ac4f 100644 index bca4794a67c369b0bb882e56f489ed952488b2c5..a851ec4d350ce442eb01385d21ca75e695cf09d2 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1042,6 +1042,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1042,6 +1042,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 01555373317beafc506f1c7559f7107cd738ac4f..1329e5784bb9941ae5bc35205b057c8e864aa09e 100644 index a851ec4d350ce442eb01385d21ca75e695cf09d2..9954fc11b2c2fe56c194d7d3ce878a343a9b2429 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2854,6 +2854,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2854,6 +2854,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -229,7 +229,7 @@ index 0000000000000000000000000000000000000000..cf67dc7d465223710adbf2b798109f52
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1329e5784bb9941ae5bc35205b057c8e864aa09e..1dab97ff89d30f018819dc054241f188319603ba 100644 index 9954fc11b2c2fe56c194d7d3ce878a343a9b2429..393b3be157d2111d7209b7a94515c93a931a1ec9 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2874,6 +2874,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2874,6 +2874,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1dab97ff89d30f018819dc054241f188319603ba..1ede954027c4e81b17948ac4fba272616f0978a6 100644 index 393b3be157d2111d7209b7a94515c93a931a1ec9..81e8bfbe4380090830591274025a026de740fd05 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2983,6 +2983,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2988,6 +2988,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
// Paper end // Paper end
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1ede954027c4e81b17948ac4fba272616f0978a6..1796749b58ab23b66905967f0af650c265e3ee27 100644 index 81e8bfbe4380090830591274025a026de740fd05..e9df321980d0744a50edf2d5f978340013588803 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2880,6 +2880,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2880,6 +2880,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1796749b58ab23b66905967f0af650c265e3ee27..156a3887628a51e099976842bc1f8ea81d7e2d9f 100644 index e9df321980d0744a50edf2d5f978340013588803..8a6cab8df1f1947bbdc4d11ba24b982a8483b2cc 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2893,6 +2893,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2893,6 +2893,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerKickEvent causes
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 156a3887628a51e099976842bc1f8ea81d7e2d9f..32b4c674e13aed411a9529bbf601c4aee0b68f12 100644 index 8a6cab8df1f1947bbdc4d11ba24b982a8483b2cc..549adf75eeb0d014c5baf7c111f4ec1468339bd5 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -274,6 +274,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -274,6 +274,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Multi Block Change API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 32b4c674e13aed411a9529bbf601c4aee0b68f12..a53805af92dab72c8e43c1e215893fb96b2150f6 100644 index 549adf75eeb0d014c5baf7c111f4ec1468339bd5..fe1c58a20de699d869a3f86295c8446991cce399 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -790,6 +790,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -790,6 +790,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -165,10 +165,10 @@ index ab0ceaba9ddcbe20a8b8a1fc3ed19cb3c64ecd3d..97f0bc6573c8ba09de77061b6312b91c
* Teleports this entity to the given location. If this entity is riding a * Teleports this entity to the given location. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation. * vehicle, it will be dismounted prior to teleportation.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a53805af92dab72c8e43c1e215893fb96b2150f6..f11e776c82d8b79281f723c97c398e8e10f2f98b 100644 index fe1c58a20de699d869a3f86295c8446991cce399..6a53097f308955dc063daf96aa367c2cb2945ca1 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3048,6 +3048,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3053,6 +3053,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
String getClientBrandName(); String getClientBrandName();
// Paper end // Paper end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f11e776c82d8b79281f723c97c398e8e10f2f98b..7cef68ae3a8ae0f71b8c5e63f0eca175a6383946 100644 index 6a53097f308955dc063daf96aa367c2cb2945ca1..470d47d6ffaf04805439d043fbb04bf2342d1db8 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2935,6 +2935,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2935,6 +2935,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7cef68ae3a8ae0f71b8c5e63f0eca175a6383946..85bce5830b47a3e915450c0f41df7ccbdd6e50e9 100644 index 470d47d6ffaf04805439d043fbb04bf2342d1db8..93a8db0a1f7fa0a06315a9ec9f58c62c6faa4fb8 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3114,6 +3114,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3119,6 +3119,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor); void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor);
// Paper end - Teleport API // Paper end - Teleport API

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add Player Warden Warning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 85bce5830b47a3e915450c0f41df7ccbdd6e50e9..8a7171f0b05d1a9c583ea9cef107c2c0e67aad67 100644 index 93a8db0a1f7fa0a06315a9ec9f58c62c6faa4fb8..4d1d81ddc7638e958f9cd1b10fd26227efc1578d 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3130,6 +3130,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3135,6 +3135,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param silent whether sound should be silenced * @param silent whether sound should be silenced
*/ */
void showElderGuardian(boolean silent); void showElderGuardian(boolean silent);

View File

@ -98,7 +98,7 @@ index de976be7132d05506fde7a839cac3954b0dd8da4..642feb8b4578e6dbd2bf78d859283d20
public static Instrument getByType(final byte type) { public static Instrument getByType(final byte type) {
return BY_DATA.get(type); return BY_DATA.get(type);
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 8a7171f0b05d1a9c583ea9cef107c2c0e67aad67..1e53491b82e465d08acf02529f73e2e83ece7d96 100644 index 4d1d81ddc7638e958f9cd1b10fd26227efc1578d..fdb0b8b81e53c85c865c4a3a895719f5afbffd17 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -511,9 +511,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -511,9 +511,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -35,7 +35,7 @@ index 3f3ea5bb6b3ea6f55b5cd699f1c01ac159619add..a2a423d4e4c2702ba5967223cab0432d
* Get the category of spawn to which this entity belongs. * Get the category of spawn to which this entity belongs.
* *
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1e53491b82e465d08acf02529f73e2e83ece7d96..4c52aa04487e7d9b6bf5ae7e87d40d14fab9f25d 100644 index fdb0b8b81e53c85c865c4a3a895719f5afbffd17..2e4b2ad1907a2d5f4462c5fd2d1482f2bb623d3b 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -414,6 +414,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -414,6 +414,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Flying Fall Damage API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 4c52aa04487e7d9b6bf5ae7e87d40d14fab9f25d..ce6e913b7bec56d2c64d50fc2848be748f023de5 100644 index 2e4b2ad1907a2d5f4462c5fd2d1482f2bb623d3b..4db6e9802105eba76d6f59b74873bea9502d2c7e 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1705,6 +1705,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1705,6 +1705,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Win Screen API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ce6e913b7bec56d2c64d50fc2848be748f023de5..41e900329090706f2999ae2f67e763b03190acdf 100644 index 4db6e9802105eba76d6f59b74873bea9502d2c7e..62400bd5d9469f9622139d2c4a6e2e5a0a83f808 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1072,6 +1072,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1072,6 +1072,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -130,7 +130,7 @@ index e805e629cede1c4c0674282c930cb67852718c3e..5248cf08ef83c7304dd76c42a2f646bb
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 41e900329090706f2999ae2f67e763b03190acdf..621cb3d41a2ff403ad33fc4bcb9f5e547dc1c46a 100644 index 62400bd5d9469f9622139d2c4a6e2e5a0a83f808..c85cfcefdd74b908cfec9a473f4b1d1af63082f4 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -298,7 +298,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -298,7 +298,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add Listing API for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 621cb3d41a2ff403ad33fc4bcb9f5e547dc1c46a..f59cbc92334c7b7b20e593a58232fb3c4434f12b 100644 index c85cfcefdd74b908cfec9a473f4b1d1af63082f4..5c7a73ea74efe256c695080ba92b8cf698e4cd86 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1841,6 +1841,32 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1841,6 +1841,32 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -73,6 +73,21 @@ index 7918deb55e6ed2e16eba501ab380a456270d9512..a81475d0cd3c5b75b4abe0d1a0138937
return new Object2ObjectLinkedOpenHashMap<>(); // CraftBukkit return new Object2ObjectLinkedOpenHashMap<>(); // CraftBukkit
}); });
ResourceLocation minecraftkey = recipeholder.id(); ResourceLocation minecraftkey = recipeholder.id();
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
index fce67663f0a954d9f184c04bf96e23e6fb2ac5eb..c21dd258d749c28e509c86a70c1f85712aeeda9e 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
@@ -250,8 +250,8 @@ public class LootTable {
public static class Builder implements FunctionUserBuilder<LootTable.Builder> {
- private final Builder<LootPool> pools = ImmutableList.builder();
- private final Builder<LootItemFunction> functions = ImmutableList.builder();
+ private final ImmutableList.Builder<LootPool> pools = ImmutableList.builder();
+ private final ImmutableList.Builder<LootItemFunction> functions = ImmutableList.builder();
private LootContextParamSet paramSet;
private Optional<ResourceLocation> randomSequence;
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
index ad52c3fc6210939a39ef77a382c640a24ee44838..6b7dd01778f0a5d3a96d2d04af4b525d17efbfba 100644 index ad52c3fc6210939a39ef77a382c640a24ee44838..6b7dd01778f0a5d3a96d2d04af4b525d17efbfba 100644
--- a/src/test/java/org/bukkit/DyeColorsTest.java --- a/src/test/java/org/bukkit/DyeColorsTest.java

View File

@ -3625,7 +3625,7 @@ index 10fa80df3ae2406f34af669f89d087b15ad1d71b..66fb6aeb49b7e93d2a4d9b5ce7f1a7d6
public boolean isOp() { public boolean isOp() {
return true; return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0c4371fba7e770050182b3cff429bdbfe778e8f6..0a945ed432b431ec6c714cccf45f4e09756c7b1a 100644 index 0c4371fba7e770050182b3cff429bdbfe778e8f6..5b3749feed210da7f62deab5672a40ec396eedc8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -296,14 +296,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -296,14 +296,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -3824,7 +3824,7 @@ index 0c4371fba7e770050182b3cff429bdbfe778e8f6..0a945ed432b431ec6c714cccf45f4e09
+ } else { + } else {
+ hash = ""; + hash = "";
+ } + }
+ this.getHandle().sendTexturePack(url, hash, force, io.papermc.paper.adventure.PaperAdventure.asVanilla(prompt)); + this.getHandle().connection.send(new ClientboundResourcePackPacket(url, hash, force, io.papermc.paper.adventure.PaperAdventure.asVanilla(prompt)));
+ } + }
+ // Paper end + // Paper end
+ +

View File

@ -1850,7 +1850,7 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- } - }
-} -}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0a945ed432b431ec6c714cccf45f4e09756c7b1a..30e77f21bfc017a6a715ea1ff0ffddea0b260ac5 100644 index 5b3749feed210da7f62deab5672a40ec396eedc8..aa8ec0a92c8bca78088a2b30f571587823dd79bb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2566,6 +2566,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2566,6 +2566,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1862,7 +1862,7 @@ index 0a945ed432b431ec6c714cccf45f4e09756c7b1a..30e77f21bfc017a6a715ea1ff0ffddea
+ @Override + @Override
+ public int getPing() + public int getPing()
+ { + {
+ return getHandle().latency; + return CraftPlayer.this.getPing();
+ } + }
+ // Paper end + // Paper end
}; };

View File

@ -137,7 +137,7 @@ index b6a3c75b84d9f768afee33aa0f226207b307c1c0..a583599e3b49d5ded871252646904a80
for(Player player : this.players()) { for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) { if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 30e77f21bfc017a6a715ea1ff0ffddea0b260ac5..be014733d23c0b03fc8b13792caaaf96ac0d33e6 100644 index aa8ec0a92c8bca78088a2b30f571587823dd79bb..19688fa3049603f63a306e5c48c45c80b0030f69 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2205,6 +2205,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2205,6 +2205,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index be014733d23c0b03fc8b13792caaaf96ac0d33e6..a6eca427d04cfbdfb8af277a72e5866e7c14d30f 100644 index 19688fa3049603f63a306e5c48c45c80b0030f69..14667b660e756da2ae838efe979e4c96146625db 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1878,12 +1878,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1878,12 +1878,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -39,7 +39,7 @@ index e978a91636192cd00ef8bab9b8411fda39aebbb7..32ecdb19c377952b553297548c7f3ff3
// CraftBukkit end // CraftBukkit end
this.language = clientOptions.language(); this.language = clientOptions.language();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a6eca427d04cfbdfb8af277a72e5866e7c14d30f..a67a3f13c2b142205b76a6ff478a606fe7546925 100644 index 14667b660e756da2ae838efe979e4c96146625db..5ded753f030cad268f8aaeaf242985c67da2ca8d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2203,7 +2203,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2203,7 +2203,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -53,7 +53,7 @@ index c2289c8ef49c73d662a67eab7a2b8c0cf9bb31a9..3e3c3db4a9a4474af79d2470da2ab133
if (this.commandMap.dispatch(sender, commandLine)) { if (this.commandMap.dispatch(sender, commandLine)) {
return true; return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a67a3f13c2b142205b76a6ff478a606fe7546925..2acb5e73db4d629729c05373babd0d2e37122448 100644 index 5ded753f030cad268f8aaeaf242985c67da2ca8d..965f40d5acb8cfe401e22c4c15efa84b36ac3ace 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -452,7 +452,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -452,7 +452,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4
// Paper end // Paper end
buf.writeComponent(this.text); buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2acb5e73db4d629729c05373babd0d2e37122448..99410c3c7fc78ea64e3f12b95c79b51d9adf39f1 100644 index 965f40d5acb8cfe401e22c4c15efa84b36ac3ace..93b38758645a52f2da7d8e2baba576dc0284a132 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@

View File

@ -16,7 +16,7 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds. This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 99410c3c7fc78ea64e3f12b95c79b51d9adf39f1..6f4829dede7dca4b3d51818f8779b3438216d3b4 100644 index 93b38758645a52f2da7d8e2baba576dc0284a132..c30d2987f4afce8737c5c67b193d9ee3b6e230be 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1120,7 +1120,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1120,7 +1120,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -22,7 +22,7 @@ index b9062fe651de34d5b3f9d5f146ae0b4fe29cbfee..e8b12a8ae009023afa2818ecbf398a14
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6f4829dede7dca4b3d51818f8779b3438216d3b4..a4b9dd757ddc31447fc4b284a63fc0b28a039fb0 100644 index c30d2987f4afce8737c5c67b193d9ee3b6e230be..de5d17be3d7dcd9ae1f10918c3d6a3caffe7ef23 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -191,6 +191,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -191,6 +191,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -58,7 +58,7 @@ index 6f4829dede7dca4b3d51818f8779b3438216d3b4..a4b9dd757ddc31447fc4b284a63fc0b2
+ net.minecraft.network.chat.Component promptComponent = resourcePackPrompt != null ? + net.minecraft.network.chat.Component promptComponent = resourcePackPrompt != null ?
+ io.papermc.paper.adventure.PaperAdventure.asVanilla(resourcePackPrompt) : + io.papermc.paper.adventure.PaperAdventure.asVanilla(resourcePackPrompt) :
+ null; + null;
+ this.getHandle().sendTexturePack(url, hash, required, promptComponent); + this.getHandle().connection.send(new ClientboundResourcePackPacket(url, hash, required, promptComponent));
+ } + }
+ +
+ @Override + @Override

View File

@ -44,7 +44,7 @@ index c5d4f36dda7c977b3a7563f4d2d74ebcf7dc61ef..fa03c3a9debe419dd4e60764de4d9544
protected void internalSetAbsorptionAmount(float absorptionAmount) { protected void internalSetAbsorptionAmount(float absorptionAmount) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a4b9dd757ddc31447fc4b284a63fc0b28a039fb0..6deb65557561268ae7126cbb9e177def16d89d97 100644 index de5d17be3d7dcd9ae1f10918c3d6a3caffe7ef23..dc436397256cecfb51ed82b0cc654307a8d2e0f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2123,6 +2123,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2123,6 +2123,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -26,7 +26,7 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
// Paper end // Paper end
buf.writeComponent(this.text); buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6deb65557561268ae7126cbb9e177def16d89d97..38c544cdf2230e94850eda4d38afce9df53973a8 100644 index dc436397256cecfb51ed82b0cc654307a8d2e0f6..75e82bec61c9e20d6ae589664f87cb1f26b0deb5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -300,6 +300,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -300,6 +300,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -11,7 +11,7 @@ public org.bukkit.craftbukkit.profile.CraftPlayerTextures
public org.bukkit.craftbukkit.profile.CraftPlayerTextures copyFrom(Lorg/bukkit/profile/PlayerTextures;)V public org.bukkit.craftbukkit.profile.CraftPlayerTextures copyFrom(Lorg/bukkit/profile/PlayerTextures;)V
public org.bukkit.craftbukkit.profile.CraftPlayerTextures rebuildPropertyIfDirty()V public org.bukkit.craftbukkit.profile.CraftPlayerTextures rebuildPropertyIfDirty()V
public org.bukkit.craftbukkit.profile.CraftPlayerProfile toString(Lcom/mojang/authlib/properties/PropertyMap;)Ljava/lang/String; public org.bukkit.craftbukkit.profile.CraftPlayerProfile toString(Lcom/mojang/authlib/properties/PropertyMap;)Ljava/lang/String;
# needed to maintain visibility with overriden methods # needed to maintain visibility with overridden methods
public org.bukkit.craftbukkit.profile.CraftPlayerProfile getProperty(Ljava/lang/String;)Lcom/mojang/authlib/properties/Property; public org.bukkit.craftbukkit.profile.CraftPlayerProfile getProperty(Ljava/lang/String;)Lcom/mojang/authlib/properties/Property;
public org.bukkit.craftbukkit.profile.CraftPlayerProfile setProperty(Ljava/lang/String;Lcom/mojang/authlib/properties/Property;)V public org.bukkit.craftbukkit.profile.CraftPlayerProfile setProperty(Ljava/lang/String;Lcom/mojang/authlib/properties/Property;)V
@ -422,13 +422,15 @@ index 0000000000000000000000000000000000000000..3ff790cec1ad89caec4be64421dd7d51
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..1459a1f99fe614d072a087cda18788cf13102645 index 0000000000000000000000000000000000000000..04eae6eda89cbad530d2a5b8d1ef5880752a8625
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
@@ -0,0 +1,31 @@ @@ -0,0 +1,30 @@
+package com.destroystokyo.paper.profile; +package com.destroystokyo.paper.profile;
+ +
+import com.mojang.authlib.*; +import com.mojang.authlib.Environment;
+import com.mojang.authlib.EnvironmentParser;
+import com.mojang.authlib.GameProfileRepository;
+import com.mojang.authlib.minecraft.MinecraftSessionService; +import com.mojang.authlib.minecraft.MinecraftSessionService;
+import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; +import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+import com.mojang.authlib.yggdrasil.YggdrasilEnvironment; +import com.mojang.authlib.yggdrasil.YggdrasilEnvironment;
@ -436,70 +438,72 @@ index 0000000000000000000000000000000000000000..1459a1f99fe614d072a087cda18788cf
+import java.net.Proxy; +import java.net.Proxy;
+ +
+public class PaperAuthenticationService extends YggdrasilAuthenticationService { +public class PaperAuthenticationService extends YggdrasilAuthenticationService {
+
+ private final Environment environment; + private final Environment environment;
+
+ public PaperAuthenticationService(Proxy proxy) { + public PaperAuthenticationService(Proxy proxy) {
+ super(proxy); + super(proxy);
+ this.environment = EnvironmentParser.getEnvironmentFromProperties().orElse(YggdrasilEnvironment.PROD.getEnvironment()); + this.environment = EnvironmentParser.getEnvironmentFromProperties().orElse(YggdrasilEnvironment.PROD.getEnvironment());
+ } + }
+ +
+ @Override + @Override
+ public UserAuthentication createUserAuthentication(Agent agent) {
+ return new PaperUserAuthentication(this, agent);
+ }
+
+ @Override
+ public MinecraftSessionService createMinecraftSessionService() { + public MinecraftSessionService createMinecraftSessionService() {
+ return new PaperMinecraftSessionService(this, this.environment); + return new PaperMinecraftSessionService(this, this.environment);
+ } + }
+ +
+ @Override + @Override
+ public GameProfileRepository createProfileRepository() { + public GameProfileRepository createProfileRepository() {
+ return new PaperGameProfileRepository(this, this.environment); + return new PaperGameProfileRepository(this.getProxy(), this.environment);
+ } + }
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..582c169c85ac66f1f9430f79042e4655f776c157 index 0000000000000000000000000000000000000000..7b9e797b42c88b17d6a7c590a423f4e85d99a59d
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
@@ -0,0 +1,18 @@ @@ -0,0 +1,17 @@
+package com.destroystokyo.paper.profile; +package com.destroystokyo.paper.profile;
+ +
+import com.mojang.authlib.Agent;
+import com.mojang.authlib.Environment; +import com.mojang.authlib.Environment;
+import com.mojang.authlib.ProfileLookupCallback; +import com.mojang.authlib.ProfileLookupCallback;
+import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository; +import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository;
+import java.net.Proxy;
+ +
+public class PaperGameProfileRepository extends YggdrasilGameProfileRepository { +public class PaperGameProfileRepository extends YggdrasilGameProfileRepository {
+ public PaperGameProfileRepository(YggdrasilAuthenticationService authenticationService, Environment environment) { + public PaperGameProfileRepository(Proxy proxy, Environment environment) {
+ super(authenticationService, environment); + super(proxy, environment);
+ } + }
+ +
+ @Override + @Override
+ public void findProfilesByNames(String[] names, Agent agent, ProfileLookupCallback callback) { + public void findProfilesByNames(String[] names, ProfileLookupCallback callback) {
+ super.findProfilesByNames(names, agent, callback); + super.findProfilesByNames(names, callback);
+ } + }
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..93d73c27340645c7502acafdc0b2cfbc1a759dd8 index 0000000000000000000000000000000000000000..ea906c9942be4c37b0daf866c759771af0b1e0ed
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
@@ -0,0 +1,30 @@ @@ -0,0 +1,31 @@
+package com.destroystokyo.paper.profile; +package com.destroystokyo.paper.profile;
+ +
+import com.mojang.authlib.Environment; +import com.mojang.authlib.Environment;
+import com.mojang.authlib.GameProfile; +import com.mojang.authlib.GameProfile;
+import com.mojang.authlib.minecraft.MinecraftProfileTexture; +import com.mojang.authlib.minecraft.MinecraftProfileTexture;
+import com.mojang.authlib.yggdrasil.ProfileResult;
+import com.mojang.authlib.yggdrasil.ServicesKeySet;
+import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; +import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService; +import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
+ +
+import java.net.Proxy;
+import java.util.Map; +import java.util.Map;
+import java.util.UUID;
+import org.jetbrains.annotations.Nullable;
+ +
+public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionService { +public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionService {
+ protected PaperMinecraftSessionService(YggdrasilAuthenticationService authenticationService, Environment environment) { +
+ super(authenticationService, environment); + protected PaperMinecraftSessionService(ServicesKeySet servicesKeySet, Proxy proxy, Environment environment) {
+ super(servicesKeySet, proxy, environment);
+ } + }
+ +
+ @Override + @Override
@ -508,31 +512,8 @@ index 0000000000000000000000000000000000000000..93d73c27340645c7502acafdc0b2cfbc
+ } + }
+ +
+ @Override + @Override
+ public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) { + public @Nullable ProfileResult fetchProfile(final UUID profileId, final boolean requireSecure) {
+ return super.fillProfileProperties(profile, requireSecure); + return super.fetchProfile(profileId, requireSecure);
+ }
+
+ @Override
+ protected GameProfile fillGameProfile(GameProfile profile, boolean requireSecure) {
+ return super.fillGameProfile(profile, requireSecure);
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
new file mode 100644
index 0000000000000000000000000000000000000000..3cdd06d3af7ff94f1fe1a11b9a9275e17c695a38
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
@@ -0,0 +1,12 @@
+package com.destroystokyo.paper.profile;
+
+import com.mojang.authlib.Agent;
+import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+import com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication;
+import java.util.UUID;
+
+public class PaperUserAuthentication extends YggdrasilUserAuthentication {
+ public PaperUserAuthentication(YggdrasilAuthenticationService authenticationService, Agent agent) {
+ super(authenticationService, UUID.randomUUID().toString(), agent);
+ } + }
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/profile/SharedPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/SharedPlayerProfile.java diff --git a/src/main/java/com/destroystokyo/paper/profile/SharedPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/SharedPlayerProfile.java

View File

@ -7,31 +7,29 @@ Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in p
profiles that had to be looked up. profiles that had to be looked up.
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
index 582c169c85ac66f1f9430f79042e4655f776c157..08fdb681a68e8be6e4062af0630957ce3e524806 100644 index 7b9e797b42c88b17d6a7c590a423f4e85d99a59d..fd841c62c659a427dd08da5dbdf0e2e625391bc0 100644
--- a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java --- a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
@@ -1,11 +1,16 @@ @@ -1,9 +1,14 @@
package com.destroystokyo.paper.profile; package com.destroystokyo.paper.profile;
+import com.destroystokyo.paper.event.profile.LookupProfileEvent; +import com.destroystokyo.paper.event.profile.LookupProfileEvent;
+import com.destroystokyo.paper.event.profile.PreLookupProfileEvent; +import com.destroystokyo.paper.event.profile.PreLookupProfileEvent;
+import com.google.common.collect.Sets; +import com.google.common.collect.Sets;
import com.mojang.authlib.Agent;
import com.mojang.authlib.Environment; import com.mojang.authlib.Environment;
+import com.mojang.authlib.GameProfile; +import com.mojang.authlib.GameProfile;
import com.mojang.authlib.ProfileLookupCallback; import com.mojang.authlib.ProfileLookupCallback;
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository; import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository;
import java.net.Proxy;
+import java.util.Set; +import java.util.Set;
public class PaperGameProfileRepository extends YggdrasilGameProfileRepository { public class PaperGameProfileRepository extends YggdrasilGameProfileRepository {
public PaperGameProfileRepository(YggdrasilAuthenticationService authenticationService, Environment environment) { public PaperGameProfileRepository(Proxy proxy, Environment environment) {
super(authenticationService, environment); @@ -12,6 +17,44 @@ public class PaperGameProfileRepository extends YggdrasilGameProfileRepository {
@@ -13,6 +18,50 @@ public class PaperGameProfileRepository extends YggdrasilGameProfileRepository {
@Override @Override
public void findProfilesByNames(String[] names, Agent agent, ProfileLookupCallback callback) { public void findProfilesByNames(String[] names, ProfileLookupCallback callback) {
- super.findProfilesByNames(names, agent, callback); - super.findProfilesByNames(names, callback);
+ Set<String> unfoundNames = Sets.newHashSet(); + Set<String> unfoundNames = Sets.newHashSet();
+ for (String name : names) { + for (String name : names) {
+ PreLookupProfileEvent event = new PreLookupProfileEvent(name); + PreLookupProfileEvent event = new PreLookupProfileEvent(name);
@ -55,27 +53,21 @@ index 582c169c85ac66f1f9430f79042e4655f776c157..08fdb681a68e8be6e4062af0630957ce
+ // Some things were not found.... Proceed to look up. + // Some things were not found.... Proceed to look up.
+ if (!unfoundNames.isEmpty()) { + if (!unfoundNames.isEmpty()) {
+ String[] namesArr = unfoundNames.toArray(new String[unfoundNames.size()]); + String[] namesArr = unfoundNames.toArray(new String[unfoundNames.size()]);
+ super.findProfilesByNames(namesArr, agent, new PreProfileLookupCallback(callback)); + super.findProfilesByNames(namesArr, new PreProfileLookupCallback(callback));
+ } + }
+ } + }
+ +
+ private static class PreProfileLookupCallback implements ProfileLookupCallback { + private record PreProfileLookupCallback(ProfileLookupCallback callback) implements ProfileLookupCallback {
+ private final ProfileLookupCallback callback;
+
+ PreProfileLookupCallback(ProfileLookupCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override + @Override
+ public void onProfileLookupSucceeded(GameProfile gameProfile) { + public void onProfileLookupSucceeded(GameProfile gameProfile) {
+ PlayerProfile from = CraftPlayerProfile.asBukkitMirror(gameProfile); + PlayerProfile from = CraftPlayerProfile.asBukkitMirror(gameProfile);
+ new LookupProfileEvent(from).callEvent(); + new LookupProfileEvent(from).callEvent();
+ callback.onProfileLookupSucceeded(gameProfile); + this.callback.onProfileLookupSucceeded(gameProfile);
+ } + }
+ +
+ @Override + @Override
+ public void onProfileLookupFailed(GameProfile gameProfile, Exception e) { + public void onProfileLookupFailed(final String profileName, final Exception exception) {
+ callback.onProfileLookupFailed(gameProfile, e); + this.callback.onProfileLookupFailed(profileName, exception);
+ } + }
} }
} }

View File

@ -90,7 +90,7 @@ index 9a327d193d732baea1fadaab7ebc663d6fd5307c..17f01fa589cb7c4eff4233a27e60a592
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 38c544cdf2230e94850eda4d38afce9df53973a8..e12ae345142f27efa9a4b97c9da522571fc1288a 100644 index 75e82bec61c9e20d6ae589664f87cb1f26b0deb5..8106506803d77b88f13ca033eefa3b3f62453650 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -246,6 +246,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -246,6 +246,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -14,7 +14,7 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e12ae345142f27efa9a4b97c9da522571fc1288a..4eab2d038a247053353f437bada1f3d87b20c92a 100644 index 8106506803d77b88f13ca033eefa3b3f62453650..d327ce535c8750b6ee6c993b3643006e0e91a08d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1498,7 +1498,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1498,7 +1498,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -11,32 +11,42 @@ If Mojang API does need to be hit, event fire so you can get the results.
This is useful for implementing a ProfileCache for Player Skulls This is useful for implementing a ProfileCache for Player Skulls
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
index 93d73c27340645c7502acafdc0b2cfbc1a759dd8..5c7d2ee19243d0911a3a00af3ae42078a2ccba94 100644 index ea906c9942be4c37b0daf866c759771af0b1e0ed..48fcfe223f807ccb903804adfead4b97beb2475d 100644
--- a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java --- a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
@@ -1,6 +1,8 @@ @@ -24,7 +24,21 @@ public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionServi
package com.destroystokyo.paper.profile; return super.getTextures(profile, requireSecure);
import com.mojang.authlib.Environment;
+import com.destroystokyo.paper.event.profile.FillProfileEvent;
+import com.destroystokyo.paper.event.profile.PreFillProfileEvent;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
@@ -20,7 +22,15 @@ public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionServi
@Override
public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) {
- return super.fillProfileProperties(profile, requireSecure);
+ CraftPlayerProfile playerProfile = (CraftPlayerProfile) CraftPlayerProfile.asBukkitMirror(profile);
+ new PreFillProfileEvent(playerProfile).callEvent();
+ profile = playerProfile.getGameProfile();
+ if (profile.isComplete() && profile.getProperties().containsKey("textures")) {
+ return profile;
+ }
+ GameProfile gameProfile = super.fillProfileProperties(profile, requireSecure);
+ new FillProfileEvent(CraftPlayerProfile.asBukkitMirror(gameProfile)).callEvent();
+ return gameProfile;
} }
@Override - @Override
+ public @Nullable ProfileResult fetchProfile(GameProfile profile, final boolean requireSecure) {
+ CraftPlayerProfile playerProfile = (CraftPlayerProfile) CraftPlayerProfile.asBukkitMirror(profile);
+ new com.destroystokyo.paper.event.profile.PreFillProfileEvent(playerProfile).callEvent();
+ profile = playerProfile.getGameProfile();
+ if (profile.getProperties().containsKey("textures")) {
+ return new ProfileResult(profile, java.util.Collections.emptySet());
+ }
+ ProfileResult result = super.fetchProfile(profile.getId(), requireSecure);
+ if (result != null) {
+ new com.destroystokyo.paper.event.profile.FillProfileEvent(CraftPlayerProfile.asBukkitMirror(result.profile())).callEvent();
+ }
+ return result;
+ }
+
+ @Override @io.papermc.paper.annotation.DoNotUse @Deprecated
public @Nullable ProfileResult fetchProfile(final UUID profileId, final boolean requireSecure) {
return super.fetchProfile(profileId, requireSecure);
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
index f5162f7171c348ff523b18e577246561d79e1c20..238b6cd88cb24ca63770db607f2241fcd7210574 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
@@ -216,7 +216,7 @@ public class SkullBlockEntity extends BlockEntity {
MinecraftSessionService minecraftsessionservice = SkullBlockEntity.sessionService;
if (minecraftsessionservice != null) {
- ProfileResult profileresult = minecraftsessionservice.fetchProfile(profile.getId(), true);
+ ProfileResult profileresult = minecraftsessionservice instanceof com.destroystokyo.paper.profile.PaperMinecraftSessionService paperMinecraftSessionService ? paperMinecraftSessionService.fetchProfile(profile, true) : minecraftsessionservice.fetchProfile(profile.getId(), true); // Paper
return profileresult == null ? Optional.of(profile) : Optional.of(profileresult.profile());
} else {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
index f5f26c0327f0dae47badcc914fc89a4019c784a3..0128c29bc0a99d4eb4f53b2beb20045c0126db9d 100644 index f5f26c0327f0dae47badcc914fc89a4019c784a3..6487bf016e646ca772b667a2a81c85e82c027c05 100644
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java --- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java +++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
@@ -226,6 +226,12 @@ public class PlayerAdvancements { @@ -226,6 +226,12 @@ public class PlayerAdvancements {
@ -13,7 +13,7 @@ index f5f26c0327f0dae47badcc914fc89a4019c784a3..0128c29bc0a99d4eb4f53b2beb20045c
if (advancementprogress.grantProgress(criterionName)) { if (advancementprogress.grantProgress(criterionName)) {
+ // Paper start + // Paper start
+ if (!new com.destroystokyo.paper.event.player.PlayerAdvancementCriterionGrantEvent(this.player.getBukkitEntity(), advancement.bukkit, criterionName).callEvent()) { + if (!new com.destroystokyo.paper.event.player.PlayerAdvancementCriterionGrantEvent(this.player.getBukkitEntity(), advancement.toBukkit(), criterionName).callEvent()) {
+ advancementprogress.revokeProgress(criterionName); + advancementprogress.revokeProgress(criterionName);
+ return false; + return false;
+ } + }

View File

@ -55,7 +55,7 @@ index b17fe83bcd7bde44ee8c1f872fffa8bf40707c50..aac78c13361b19efa7b43a0c95458390
public Server getServer() { public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4eab2d038a247053353f437bada1f3d87b20c92a..df3baed35f408e2098f6c98522aed8017d61f489 100644 index d327ce535c8750b6ee6c993b3643006e0e91a08d..160a6d5b3ec3a9bc7677f937444334c0aca8be86 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -229,11 +229,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -229,11 +229,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -179,7 +179,7 @@ index 4eab2d038a247053353f437bada1f3d87b20c92a..df3baed35f408e2098f6c98522aed801
+ +
+ //Respawn the player then update their position and selected slot + //Respawn the player then update their position and selected slot
+ ServerLevel worldserver = handle.serverLevel(); + ServerLevel worldserver = handle.serverLevel();
+ connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), net.minecraft.world.level.biome.BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), net.minecraft.network.protocol.game.ClientboundRespawnPacket.KEEP_ALL_DATA, this.getHandle().getLastDeathLocation(), handle.getPortalCooldown())); + connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(new net.minecraft.network.protocol.game.CommonPlayerSpawnInfo(worldserver.dimensionTypeId(), worldserver.dimension(), net.minecraft.world.level.biome.BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), handle.getLastDeathLocation(), handle.getPortalCooldown()), net.minecraft.network.protocol.game.ClientboundRespawnPacket.KEEP_ALL_DATA));
+ handle.onUpdateAbilities(); + handle.onUpdateAbilities();
+ connection.internalTeleport(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet()); + connection.internalTeleport(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet());
+ net.minecraft.server.MinecraftServer.getServer().getPlayerList().sendAllPlayerInfo(handle); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().sendAllPlayerInfo(handle);

View File

@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk. provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index df3baed35f408e2098f6c98522aed8017d61f489..380c1c32a2f404b2e6b801f5ebeccae54d9395fa 100644 index 160a6d5b3ec3a9bc7677f937444334c0aca8be86..21e12aa4508b0079e17131b1ee7baebe4108e413 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -194,6 +194,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -194,6 +194,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -173,7 +173,7 @@ index e5b2686e466a2604ebcdb6e5c3b6fb7ff7bc6eec..aa131c233ee9d7926ca77e1afedd27ba
@Override @Override
public boolean isBlocking() { public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 380c1c32a2f404b2e6b801f5ebeccae54d9395fa..9366cc71807cc88d5dd70138b9ce5d49335731db 100644 index 21e12aa4508b0079e17131b1ee7baebe4108e413..f1c6baeafb93ae51d4a76d39399cbd99b2e1f92c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1149,7 +1149,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1149,7 +1149,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9366cc71807cc88d5dd70138b9ce5d49335731db..42034c3ce08ef4432cb71dfd10dc561bda7c8dc8 100644 index f1c6baeafb93ae51d4a76d39399cbd99b2e1f92c..d9ada8e35c30dcad123716bf4ca7b3fbbb5bdf4b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2801,6 +2801,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2801,6 +2801,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -392,7 +392,7 @@ index 6483ad071c119353267a4f13b192a50931995c2a..7eecbe85949e47b367014c04d7a37c2c
this.gameEvent(GameEvent.ENTITY_DIE); this.gameEvent(GameEvent.ENTITY_DIE);
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 42034c3ce08ef4432cb71dfd10dc561bda7c8dc8..874f515eb8cf7bc3fa2e37f09993fd4454ec089e 100644 index d9ada8e35c30dcad123716bf4ca7b3fbbb5bdf4b..622cd2c42dc51353c29f85abb6ab3cbbed460bfa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2301,7 +2301,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2301,7 +2301,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -106,7 +106,7 @@ index aac78c13361b19efa7b43a0c95458390f1ba8340..f572a74b85df36a6da76b78ec29d8072
public Location getLastDeathLocation() { public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) { if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 874f515eb8cf7bc3fa2e37f09993fd4454ec089e..574186529adc6d780efb1f9644703d6c472f16d4 100644 index 622cd2c42dc51353c29f85abb6ab3cbbed460bfa..f38de4bf4f45e2069e4baaf960b6fac542b1a08e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -195,6 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -195,6 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -12,7 +12,7 @@ Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far. be unintentional in the few cases we've seen so far.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 574186529adc6d780efb1f9644703d6c472f16d4..ffac201e99efcc1527956df18cce5aab986332e9 100644 index f38de4bf4f45e2069e4baaf960b6fac542b1a08e..1fecbdbc382a47aa76bd562fb3cc0625b7807bfc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2848,6 +2848,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2848,6 +2848,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -143,14 +143,14 @@ index 0000000000000000000000000000000000000000..413dfa52760db393ad6a8b5341200ee7
+import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.NonNull;
+import org.checkerframework.framework.qual.DefaultQualifier; +import org.checkerframework.framework.qual.DefaultQualifier;
diff --git a/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java b/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java diff --git a/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java b/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java
index 4303f2b4e55191f8a53170435c6d1263782d1c8d..f5440ae9bbce231de06cf184fd0a8490cebfafde 100644 index 4303f2b4e55191f8a53170435c6d1263782d1c8d..a65d07cb3d2dae85225921498d1721dc3c6a6bf3 100644
--- a/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java --- a/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java
+++ b/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java +++ b/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java
@@ -34,6 +34,7 @@ public class ServerPlaceRecipe<C extends Container> implements PlaceRecipe<Integ @@ -34,6 +34,7 @@ public class ServerPlaceRecipe<C extends Container> implements PlaceRecipe<Integ
this.inventory = entity.getInventory(); this.inventory = entity.getInventory();
if (this.testClearGrid() || entity.isCreative()) { if (this.testClearGrid() || entity.isCreative()) {
this.stackedContents.clear(); this.stackedContents.clear();
+ this.stackedContents.initialize(recipe); // Paper - better exact choice recipes + this.stackedContents.initialize(recipe.value()); // Paper - better exact choice recipes
entity.getInventory().fillStackedContents(this.stackedContents); entity.getInventory().fillStackedContents(this.stackedContents);
this.menu.fillCraftSlotsStackedContents(this.stackedContents); this.menu.fillCraftSlotsStackedContents(this.stackedContents);
if (this.stackedContents.canCraft(recipe.value(), (IntList)null)) { if (this.stackedContents.canCraft(recipe.value(), (IntList)null)) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize call to getFluid for explosions
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 401076c5350429052994d98c414a83a21f908010..75d827f1eecb24f7ab985bdea2bbf65b8478fc8c 100644 index aea135503da20b7c4e2c6cd2dba81998f101b0c4..c0227cda09b9ca508c1de1fbe1e57afd743a9426 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java --- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -168,7 +168,7 @@ public class Explosion { @@ -169,7 +169,7 @@ public class Explosion {
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) { for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
BlockPos blockposition = BlockPos.containing(d4, d5, d6); BlockPos blockposition = BlockPos.containing(d4, d5, d6);
BlockState iblockdata = this.level.getBlockState(blockposition); BlockState iblockdata = this.level.getBlockState(blockposition);

View File

@ -9,15 +9,15 @@ dispensed. The resulting item would have size == 0 and therefore
be convertered to air, hence why the effects disappeared. be convertered to air, hence why the effects disappeared.
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index b13944a7a688ed9013e4c7dfdad6523738b9c35c..cec6ee5d31f2a86a61fd142035af853fa512e211 100644 index b1256306601969c05a833b22ab1f16b5b6b4ed15..d500de41d0a61d67aff523fe436da06e625687dd 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -515,7 +515,7 @@ public interface DispenseItemBehavior { @@ -516,7 +516,7 @@ public interface DispenseItemBehavior {
}
itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
- FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.getLevel(), stack, pointer.x(), pointer.y(), pointer.x(), true); Vec3 vec3d = DispenseItemBehavior.getEntityPokingOutOfBlockPos(pointer, EntityType.FIREWORK_ROCKET, enumdirection);
+ FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.getLevel(), itemstack1, pointer.x(), pointer.y(), pointer.x(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed - FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.level(), stack, vec3d.x(), vec3d.y(), vec3d.z(), true);
+ FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.level(), itemstack1, vec3d.x(), vec3d.y(), vec3d.z(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed
DispenseItemBehavior.setEntityPokingOutOfBlock(pointer, entityfireworks, enumdirection);
entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F); entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F);
pointer.level().addFreshEntity(entityfireworks);

View File

@ -18,7 +18,7 @@ public net.minecraft.world.entity.Entity isInsidePortal
public net.minecraft.world.entity.LivingEntity jumping public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78f3bcb060 100644 index 0b928a1cf86de9c83fd50472226be48443ed65a6..9bcf1fee8df0186f7355bf37ba7c39553bdbf1d0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2,7 +2,6 @@ package net.minecraft.server.level; @@ -2,7 +2,6 @@ package net.minecraft.server.level;
@ -29,7 +29,7 @@ index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.mojang.datafixers.DataFixer; import com.mojang.datafixers.DataFixer;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
@@ -1186,17 +1185,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -956,17 +955,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
++TimingHistory.entityTicks; // Paper - timings ++TimingHistory.entityTicks; // Paper - timings
// Spigot start // Spigot start
co.aikar.timings.Timing timer; // Paper co.aikar.timings.Timing timer; // Paper
@ -51,7 +51,7 @@ index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78
try { try {
// Paper end - timings // Paper end - timings
entity.setOldPosAndRot(); entity.setOldPosAndRot();
@@ -1207,9 +1206,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -977,9 +976,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString(); return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
}); });
gameprofilerfiller.incrementCounter("tickNonPassenger"); gameprofilerfiller.incrementCounter("tickNonPassenger");
@ -65,7 +65,7 @@ index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78
Iterator iterator = entity.getPassengers().iterator(); Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1217,13 +1220,18 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -987,13 +990,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(entity, entity1); this.tickPassenger(entity, entity1);
} }
@ -85,7 +85,7 @@ index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78
passenger.setOldPosAndRot(); passenger.setOldPosAndRot();
++passenger.tickCount; ++passenger.tickCount;
ProfilerFiller gameprofilerfiller = this.getProfiler(); ProfilerFiller gameprofilerfiller = this.getProfiler();
@@ -1232,8 +1240,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1002,8 +1010,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString(); return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
}); });
gameprofilerfiller.incrementCounter("tickPassenger"); gameprofilerfiller.incrementCounter("tickPassenger");
@ -103,7 +103,7 @@ index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78
gameprofilerfiller.pop(); gameprofilerfiller.pop();
Iterator iterator = passenger.getPassengers().iterator(); Iterator iterator = passenger.getPassengers().iterator();
@@ -1243,6 +1260,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1013,6 +1030,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(passenger, entity2); this.tickPassenger(passenger, entity2);
} }
@ -112,7 +112,7 @@ index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78
} else { } else {
passenger.stopRiding(); passenger.stopRiding();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0f40361ebfe64fae828f577529200e40e94b0e05..049df55b07e14b6ea75bfb9aa4de2adb0548305d 100644 index 7c23f63fd642002cac597da2eafc5f0b4232d5a4..359f680c52dc44139e48673675617d97c1aa24a1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -390,6 +390,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -390,6 +390,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -124,7 +124,7 @@ index 0f40361ebfe64fae828f577529200e40e94b0e05..049df55b07e14b6ea75bfb9aa4de2adb
protected int numCollisions = 0; // Paper protected int numCollisions = 0; // Paper
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
@javax.annotation.Nullable @javax.annotation.Nullable
@@ -962,6 +964,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -910,6 +912,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} else { } else {
this.wasOnFire = this.isOnFire(); this.wasOnFire = this.isOnFire();
if (movementType == MoverType.PISTON) { if (movementType == MoverType.PISTON) {
@ -133,7 +133,7 @@ index 0f40361ebfe64fae828f577529200e40e94b0e05..049df55b07e14b6ea75bfb9aa4de2adb
movement = this.limitPistonMovement(movement); movement = this.limitPistonMovement(movement);
if (movement.equals(Vec3.ZERO)) { if (movement.equals(Vec3.ZERO)) {
return; return;
@@ -974,6 +978,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -922,6 +926,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.stuckSpeedMultiplier = Vec3.ZERO; this.stuckSpeedMultiplier = Vec3.ZERO;
this.setDeltaMovement(Vec3.ZERO); this.setDeltaMovement(Vec3.ZERO);
} }
@ -148,10 +148,10 @@ index 0f40361ebfe64fae828f577529200e40e94b0e05..049df55b07e14b6ea75bfb9aa4de2adb
movement = this.maybeBackOffFromEdge(movement, movementType); movement = this.maybeBackOffFromEdge(movement, movementType);
Vec3 vec3d1 = this.collide(movement); Vec3 vec3d1 = this.collide(movement);
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 3081c1370a0854f07214cbc50b06cbb005d171fb..cbdbc859416d51d0311ce5f6032a2b4dfe34d3a7 100644 index df0cc02f9bbea857226765c6066a2b945036a0d9..7bbb68bf06e04b58b6c4fa546fe919e387e00b27 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -218,6 +218,19 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -220,6 +220,19 @@ public abstract class Mob extends LivingEntity implements Targeting {
return this.lookControl; return this.lookControl;
} }
@ -172,10 +172,10 @@ index 3081c1370a0854f07214cbc50b06cbb005d171fb..cbdbc859416d51d0311ce5f6032a2b4d
Entity entity = this.getControlledVehicle(); Entity entity = this.getControlledVehicle();
diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
index d8ce7ea5fcb2785435ec1f530cb6e7114c01e4b7..5f3a14ca456e65894e824864ccf3cd5fabc9c6bd 100644 index 5e9cf929674888b3a143a0691dc6936b304467f1..b5964614823059261c28eb2e998ad54249f07e7b 100644
--- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java
+++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java +++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
@@ -19,6 +19,7 @@ public abstract class PathfinderMob extends Mob { @@ -21,6 +21,7 @@ public abstract class PathfinderMob extends Mob {
} }
public org.bukkit.craftbukkit.entity.CraftCreature getBukkitCreature() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper public org.bukkit.craftbukkit.entity.CraftCreature getBukkitCreature() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper
@ -252,10 +252,10 @@ index d27e5f9dac4703b839ab8444f6b54bf54d58af86..34f319ad09276c6f68dde449c79351de
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index 73a5750dd47cf8869070f92594cfb926193c8761..1e775178f346ef3d2f121e539ba81a75c8a37c36 100644 index 7d7390dc76f683178fc332ea3c2c945ba8e9b84b..cc829161404c0f98a403c5219d5c535de1d5c5ba 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -226,17 +226,34 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -227,17 +227,34 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override @Override
public void inactiveTick() { public void inactiveTick() {
// SPIGOT-3874, SPIGOT-3894, SPIGOT-3846, SPIGOT-5286 :( // SPIGOT-3874, SPIGOT-3894, SPIGOT-3846, SPIGOT-5286 :(
@ -293,7 +293,7 @@ index 73a5750dd47cf8869070f92594cfb926193c8761..1e775178f346ef3d2f121e539ba81a75
this.level().getProfiler().pop(); this.level().getProfiler().pop();
if (this.assignProfessionWhenSpawned) { if (this.assignProfessionWhenSpawned) {
this.assignProfessionWhenSpawned = false; this.assignProfessionWhenSpawned = false;
@@ -260,7 +277,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -261,7 +278,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
this.lastTradedPlayer = null; this.lastTradedPlayer = null;
} }
@ -302,7 +302,7 @@ index 73a5750dd47cf8869070f92594cfb926193c8761..1e775178f346ef3d2f121e539ba81a75
Raid raid = ((ServerLevel) this.level()).getRaidAt(this.blockPosition()); Raid raid = ((ServerLevel) this.level()).getRaidAt(this.blockPosition());
if (raid != null && raid.isActive() && !raid.isOver()) { if (raid != null && raid.isActive() && !raid.isOver()) {
@@ -271,6 +288,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -272,6 +289,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
if (this.getVillagerData().getProfession() == VillagerProfession.NONE && this.isTrading()) { if (this.getVillagerData().getProfession() == VillagerProfession.NONE && this.isTrading()) {
this.stopTrading(); this.stopTrading();
} }
@ -348,7 +348,7 @@ index b149e8bcac034bb3fc118a9adcb0de45e18ed5e9..fc35cfc9d045f3e5b6a50af1d0ba83b6
+ +
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b1111e644f860f40a944fd43ac900db4615a1c5e..9a6ed3aa55f988ed30669fab2a2513741eda399b 100644 index 4968e036350631b79a8c7e70fdc32db4bcff2ade..495ab82a3a9d47583eb7239730aa78dd51f16fc6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -160,6 +160,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -160,6 +160,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -380,7 +380,7 @@ index 45f55c79a9d105f732054d61c4cf83eb5db49762..17a6327ab7b26dfab38881bbc0689b0b
} }
} }
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8ef078932 100644 index 5d470b424d52ae402ec0e950263ad54cf6f7e3ef..b1e844b1c0dafb2dfc9904d2d4ad0e8fd5b6e572 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -1,39 +1,52 @@ @@ -1,39 +1,52 @@
@ -564,9 +564,9 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
+ ActivationType.VILLAGER.boundingBox = player.getBoundingBox().inflate( villagerActivationRange, worldHeight, villagerActivationRange ); + ActivationType.VILLAGER.boundingBox = player.getBoundingBox().inflate( villagerActivationRange, worldHeight, villagerActivationRange );
+ // Paper end + // Paper end
// Paper start world.getEntities().get(maxBB, ActivationRange::activateEntity);
java.util.List<Entity> entities = world.getEntities((Entity)null, maxBB, null); }
@@ -172,60 +250,118 @@ public class ActivationRange @@ -166,60 +244,118 @@ public class ActivationRange
* @param entity * @param entity
* @return * @return
*/ */
@ -628,7 +628,8 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
{ {
- return true; - return true;
+ return 20; // Paper + return 20; // Paper
+ } }
- if ( entity instanceof Villager && ( (Villager) entity ).canBreed() )
+ // Paper start + // Paper start
+ if (entity instanceof Bee) { + if (entity instanceof Bee) {
+ Bee bee = (Bee)entity; + Bee bee = (Bee)entity;
@ -656,8 +657,7 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
+ return config.villagersWorkImmunityFor; + return config.villagersWorkImmunityFor;
+ } + }
+ } + }
} + }
- if ( entity instanceof Villager && ( (Villager) entity ).canBreed() )
+ if ( entity instanceof Llama && ( (Llama) entity ).inCaravan() ) + if ( entity instanceof Llama && ( (Llama) entity ).inCaravan() )
{ {
- return true; - return true;
@ -685,11 +685,11 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
+ // Paper start + // Paper start
+ if (entity instanceof Mob && ((Mob) entity).targetSelector.hasTasks() ) { + if (entity instanceof Mob && ((Mob) entity).targetSelector.hasTasks() ) {
+ return 0; + return 0;
} + }
+ if (entity instanceof Pillager) { + if (entity instanceof Pillager) {
+ Pillager pillager = (Pillager) entity; + Pillager pillager = (Pillager) entity;
+ // TODO:? + // TODO:?
+ } }
+ // Paper end + // Paper end
} }
// SPIGOT-6644: Otherwise the target refresh tick will be missed // SPIGOT-6644: Otherwise the target refresh tick will be missed
@ -702,7 +702,7 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
} }
/** /**
@@ -240,8 +376,19 @@ public class ActivationRange @@ -234,8 +370,19 @@ public class ActivationRange
if ( entity instanceof FireworkRocketEntity ) { if ( entity instanceof FireworkRocketEntity ) {
return true; return true;
} }
@ -723,7 +723,7 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
// Should this entity tick? // Should this entity tick?
if ( !isActive ) if ( !isActive )
@@ -249,15 +396,19 @@ public class ActivationRange @@ -243,15 +390,19 @@ public class ActivationRange
if ( ( MinecraftServer.currentTick - entity.activatedTick - 1 ) % 20 == 0 ) if ( ( MinecraftServer.currentTick - entity.activatedTick - 1 ) % 20 == 0 )
{ {
// Check immunities every 20 ticks. // Check immunities every 20 ticks.

View File

@ -7,10 +7,10 @@ When the server is lagging, players will wait longer when eating.
Change to also use a time check instead if it passes. Change to also use a time check instead if it passes.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 53abf88143206eee03f372cf6471fbfbe519496d..1d0d8971675d882a54e5c3eb1315ed53be9338be 100644 index ac59a1e5ae4fe84af44220d721b60f2e157e0f1f..ca179b062fa6142da584ad1a091e63d89403a0f0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3594,6 +3594,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3653,6 +3653,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
} }
@ -22,7 +22,7 @@ index 53abf88143206eee03f372cf6471fbfbe519496d..1d0d8971675d882a54e5c3eb1315ed53
private void updatingUsingItem() { private void updatingUsingItem() {
if (this.isUsingItem()) { if (this.isUsingItem()) {
if (ItemStack.isSameItem(this.getItemInHand(this.getUsedItemHand()), this.useItem)) { if (ItemStack.isSameItem(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
@@ -3612,7 +3617,12 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3671,7 +3676,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.triggerItemUseEffects(stack, 5); this.triggerItemUseEffects(stack, 5);
} }
@ -36,7 +36,7 @@ index 53abf88143206eee03f372cf6471fbfbe519496d..1d0d8971675d882a54e5c3eb1315ed53
this.completeUsingItem(); this.completeUsingItem();
} }
@@ -3660,7 +3670,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3719,7 +3729,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag
this.useItem = itemstack; this.useItem = itemstack;
@ -48,7 +48,7 @@ index 53abf88143206eee03f372cf6471fbfbe519496d..1d0d8971675d882a54e5c3eb1315ed53
if (!this.level().isClientSide) { if (!this.level().isClientSide) {
this.setLivingEntityFlag(1, true); this.setLivingEntityFlag(1, true);
this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND); this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND);
@@ -3685,7 +3698,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3744,7 +3757,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
} else if (!this.isUsingItem() && !this.useItem.isEmpty()) { } else if (!this.isUsingItem() && !this.useItem.isEmpty()) {
this.useItem = ItemStack.EMPTY; this.useItem = ItemStack.EMPTY;
@ -60,7 +60,7 @@ index 53abf88143206eee03f372cf6471fbfbe519496d..1d0d8971675d882a54e5c3eb1315ed53
} }
} }
@@ -3818,7 +3834,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3877,7 +3893,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
this.useItem = ItemStack.EMPTY; this.useItem = ItemStack.EMPTY;

View File

@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
Also ignores Enderdragon, defaulting it to Mojang's setting Also ignores Enderdragon, defaulting it to Mojang's setting
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 562e45954cc72a253f20e9a9fddf0f179baf3e7b..c00a625af27cdd80e2e4773ad93ff919f12acf31 100644 index 66046c763872a031c65db17502b33199a40fd093..eb8b82514cc19ff5404c7558f93310d6629cb6d7 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1326,6 +1326,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1816,6 +1816,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
int j = entity.getType().clientTrackingRange() * 16; int j = entity.getType().clientTrackingRange() * 16;

View File

@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
heightmap resolves the issue without having to load all spawn chunks. heightmap resolves the issue without having to load all spawn chunks.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 049df55b07e14b6ea75bfb9aa4de2adb0548305d..92f96ea37ea73353c17b73721af31c65467dcc0d 100644 index 359f680c52dc44139e48673675617d97c1aa24a1..d9e9d363d8b0271cee42479a362f6670c5df38cb 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3342,6 +3342,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3326,6 +3326,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
if (flag1) { if (flag1) {
blockposition1 = ServerLevel.END_SPAWN_POINT; blockposition1 = ServerLevel.END_SPAWN_POINT;
} else { } else {

View File

@ -252,20 +252,20 @@ index 0000000000000000000000000000000000000000..11de56afaf059b00fa5bec293516bcdc
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index c00a625af27cdd80e2e4773ad93ff919f12acf31..5cc0a39622a265e42e6b7d20e81144d1acce59b7 100644 index eb8b82514cc19ff5404c7558f93310d6629cb6d7..842f7423d113f23d4b95162c81d407efd765679a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -151,6 +151,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -147,6 +147,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private final Long2LongMap chunkSaveCooldowns; private final Long2LongMap chunkSaveCooldowns;
private final Queue<Runnable> unloadQueue; private final Queue<Runnable> unloadQueue;
int viewDistance; private int serverViewDistance;
+ public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobDistanceMap; // Paper + public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobDistanceMap; // Paper
// Paper - rewrite chunk system // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback()
public final CallbackExecutor callbackExecutor = new CallbackExecutor();
@@ -162,11 +163,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -176,16 +177,32 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
int chunkX = MCUtil.getChunkCoordinate(player.getX()); int chunkX = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getX());
int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); int chunkZ = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getZ());
// Note: players need to be explicitly added to distance maps before they can be updated // Note: players need to be explicitly added to distance maps before they can be updated
+ // Paper start - per player mob spawning + // Paper start - per player mob spawning
+ if (this.playerMobDistanceMap != null) { + if (this.playerMobDistanceMap != null) {
@ -275,7 +275,6 @@ index c00a625af27cdd80e2e4773ad93ff919f12acf31..5cc0a39622a265e42e6b7d20e81144d1
} }
void removePlayerFromDistanceMaps(ServerPlayer player) { void removePlayerFromDistanceMaps(ServerPlayer player) {
this.level.playerChunkLoader.removePlayer(player); // Paper - replace chunk loader
+ // Paper start - per player mob spawning + // Paper start - per player mob spawning
+ if (this.playerMobDistanceMap != null) { + if (this.playerMobDistanceMap != null) {
@ -285,10 +284,10 @@ index c00a625af27cdd80e2e4773ad93ff919f12acf31..5cc0a39622a265e42e6b7d20e81144d1
} }
void updateMaps(ServerPlayer player) { void updateMaps(ServerPlayer player) {
@@ -174,6 +185,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkX = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getX());
int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); int chunkZ = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getZ());
// Note: players need to be explicitly added to distance maps before they can be updated // Note: players need to be explicitly added to distance maps before they can be updated
this.level.playerChunkLoader.updatePlayer(player); // Paper - replace chunk loader +
+ // Paper start - per player mob spawning + // Paper start - per player mob spawning
+ if (this.playerMobDistanceMap != null) { + if (this.playerMobDistanceMap != null) {
+ this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); + this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
@ -297,7 +296,7 @@ index c00a625af27cdd80e2e4773ad93ff919f12acf31..5cc0a39622a265e42e6b7d20e81144d1
} }
// Paper end // Paper end
// Paper start // Paper start
@@ -259,6 +275,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -276,6 +293,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new); this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new);
this.regionManagers.add(this.dataRegionManager); this.regionManagers.add(this.dataRegionManager);
// Paper end // Paper end
@ -305,7 +304,7 @@ index c00a625af27cdd80e2e4773ad93ff919f12acf31..5cc0a39622a265e42e6b7d20e81144d1
} }
protected ChunkGenerator generator() { protected ChunkGenerator generator() {
@@ -284,6 +301,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -301,6 +319,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}); });
} }
@ -338,10 +337,10 @@ index c00a625af27cdd80e2e4773ad93ff919f12acf31..5cc0a39622a265e42e6b7d20e81144d1
double d0 = (double) SectionPos.sectionToBlockCoord(pos.x, 8); double d0 = (double) SectionPos.sectionToBlockCoord(pos.x, 8);
double d1 = (double) SectionPos.sectionToBlockCoord(pos.z, 8); double d1 = (double) SectionPos.sectionToBlockCoord(pos.z, 8);
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 5cb151a7d89c7281b03f24c5f79afb7edf7cbfea..d9743139d1cb932c6aac56da85f073e4dfe2933c 100644 index 0f38bdf2c9a29f2111c27138b8d997c230633bb8..dd9b315c169398d12c592c549693f94922961ed1 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -543,7 +543,18 @@ public class ServerChunkCache extends ChunkSource { @@ -696,7 +696,18 @@ public class ServerChunkCache extends ChunkSource {
gameprofilerfiller.push("naturalSpawnCount"); gameprofilerfiller.push("naturalSpawnCount");
this.level.timings.countNaturalMobs.startTiming(); // Paper - timings this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
int l = this.distanceManager.getNaturalSpawnChunkCount(); int l = this.distanceManager.getNaturalSpawnChunkCount();
@ -362,10 +361,10 @@ index 5cb151a7d89c7281b03f24c5f79afb7edf7cbfea..d9743139d1cb932c6aac56da85f073e4
this.lastSpawnState = spawnercreature_d; this.lastSpawnState = spawnercreature_d;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 4aea5b2e36f5cd6f9b076f9a225a391211ec0c25..a1f75dfbe975ff0150cb529266c3c0884c8e2d45 100644 index 394f2b87010454ff2e4898f3ee5085c68d91952a..8af7966008a5f06c9a33f0c4396b940ecec623e8 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -248,6 +248,11 @@ public class ServerPlayer extends Player { @@ -246,6 +246,11 @@ public class ServerPlayer extends Player {
public boolean queueHealthUpdatePacket = false; public boolean queueHealthUpdatePacket = false;
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
// Paper end // Paper end
@ -377,7 +376,7 @@ index 4aea5b2e36f5cd6f9b076f9a225a391211ec0c25..a1f75dfbe975ff0150cb529266c3c088
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
@@ -380,6 +385,7 @@ public class ServerPlayer extends Player { @@ -339,6 +344,7 @@ public class ServerPlayer extends Player {
this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getScoreboardName()); // Paper this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getScoreboardName()); // Paper
this.bukkitPickUpLoot = true; this.bukkitPickUpLoot = true;
this.maxHealthCache = this.getMaxHealth(); this.maxHealthCache = this.getMaxHealth();
@ -386,7 +385,7 @@ index 4aea5b2e36f5cd6f9b076f9a225a391211ec0c25..a1f75dfbe975ff0150cb529266c3c088
// Yes, this doesn't match Vanilla, but it's the best we can do for now. // Yes, this doesn't match Vanilla, but it's the best we can do for now.
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 23d53f3fd524cc4d827dc95ab95367702a110a05..e57bb23ec14263b7c9dd721fefbe912963b863d0 100644 index fe38079d69f3e9987ad5ab077ae09d05017a681a..7983f9a21251cec4857529ad1180a62668ea5037 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -70,6 +70,12 @@ public final class NaturalSpawner { @@ -70,6 +70,12 @@ public final class NaturalSpawner {

View File

@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
then unwrap it... then unwrap it...
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index d9743139d1cb932c6aac56da85f073e4dfe2933c..603f9d1f501a18214f11a6e401f2c43d9c3cf8eb 100644 index dd9b315c169398d12c592c549693f94922961ed1..b6461fdd77895fbeae10e92c76e8799c7e846ac5 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -270,6 +270,12 @@ public class ServerChunkCache extends ChunkSource { @@ -398,6 +398,12 @@ public class ServerChunkCache extends ChunkSource {
return this.getChunk(x, z, leastStatus, create); return this.getChunk(x, z, leastStatus, create);
}, this.mainThreadProcessor).join(); }, this.mainThreadProcessor).join();
} else { } else {
@ -23,8 +23,8 @@ index d9743139d1cb932c6aac56da85f073e4dfe2933c..603f9d1f501a18214f11a6e401f2c43d
ProfilerFiller gameprofilerfiller = this.level.getProfiler(); ProfilerFiller gameprofilerfiller = this.level.getProfiler();
gameprofilerfiller.incrementCounter("getChunk"); gameprofilerfiller.incrementCounter("getChunk");
@@ -313,39 +319,7 @@ public class ServerChunkCache extends ChunkSource { @@ -444,39 +450,7 @@ public class ServerChunkCache extends ChunkSource {
if (!io.papermc.paper.util.TickThread.isTickThread()) { // Paper - rewrite chunk system if (Thread.currentThread() != this.mainThread) {
return null; return null;
} else { } else {
- this.level.getProfiler().incrementCounter("getChunkNow"); - this.level.getProfiler().incrementCounter("getChunkNow");

View File

@ -194,13 +194,13 @@ index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f3047
+ } + }
+} +}
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
index ae51993e0de706cb62c96795ca9de7663893a5bf..5bfa245a621a0bf7ef60cd01f4c04576b770384e 100644 index 830978f3409888302ab857161628cee5869efa8f..43573b5ef76c8bb42411c3707cb13d90d531b905 100644
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java --- a/src/main/java/io/papermc/paper/command/PaperCommand.java
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
@@ -40,6 +40,7 @@ public final class PaperCommand extends Command { @@ -39,6 +39,7 @@ public final class PaperCommand extends Command {
commands.put(Set.of("version"), new VersionCommand());
commands.put(Set.of("dumpplugins"), new DumpPluginsCommand()); commands.put(Set.of("dumpplugins"), new DumpPluginsCommand());
commands.put(Set.of("fixlight"), new FixLightCommand()); commands.put(Set.of("fixlight"), new FixLightCommand());
commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand());
+ commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand()); + commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
return commands.entrySet().stream() return commands.entrySet().stream()
@ -300,23 +300,31 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 603f9d1f501a18214f11a6e401f2c43d9c3cf8eb..1c327067d488cc916d082a797b161cb7836ffa2e 100644 index b6461fdd77895fbeae10e92c76e8799c7e846ac5..7aceefc28f310e704ca8803e95c40ada13718988 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -294,6 +294,7 @@ public class ServerChunkCache extends ChunkSource { @@ -393,6 +393,7 @@ public class ServerChunkCache extends ChunkSource {
// Paper start - async chunk io/loading @Nullable
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system @Override
// Paper end public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) {
+ final int x1 = x; final int z1 = z; // Paper - conflict on variable change
if (Thread.currentThread() != this.mainThread) {
return (ChunkAccess) CompletableFuture.supplyAsync(() -> {
return this.getChunk(x, z, leastStatus, create);
@@ -426,6 +427,7 @@ public class ServerChunkCache extends ChunkSource {
Objects.requireNonNull(completablefuture);
if (!completablefuture.isDone()) { // Paper
+ com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x1, z1); // Paper - sync load info + com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x1, z1); // Paper - sync load info
this.level.timings.syncChunkLoad.startTiming(); // Paper this.level.timings.syncChunkLoad.startTiming(); // Paper
chunkproviderserver_b.managedBlock(completablefuture::isDone); chunkproviderserver_b.managedBlock(completablefuture::isDone);
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system this.level.timings.syncChunkLoad.stopTiming(); // Paper
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 62ea2bb2fdd1f2de31b08c88193887989fbd3ece..fc6cf61664b4c64c9319c61b447a02e2cc38558f 100644 index 9bcf1fee8df0186f7355bf37ba7c39553bdbf1d0..79229f3563cc642568487ea92840c8753c536240 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -651,6 +651,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -416,6 +416,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.entityLookup = new io.papermc.paper.chunk.system.entity.EntityLookup(this, new EntityCallbacks()); // Paper - rewrite chunk system this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
} }
+ // Paper start + // Paper start

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check
Co-Authored-By: MiniDigger <admin@benndorf.dev> Co-Authored-By: MiniDigger <admin@benndorf.dev>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 863a983165aa845abbf7b8f2a3cd0c5057bb47d8..2badebc0d7954c6d343bfd66dd14dc2d2d4661d7 100644 index bf34d343fd0b3158bf00f9ce22b45dfd82c75dc5..8c9a6e1b34865c3a15eea40637d6a4b540396a5c 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -200,23 +200,27 @@ public class Main { @@ -200,23 +200,27 @@ public class Main {

View File

@ -5,13 +5,13 @@ Subject: [PATCH] Entity Jump API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 1d0d8971675d882a54e5c3eb1315ed53be9338be..11e84ea16177f11b834bcf13e9b36985ac4cfd4e 100644 index ca179b062fa6142da584ad1a091e63d89403a0f0..4008d402b01d7ea25a56d16ebbf00e182b0d60c3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3255,8 +3255,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3284,8 +3284,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else if (this.isInLava() && (!this.onGround() || d7 > d8)) { } else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
this.jumpInLiquid(FluidTags.LAVA); this.jumpInLiquid(FluidTags.LAVA);
} else if ((this.onGround() || flag && d7 <= d8) && this.noJumpDelay == 0) { } else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
+ if (new com.destroystokyo.paper.event.entity.EntityJumpEvent(getBukkitLivingEntity()).callEvent()) { // Paper + if (new com.destroystokyo.paper.event.entity.EntityJumpEvent(getBukkitLivingEntity()).callEvent()) { // Paper
this.jumpFromGround(); this.jumpFromGround();
this.noJumpDelay = 10; this.noJumpDelay = 10;
@ -20,10 +20,10 @@ index 1d0d8971675d882a54e5c3eb1315ed53be9338be..11e84ea16177f11b834bcf13e9b36985
} else { } else {
this.noJumpDelay = 0; this.noJumpDelay = 0;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
index 278a9842455a222ed9102fc7a95585755dfd5d7b..a190826d87ca5e05c408ef488986a29280b1b3d2 100644 index 3d947293d33407e5d24f8fba738ab872e1d890b6..27e1ed14f2ae4f7922c7c3bc1ac21156bafcb0ba 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
@@ -524,7 +524,9 @@ public class Panda extends Animal { @@ -527,7 +527,9 @@ public class Panda extends Animal {
Panda entitypanda = (Panda) iterator.next(); Panda entitypanda = (Panda) iterator.next();
if (!entitypanda.isBaby() && entitypanda.onGround() && !entitypanda.isInWater() && entitypanda.canPerformAction()) { if (!entitypanda.isBaby() && entitypanda.onGround() && !entitypanda.isInWater() && entitypanda.canPerformAction()) {
@ -34,10 +34,10 @@ index 278a9842455a222ed9102fc7a95585755dfd5d7b..a190826d87ca5e05c408ef488986a292
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
index 02f962eed1d85e8c532264f63666d26401d6a8f2..c245acdbaa84cc795e341ed042a0d8d90383f070 100644 index 344e933311f5cdccb66069d486b111a003639dfe..add3cd866452df727107e94fb2039bddebe909be 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java --- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java +++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
@@ -184,7 +184,9 @@ public class Ravager extends Raider { @@ -167,7 +167,9 @@ public class Ravager extends Raider {
} }
if (!flag && this.onGround()) { if (!flag && this.onGround()) {
@ -48,7 +48,7 @@ index 02f962eed1d85e8c532264f63666d26401d6a8f2..c245acdbaa84cc795e341ed042a0d8d9
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 2913ad431b09a75106115257729960f8ba1637f4..f0457dd3d179dab3e164279f30690058549e530a 100644 index d5f53ddf1bb24c933bf38efbe142411663ec2470..607e48cf2eb50f477bcacca636cacf27f01342ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -906,5 +906,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -906,5 +906,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 92f96ea37ea73353c17b73721af31c65467dcc0d..7d00dc9bd1fe9167e0122395f901a4700c132f61 100644 index d9e9d363d8b0271cee42479a362f6670c5df38cb..1badb25665edaeb5eb274b770ea50598ba056b22 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -392,6 +392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -392,6 +392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -16,7 +16,7 @@ index 92f96ea37ea73353c17b73721af31c65467dcc0d..7d00dc9bd1fe9167e0122395f901a470
protected int numCollisions = 0; // Paper protected int numCollisions = 0; // Paper
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
@javax.annotation.Nullable @javax.annotation.Nullable
@@ -2200,6 +2201,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2156,6 +2157,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
if (spawnedViaMobSpawner) { if (spawnedViaMobSpawner) {
nbt.putBoolean("Paper.FromMobSpawner", true); nbt.putBoolean("Paper.FromMobSpawner", true);
} }
@ -26,7 +26,7 @@ index 92f96ea37ea73353c17b73721af31c65467dcc0d..7d00dc9bd1fe9167e0122395f901a470
// Paper end // Paper end
return nbt; return nbt;
} catch (Throwable throwable) { } catch (Throwable throwable) {
@@ -2342,6 +2346,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2298,6 +2302,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} }
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status

View File

@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index eaca76dfec9cbe3cbb9972a0c9cf30599816fcda..ee7a7b80f96712830ea92daefb4454df70def170 100644 index 01ce54dba8c3efcc147b694ba57e070686375f68..ceca2bccb4c36713cf15fb1d7cab0cbd3f31aff5 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -399,13 +399,18 @@ public class CraftEventFactory { @@ -401,13 +401,18 @@ public class CraftEventFactory {
} }
org.bukkit.inventory.ItemStack item; org.bukkit.inventory.ItemStack item;

View File

@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where:
* On normal difficulty they will have a 50% of getting infected or dying. * On normal difficulty they will have a 50% of getting infected or dying.
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index fed8b065172f40a2a5c251f46303fc4d72c9653a..fae2c89900db222f7319b5675ef4b470beca251b 100644 index 2be074ecbc131b68574cf77ba9cab96424715522..55e4416a7988690ecfc8da6e83b43cbf9adda33b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -451,12 +451,16 @@ public class Zombie extends Monster { @@ -452,12 +452,16 @@ public class Zombie extends Monster {
public boolean killedEntity(ServerLevel world, LivingEntity other) { public boolean killedEntity(ServerLevel world, LivingEntity other) {
boolean flag = super.killedEntity(world, other); boolean flag = super.killedEntity(world, other);

View File

@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it
easier to inline due to code size easier to inline due to code size
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 24a1d04d01d01262facbac9c3683c21b7f54fd6d..c3760f22fcc56ccb25e3315823054416c2172386 100644 index fdb8c2346cb2e444b75f863a8a8199da84f25193..f229838bf0566d61b2716463ff95fcc0b04d2e97 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -380,18 +380,20 @@ public class LevelChunk extends ChunkAccess { @@ -380,18 +380,20 @@ public class LevelChunk extends ChunkAccess {
@ -47,10 +47,10 @@ index 24a1d04d01d01262facbac9c3683c21b7f54fd6d..c3760f22fcc56ccb25e3315823054416
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
index 4eeb719b40ff1c18a7cdda7ecc6b135dbedd626e..b8fee4f8a0cfe32b9ef7f3f3cf818cbaec0d3fca 100644 index 2c3ea88bac229df67bd742e16d2106d80bcc8889..789664d53584c7d958572c63db22f904fb411a58 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
@@ -46,7 +46,7 @@ public class LevelChunkSection { @@ -43,7 +43,7 @@ public class LevelChunkSection {
} }
public FluidState getFluidState(int x, int y, int z) { public FluidState getFluidState(int x, int y, int z) {

View File

@ -125,10 +125,10 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
public static void registerCommands(final MinecraftServer server) { public static void registerCommands(final MinecraftServer server) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 21d7196cdc694a581c8a3232a39e7454c0b30f56..498f06aa1d8b2c20f5bf31d6751f08cf1eb4240f 100644 index 5b274f766e8cf55151ac6499fa1a68b9a0816b57..0fa1d9f299194ff660130a1cf33d9a405d56a842 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -251,6 +251,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -247,6 +247,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private net.kyori.adventure.text.Component motd; // Paper - Adventure private net.kyori.adventure.text.Component motd; // Paper - Adventure
private int playerIdleTimeout; private int playerIdleTimeout;
public final long[] tickTimes; public final long[] tickTimes;
@ -140,7 +140,7 @@ index 21d7196cdc694a581c8a3232a39e7454c0b30f56..498f06aa1d8b2c20f5bf31d6751f08cf
@Nullable @Nullable
private KeyPair keyPair; private KeyPair keyPair;
@Nullable @Nullable
@@ -1340,6 +1345,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1328,6 +1333,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.averageTickTime = this.averageTickTime * 0.8F + (float) j / 1000000.0F * 0.19999999F; this.averageTickTime = this.averageTickTime * 0.8F + (float) j / 1000000.0F * 0.19999999F;
long k = Util.getNanos(); long k = Util.getNanos();
@ -149,10 +149,10 @@ index 21d7196cdc694a581c8a3232a39e7454c0b30f56..498f06aa1d8b2c20f5bf31d6751f08cf
+ tickTimes10s.add(this.tickCount, j); + tickTimes10s.add(this.tickCount, j);
+ tickTimes60s.add(this.tickCount, j); + tickTimes60s.add(this.tickCount, j);
+ // Paper end + // Paper end
this.frameTimer.logFrameDuration(k - i); this.logTickTime(k - i);
this.profiler.pop(); this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -2570,4 +2580,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2574,4 +2584,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) { public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) {
} }
@ -184,10 +184,10 @@ index 21d7196cdc694a581c8a3232a39e7454c0b30f56..498f06aa1d8b2c20f5bf31d6751f08cf
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 06e0904b47838c4bed2ae85a8f329e3035543b5e..677ddf5e368a5407e6935973a87eedb19b02dfee 100644 index da2c850b1625758c0bb387930788b6e9f03555d9..7ac0cdf96740887b97616290b27eb63665294546 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2530,6 +2530,16 @@ public final class CraftServer implements Server { @@ -2533,6 +2533,16 @@ public final class CraftServer implements Server {
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
}; };
} }

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 677ddf5e368a5407e6935973a87eedb19b02dfee..4d003aa1066a1fd56683be9ebe4095dddcb1ed83 100644 index 7ac0cdf96740887b97616290b27eb63665294546..712bee34303ca3ceec4520e265f4defdc27ea8ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2761,5 +2761,10 @@ public final class CraftServer implements Server { @@ -2764,5 +2764,10 @@ public final class CraftServer implements Server {
public int getCurrentTick() { public int getCurrentTick() {
return net.minecraft.server.MinecraftServer.currentTick; return net.minecraft.server.MinecraftServer.currentTick;
} }

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format. Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index bf8cb65df8e6ecc76e065625e89fd296d71b15b4..173d17adb76f5f08828048236f544d25f53152ea 100644 index 6f2b9d0d2cc8b18d74b59bf77fec394d14211a24..3544ffd3af1e71cfd6fb198b4fa45da3167cd62d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -466,6 +466,52 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -467,6 +467,52 @@ public final class CraftMagicNumbers implements UnsafeValues {
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.PaperVersionFetcher(); return new com.destroystokyo.paper.PaperVersionFetcher();
} }

View File

@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
world and the world age for the start day. world and the world age for the start day.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a1f75dfbe975ff0150cb529266c3c0884c8e2d45..60564b0624eb253443831e1ba1c3f3dcade6b8ef 100644 index 8af7966008a5f06c9a33f0c4396b940ecec623e8..b8a54046bdfd7ae0650a3758af3a56d0d06d0661 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -244,6 +244,7 @@ public class ServerPlayer extends Player { @@ -242,6 +242,7 @@ public class ServerPlayer extends Player {
public boolean wonGame; public boolean wonGame;
private int containerUpdateDelay; // Paper private int containerUpdateDelay; // Paper
public long loginTime; // Paper public long loginTime; // Paper

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
Bugs in the connection logic appears to leave stale connections even, preventing shutdown Bugs in the connection logic appears to leave stale connections even, preventing shutdown
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index ff908bab7d83e5c049d86a0c8ea235ca3c69936b..56b17a1ce545ec43bf588d4ab438440fb829bc97 100644 index f17116ee619338e1dc8ae1fb9d5b18ad28164ba3..6d2f49204e6a8fe8057a0c83f23adae3e1dbf00c 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -390,11 +390,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -390,11 +390,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

View File

@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing. Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e0c9b9b61fa718d81d6e4438d7c12a833dfd7b64..a8c4c7298e127e5b60a3b43ad168976d29901bc5 100644 index 842f7423d113f23d4b95162c81d407efd765679a..b652019a5feffeeec2871011e2df0d609e1a7647 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1031,6 +1031,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1550,6 +1550,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void addEntity(Entity entity) { public void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
@ -25,10 +25,10 @@ index e0c9b9b61fa718d81d6e4438d7c12a833dfd7b64..a8c4c7298e127e5b60a3b43ad168976d
EntityType<?> entitytypes = entity.getType(); EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16; int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index fc6cf61664b4c64c9319c61b447a02e2cc38558f..2838e035204e95defce0d7488248b2e57bf71fab 100644 index 79229f3563cc642568487ea92840c8753c536240..4307b72acc389ccab97b2b7f3f824ddeca5a3cda 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2473,7 +2473,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2217,7 +2217,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTrackingStart(Entity entity) { public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@ -37,7 +37,7 @@ index fc6cf61664b4c64c9319c61b447a02e2cc38558f..2838e035204e95defce0d7488248b2e5
if (entity instanceof ServerPlayer) { if (entity instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entity; ServerPlayer entityplayer = (ServerPlayer) entity;
@@ -2507,6 +2507,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2251,6 +2251,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit

View File

@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
This is safe because Spectators are skipped in unloaded chunks too in vanilla. This is safe because Spectators are skipped in unloaded chunks too in vanilla.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 60564b0624eb253443831e1ba1c3f3dcade6b8ef..8be5973f90c7c6959e572072951d61f65f0cd2f3 100644 index b8a54046bdfd7ae0650a3758af3a56d0d06d0661..ddfc108db57e3df813e9cef794f00b95d86f5078 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -724,7 +724,7 @@ public class ServerPlayer extends Player { @@ -683,7 +683,7 @@ public class ServerPlayer extends Player {
public void doTick() { public void doTick() {
try { try {

View File

@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
due to 1.15's new queue but processed while dead. due to 1.15's new queue but processed while dead.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 078986fb32eeecacc954ad6719e981ed8b3a2350..a8731cf957da9aad7ed6f5d372500bc34afd32ca 100644 index 9d252aea2c372f9a6b46319564dc6dc5e94d9a91..00d9dd5affd62ceb35bb783d6bcc9e1e600c0fb4 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1160,7 +1160,7 @@ public abstract class Player extends LivingEntity { @@ -1166,7 +1166,7 @@ public abstract class Player extends LivingEntity {
@Override @Override
protected boolean isImmobile() { protected boolean isImmobile() {

View File

@ -14,19 +14,19 @@ movement will load only the chunk the player enters anyways and avoids loading
massive amounts of surrounding chunks due to large AABB lookups. massive amounts of surrounding chunks due to large AABB lookups.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 2848e657209a699b12fc0e1fd2bde54d661f07f0..9c3ab91555f60a1a3cd8a89e883cfbdedc53f3f8 100644 index b4ded40387006821433db1de85ed1c2347757155..6a170e73f0ca6233a742dfa13ce496e0b770b0ac 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -827,6 +827,7 @@ public abstract class PlayerList { @@ -824,6 +824,7 @@ public abstract class PlayerList {
entityplayer1.setShiftKeyDown(false);
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
// CraftBukkit end
+ worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper + worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper
while (avoidSuffocation && !worldserver1.noCollision((Entity) entityplayer1) && entityplayer1.getY() < (double) worldserver1.getMaxBuildHeight()) { while (avoidSuffocation && !worldserver1.noCollision((Entity) entityplayer1) && entityplayer1.getY() < (double) worldserver1.getMaxBuildHeight()) {
// CraftBukkit end
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ()); entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 7d00dc9bd1fe9167e0122395f901a4700c132f61..70d1d664efa323cbb0c07fd5aa746122261b6bfa 100644 index 1badb25665edaeb5eb274b770ea50598ba056b22..961213739ba810c6e39aca76a32d74bcf2a58ad3 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -92,7 +92,7 @@ index f2c423154ed6a00882a46d93b69ed4f6ba73782c..a3eaf80b020c3bbc0306c5d17659ee66
} }
diff --git a/src/main/java/net/minecraft/world/level/CollisionGetter.java b/src/main/java/net/minecraft/world/level/CollisionGetter.java diff --git a/src/main/java/net/minecraft/world/level/CollisionGetter.java b/src/main/java/net/minecraft/world/level/CollisionGetter.java
index 30d037a8f890e06b27c5d3609bdd10e6b11cfb13..06107d69dff9f0b52a5f188095cbd9a9efa5684c 100644 index 140d10807a3a6806578cd203ba58383590c2f2c0..c476e37df8a75d77f5093b2a449e04f25ef2c2dd 100644
--- a/src/main/java/net/minecraft/world/level/CollisionGetter.java --- a/src/main/java/net/minecraft/world/level/CollisionGetter.java
+++ b/src/main/java/net/minecraft/world/level/CollisionGetter.java +++ b/src/main/java/net/minecraft/world/level/CollisionGetter.java
@@ -44,11 +44,13 @@ public interface CollisionGetter extends BlockGetter { @@ -44,11 +44,13 @@ public interface CollisionGetter extends BlockGetter {

View File

@ -13,19 +13,19 @@ By skipping this, we avoid potential for a large spike on server start.
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8be5973f90c7c6959e572072951d61f65f0cd2f3..c7d4341642df2fc847e139cf03992b13645afa3e 100644 index ddfc108db57e3df813e9cef794f00b95d86f5078..3ebcbda84de7817ff1aab5cdac6566f9eb05f2dd 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -377,7 +377,7 @@ public class ServerPlayer extends Player { @@ -335,7 +335,7 @@ public class ServerPlayer extends Player {
this.stats = server.getPlayerList().getPlayerStats(this); this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this);
this.setMaxUpStep(1.0F); this.setMaxUpStep(1.0F);
- this.fudgeSpawnLocation(world); - this.fudgeSpawnLocation(world);
+ // this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join + // this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join
this.updateOptions(clientOptions);
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
@@ -570,7 +570,7 @@ public class ServerPlayer extends Player {
@@ -611,7 +611,7 @@ public class ServerPlayer extends Player {
position = Vec3.atCenterOf(world.getSharedSpawnPos()); position = Vec3.atCenterOf(world.getSharedSpawnPos());
} }
this.setLevel(world); this.setLevel(world);
@ -35,10 +35,10 @@ index 8be5973f90c7c6959e572072951d61f65f0cd2f3..c7d4341642df2fc847e139cf03992b13
this.gameMode.setLevel((ServerLevel) world); this.gameMode.setLevel((ServerLevel) world);
} }
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9c3ab91555f60a1a3cd8a89e883cfbdedc53f3f8..5b8b345ade30012371bdda744ba82c585f74db07 100644 index 6a170e73f0ca6233a742dfa13ce496e0b770b0ac..89310108e94f3198c5f4ecd65e414a2c7af262cb 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -236,6 +236,7 @@ public abstract class PlayerList { @@ -228,6 +228,7 @@ public abstract class PlayerList {
// Paper start // Paper start
if (nbttagcompound == null) { if (nbttagcompound == null) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login