[ci skip] Move chunk system patch back
This commit is contained in:
parent
b700460999
commit
1831240d1c
244 changed files with 994 additions and 1228 deletions
|
@ -8,10 +8,10 @@ Add per player no-tick, tick, and send view distances.
|
|||
Also add send/no-tick view distance to World.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 4c878531d9d8d0aee6832fd10b339a32f219fa9a..52977ba7aba446f74bf6befe065f722eaafee0c2 100644
|
||||
index 4c878531d9d8d0aee6832fd10b339a32f219fa9a..1ea851c658243aa3bfcdbffca3df5ded9386da98 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2875,6 +2875,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2875,6 +2875,66 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Set<FeatureFlag> getFeatureFlags();
|
||||
|
||||
|
@ -38,7 +38,9 @@ index 4c878531d9d8d0aee6832fd10b339a32f219fa9a..52977ba7aba446f74bf6befe065f722e
|
|||
+ * @deprecated Use {@link #getViewDistance()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ int getNoTickViewDistance();
|
||||
+ default int getNoTickViewDistance() {
|
||||
+ return this.getViewDistance();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the no-tick view distance for this world.
|
||||
|
@ -50,7 +52,9 @@ index 4c878531d9d8d0aee6832fd10b339a32f219fa9a..52977ba7aba446f74bf6befe065f722e
|
|||
+ * @deprecated Use {@link #setViewDistance(int)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void setNoTickViewDistance(int viewDistance);
|
||||
+ default void setNoTickViewDistance(int viewDistance) {
|
||||
+ this.setViewDistance(viewDistance);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the sending view distance for this world.
|
||||
|
@ -75,10 +79,10 @@ index 4c878531d9d8d0aee6832fd10b339a32f219fa9a..52977ba7aba446f74bf6befe065f722e
|
|||
* Represents various map environment types that a world may be
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index c03b5f24304d28a5ebabdf6301165cf04dd5176c..15d73986499cc190de925c1024cea6dfdf930065 100644
|
||||
index c03b5f24304d28a5ebabdf6301165cf04dd5176c..1f5402afd5e34c5da0d59d9c604f6da8c015950e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2391,6 +2391,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2391,6 +2391,82 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param affects Whether the player can affect mob spawning
|
||||
*/
|
||||
public void setAffectsSpawning(boolean affects);
|
||||
|
@ -123,7 +127,9 @@ index c03b5f24304d28a5ebabdf6301165cf04dd5176c..15d73986499cc190de925c1024cea6df
|
|||
+ * @deprecated Use {@link #getViewDistance()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public int getNoTickViewDistance();
|
||||
+ default int getNoTickViewDistance() {
|
||||
+ return this.getViewDistance();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the no-ticking view distance for this player.
|
||||
|
@ -135,7 +141,9 @@ index c03b5f24304d28a5ebabdf6301165cf04dd5176c..15d73986499cc190de925c1024cea6df
|
|||
+ * @deprecated Use {@link #setViewDistance(int)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setNoTickViewDistance(int viewDistance);
|
||||
+ default void setNoTickViewDistance(int viewDistance) {
|
||||
+ this.setViewDistance(viewDistance);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the sending view distance for this player.
|
||||
|
|
|
@ -93,10 +93,10 @@ index 4016129ead172c5f5b550482f523921d39df046f..4d500904b28375f8517aa05075667da2
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 4433ec84c717f9f922384836b45d636be76b3463..3e6f25bc92cd4711b9875f169b7d5071c1dbac12 100644
|
||||
index 36aeb88d10e0e30c8572d1eccaa2e97825e1a986..792fe65d970a5cd4bac20350c7177a5d16dff9ba 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2904,6 +2904,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2908,6 +2908,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@ index abdca9fe5acc90f167219eb769ece66c35682bb1..b3aa3dc6aa5afbc36cc86741b4cba56f
|
|||
/**
|
||||
* 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
|
||||
index 3e6f25bc92cd4711b9875f169b7d5071c1dbac12..c8fa6733c6c8c08f653069d4630e35df4e29bd04 100644
|
||||
index 792fe65d970a5cd4bac20350c7177a5d16dff9ba..c67dd3cfd1d359b1f11c3f7c6fb1e58f2abe5610 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2865,10 +2865,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2869,10 +2869,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Open a Sign for editing by the Player.
|
||||
*
|
||||
|
|
|
@ -5,10 +5,10 @@ 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
|
||||
index e8497492713a97ef05dff838bdc2a8880111a0e1..f17fadd635f7f0bc1b55cca4947377942e50aceb 100644
|
||||
index 0b3f6fabdf8439fba748a3770fa202161bbeb26f..cb75b93f740b6d9a155a7c6073252412b5a9aac0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3082,6 +3082,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3086,6 +3086,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void setPlayerProfile(com.destroystokyo.paper.profile.@NotNull PlayerProfile profile);
|
||||
// Paper end - Player Profile API
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ index f9c9ae463aacd593e3aa9caf037ea1e23d56c780..f8ae143acbf586d5279b44f7311ca97f
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 0b202d378d50946f43434e70d9d511cac06749b0..cf42f6e57e96aa9cb4465e34a6e3f8709de4ca09 100644
|
||||
index 02b4ffa6b918269bd64f7c518fcceef1f6990737..f0878c7539696cc0676e6010e88914d3850acf20 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -46,7 +46,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
|
@ -600,7 +600,7 @@ index e455eb21abf121dc6ff10ff8a13dd06f67096a8f..bbc01e7c192ae6689c301670047ff114
|
|||
return origin;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index b13f6d4ae42c981b051c6ef81b0f572039faded4..59a52583f433859b0a12a44c53970db87cde08aa 100644
|
||||
index 985dcea9ebed2fc5a3bfb8581cbd0ee4bf89ee8f..08eb8744104f1bbbd4f96972e0fb68f1aa4049f5 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -416,9 +416,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
|
@ -634,7 +634,7 @@ index b13f6d4ae42c981b051c6ef81b0f572039faded4..59a52583f433859b0a12a44c53970db8
|
|||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
@@ -3924,9 +3928,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -3928,9 +3932,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* Gets the dimension ID of this environment
|
||||
*
|
||||
* @return dimension ID
|
||||
|
@ -646,7 +646,7 @@ index b13f6d4ae42c981b051c6ef81b0f572039faded4..59a52583f433859b0a12a44c53970db8
|
|||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -3936,9 +3940,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -3940,9 +3944,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*
|
||||
* @param id The ID of the environment
|
||||
* @return The environment
|
||||
|
@ -659,7 +659,7 @@ index b13f6d4ae42c981b051c6ef81b0f572039faded4..59a52583f433859b0a12a44c53970db8
|
|||
public static Environment getEnvironment(int id) {
|
||||
return lookup.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 78f6cc1a8a8de05aec6f551f8a5f425944f0ffa3..653a83b7ceb5cec1d92aed5250ae50e714fe5f9f 100644
|
||||
index f3a18e337a579b602b1289bccdf454334a663fcf..c22f333174bd6b8860ee06a71f713e4be8fa64ec 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -517,7 +517,7 @@ public interface Block extends Metadatable, Translatable {
|
||||
|
@ -859,7 +859,7 @@ index 95c79c5fa0c4e30201f887da6467ce5f81c8a255..7f9c4d4b430a3f0276461346ff2621ba
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index e8d9b33f57b6eeb310662a63dde809ffaa49fcd2..b6ef3c47053747964289b99fc28be2e2452200b6 100644
|
||||
index cb75b93f740b6d9a155a7c6073252412b5a9aac0..23ed4d9bbd0e0ed44771c1663b707b025f242c60 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1498,11 +1498,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
|
|
@ -229,10 +229,10 @@ index 0000000000000000000000000000000000000000..cf67dc7d465223710adbf2b798109f52
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 604172b2362028a98599e463c18251ca12fabb49..dd9527b973239e20e62289ea8b4931623be6f7be 100644
|
||||
index 23ed4d9bbd0e0ed44771c1663b707b025f242c60..5da568d7760798e0f2df7d2e9bceadccf7162692 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3101,6 +3101,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3105,6 +3105,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void resetCooldown();
|
||||
// Paper end - attack cooldown API
|
||||
|
||||
|
|
|
@ -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
|
||||
index dd9527b973239e20e62289ea8b4931623be6f7be..5311c533883e75bb8bf6017f6404dc3d02f1ea7a 100644
|
||||
index 5da568d7760798e0f2df7d2e9bceadccf7162692..1e2232ab9ac8e3dd169ad5a444fff529350ee2fd 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3214,6 +3214,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3218,6 +3218,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
// Paper end
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ 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
|
||||
index 5311c533883e75bb8bf6017f6404dc3d02f1ea7a..7bd0cf4ce7d79a69bbb47129d6a3917a54dd9a5a 100644
|
||||
index 1e2232ab9ac8e3dd169ad5a444fff529350ee2fd..51e9a9f5843c97dd09e6f8e09f80221fe2b66ee6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3108,6 +3108,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3112,6 +3112,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
<T> @NotNull T getClientOption(com.destroystokyo.paper.@NotNull ClientOption<T> option);
|
||||
// Paper end - client option API
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ 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
|
||||
index 7bd0cf4ce7d79a69bbb47129d6a3917a54dd9a5a..a1bf0abc5a22f75e2cf3a981fc917915ae7ef00f 100644
|
||||
index 51e9a9f5843c97dd09e6f8e09f80221fe2b66ee6..202e6a5cf87fbbaa28081be2f34227bb0b414839 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3127,6 +3127,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3131,6 +3131,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
}
|
||||
// Paper end - elytra boost API
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ index 0000000000000000000000000000000000000000..c8b5b570d44da9524bfc59c7e11b2ae5
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 953bb49b7079647450d3453356d1c8a91be94c01..2ea66188468cf32bcaedc5167d4b9b0c6ea9b0b3 100644
|
||||
index f090368dbb5acf352e1bee34d78b55eb92373c6d..8322d22f34968d579b92c581b36544d42b7732cd 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -126,10 +126,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
|
@ -158,10 +158,10 @@ index 953bb49b7079647450d3453356d1c8a91be94c01..2ea66188468cf32bcaedc5167d4b9b0c
|
|||
* Teleports this entity to the given location. If this entity is riding a
|
||||
* 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
|
||||
index e2333a5f8e357ada69ff8857d3b1c666f51ac909..da4d8d36fdf8006e308220cb7665c9e0302e5879 100644
|
||||
index 28d80415ef153e8e34faaae829a58556922c6024..d673de42d7d7eadc3101a70c297d89e406c3814e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3287,6 +3287,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3291,6 +3291,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
String getClientBrandName();
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ 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
|
||||
index da4d8d36fdf8006e308220cb7665c9e0302e5879..541ac9cf8f4af2386a5c2930cbd8fa81a48d8445 100644
|
||||
index d673de42d7d7eadc3101a70c297d89e406c3814e..ae3a4f35a35df94496a73acd4127d0ab22fcf877 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3171,6 +3171,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3175,6 +3175,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void sendOpLevel(byte level);
|
||||
// Paper end - sendOpLevel API
|
||||
|
||||
|
|
|
@ -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
|
||||
index 541ac9cf8f4af2386a5c2930cbd8fa81a48d8445..c79a3583ccbd808df6ca0ef2912bfed4f417c387 100644
|
||||
index ae3a4f35a35df94496a73acd4127d0ab22fcf877..2abb6c19655bad636819097c72c5e210c1b7d98d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3351,6 +3351,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3355,6 +3355,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);
|
||||
// Paper end - Teleport API
|
||||
|
||||
|
|
|
@ -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
|
||||
index c79a3583ccbd808df6ca0ef2912bfed4f417c387..5b1233ff2a5cdda75263eae86f96052bc28e9f5c 100644
|
||||
index 2abb6c19655bad636819097c72c5e210c1b7d98d..6b998eccff579c8491786e6df3e88ce48fb14dd6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3367,6 +3367,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3371,6 +3371,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param silent whether sound should be silenced
|
||||
*/
|
||||
void showElderGuardian(boolean silent);
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add player idle duration API
|
|||
Implements API for getting and resetting a player's idle duration.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 8ca61bca18c5520d20b0405d5add37759349560b..c09f423fe2a029c933bd2697c8ff104fc4230cf0 100644
|
||||
index 1ff74c6fb0dee02dad1d551d67a3c64bd9ebafa9..3fbad74bc9f0e95e19b0b17e73d130b4b257ee23 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3508,6 +3508,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3512,6 +3512,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void increaseWardenWarningLevel();
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ index 0000000000000000000000000000000000000000..c01b4393439838976965823298f12e47
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..73a34b4e378e6012a01c8ac8b092248298be6648
|
||||
index 0000000000000000000000000000000000000000..57e6e857c84234bf0c137058ae35e6fb0e9b124f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -0,0 +1,309 @@
|
||||
|
@ -686,7 +686,7 @@ index 0000000000000000000000000000000000000000..73a34b4e378e6012a01c8ac8b0922482
|
|||
+
|
||||
+ @PostProcess
|
||||
+ private void postProcess() {
|
||||
+ io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.init(this);
|
||||
+ //io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.init(this);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -2662,10 +2662,10 @@ index 0000000000000000000000000000000000000000..a5f706d6f716b2a463ae58adcde69d9e
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..87ae7d64e67ebae5ab53cc239cdf6580dca31652
|
||||
index 0000000000000000000000000000000000000000..05bddc0697faa8d9d9955d89d76930c84ef7df0d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||
@@ -0,0 +1,295 @@
|
||||
@@ -0,0 +1,296 @@
|
||||
+package io.papermc.paper.chunk.system;
|
||||
+
|
||||
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
|
||||
|
@ -2762,7 +2762,7 @@ index 0000000000000000000000000000000000000000..87ae7d64e67ebae5ab53cc239cdf6580
|
|||
+ }
|
||||
+ };
|
||||
+
|
||||
+ final ChunkHolder holder = level.chunkSource.chunkMap.getUpdatingChunkIfPresent(CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
||||
+ final ChunkHolder holder = level.chunkSource.chunkMap.updatingChunkMap.get(CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
||||
+
|
||||
+ if (holder == null || holder.getTicketLevel() > minLevel) {
|
||||
+ loadCallback.accept(null);
|
||||
|
@ -2790,7 +2790,8 @@ index 0000000000000000000000000000000000000000..87ae7d64e67ebae5ab53cc239cdf6580
|
|||
+ public static void scheduleTickingState(final ServerLevel level, final int chunkX, final int chunkZ,
|
||||
+ final FullChunkStatus toStatus, final boolean addTicket,
|
||||
+ final PrioritisedExecutor.Priority priority, final Consumer<LevelChunk> onComplete) {
|
||||
+ if (toStatus == ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
||||
+ // This method goes unused until the chunk system rewrite
|
||||
+ if (toStatus == FullChunkStatus.INACCESSIBLE) {
|
||||
+ throw new IllegalArgumentException("Cannot wait for INACCESSIBLE status");
|
||||
+ }
|
||||
+
|
||||
|
@ -2829,7 +2830,7 @@ index 0000000000000000000000000000000000000000..87ae7d64e67ebae5ab53cc239cdf6580
|
|||
+ }
|
||||
+ };
|
||||
+
|
||||
+ final ChunkHolder holder = level.chunkSource.chunkMap.getUpdatingChunkIfPresent(CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
||||
+ final ChunkHolder holder = level.chunkSource.chunkMap.updatingChunkMap.get(CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
||||
+
|
||||
+ if (holder == null || holder.getTicketLevel() > minLevel) {
|
||||
+ loadCallback.accept(null);
|
||||
|
@ -2838,11 +2839,11 @@ index 0000000000000000000000000000000000000000..87ae7d64e67ebae5ab53cc239cdf6580
|
|||
+
|
||||
+ final CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> tickingState;
|
||||
+ switch (toStatus) {
|
||||
+ case BORDER: {
|
||||
+ case FULL: {
|
||||
+ tickingState = holder.getFullChunkFuture();
|
||||
+ break;
|
||||
+ }
|
||||
+ case TICKING: {
|
||||
+ case BLOCK_TICKING: {
|
||||
+ tickingState = holder.getTickingChunkFuture();
|
||||
+ break;
|
||||
+ }
|
||||
|
@ -2942,19 +2943,19 @@ index 0000000000000000000000000000000000000000..87ae7d64e67ebae5ab53cc239cdf6580
|
|||
+ }
|
||||
+
|
||||
+ public static int getLoadViewDistance(final ServerPlayer player) {
|
||||
+ final ServerLevel level = player.getLevel();
|
||||
+ final ServerLevel level = player.serverLevel();
|
||||
+ if (level == null) {
|
||||
+ return Bukkit.getViewDistance() + 1;
|
||||
+ return Bukkit.getViewDistance();
|
||||
+ }
|
||||
+ return level.chunkSource.chunkMap.getEffectiveViewDistance() + 1;
|
||||
+ return level.chunkSource.chunkMap.getPlayerViewDistance(player);
|
||||
+ }
|
||||
+
|
||||
+ public static int getTickViewDistance(final ServerPlayer player) {
|
||||
+ final ServerLevel level = player.getLevel();
|
||||
+ final ServerLevel level = player.serverLevel();
|
||||
+ if (level == null) {
|
||||
+ return Bukkit.getSimulationDistance();
|
||||
+ }
|
||||
+ return level.chunkSource.chunkMap.distanceManager.getSimulationDistance();
|
||||
+ return level.chunkSource.chunkMap.distanceManager.simulationDistance;
|
||||
+ }
|
||||
+
|
||||
+ private ChunkSystem() {
|
||||
|
@ -6345,7 +6346,7 @@ index 1641bdf8725df778ba91bf5cd22c1ebbb3745058..facfdbb87e89f4db33ce13233c2ba436
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b717d3b03 100644
|
||||
index f083356fe490ecebdc1486784f4833d778b816f4..59b608d9722898470010413bef0cb6a6b83500b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -168,6 +168,62 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
@ -6411,7 +6412,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
||||
super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
||||
this.visibleChunkMap = this.updatingChunkMap.clone();
|
||||
@@ -221,8 +277,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -221,7 +277,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.overworldDataStorage = persistentStateManagerFactory;
|
||||
this.poiManager = new PoiManager(path.resolve("poi"), dataFixer, dsync, iregistrycustom, world);
|
||||
this.setServerViewDistance(viewDistance);
|
||||
|
@ -6420,18 +6421,17 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
+ this.regionManagers.add(this.dataRegionManager);
|
||||
+ this.nearbyPlayers = new io.papermc.paper.util.player.NearbyPlayers(this.level);
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ // always use accessor, so folia can override
|
||||
+ public final io.papermc.paper.util.player.NearbyPlayers getNearbyPlayers() {
|
||||
+ return this.nearbyPlayers;
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
+
|
||||
|
||||
protected ChunkGenerator generator() {
|
||||
return this.generator;
|
||||
}
|
||||
@@ -246,6 +314,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
}
|
||||
|
@ -6443,23 +6443,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
private static double euclideanDistanceSquared(ChunkPos pos, Entity entity) {
|
||||
double d0 = (double) SectionPos.sectionToBlockCoord(pos.x, 8);
|
||||
double d1 = (double) SectionPos.sectionToBlockCoord(pos.z, 8);
|
||||
@@ -322,6 +394,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ public final int getEffectiveViewDistance() {
|
||||
+ // TODO this needs to be checked on update
|
||||
+ // Mojang currently sets it to +1 of the configured view distance. So subtract one to get the one we really want.
|
||||
+ //TODO check if +0 is correct now
|
||||
+ return this.viewDistance;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
private CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkHolder centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) {
|
||||
if (margin == 0) {
|
||||
ChunkStatus chunkstatus = (ChunkStatus) distanceToStatus.apply(0);
|
||||
@@ -418,9 +499,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -418,9 +490,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
};
|
||||
|
||||
stringbuilder.append("Updating:").append(System.lineSeparator());
|
||||
|
@ -6471,7 +6455,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
CrashReport crashreport = CrashReport.forThrowable(exception, "Chunk loading");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Chunk loading");
|
||||
|
||||
@@ -462,8 +543,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -462,8 +534,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
holder.setTicketLevel(level);
|
||||
} else {
|
||||
holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this.queueSorter, this);
|
||||
|
@ -6486,7 +6470,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
this.updatingChunkMap.put(pos, holder);
|
||||
this.modified = true;
|
||||
}
|
||||
@@ -485,7 +572,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -485,7 +563,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
protected void saveAllChunks(boolean flush) {
|
||||
if (flush) {
|
||||
|
@ -6495,7 +6479,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
MutableBoolean mutableboolean = new MutableBoolean();
|
||||
|
||||
do {
|
||||
@@ -514,7 +601,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -514,7 +592,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
this.flushWorker();
|
||||
} else {
|
||||
|
@ -6504,7 +6488,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
}
|
||||
|
||||
}
|
||||
@@ -533,7 +620,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -533,7 +611,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public boolean hasWork() {
|
||||
|
@ -6513,7 +6497,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
}
|
||||
|
||||
private void processUnloads(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -544,6 +631,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -544,6 +622,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
|
||||
|
||||
if (playerchunk != null) {
|
||||
|
@ -6521,7 +6505,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
this.pendingUnloads.put(j, playerchunk);
|
||||
this.modified = true;
|
||||
++i;
|
||||
@@ -561,7 +649,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -561,7 +640,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
int l = 0;
|
||||
|
@ -6530,7 +6514,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
|
||||
while (l < 20 && shouldKeepTicking.getAsBoolean() && objectiterator.hasNext()) {
|
||||
if (this.saveChunkIfNeeded((ChunkHolder) objectiterator.next())) {
|
||||
@@ -579,7 +667,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -579,7 +658,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (completablefuture1 != completablefuture) {
|
||||
this.scheduleUnload(pos, holder);
|
||||
} else {
|
||||
|
@ -6543,7 +6527,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
if (ichunkaccess instanceof LevelChunk) {
|
||||
((LevelChunk) ichunkaccess).setLoaded(false);
|
||||
}
|
||||
@@ -595,7 +687,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -595,7 +678,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.lightEngine.tryScheduleUpdate();
|
||||
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
|
||||
this.chunkSaveCooldowns.remove(ichunkaccess.getPos().toLong());
|
||||
|
@ -6554,7 +6538,25 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
|
||||
}
|
||||
};
|
||||
@@ -1038,7 +1132,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -992,7 +1077,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
- protected void setServerViewDistance(int watchDistance) {
|
||||
+ public void setServerViewDistance(int watchDistance) { // Paper - public
|
||||
int j = Mth.clamp(watchDistance, 2, 32);
|
||||
|
||||
if (j != this.serverViewDistance) {
|
||||
@@ -1009,7 +1094,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
}
|
||||
|
||||
- int getPlayerViewDistance(ServerPlayer player) {
|
||||
+ public int getPlayerViewDistance(ServerPlayer player) { // Paper - public
|
||||
return Mth.clamp(player.requestedViewDistance(), 2, this.serverViewDistance);
|
||||
}
|
||||
|
||||
@@ -1038,7 +1123,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public int size() {
|
||||
|
@ -6563,7 +6565,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
}
|
||||
|
||||
public DistanceManager getDistanceManager() {
|
||||
@@ -1046,19 +1140,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1046,19 +1131,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
protected Iterable<ChunkHolder> getChunks() {
|
||||
|
@ -6588,7 +6590,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
Optional<ChunkAccess> optional = Optional.ofNullable(playerchunk.getLastAvailable());
|
||||
Optional<LevelChunk> optional1 = optional.flatMap((ichunkaccess) -> {
|
||||
return ichunkaccess instanceof LevelChunk ? Optional.of((LevelChunk) ichunkaccess) : Optional.empty();
|
||||
@@ -1183,6 +1277,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1183,6 +1268,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
player.setChunkTrackingView(ChunkTrackingView.EMPTY);
|
||||
this.updateChunkTracking(player);
|
||||
|
@ -6596,7 +6598,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
} else {
|
||||
SectionPos sectionposition = player.getLastSectionPos();
|
||||
|
||||
@@ -1191,6 +1286,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1191,6 +1277,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.distanceManager.removePlayer(sectionposition, player);
|
||||
}
|
||||
|
||||
|
@ -6604,7 +6606,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
this.applyChunkTrackingView(player, ChunkTrackingView.EMPTY);
|
||||
}
|
||||
|
||||
@@ -1242,6 +1338,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1242,6 +1329,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.updateChunkTracking(player);
|
||||
}
|
||||
|
||||
|
@ -6612,8 +6614,12 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
}
|
||||
|
||||
private void updateChunkTracking(ServerPlayer player) {
|
||||
@@ -1494,7 +1591,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private class ChunkDistanceManager extends DistanceManager {
|
||||
@@ -1491,10 +1579,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
}
|
||||
|
||||
- private class ChunkDistanceManager extends DistanceManager {
|
||||
+ public class ChunkDistanceManager extends DistanceManager { // Paper - public
|
||||
|
||||
protected ChunkDistanceManager(Executor workerExecutor, Executor mainThreadExecutor) {
|
||||
- super(workerExecutor, mainThreadExecutor);
|
||||
|
@ -6622,7 +6628,7 @@ index f083356fe490ecebdc1486784f4833d778b816f4..c721642337652ba4cf984ba3c263655b
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
index 2a805b9e67b7a05dda5f9caa4b63b28c940828d0..42f9f28726bc6ef09ab877ecf663b4caa5003a3a 100644
|
||||
index 2a805b9e67b7a05dda5f9caa4b63b28c940828d0..76005b3c48bfa323a77781c20c63708eeaa66b2b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
@@ -56,8 +56,9 @@ public abstract class DistanceManager {
|
||||
|
@ -6644,20 +6650,7 @@ index 2a805b9e67b7a05dda5f9caa4b63b28c940828d0..42f9f28726bc6ef09ab877ecf663b4ca
|
|||
}
|
||||
|
||||
protected void purgeStaleTickets() {
|
||||
@@ -315,6 +317,12 @@ public abstract class DistanceManager {
|
||||
this.playerTicketManager.updateViewDistance(viewDistance);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ public int getSimulationDistance() {
|
||||
+ return this.simulationDistance;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public void updateSimulationDistance(int simulationDistance) {
|
||||
if (simulationDistance != this.simulationDistance) {
|
||||
this.simulationDistance = simulationDistance;
|
||||
@@ -378,7 +386,7 @@ public abstract class DistanceManager {
|
||||
@@ -378,7 +380,7 @@ public abstract class DistanceManager {
|
||||
}
|
||||
|
||||
public void removeTicketsOnClosing() {
|
||||
|
@ -6667,7 +6660,7 @@ index 2a805b9e67b7a05dda5f9caa4b63b28c940828d0..42f9f28726bc6ef09ab877ecf663b4ca
|
|||
|
||||
while (objectiterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579423d03ac 100644
|
||||
index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..2c4727bf4571e1596bb0696b25104155f6302065 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -49,6 +49,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
||||
|
@ -6678,16 +6671,26 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579
|
|||
private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
|
||||
private final DistanceManager distanceManager;
|
||||
final ServerLevel level;
|
||||
@@ -67,6 +68,231 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -67,6 +68,14 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@Nullable
|
||||
@VisibleForDebug
|
||||
private NaturalSpawner.SpawnState lastSpawnState;
|
||||
+ // Paper start
|
||||
+ public final io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<LevelChunk> tickingChunks = new io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true);
|
||||
+ public final io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<LevelChunk> entityTickingChunks = new io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true);
|
||||
+ final com.destroystokyo.paper.util.concurrent.WeakSeqLock loadedChunkMapSeqLock = new com.destroystokyo.paper.util.concurrent.WeakSeqLock();
|
||||
+ final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<LevelChunk> loadedChunkMap = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>(8192, 0.5f);
|
||||
+
|
||||
+ long chunkFutureAwaitCounter;
|
||||
+ private final LevelChunk[] lastLoadedChunks = new LevelChunk[4 * 4];
|
||||
+
|
||||
+ // Paper end
|
||||
|
||||
public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory) {
|
||||
this.level = world;
|
||||
@@ -92,6 +101,124 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return chunk.getFullChunkNow() != null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Paper start
|
||||
+ private static int getChunkCacheKey(int x, int z) {
|
||||
+ return x & 3 | ((z & 3) << 2);
|
||||
+ }
|
||||
|
@ -6745,119 +6748,6 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579
|
|||
+ return this.loadedChunkMap.get(ChunkPos.asLong(x, z));
|
||||
+ }
|
||||
+
|
||||
+ public final LevelChunk getChunkAtMainThread(int x, int z) {
|
||||
+ LevelChunk ret = this.getChunkAtIfLoadedMainThread(x, z);
|
||||
+ if (ret != null) {
|
||||
+ return ret;
|
||||
+ }
|
||||
+ return (LevelChunk)this.getChunk(x, z, ChunkStatus.FULL, true);
|
||||
+ }
|
||||
+
|
||||
+ long chunkFutureAwaitCounter; // Paper - private -> package private
|
||||
+
|
||||
+ public void getEntityTickingChunkAsync(int x, int z, java.util.function.Consumer<LevelChunk> onLoad) {
|
||||
+ io.papermc.paper.chunk.system.ChunkSystem.scheduleTickingState(
|
||||
+ this.level, x, z, FullChunkStatus.ENTITY_TICKING, true,
|
||||
+ ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL, onLoad
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ public void getTickingChunkAsync(int x, int z, java.util.function.Consumer<LevelChunk> onLoad) {
|
||||
+ io.papermc.paper.chunk.system.ChunkSystem.scheduleTickingState(
|
||||
+ this.level, x, z, FullChunkStatus.BLOCK_TICKING, true,
|
||||
+ ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL, onLoad
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ public void getFullChunkAsync(int x, int z, java.util.function.Consumer<LevelChunk> onLoad) {
|
||||
+ io.papermc.paper.chunk.system.ChunkSystem.scheduleTickingState(
|
||||
+ this.level, x, z, FullChunkStatus.FULL, true,
|
||||
+ ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL, onLoad
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ void chunkLoadAccept(int chunkX, int chunkZ, ChunkAccess chunk, java.util.function.Consumer<ChunkAccess> consumer) {
|
||||
+ try {
|
||||
+ consumer.accept(chunk);
|
||||
+ } catch (Throwable throwable) {
|
||||
+ if (throwable instanceof ThreadDeath) {
|
||||
+ throw (ThreadDeath)throwable;
|
||||
+ }
|
||||
+ LOGGER.error("Load callback for chunk " + chunkX + "," + chunkZ + " in world '" + this.level.getWorld().getName() + "' threw an exception", throwable);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ void getChunkAtAsynchronously(int chunkX, int chunkZ, int ticketLevel,
|
||||
+ java.util.function.Consumer<ChunkAccess> consumer) {
|
||||
+ if (ticketLevel <= 33) {
|
||||
+ this.getFullChunkAsync(chunkX, chunkZ, (java.util.function.Consumer)consumer);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(
|
||||
+ this.level, chunkX, chunkZ, ChunkHolder.getStatus(ticketLevel), true,
|
||||
+ ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL, consumer
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public final void getChunkAtAsynchronously(int chunkX, int chunkZ, ChunkStatus status, boolean gen, boolean allowSubTicketLevel, java.util.function.Consumer<ChunkAccess> onLoad) {
|
||||
+ // try to fire sync
|
||||
+ int chunkStatusTicketLevel = 33 + ChunkStatus.getDistance(status);
|
||||
+ ChunkHolder playerChunk = this.chunkMap.getUpdatingChunkIfPresent(io.papermc.paper.util.CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
||||
+ if (playerChunk != null) {
|
||||
+ ChunkStatus holderStatus = playerChunk.getChunkHolderStatus();
|
||||
+ ChunkAccess immediate = playerChunk.getAvailableChunkNow();
|
||||
+ if (immediate != null) {
|
||||
+ if (allowSubTicketLevel ? immediate.getStatus().isOrAfter(status) : (playerChunk.getTicketLevel() <= chunkStatusTicketLevel && holderStatus != null && holderStatus.isOrAfter(status))) {
|
||||
+ this.chunkLoadAccept(chunkX, chunkZ, immediate, onLoad);
|
||||
+ return;
|
||||
+ } else {
|
||||
+ if (gen || (!allowSubTicketLevel && immediate.getStatus().isOrAfter(status))) {
|
||||
+ this.getChunkAtAsynchronously(chunkX, chunkZ, chunkStatusTicketLevel, onLoad);
|
||||
+ return;
|
||||
+ } else {
|
||||
+ this.chunkLoadAccept(chunkX, chunkZ, null, onLoad);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // need to fire async
|
||||
+
|
||||
+ if (gen && !allowSubTicketLevel) {
|
||||
+ this.getChunkAtAsynchronously(chunkX, chunkZ, chunkStatusTicketLevel, onLoad);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ this.getChunkAtAsynchronously(chunkX, chunkZ, io.papermc.paper.util.MCUtil.getTicketLevelFor(ChunkStatus.EMPTY), (ChunkAccess chunk) -> {
|
||||
+ if (chunk == null) {
|
||||
+ throw new IllegalStateException("Chunk cannot be null");
|
||||
+ }
|
||||
+
|
||||
+ if (!chunk.getStatus().isOrAfter(status)) {
|
||||
+ if (gen) {
|
||||
+ this.getChunkAtAsynchronously(chunkX, chunkZ, chunkStatusTicketLevel, onLoad);
|
||||
+ return;
|
||||
+ } else {
|
||||
+ ServerChunkCache.this.chunkLoadAccept(chunkX, chunkZ, null, onLoad);
|
||||
+ return;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (allowSubTicketLevel) {
|
||||
+ ServerChunkCache.this.chunkLoadAccept(chunkX, chunkZ, chunk, onLoad);
|
||||
+ return;
|
||||
+ } else {
|
||||
+ this.getChunkAtAsynchronously(chunkX, chunkZ, chunkStatusTicketLevel, onLoad);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Nullable
|
||||
+ public ChunkAccess getChunkAtImmediately(int x, int z) {
|
||||
+ ChunkHolder holder = this.chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z));
|
||||
|
@ -6868,34 +6758,6 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579
|
|||
+ return holder.getLastAvailable();
|
||||
+ }
|
||||
+
|
||||
+ // this will try to avoid chunk neighbours for lighting
|
||||
+ public final ChunkAccess getFullStatusChunkAt(int chunkX, int chunkZ) {
|
||||
+ LevelChunk ifLoaded = this.getChunkAtIfLoadedImmediately(chunkX, chunkZ);
|
||||
+ if (ifLoaded != null) {
|
||||
+ return ifLoaded;
|
||||
+ }
|
||||
+
|
||||
+ ChunkAccess empty = this.getChunk(chunkX, chunkZ, ChunkStatus.EMPTY, true);
|
||||
+ if (empty != null && empty.getStatus().isOrAfter(ChunkStatus.FULL)) {
|
||||
+ return empty;
|
||||
+ }
|
||||
+ return this.getChunk(chunkX, chunkZ, ChunkStatus.FULL, true);
|
||||
+ }
|
||||
+
|
||||
+ public final ChunkAccess getFullStatusChunkAtIfLoaded(int chunkX, int chunkZ) {
|
||||
+ LevelChunk ifLoaded = this.getChunkAtIfLoadedImmediately(chunkX, chunkZ);
|
||||
+ if (ifLoaded != null) {
|
||||
+ return ifLoaded;
|
||||
+ }
|
||||
+
|
||||
+ ChunkAccess ret = this.getChunkAtImmediately(chunkX, chunkZ);
|
||||
+ if (ret != null && ret.getStatus().isOrAfter(ChunkStatus.FULL)) {
|
||||
+ return ret;
|
||||
+ } else {
|
||||
+ return null;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public <T> void addTicketAtLevel(TicketType<T> ticketType, ChunkPos chunkPos, int ticketLevel, T identifier) {
|
||||
+ this.distanceManager.addTicket(ticketType, chunkPos, ticketLevel, identifier);
|
||||
+ }
|
||||
|
@ -6904,17 +6766,7 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579
|
|||
+ this.distanceManager.removeTicket(ticketType, chunkPos, ticketLevel, identifier);
|
||||
+ }
|
||||
+
|
||||
+ public final io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<LevelChunk> tickingChunks = new io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true);
|
||||
+ public final io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<LevelChunk> entityTickingChunks = new io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true);
|
||||
+ // Paper end
|
||||
|
||||
public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory) {
|
||||
this.level = world;
|
||||
@@ -119,6 +345,49 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.lastChunk[0] = chunk;
|
||||
}
|
||||
|
||||
+ // Paper start - "real" get chunk if loaded
|
||||
+ // "real" get chunk if loaded
|
||||
+ // Note: Partially copied from the getChunkAt method below
|
||||
+ @Nullable
|
||||
+ public LevelChunk getChunkAtIfCachedImmediately(int x, int z) {
|
||||
|
@ -6956,11 +6808,19 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579
|
|||
+ return ret;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Nullable
|
||||
|
||||
@Override
|
||||
public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) {
|
||||
@@ -327,6 +596,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
public ThreadedLevelLightEngine getLightEngine() {
|
||||
@@ -315,7 +442,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return this.mainThreadProcessor.pollTask();
|
||||
}
|
||||
|
||||
- boolean runDistanceManagerUpdates() {
|
||||
+ public boolean runDistanceManagerUpdates() { // Paper - public
|
||||
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
||||
|
||||
@@ -327,6 +454,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6974,7 +6834,7 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579
|
|||
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 93867b8883c6f5d5086e8fdc153e6d7c1e5d9fec..aa2c9b13b86130a613ed171a3c16f3639e7c82c6 100644
|
||||
index 93867b8883c6f5d5086e8fdc153e6d7c1e5d9fec..68a0192f3b1c9491a6f64309ccc919274cdfe178 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -230,6 +230,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -7020,7 +6880,7 @@ index 93867b8883c6f5d5086e8fdc153e6d7c1e5d9fec..aa2c9b13b86130a613ed171a3c16f363
|
|||
+ return;
|
||||
+ }
|
||||
+ List<net.minecraft.world.level.chunk.ChunkAccess> ret = new java.util.ArrayList<>();
|
||||
+ IntArrayList ticketLevels = new IntArrayList();
|
||||
+ it.unimi.dsi.fastutil.ints.IntArrayList ticketLevels = new it.unimi.dsi.fastutil.ints.IntArrayList();
|
||||
+
|
||||
+ int minBlockX = Mth.floor(axisalignedbb.minX - 1.0E-7D) - 3;
|
||||
+ int maxBlockX = Mth.floor(axisalignedbb.maxX + 1.0E-7D) + 3;
|
||||
|
@ -7876,8 +7736,22 @@ index 98836000cbca2a21649cb8f2a466986373405ea1..bbbf6dd8e566ecdca8794e3b03765fe7
|
|||
if (!this.addEntityUuid(entity)) {
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 82d5c749a70f7a808c073263e861e09913c529d4..fdb24fe5504458ba2806df617464a1c41d8ba9e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2533,4 +2533,9 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
+
|
||||
+ @Override
|
||||
+ public double[] getTPS() {
|
||||
+ return new double[]{0, 0, 0}; // TODO
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 16785a8dab5a2e786e17db049c027ed1c13f5ef6..9bd43d8859874c4d499f9b8d5ae6e08a23e0d4f2 100644
|
||||
index 16785a8dab5a2e786e17db049c027ed1c13f5ef6..2b0b9994751557e69ee7aa48fcb8319c128a5bbf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -245,8 +245,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
@ -7900,7 +7774,7 @@ index 16785a8dab5a2e786e17db049c027ed1c13f5ef6..9bd43d8859874c4d499f9b8d5ae6e08a
|
|||
if (playerChunk == null) return false;
|
||||
|
||||
playerChunk.getTickingChunkFuture().thenAccept(either -> {
|
||||
@@ -2018,4 +2018,32 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2018,4 +2018,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -7931,6 +7805,29 @@ index 16785a8dab5a2e786e17db049c027ed1c13f5ef6..9bd43d8859874c4d499f9b8d5ae6e08a
|
|||
+
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setViewDistance(final int viewDistance) {
|
||||
+ if (viewDistance < 2 || viewDistance > 32) {
|
||||
+ throw new IllegalArgumentException("View distance " + viewDistance + " is out of range of [2, 32]");
|
||||
+ }
|
||||
+ this.getHandle().chunkSource.chunkMap.setServerViewDistance(viewDistance);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setSimulationDistance(final int simulationDistance) {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getSendViewDistance() {
|
||||
+ return this.getViewDistance();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setSendViewDistance(final int viewDistance) {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
|
@ -7975,6 +7872,45 @@ index 70165d287156f46b793eb23dd30b601289c0ffb1..758bf988432bb34aad9386e3f4e8bba6
|
|||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index d5e56ed0a1bef50c0c715a7877f43fbc80dcaa44..633242f7cb25b8cdebd8c6ce579e4b60e471cdfa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2267,4 +2267,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
+
|
||||
+ @Override
|
||||
+ public int getViewDistance() {
|
||||
+ return io.papermc.paper.chunk.system.ChunkSystem.getLoadViewDistance(this.getHandle());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setViewDistance(final int viewDistance) {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getSimulationDistance() {
|
||||
+ return io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(this.getHandle());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setSimulationDistance(final int simulationDistance) {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getSendViewDistance() {
|
||||
+ return io.papermc.paper.chunk.system.ChunkSystem.getSendViewDistance(this.getHandle());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setSendViewDistance(final int viewDistance) {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 97c8723d19233fb0a12e446594b18c50f34f11f1..cba729914a3adaee2507e2916a4cfb585869746d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
|
|
|
@ -3354,7 +3354,7 @@ index 23bdb77690ba15bcbbfb0c70af23336d08ac7752..8f144a357174bbe096ac9b38a5e67a61
|
|||
}
|
||||
collection = icons;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 82d5c749a70f7a808c073263e861e09913c529d4..a3ef246b6765f93605bb3af6525adff01e71dd46 100644
|
||||
index fdb24fe5504458ba2806df617464a1c41d8ba9e3..1079476a3b327d668cf3d98f0a0659c81c120443 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -608,8 +608,10 @@ public final class CraftServer implements Server {
|
||||
|
@ -3484,10 +3484,10 @@ index 82d5c749a70f7a808c073263e861e09913c529d4..a3ef246b6765f93605bb3af6525adff0
|
|||
@Override
|
||||
public String getMotd() {
|
||||
return this.console.getMotd();
|
||||
@@ -2533,4 +2590,57 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
@@ -2538,4 +2595,57 @@ public final class CraftServer implements Server {
|
||||
public double[] getTPS() {
|
||||
return new double[]{0, 0, 0}; // TODO
|
||||
}
|
||||
// Spigot end
|
||||
+
|
||||
+ // Paper start - adventure sounds
|
||||
+ @Override
|
||||
|
@ -3543,7 +3543,7 @@ index 82d5c749a70f7a808c073263e861e09913c529d4..a3ef246b6765f93605bb3af6525adff0
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 9bd43d8859874c4d499f9b8d5ae6e08a23e0d4f2..68a7db9c840f101950435b386058f4cf409bfc05 100644
|
||||
index 2b0b9994751557e69ee7aa48fcb8319c128a5bbf..b2632cbc7903e23eb68e9901df039f5d8293bd77 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -155,6 +155,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
@ -3597,9 +3597,9 @@ index 9bd43d8859874c4d499f9b8d5ae6e08a23e0d4f2..68a7db9c840f101950435b386058f4cf
|
|||
|
||||
private static Map<String, GameRules.Key<?>> gamerules;
|
||||
public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
|
||||
@@ -2045,5 +2082,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
return ret;
|
||||
@@ -2068,5 +2105,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public void setSendViewDistance(final int viewDistance) {
|
||||
throw new UnsupportedOperationException("Not implemented yet");
|
||||
}
|
||||
+
|
||||
+ // Paper start - implement pointers
|
||||
|
@ -3617,7 +3617,7 @@ index 9bd43d8859874c4d499f9b8d5ae6e08a23e0d4f2..68a7db9c840f101950435b386058f4cf
|
|||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 5edad60f75a14b63ad704a68a3920f180ae82c40..ff503ab0ef9f3245d8ead4519507936f1c2288cf 100644
|
||||
index 02060584892d630d91f58e864ed34656ee738572..5158d536de16c93358d1b335b0fcfbe0d6ce848e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -20,6 +20,12 @@ public class Main {
|
||||
|
@ -4137,7 +4137,7 @@ index 61759e8179d0f6342abf0c0294e5a024928db8d9..92e21126a9347f1ee2279ab09bb6abf2
|
|||
public boolean isOp() {
|
||||
return true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index d5e56ed0a1bef50c0c715a7877f43fbc80dcaa44..af299f1e8a090758dea933647a4322f8f57d0aef 100644
|
||||
index 633242f7cb25b8cdebd8c6ce579e4b60e471cdfa..f609c4e67dd6feefb0c9366a515fd91256af3ff4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -300,14 +300,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -617,7 +617,7 @@ index c56c7293261ec2601ab02d051b37e820f023f0ff..faab5e8c952a2af6a286043617cded4e
|
|||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a3ef246b6765f93605bb3af6525adff01e71dd46..606aa8bc3c1dbbe7c20e702042e7ff2335544398 100644
|
||||
index 1079476a3b327d668cf3d98f0a0659c81c120443..6c6a2a1eb9a02bf14b6b851f5d0aaba8528a8fec 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -939,6 +939,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -628,7 +628,7 @@ index a3ef246b6765f93605bb3af6525adff01e71dd46..606aa8bc3c1dbbe7c20e702042e7ff23
|
|||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2634,6 +2635,34 @@ public final class CraftServer implements Server {
|
||||
@@ -2639,6 +2640,34 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
|
||||
// Paper start
|
||||
|
|
|
@ -7085,7 +7085,7 @@ index 1eabd8b5a99850298838b11ba97e3d220f444378..8ff786c366332588a2df053438f23cc9
|
|||
Bootstrap.wrapStreams();
|
||||
Bootstrap.bootstrapDuration.set(Duration.between(instant, Instant.now()).toMillis());
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index f3130afbfd70e39a8000b0471854f8ef892bbbf5..884731fa4ebbbdc7c06ff670941f36ef3bf384ad 100644
|
||||
index 403c57fc683bb0497602e1a9ec7b81b2722ecc01..ba58580f4c60205d1c7a7b7dfcdc22c4fafc9bc6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -128,6 +128,7 @@ public class Main {
|
||||
|
@ -7097,7 +7097,7 @@ index f3130afbfd70e39a8000b0471854f8ef892bbbf5..884731fa4ebbbdc7c06ff670941f36ef
|
|||
Bootstrap.validate();
|
||||
Util.startTimerHackThread();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5f03d77a64e5ba2e86343599e0faafecbda316b1..04880123cde240f2d02936ecdefa9731db743b8f 100644
|
||||
index 6c6a2a1eb9a02bf14b6b851f5d0aaba8528a8fec..59872b2a9d88db63b76e07f7815246bbb095dbc1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -270,7 +270,8 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -181,10 +181,10 @@ index 0000000000000000000000000000000000000000..4bd813161a5d76a83cdbd0a9209b9ea9
|
|||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..38f01952153348d937e326da0ec102cd9b0f80af
|
||||
index 0000000000000000000000000000000000000000..49028463ba47e760281545c2f7597e3db8d6c453
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -0,0 +1,386 @@
|
||||
@@ -0,0 +1,388 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
|
@ -350,7 +350,9 @@ index 0000000000000000000000000000000000000000..38f01952153348d937e326da0ec102cd
|
|||
+ pair("gamerules", toObjectMapper(world.getWorld().getGameRules(), rule -> {
|
||||
+ return pair(rule, world.getWorld().getGameRuleValue(rule));
|
||||
+ })),
|
||||
+ pair("ticking-distance", world.getChunkSource().chunkMap.getEffectiveViewDistance())
|
||||
+ pair("ticking-distance", world.getWorld().getSimulationDistance()),
|
||||
+ pair("no-ticking-distance", world.getWorld().getViewDistance()),
|
||||
+ pair("sending-distance", world.getWorld().getSendViewDistance())
|
||||
+ ));
|
||||
+ }));
|
||||
+
|
||||
|
@ -974,7 +976,7 @@ index 813fd87df0dfed8fe46389db8333d1d9f409fbe4..dfb37ddb89c2f43d9f9a34a6b2d38616
|
|||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index c721642337652ba4cf984ba3c263655b717d3b03..23e830d4cbe94a91c34ebb426311c8f861280b16 100644
|
||||
index 59b608d9722898470010413bef0cb6a6b83500b2..7245b93a4935aece23567fda0474104686485395 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1,8 +1,10 @@
|
||||
|
@ -988,7 +990,7 @@ index c721642337652ba4cf984ba3c263655b717d3b03..23e830d4cbe94a91c34ebb426311c8f8
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Queues;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -901,6 +903,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -892,6 +894,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
ChunkStatus chunkstatus = ChunkLevel.generationStatus(chunkHolder.getTicketLevel());
|
||||
|
||||
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
|
||||
|
@ -996,7 +998,7 @@ index c721642337652ba4cf984ba3c263655b717d3b03..23e830d4cbe94a91c34ebb426311c8f8
|
|||
ChunkPos chunkcoordintpair = chunkHolder.getPos();
|
||||
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
|
||||
LevelChunk chunk;
|
||||
@@ -925,6 +928,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -916,6 +919,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
return chunk;
|
||||
|
@ -1004,7 +1006,7 @@ index c721642337652ba4cf984ba3c263655b717d3b03..23e830d4cbe94a91c34ebb426311c8f8
|
|||
});
|
||||
}, (runnable) -> {
|
||||
ProcessorHandle mailbox = this.mainThreadMailbox;
|
||||
@@ -1476,6 +1480,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1467,6 +1471,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
List<ServerPlayer> list = Lists.newArrayList();
|
||||
List<ServerPlayer> list1 = this.level.players();
|
||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||
|
@ -1012,7 +1014,7 @@ index c721642337652ba4cf984ba3c263655b717d3b03..23e830d4cbe94a91c34ebb426311c8f8
|
|||
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||
|
||||
@@ -1500,14 +1505,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1491,14 +1496,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||
}
|
||||
}
|
||||
|
@ -1031,10 +1033,10 @@ index c721642337652ba4cf984ba3c263655b717d3b03..23e830d4cbe94a91c34ebb426311c8f8
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662a92e3d7a 100644
|
||||
index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0382561d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -413,13 +413,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -271,13 +271,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
||||
|
@ -1052,7 +1054,7 @@ index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662
|
|||
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
return ichunkaccess1;
|
||||
}, (playerchunk_failure) -> {
|
||||
@@ -618,7 +620,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -476,7 +478,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
public void save(boolean flush) {
|
||||
this.runDistanceManagerUpdates();
|
||||
|
@ -1062,7 +1064,7 @@ index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -657,10 +661,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -515,10 +519,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
||||
this.level.getProfiler().popPush("chunks");
|
||||
if (tickChunks) {
|
||||
|
@ -1075,7 +1077,7 @@ index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662
|
|||
}
|
||||
|
||||
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
||||
@@ -683,6 +687,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -541,6 +545,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
gameprofilerfiller.push("filteringLoadedChunks");
|
||||
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
|
||||
Iterator iterator = this.chunkMap.getChunks().iterator();
|
||||
|
@ -1083,7 +1085,7 @@ index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662
|
|||
|
||||
while (iterator.hasNext()) {
|
||||
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
||||
@@ -695,8 +700,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -553,8 +558,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
if (this.level.getServer().tickRateManager().runsNormally()) {
|
||||
gameprofilerfiller.popPush("naturalSpawnCount");
|
||||
|
@ -1094,7 +1096,7 @@ index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662
|
|||
|
||||
this.lastSpawnState = spawnercreature_d;
|
||||
gameprofilerfiller.popPush("spawnAndTick");
|
||||
@@ -719,22 +726,25 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -577,22 +584,25 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
||||
|
@ -1123,7 +1125,7 @@ index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662
|
|||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.pop();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index aa2c9b13b86130a613ed171a3c16f3639e7c82c6..d00b789d8deb0163726acbcb10edb0965ac9f326 100644
|
||||
index 68a0192f3b1c9491a6f64309ccc919274cdfe178..73608abb5a39749c326ce6fe1bf014422941b2d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -1603,7 +1605,7 @@ index 0eb09ce5c850d85ffd7229d27cf06b3e0edda11b..cc1d7626a82881c4410d65c6a33dadae
|
|||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6a6923c1bc597831921cc3515e0e94f5172ef3e1..f7ff043c99268d5d8d139e2a4d8cd0817b7bb96b 100644
|
||||
index 59872b2a9d88db63b76e07f7815246bbb095dbc1..b1d0e9caed38b6a264b7ea8e508be103d3d0664e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -368,7 +368,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -1817,7 +1819,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
|
||||
index af299f1e8a090758dea933647a4322f8f57d0aef..cf8a5b3ba642d4829725bc488c074b1b3b142867 100644
|
||||
index f609c4e67dd6feefb0c9366a515fd91256af3ff4..86802dee856ec0a5342c35ace716b6d66b093ccd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2631,6 +2631,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -4480,7 +4480,7 @@ index 0000000000000000000000000000000000000000..463c6d8d5b114816ed90655582859458
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index facfdbb87e89f4db33ce13233c2ba4366d35c15b..807a6bb1026dac2c4cd0a50afe06fd62ce23558b 100644
|
||||
index 5250bf5029825524c239854db7999883459f1a8a..c5cd2c2c28795593712b0de2bbaa7e3860f1131a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -53,7 +53,7 @@ public class ChunkHolder {
|
||||
|
@ -4493,7 +4493,7 @@ index facfdbb87e89f4db33ce13233c2ba4366d35c15b..807a6bb1026dac2c4cd0a50afe06fd62
|
|||
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
|
||||
public int oldTicketLevel;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 23e830d4cbe94a91c34ebb426311c8f861280b16..ed095afdf8be843b9a608130040739c0b21dbe0a 100644
|
||||
index 7ee1b9fe8099091feaf09c4e7ffda99159b33c9b..c581ddf24f66a98798e8965adc848638edd889de 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -125,7 +125,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
@ -4506,10 +4506,10 @@ index 23e830d4cbe94a91c34ebb426311c8f861280b16..ed095afdf8be843b9a608130040739c0
|
|||
private final RandomState randomState;
|
||||
private final ChunkGeneratorStructureState chunkGeneratorState;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
index 42f9f28726bc6ef09ab877ecf663b4caa5003a3a..0bd05d7a8f2a388c28ddcf3f07db5b0648dddeea 100644
|
||||
index 76005b3c48bfa323a77781c20c63708eeaa66b2b..222e72baa2fdb27c592e4c9ebef8303263b8d8ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
@@ -386,7 +386,7 @@ public abstract class DistanceManager {
|
||||
@@ -380,7 +380,7 @@ public abstract class DistanceManager {
|
||||
}
|
||||
|
||||
public void removeTicketsOnClosing() {
|
||||
|
|
|
@ -7,10 +7,10 @@ Placeholder patch, to be used by chunksystem rewrite
|
|||
|
||||
diff --git a/src/main/java/io/papermc/paper/util/TickThread.java b/src/main/java/io/papermc/paper/util/TickThread.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..d59885ee9c8b29d5bac34dce0597e345e5358c77
|
||||
index 0000000000000000000000000000000000000000..73e83d56a340f0c7dcb8ff737d621003e72c6de4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/util/TickThread.java
|
||||
@@ -0,0 +1,79 @@
|
||||
@@ -0,0 +1,83 @@
|
||||
+package io.papermc.paper.util;
|
||||
+
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
|
@ -75,7 +75,7 @@ index 0000000000000000000000000000000000000000..d59885ee9c8b29d5bac34dce0597e345
|
|||
+ }
|
||||
+
|
||||
+ public static TickThread getCurrentTickThread() {
|
||||
+ return (TickThread)Thread.currentThread();
|
||||
+ return (TickThread) Thread.currentThread();
|
||||
+ }
|
||||
+
|
||||
+ public static boolean isTickThread() {
|
||||
|
@ -83,11 +83,15 @@ index 0000000000000000000000000000000000000000..d59885ee9c8b29d5bac34dce0597e345
|
|||
+ }
|
||||
+
|
||||
+ public static boolean isTickThreadFor(final ServerLevel world, final int chunkX, final int chunkZ) {
|
||||
+ return Bukkit.isPrimaryThread();
|
||||
+ return isTickThread();
|
||||
+ }
|
||||
+
|
||||
+ public static boolean isTickThreadFor(final ServerLevel world, final int chunkX, final int chunkZ, final int radius) {
|
||||
+ return isTickThread();
|
||||
+ }
|
||||
+
|
||||
+ public static boolean isTickThreadFor(final Entity entity) {
|
||||
+ return Bukkit.isPrimaryThread();
|
||||
+ return isTickThread();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
|
|
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
|||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f7ff043c99268d5d8d139e2a4d8cd0817b7bb96b..67129bf8c109486b65504536224666b1cb033b44 100644
|
||||
index b1d0e9caed38b6a264b7ea8e508be103d3d0664e..cfac91359e6084082fffd769fc8ce91f75717b1d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -422,6 +422,35 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -19,7 +19,7 @@ index a6a8b5079ceaad90a79a09cab5c38a6fde6d33ee..de8b12b5014e653cb96d422c74307c7f
|
|||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 67129bf8c109486b65504536224666b1cb033b44..58c0fc6c0d5df7cd8331d742dc93aad37d6139c9 100644
|
||||
index cfac91359e6084082fffd769fc8ce91f75717b1d..4fbc98bc2fe808a15f974b0abf614781fe66e1c4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -261,7 +261,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
|
|
@ -40,7 +40,7 @@ index ce7caf08865df9ff032ba6c42308ea3ce4de6226..04e68886a5385234701962f250294805
|
|||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 58c0fc6c0d5df7cd8331d742dc93aad37d6139c9..c370a3be48d3582eb23e0831a3e21798ade9affd 100644
|
||||
index 4fbc98bc2fe808a15f974b0abf614781fe66e1c4..6568af2428be41c6d8baa8cf2a486ec4942d44d7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -885,7 +885,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -53,7 +53,7 @@ index 58c0fc6c0d5df7cd8331d742dc93aad37d6139c9..c370a3be48d3582eb23e0831a3e21798
|
|||
if (this.commandMap.dispatch(sender, commandLine)) {
|
||||
return true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 70a5ced9e39d6ce0e38f9ee04883584f40d49971..d37ff41c7266f6811988272e32e035469fe30f46 100644
|
||||
index ce54892f4a9b745779613af769783cb388336103..0017679b115de12f2e272db7ba3c11315086680f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -456,7 +456,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c370a3be48d3582eb23e0831a3e21798ade9affd..fa77a985087acf3398f65b58be7c1d12ea8f7f66 100644
|
||||
index 6568af2428be41c6d8baa8cf2a486ec4942d44d7..669e75549d0cc1d9c506f362e27b2f1717ec8d5c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2112,6 +2112,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fa77a985087acf3398f65b58be7c1d12ea8f7f66..b7707cccbdc1b55f49cc70218949aacdceeb2651 100644
|
||||
index 669e75549d0cc1d9c506f362e27b2f1717ec8d5c..908808099d0b7c3320f447330a441a536ce07421 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -298,6 +298,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
|
|||
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b7707cccbdc1b55f49cc70218949aacdceeb2651..64541619b92f58a9e2621f754c8494ab5c7014c8 100644
|
||||
index 908808099d0b7c3320f447330a441a536ce07421..9bec3b0d5c7eaccb334e2663bb1fdc42cd6eb367 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -456,6 +456,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
|||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 64541619b92f58a9e2621f754c8494ab5c7014c8..73e29dc1cce2999e81d250a9cc8fae55df97698a 100644
|
||||
index 9bec3b0d5c7eaccb334e2663bb1fdc42cd6eb367..d2d2cc70eac66d503efe89ded205f1a904c95a26 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2709,5 +2709,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2714,5 +2714,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
|||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 73e29dc1cce2999e81d250a9cc8fae55df97698a..7555a74c90082d4164fbfda9d467514ccf7815bb 100644
|
||||
index d2d2cc70eac66d503efe89ded205f1a904c95a26..fb6c21a43e771317526972c183d95402d941924b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -952,8 +952,16 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -11,7 +11,7 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
|
|||
The maximum size of the RegionFileCache is also made configurable.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index a7bf0ce6eefa60ba61975afb8885fc1857fb7959..50f8e12c964a7a0f388568e4df512ddffdda4a64 100644
|
||||
index 50a285127ee5a247680d4486ec9d5e01453b8a8e..b5b7b73048eaadfe58961631427da7574d42f5e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -37,7 +37,7 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
|
|
|
@ -60,7 +60,7 @@ index b3c6e76105ee26a79a84a203935530f859460652..e697b8f7b165d2394d8155cbee7453e2
|
|||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7555a74c90082d4164fbfda9d467514ccf7815bb..b765da78ff380ffdf6472f850eab73d75fd6f469 100644
|
||||
index fb6c21a43e771317526972c183d95402d941924b..040d5fa985f746d90e144b668ebb2adb79c33daa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1821,7 +1821,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
|||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b765da78ff380ffdf6472f850eab73d75fd6f469..b8eac20a5df37408321d3b05f4c55f091f808f50 100644
|
||||
index 040d5fa985f746d90e144b668ebb2adb79c33daa..d2fe67471259738a1008460d3364fb8650fe3811 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2735,5 +2735,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2740,5 +2740,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b8eac20a5df37408321d3b05f4c55f091f808f50..83eb0a8aec7b54f15af033a1018d6cd7901e6ce7 100644
|
||||
index d2fe67471259738a1008460d3364fb8650fe3811..e1403914e740f8fa9edc5381593926af99dfb5aa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2754,5 +2754,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2759,5 +2759,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -386,7 +386,7 @@ index 40af2325afea3e4831a9d8795ce1932a6a5663bf..db4480778e4b917a073c61f29cd45663
|
|||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 83eb0a8aec7b54f15af033a1018d6cd7901e6ce7..42b2ec78b8a4089c4d35e92a5450b95a97e057ed 100644
|
||||
index e1403914e740f8fa9edc5381593926af99dfb5aa..924dac8bc6b35c834e64512f036503b0ac365579 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -42,7 +42,7 @@ import java.util.logging.Level;
|
||||
|
|
|
@ -612,7 +612,7 @@ index adb472c175cc6f6ced7075a37423d6c898fd5ccb..1ec0f3a7148c2f412421772f6e1dff0b
|
|||
String s1 = name.toLowerCase(Locale.ROOT);
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 42b2ec78b8a4089c4d35e92a5450b95a97e057ed..0ba93b1fe563a76dae12cef93ae4a33ca92ff4e6 100644
|
||||
index 924dac8bc6b35c834e64512f036503b0ac365579..7678b7eb8561bca272bdb26de5a9f96bd18d005d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -260,6 +260,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
@ -633,7 +633,7 @@ index 42b2ec78b8a4089c4d35e92a5450b95a97e057ed..0ba93b1fe563a76dae12cef93ae4a33c
|
|||
CraftItemFactory.instance();
|
||||
}
|
||||
|
||||
@@ -2763,5 +2767,42 @@ public final class CraftServer implements Server {
|
||||
@@ -2768,5 +2772,42 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ index 495a7b713a7ab9c19aad34512b76523bad43b89d..15a5059994371da4850adcf726034a71
|
|||
|
||||
return null;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0ba93b1fe563a76dae12cef93ae4a33ca92ff4e6..24fe763be314cd80b37f929a20a1af8da12ae9e8 100644
|
||||
index 7678b7eb8561bca272bdb26de5a9f96bd18d005d..59776663cee396f29f05988d8e22dd5c23b118b5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -527,6 +527,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -87,7 +87,7 @@ index ba2628f22907b386fe5638220e5f10e39bc1f80b..2d633b9921e04dac21d705ffdf0f5a92
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 24fe763be314cd80b37f929a20a1af8da12ae9e8..26a5e44fdb0078b2711228ac4f0eb827fe03f037 100644
|
||||
index 59776663cee396f29f05988d8e22dd5c23b118b5..fb26379f600cc3e7e286d246f25e2bf718611e9d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2227,7 +2227,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -9,10 +9,10 @@ from triggering monster spawns on a server.
|
|||
Also a highly more effecient way to blanket block spawns in a world
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index ed095afdf8be843b9a608130040739c0b21dbe0a..57b344459b670742edc81a5046f1dfc2dae52c9f 100644
|
||||
index c581ddf24f66a98798e8965adc848638edd889de..987f867def412552b0d7f6cb2cba50af520f1257 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1212,7 +1212,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1203,7 +1203,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
|
||||
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
|
||||
|
||||
|
@ -23,7 +23,7 @@ index ed095afdf8be843b9a608130040739c0b21dbe0a..57b344459b670742edc81a5046f1dfc2
|
|||
// Spigot end
|
||||
if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) {
|
||||
return false;
|
||||
@@ -1227,6 +1229,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1218,6 +1220,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
entityplayer = (ServerPlayer) iterator.next();
|
||||
|
@ -40,10 +40,10 @@ index ed095afdf8be843b9a608130040739c0b21dbe0a..57b344459b670742edc81a5046f1dfc2
|
|||
|
||||
return true;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 5cd680d2ed47aadb5e65a775d70bc662a92e3d7a..5fc48485aa2045c19c5ec2ba9cb6fafabb1ae8f1 100644
|
||||
index e0ae7274da59ff043cd423d282ed8db0382561d4..369e4bf5ff52cb774f1acaf760b8bd276a0745f5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -710,6 +710,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -568,6 +568,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
Util.shuffle(list, this.level.random);
|
||||
|
|
|
@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID
|
|||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 26a5e44fdb0078b2711228ac4f0eb827fe03f037..43406c5d7fdd3cd7c88aad5a86252eab28a88c0b 100644
|
||||
index fb26379f600cc3e7e286d246f25e2bf718611e9d..d4c3d9a45c01d462513e5dbfa514afdde32c9ad7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1826,6 +1826,25 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 57b344459b670742edc81a5046f1dfc2dae52c9f..fbac26f913476242c8dd1310426a1d66275f6567 100644
|
||||
index 987f867def412552b0d7f6cb2cba50af520f1257..1a80f48a425a81af6acd917f67d33a80746f46c3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1434,6 +1434,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1425,6 +1425,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
} else {
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas());
|
||||
|
||||
|
@ -16,7 +16,7 @@ index 57b344459b670742edc81a5046f1dfc2dae52c9f..fbac26f913476242c8dd1310426a1d66
|
|||
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
|
||||
playerchunkmap_entitytracker.updatePlayers(this.level.players());
|
||||
if (entity instanceof ServerPlayer) {
|
||||
@@ -1476,7 +1477,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1467,7 +1468,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (playerchunkmap_entitytracker1 != null) {
|
||||
playerchunkmap_entitytracker1.broadcastRemoved();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ index 57b344459b670742edc81a5046f1dfc2dae52c9f..fbac26f913476242c8dd1310426a1d66
|
|||
|
||||
protected void tick() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 35ed4ba377eadb72d59a7984bc40f3834136174c..46b71a140ab8a1b997415184db09cb8a3ea39c52 100644
|
||||
index a6749080a192a591dd4e52f56b691df8d9cfcd98..e1518465e4ffc473a75a57e4d9b3ad399a022589 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1197,6 +1197,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -43,7 +43,7 @@ index 35ed4ba377eadb72d59a7984bc40f3834136174c..46b71a140ab8a1b997415184db09cb8a
|
|||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7abb4ba10029ad8df5ed520d1d3deb9d2819ca8d..227df91e28d11cad778b5190432c6eb5fb0312e5 100644
|
||||
index 3ff8c6a4aa867e2ceed8c355550c9c20db6e812e..92284eff12eb28034e33563bb3644deeb0fa81ac 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -241,6 +241,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
|
|
@ -33,7 +33,7 @@ index 6aede562955799fae90a1234b6300ba3a91ba2f2..333647f4328c29afffdc2b0de5abeec7
|
|||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 43406c5d7fdd3cd7c88aad5a86252eab28a88c0b..0e18637f9ac0cf69f370d46081664456b4b30c4c 100644
|
||||
index d4c3d9a45c01d462513e5dbfa514afdde32c9ad7..4958a3715a3d09e6d956ca8cc8201f11e3ebc3a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -915,6 +915,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -18,10 +18,10 @@ index de0e1ad2c78e5132651494f198703533847c84bd..830978f3409888302ab857161628cee5
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0e18637f9ac0cf69f370d46081664456b4b30c4c..c682abdd2b144dcd6260db6d63b0474b547f2cc6 100644
|
||||
index 4958a3715a3d09e6d956ca8cc8201f11e3ebc3a4..3ff493a3a0f679d894d8f60712811e20f5d986a0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2796,6 +2796,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2801,6 +2801,16 @@ public final class CraftServer implements Server {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c682abdd2b144dcd6260db6d63b0474b547f2cc6..e406157dd677f4dde226a30a7faed92c1744afd7 100644
|
||||
index 3ff493a3a0f679d894d8f60712811e20f5d986a0..743e6d25ca5ef4745a723d3bbb2efd2d18741ded 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2842,5 +2842,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2847,5 +2847,10 @@ public final class CraftServer implements Server {
|
||||
profile.getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
|
||||
}
|
||||
|
|
|
@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
|
|||
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index fbac26f913476242c8dd1310426a1d66275f6567..f9df43a6e6239fe8a7abec9f9fce4c9eb01b89ae 100644
|
||||
index 1a80f48a425a81af6acd917f67d33a80746f46c3..4357c2800aaceb2d6a9d3c5246faf796d7732f42 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -889,6 +889,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -880,6 +880,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
entity.discard();
|
||||
needsRemoval = true;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ index fbac26f913476242c8dd1310426a1d66275f6567..f9df43a6e6239fe8a7abec9f9fce4c9e
|
|||
return !needsRemoval;
|
||||
}));
|
||||
// CraftBukkit end
|
||||
@@ -939,6 +940,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -930,6 +931,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index f9df43a6e6239fe8a7abec9f9fce4c9eb01b89ae..064b008c3869346315f7a9fb2ce7a111f5adf729 100644
|
||||
index bc481cf547504140a921ec20d7c21d2931b1e7ab..51cbdaead57a527bac5eeb7bc130f31667fcf450 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1770,6 +1770,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1761,6 +1761,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
int j = entity.getType().clientTrackingRange() * 16;
|
||||
|
@ -20,7 +20,7 @@ index f9df43a6e6239fe8a7abec9f9fce4c9eb01b89ae..064b008c3869346315f7a9fb2ce7a111
|
|||
if (j > i) {
|
||||
i = j;
|
||||
diff --git a/src/main/java/org/spigotmc/TrackingRange.java b/src/main/java/org/spigotmc/TrackingRange.java
|
||||
index 73f9563551632a5369ba55e8fe9211afc325e869..172d231adecf043f9f06b7f5e0365ae82327998d 100644
|
||||
index 73f9563551632a5369ba55e8fe9211afc325e869..bb06f89a29f30144e7e2113e088a503db006a83c 100644
|
||||
--- a/src/main/java/org/spigotmc/TrackingRange.java
|
||||
+++ b/src/main/java/org/spigotmc/TrackingRange.java
|
||||
@@ -7,7 +7,6 @@ import net.minecraft.world.entity.ExperienceOrb;
|
||||
|
@ -72,7 +72,7 @@ index 73f9563551632a5369ba55e8fe9211afc325e869..172d231adecf043f9f06b7f5e0365ae8
|
|||
return config.displayTrackingRange;
|
||||
} else
|
||||
{
|
||||
+ if (entity instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon) return ((net.minecraft.server.level.ServerLevel)(entity.getCommandSenderWorld())).getChunkSource().chunkMap.getEffectiveViewDistance(); // Paper - enderdragon is exempt
|
||||
+ if (entity instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon) return ((net.minecraft.server.level.ServerLevel)(entity.getCommandSenderWorld())).getChunkSource().chunkMap.serverViewDistance; // Paper - enderdragon is exempt
|
||||
return config.otherTrackingRange;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
|
|||
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
|
||||
index 5fc48485aa2045c19c5ec2ba9cb6fafabb1ae8f1..32a26eac53cfd4fb69ba117908acc82894deb1a0 100644
|
||||
index 369e4bf5ff52cb774f1acaf760b8bd276a0745f5..326b67c15ee3df162bf4468729c49dd98b582f02 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -396,6 +396,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -254,6 +254,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return this.getChunk(x, z, leastStatus, create);
|
||||
}, this.mainThreadProcessor).join();
|
||||
} else {
|
||||
|
@ -23,7 +23,7 @@ index 5fc48485aa2045c19c5ec2ba9cb6fafabb1ae8f1..32a26eac53cfd4fb69ba117908acc828
|
|||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||
|
||||
gameprofilerfiller.incrementCounter("getChunk");
|
||||
@@ -442,39 +448,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -300,39 +306,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
if (Thread.currentThread() != this.mainThread) {
|
||||
return null;
|
||||
} else {
|
||||
|
|
|
@ -14,7 +14,7 @@ chunks, however it must be enabled by setting the startup flag
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f30478a9337c1
|
||||
index 0000000000000000000000000000000000000000..404a8fd128043527d23f22ee26f7c8c739f09089
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
@@ -0,0 +1,175 @@
|
||||
|
@ -69,7 +69,7 @@ index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f3047
|
|||
+
|
||||
+ ++valueInMap.times;
|
||||
+
|
||||
+ valueInMap.coordinateTimes.compute(IOUtil.getCoordinateKey(chunkX, chunkZ), (Long keyInMap1, Integer valueInMap1) -> {
|
||||
+ valueInMap.coordinateTimes.compute(io.papermc.paper.util.MCUtil.getCoordinateKey(chunkX, chunkZ), (Long keyInMap1, Integer valueInMap1) -> {
|
||||
+ return valueInMap1 == null ? Integer.valueOf(1) : Integer.valueOf(valueInMap1.intValue() + 1);
|
||||
+ });
|
||||
+
|
||||
|
@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f3047
|
|||
+ for (Long2IntMap.Entry coordinate : pair.getSecond().coordinateTimes.long2IntEntrySet()) {
|
||||
+ final long key = coordinate.getLongKey();
|
||||
+ final int times = coordinate.getIntValue();
|
||||
+ coordinates.add("(" + IOUtil.getCoordinateX(key) + "," + IOUtil.getCoordinateZ(key) + "): " + times);
|
||||
+ coordinates.add("(" + io.papermc.paper.util.MCUtil.getCoordinateX(key) + "," + io.papermc.paper.util.MCUtil.getCoordinateZ(key) + "): " + times);
|
||||
+ }
|
||||
+
|
||||
+ stacktrace.add("coordinates", coordinates);
|
||||
|
@ -300,10 +300,10 @@ 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
|
||||
index 32a26eac53cfd4fb69ba117908acc82894deb1a0..6bb0b24e8bc5cd031d192dd0b61a3afd248c62e4 100644
|
||||
index 326b67c15ee3df162bf4468729c49dd98b582f02..8a118a7b2878d3c99dadfa97e2ae58fda2b3f93b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -424,6 +424,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -282,6 +282,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
Objects.requireNonNull(completablefuture);
|
||||
if (!completablefuture.isDone()) { // Paper
|
||||
|
@ -312,7 +312,7 @@ index 32a26eac53cfd4fb69ba117908acc82894deb1a0..6bb0b24e8bc5cd031d192dd0b61a3afd
|
|||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||
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
|
||||
index 989cd53db579408f89c3425d808e0a611194e896..dd7071404555548c7f102737456f8773860b597b 100644
|
||||
index 3f70bab49d58ec36f6153a7dae577d22c90d2918..14958ce7c7cb1a55da6b6dd6c32a32c9346e866b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -415,6 +415,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
|
|
@ -184,7 +184,7 @@ index e8b3755dec8149282a2fc55bf0a3fbb788df0b2b..fcb8708276a73ab61e004f0113650b0a
|
|||
+ // Paper end - Add tick times API and /mspt command
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e406157dd677f4dde226a30a7faed92c1744afd7..bc81109da3e03a34b0684a6a5a0e67b22fda569e 100644
|
||||
index 743e6d25ca5ef4745a723d3bbb2efd2d18741ded..7b30b180900d18074edf517c969f78bb1c10c241 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2619,6 +2619,16 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bc81109da3e03a34b0684a6a5a0e67b22fda569e..e7cc65bd56b8526ca4f5a935872bc158fae22bb0 100644
|
||||
index 7b30b180900d18074edf517c969f78bb1c10c241..69e25f23322704d054bef119f3581eee08cff55f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2857,5 +2857,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2862,5 +2862,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 064b008c3869346315f7a9fb2ce7a111f5adf729..b2bc8869c454eba5c55a45d5671e2e406a0d12a7 100644
|
||||
index 5be7788ad5c9fb8158c70b7e5eb11b82e0fbeafe..1543bdec9bfa48bba65d03b04a0986698aa00bba 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1461,6 +1461,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1452,6 +1452,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
public void addEntity(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
|
||||
|
@ -25,7 +25,7 @@ index 064b008c3869346315f7a9fb2ce7a111f5adf729..b2bc8869c454eba5c55a45d5671e2e40
|
|||
EntityType<?> entitytypes = entity.getType();
|
||||
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
|
||||
index dd7071404555548c7f102737456f8773860b597b..ecc716ce94f40ab8f85e5f57fecad68c08d4e85e 100644
|
||||
index 14958ce7c7cb1a55da6b6dd6c32a32c9346e866b..d2da284aa7284c5205e656c48262061980893be6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2224,7 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
|
|
@ -31,10 +31,10 @@ delays anymore.
|
|||
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index b2bc8869c454eba5c55a45d5671e2e406a0d12a7..9706e08511fcfd72abd5e92d7df54dc199451499 100644
|
||||
index 1543bdec9bfa48bba65d03b04a0986698aa00bba..7f61b2945e5174f89936041c334d4cb2e5cdb130 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1468,6 +1468,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1459,6 +1459,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return;
|
||||
}
|
||||
// Paper end - ignore and warn about illegal addEntity calls instead of crashing server
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e7cc65bd56b8526ca4f5a935872bc158fae22bb0..46273f6d706ecf9a46c9c41bd93cffda9ff0687a 100644
|
||||
index 69e25f23322704d054bef119f3581eee08cff55f..32833942d0383671a03463d07ed6e40171db53c6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -577,6 +577,13 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -87,7 +87,7 @@ index 04a728a16bb629adbae1cd8586764a6dbc22b5dc..d130f843975236018df4fa2ccc3ca6aa
|
|||
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 46273f6d706ecf9a46c9c41bd93cffda9ff0687a..0035e5c4e4394132a869dcadd15015fd33a2fefb 100644
|
||||
index 32833942d0383671a03463d07ed6e40171db53c6..51ae35b3edd651cc85aaab2cbf7d223c7563951a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1006,6 +1006,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -768,10 +768,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7
|
|||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0035e5c4e4394132a869dcadd15015fd33a2fefb..0e7cfec27eb76382d4827b62c31e10f118a87dd4 100644
|
||||
index 51ae35b3edd651cc85aaab2cbf7d223c7563951a..bbd3ceb2db482f32e939ccd99970fd7101f5a5ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2870,5 +2870,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2875,5 +2875,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ index 4339a2cd0b2020b673ebdb6902ad0d0a53373a27..d983aec418603a470f640ace139572fd
|
|||
// CraftBukkit end
|
||||
this.getConnection().stop();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0e7cfec27eb76382d4827b62c31e10f118a87dd4..5b41a2c7e26fde4a5e34f2de567d6e1920e51a36 100644
|
||||
index bbd3ceb2db482f32e939ccd99970fd7101f5a5ce..b0e5dc6b3c9a7e820e001cfe311a7414cea4c245 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1016,6 +1016,31 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -102,7 +102,7 @@ index 6dbf7734b640dc9cd553dfd6afb4c9cd4e3d66da..48fca15cdc6b0bafc3d8ff13cc96b325
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5b41a2c7e26fde4a5e34f2de567d6e1920e51a36..2b709a4e7b120497c48d0408874a29602ea5bd98 100644
|
||||
index b0e5dc6b3c9a7e820e001cfe311a7414cea4c245..7803075383cdde77444991e72f49ed67627f95ed 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -955,8 +955,8 @@ public final class CraftServer implements Server {
|
||||
|
@ -117,7 +117,7 @@ index 5b41a2c7e26fde4a5e34f2de567d6e1920e51a36..2b709a4e7b120497c48d0408874a2960
|
|||
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
|
||||
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 92c19035e4e03530eb27d7dd96847f4546710d28..316ba3726f4bfe2e99edefa87bc0ff372a6389bc 100644
|
||||
index 6ab78bead1fd4e7c02c597b23824f5e4f80132c9..c44cfa0dd5794976c74211467ac0b7022cce17e9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1121,7 +1121,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
|
|
@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
|||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2b709a4e7b120497c48d0408874a29602ea5bd98..3aa481599811af7cd9b0c523f66dac469105ee49 100644
|
||||
index 7803075383cdde77444991e72f49ed67627f95ed..936928dda8b09386ef936cec9da65eb76b1ccf1d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -377,7 +377,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -44,7 +44,7 @@ index 2b709a4e7b120497c48d0408874a29602ea5bd98..3aa481599811af7cd9b0c523f66dac46
|
|||
this.printSaveWarning = false;
|
||||
this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 316ba3726f4bfe2e99edefa87bc0ff372a6389bc..fe0095601b41d85d8813af18e1c74b31f26f150d 100644
|
||||
index c44cfa0dd5794976c74211467ac0b7022cce17e9..6070409175b106ba6920adf4fa860215cd6f3087 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -282,7 +282,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
|
|
@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is
|
|||
still at a respawn anchor.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a35dda4010c6db1a8e1efb7951ac8732d9a1e16e..98e66497f1a81e3df8d555ffdd36b9aae9f39447 100644
|
||||
index 54aba3118157f72491cb8c3d5fb5c63750ea6878..4959c1cc9f1ceead9da42e6d12903d13882a1c17 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -805,6 +805,7 @@ public abstract class PlayerList {
|
||||
@@ -804,6 +804,7 @@ public abstract class PlayerList {
|
||||
// Paper start - Add PlayerPostRespawnEvent
|
||||
boolean isBedSpawn = false;
|
||||
boolean isRespawn = false;
|
||||
|
@ -21,7 +21,7 @@ index a35dda4010c6db1a8e1efb7951ac8732d9a1e16e..98e66497f1a81e3df8d555ffdd36b9aa
|
|||
// Paper end - Add PlayerPostRespawnEvent
|
||||
|
||||
// CraftBukkit start - fire PlayerRespawnEvent
|
||||
@@ -815,7 +816,7 @@ public abstract class PlayerList {
|
||||
@@ -814,7 +815,7 @@ public abstract class PlayerList {
|
||||
Optional optional;
|
||||
|
||||
if (blockposition != null) {
|
||||
|
@ -30,7 +30,7 @@ index a35dda4010c6db1a8e1efb7951ac8732d9a1e16e..98e66497f1a81e3df8d555ffdd36b9aa
|
|||
} else {
|
||||
optional = Optional.empty();
|
||||
}
|
||||
@@ -859,7 +860,12 @@ public abstract class PlayerList {
|
||||
@@ -858,7 +859,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
|
@ -44,7 +44,7 @@ index a35dda4010c6db1a8e1efb7951ac8732d9a1e16e..98e66497f1a81e3df8d555ffdd36b9aa
|
|||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
isRespawn = true; // Paper - Add PlayerPostRespawnEvent
|
||||
} else {
|
||||
@@ -897,8 +903,14 @@ public abstract class PlayerList {
|
||||
@@ -896,8 +902,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
// entityplayer1.initInventoryMenu();
|
||||
entityplayer1.setHealth(entityplayer1.getHealth());
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index c4e0fa6c24f9df0d99508ea7d6a9ed974f14835e..468e4ccbe767a04a6903307f7285e882fab9e598 100644
|
||||
index ab92c2c0ff5ebb395670c23fe0e3a8122b215874..dc41eb243510fdb1de9ca3a0a8cb871af5272876 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -274,6 +274,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -273,6 +273,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean isRealPlayer; // Paper
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
|
@ -57,7 +57,7 @@ index e69043316372d98b122ed3788fda79cdd36849e8..6597e6e9987ddb5906909c22704fdfb6
|
|||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 549c14e2d861c0b4692ee56e1de5df13ef72f6f8..7a10bdaf6b837738afb73e27fa970f9eff9bb196 100644
|
||||
index bcdb1cbb6e59681163c9800bf6576965ab331721..e34a954247488f3ba96ef354ff676d07fd36cb06 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2988,6 +2988,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index baafe984f2e015e20e57841b5009861cb0a02525..d7bbe096b2bff241b95da17c2897c88565d521ae 100644
|
||||
index d2da284aa7284c5205e656c48262061980893be6..aa2f23c4f7d25d0f92ff025bb1840aff1b053fa3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1757,9 +1757,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1726,9 +1726,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public void setDefaultSpawnPos(BlockPos pos, float angle) {
|
||||
// Paper start - Configurable Keep Spawn Loaded range per world
|
||||
BlockPos prevSpawn = this.getSharedSpawnPos();
|
||||
|
@ -21,7 +21,7 @@ index baafe984f2e015e20e57841b5009861cb0a02525..d7bbe096b2bff241b95da17c2897c885
|
|||
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
|
||||
this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index fe0095601b41d85d8813af18e1c74b31f26f150d..46a168a3e0db80c1584931c13eedeab420aa76c6 100644
|
||||
index 6070409175b106ba6920adf4fa860215cd6f3087..89119833db9660377d4d4cd7d69c7a16f23f8c12 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -262,12 +262,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f03a2995c2eb080ec4db0d6c3aa261a463c08579..3b50dc6f01a449ca3d5cfa02aadc8c63777a0094 100644
|
||||
index f3afc22e3c4fc792fa4ed5c3ee18d76cd1cd6e85..dedaf6f93cc81275e318d8eee3f4f140ddfa7655 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2017,6 +2017,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2005,6 +2005,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index d7bbe096b2bff241b95da17c2897c88565d521ae..e360048893f7719e6735724a2e0c2606879d6c9d 100644
|
||||
index aa2f23c4f7d25d0f92ff025bb1840aff1b053fa3..a668e204946943bcc963ad41ea3029111267eef9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1255,6 +1255,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1224,6 +1224,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3b50dc6f01a449ca3d5cfa02aadc8c63777a0094..e7936fbc641769dfea77ae4add7b1b19e59addbb 100644
|
||||
index dedaf6f93cc81275e318d8eee3f4f140ddfa7655..546c8edcd53aab9ed38ef07291606d4765bcde25 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2100,13 +2100,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2088,13 +2088,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3aa481599811af7cd9b0c523f66dac469105ee49..da0af328409aae94b3d537bf2db083fbc269d573 100644
|
||||
index 936928dda8b09386ef936cec9da65eb76b1ccf1d..811c0f36bc314ca79e062fa149c6d19fc2734087 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1909,6 +1909,28 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -25,10 +25,10 @@ index 777681a58417684a35a875c869ab22e50bb27da5..1e495daf53a53260e1a3b1c86365edb9
|
|||
Connection.LOGGER.debug("Failed to sent packet", throwable);
|
||||
if (this.getSending() == PacketFlow.CLIENTBOUND) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 468e4ccbe767a04a6903307f7285e882fab9e598..58bbf3176f405c3c31007780368a3e16948382a7 100644
|
||||
index dc41eb243510fdb1de9ca3a0a8cb871af5272876..effafbcd8400cc40956d9cf36757e83f7f803038 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -275,6 +275,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -274,6 +274,7 @@ public class ServerPlayer extends Player {
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
public @Nullable String clientBrandName = null; // Paper - Brand support
|
||||
|
@ -49,10 +49,10 @@ index 6597e6e9987ddb5906909c22704fdfb6557aee8e..6bb846d3ee2fb54ab3ffa116607f2a83
|
|||
this.connection.disconnect(ichatbasecomponent);
|
||||
}));
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 98e66497f1a81e3df8d555ffdd36b9aae9f39447..5e6aa40d7574b939746ac4724a24d85f9cf29d76 100644
|
||||
index 4959c1cc9f1ceead9da42e6d12903d13882a1c17..5777bb6bd01d01c0ff333d7a593744b6e62ddd58 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -578,7 +578,7 @@ public abstract class PlayerList {
|
||||
@@ -577,7 +577,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5e6aa40d7574b939746ac4724a24d85f9cf29d76..4771d0da97421443089499cc376bdf469dec8522 100644
|
||||
index 5777bb6bd01d01c0ff333d7a593744b6e62ddd58..08e4e8da49676f2fb20eb6fc42a399bee426a340 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -848,7 +848,7 @@ public abstract class PlayerList {
|
||||
@@ -847,7 +847,7 @@ public abstract class PlayerList {
|
||||
if (location == null) {
|
||||
worldserver1 = this.server.getLevel(Level.OVERWORLD);
|
||||
blockposition = entityplayer1.getSpawnPoint(worldserver1);
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ServerResourcesReloadedEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e7936fbc641769dfea77ae4add7b1b19e59addbb..e679ee1cfae0787775c655690094d72732e1bbb4 100644
|
||||
index 546c8edcd53aab9ed38ef07291606d4765bcde25..1d109679f5f16e8a4fb32020bc5d781b817f1ac8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1985,7 +1985,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1973,7 +1973,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.functionManager;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ index e7936fbc641769dfea77ae4add7b1b19e59addbb..e679ee1cfae0787775c655690094d727
|
|||
RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE);
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
||||
@@ -2018,6 +2024,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2006,6 +2012,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings; they can be defined by datapacks so refresh it here
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e360048893f7719e6735724a2e0c2606879d6c9d..2f1d8a02f9fd85b4d577b67237de8400917c151f 100644
|
||||
index a668e204946943bcc963ad41ea3029111267eef9..b93976abbc98c1beffe4b464735c9b5a71cb45a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1826,6 +1826,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1795,6 +1795,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
});
|
||||
optional1.ifPresent((holder) -> {
|
||||
this.getServer().execute(() -> {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4771d0da97421443089499cc376bdf469dec8522..5cb195fc8d1431088253d496585f19e81f8082ef 100644
|
||||
index 08e4e8da49676f2fb20eb6fc42a399bee426a340..e629a560ae2163ea45ede727b97a301e8fa6f1e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -603,6 +603,14 @@ public abstract class PlayerList {
|
||||
@@ -602,6 +602,14 @@ public abstract class PlayerList {
|
||||
PlayerList.LOGGER.debug("Removing player mount");
|
||||
entityplayer.stopRiding();
|
||||
entity.getPassengersAndSelf().forEach((entity1) -> {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5cb195fc8d1431088253d496585f19e81f8082ef..065a189566d1eea08b1013ce64d1f2282d0c2dc3 100644
|
||||
index e629a560ae2163ea45ede727b97a301e8fa6f1e8..f336b52a529c3c0ddccb36ace8b441fba61b99dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1101,6 +1101,11 @@ public abstract class PlayerList {
|
||||
@@ -1100,6 +1100,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) {
|
||||
|
@ -20,7 +20,7 @@ index 5cb195fc8d1431088253d496585f19e81f8082ef..065a189566d1eea08b1013ce64d1f228
|
|||
if (player.connection != null) {
|
||||
byte b0;
|
||||
|
||||
@@ -1115,8 +1120,10 @@ public abstract class PlayerList {
|
||||
@@ -1114,8 +1119,10 @@ public abstract class PlayerList {
|
||||
player.connection.send(new ClientboundEntityEventPacket(player, b0));
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ index 5cb195fc8d1431088253d496585f19e81f8082ef..065a189566d1eea08b1013ce64d1f228
|
|||
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 1b9eeb31e2cea8a30640af4daa73f7a3b335a9c4..57839c42ca0f9925028eb4f8e3d39a252b9fcbf8 100644
|
||||
index eccc82f4c8eeb3a2b6ae2abbd1a38d447a2bfda8..537590236e9a0ac2946953ebbebe0044e17ccc72 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -591,6 +591,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Reset shield blocking on dimension change
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 58bbf3176f405c3c31007780368a3e16948382a7..4b4f5fcb51b54981d81924e3d1b9ff091e2c5ae5 100644
|
||||
index effafbcd8400cc40956d9cf36757e83f7f803038..5a26a7d6e052c0533f73b1930da6c801f23cb521 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1199,6 +1199,11 @@ public class ServerPlayer extends Player {
|
||||
@@ -1198,6 +1198,11 @@ public class ServerPlayer extends Player {
|
||||
this.level().getCraftServer().getPluginManager().callEvent(changeEvent);
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityMoveEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e679ee1cfae0787775c655690094d72732e1bbb4..f8e74f8818002f7cc1be0bdb2317439b29a05ad5 100644
|
||||
index 1d109679f5f16e8a4fb32020bc5d781b817f1ac8..7ab3e35d4a6376f4c18c36ef1d6a29556d19f15f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1475,6 +1475,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1463,6 +1463,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
|
||||
|
@ -17,7 +17,7 @@ index e679ee1cfae0787775c655690094d72732e1bbb4..f8e74f8818002f7cc1be0bdb2317439b
|
|||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2f1d8a02f9fd85b4d577b67237de8400917c151f..909f9c0a53971a28844a59b1cb4b996afb902d80 100644
|
||||
index b93976abbc98c1beffe4b464735c9b5a71cb45a4..f75722633789155af38184982ce6459a6ff1178e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 909f9c0a53971a28844a59b1cb4b996afb902d80..379be7cd3ce1808cf0cf50e50ac7e8de8c8f652c 100644
|
||||
index f75722633789155af38184982ce6459a6ff1178e..bc7177bc0699e64933399a1ed0e66fee0663636d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1400,6 +1400,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1369,6 +1369,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
this.getChunkSource().blockChanged(pos);
|
||||
|
@ -16,7 +16,7 @@ index 909f9c0a53971a28844a59b1cb4b996afb902d80..379be7cd3ce1808cf0cf50e50ac7e8de
|
|||
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
||||
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
|
||||
|
||||
@@ -1441,6 +1442,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1410,6 +1411,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ Subject: [PATCH] Improve ServerGUI
|
|||
- Show tps in the server stats
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
|
||||
index f93373d28d741e1f8a53e07b4e328ce9c4e1657f..cac68122f2f816674173cd8057107ad6875c6d3b 100644
|
||||
index f93373d28d741e1f8a53e07b4e328ce9c4e1657f..039a86034928a5eb7aaa2d7ca76a7bddcca346bd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
|
||||
@@ -58,9 +58,17 @@ public class RAMDetails extends JList<String> {
|
||||
|
@ -15,7 +15,7 @@ index f93373d28d741e1f8a53e07b4e328ce9c4e1657f..cac68122f2f816674173cd8057107ad6
|
|||
GraphData data = RAMGraph.DATA.peekLast();
|
||||
Vector<String> vector = new Vector<>();
|
||||
+
|
||||
+ double[] tps = new double[] {server.tps1.getAverage(), server.tps5.getAverage(), server.tps15.getAverage()};
|
||||
+ double[] tps = org.bukkit.Bukkit.getTPS();
|
||||
+ String[] tpsAvg = new String[tps.length];
|
||||
+
|
||||
+ for ( int g = 0; g < tps.length; g++) {
|
||||
|
|
|
@ -20,7 +20,7 @@ index 0fb214ddd919b568da64541fd9b531c65caa5fad..9cd267f53505658d1c75187b662c4d9f
|
|||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index da0af328409aae94b3d537bf2db083fbc269d573..3ace5c08dfa2b156d79a00f06a2977c385fe5210 100644
|
||||
index 811c0f36bc314ca79e062fa149c6d19fc2734087..150013a0c62a057671cfad7f852c4439bd9051c6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1137,9 +1137,15 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
|
|||
Closes #5036
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index fde0b21f3e3349cf55ed6e9c200cf0b63dcb11a9..ad8d02821131eac8cb04532a57265fa450cd8e87 100644
|
||||
index 41c682c24b2f984e6cd0cc63eed5acc09f00d649..0ec9312fb2992aa2a7972734cd4be4b1621c594a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -596,6 +596,14 @@ public abstract class PlayerList {
|
||||
@@ -595,6 +595,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end - Configurable player collision
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] forced whitelist: use configurable kick message
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f8e74f8818002f7cc1be0bdb2317439b29a05ad5..2615fbf23202c3218826d98835e327a71a5214e2 100644
|
||||
index 7ab3e35d4a6376f4c18c36ef1d6a29556d19f15f..82ed16af2384c73560b66cb5a60d53fb940371c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2116,7 +2116,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2104,7 +2104,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
||||
|
|
|
@ -19,10 +19,10 @@ index 923026fbc223d845ed8ea4028522b4c6d21673f2..6acec839ee6d7a8893016e79af76892d
|
|||
} else {
|
||||
if (this.player.getHealth() > 0.0F) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ad8d02821131eac8cb04532a57265fa450cd8e87..37662f2b42d1cbaac62743ff9907434670bb93ed 100644
|
||||
index 0ec9312fb2992aa2a7972734cd4be4b1621c594a..27ae2ac95d4f53c1c16b35f737fa6c138ddcc644 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -780,6 +780,12 @@ public abstract class PlayerList {
|
||||
@@ -779,6 +779,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason) {
|
||||
|
@ -35,7 +35,7 @@ index ad8d02821131eac8cb04532a57265fa450cd8e87..37662f2b42d1cbaac62743ff99074346
|
|||
entityplayer.stopRiding(); // CraftBukkit
|
||||
this.players.remove(entityplayer);
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
@@ -821,6 +827,7 @@ public abstract class PlayerList {
|
||||
@@ -820,6 +826,7 @@ public abstract class PlayerList {
|
||||
|
||||
// Paper start - Add PlayerPostRespawnEvent
|
||||
boolean isBedSpawn = false;
|
||||
|
@ -43,7 +43,7 @@ index ad8d02821131eac8cb04532a57265fa450cd8e87..37662f2b42d1cbaac62743ff99074346
|
|||
boolean isRespawn = false;
|
||||
boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
|
||||
// Paper end - Add PlayerPostRespawnEvent
|
||||
@@ -841,6 +848,7 @@ public abstract class PlayerList {
|
||||
@@ -840,6 +847,7 @@ public abstract class PlayerList {
|
||||
if (optional.isPresent()) {
|
||||
BlockState iblockdata = worldserver1.getBlockState(blockposition);
|
||||
boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
|
||||
|
@ -51,7 +51,7 @@ index ad8d02821131eac8cb04532a57265fa450cd8e87..37662f2b42d1cbaac62743ff99074346
|
|||
Vec3 vec3d = (Vec3) optional.get();
|
||||
float f1;
|
||||
|
||||
@@ -869,7 +877,7 @@ public abstract class PlayerList {
|
||||
@@ -868,7 +876,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
||||
|
|
|
@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3ace5c08dfa2b156d79a00f06a2977c385fe5210..b3e11cf65548bd79413620a4a6303b530e15297e 100644
|
||||
index 150013a0c62a057671cfad7f852c4439bd9051c6..5bf8d8de30f69e2eed92400bc75c36231a4631fe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -301,6 +301,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -111,7 +111,7 @@ index 3ace5c08dfa2b156d79a00f06a2977c385fe5210..b3e11cf65548bd79413620a4a6303b53
|
|||
}
|
||||
|
||||
public boolean getCommandBlockOverride(String command) {
|
||||
@@ -2938,5 +2940,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2943,5 +2945,11 @@ public final class CraftServer implements Server {
|
||||
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return mobGoals;
|
||||
}
|
||||
|
|
|
@ -45,10 +45,10 @@ index aee8618e27b893b72931e925724dd683d2e6d2aa..f7c9127346261d83413ca03a1cdaa849
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 4b4f5fcb51b54981d81924e3d1b9ff091e2c5ae5..364ecb81521a9490d561faddd86aa2ac6b225d12 100644
|
||||
index 5a26a7d6e052c0533f73b1930da6c801f23cb521..895c2cd385622fcc426e9e920ff35109f444b569 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1941,8 +1941,16 @@ public class ServerPlayer extends Player {
|
||||
@@ -1940,8 +1940,16 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
|
||||
public boolean setGameMode(GameType gameMode) {
|
||||
|
@ -67,7 +67,7 @@ index 4b4f5fcb51b54981d81924e3d1b9ff091e2c5ae5..364ecb81521a9490d561faddd86aa2ac
|
|||
} else {
|
||||
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId()));
|
||||
if (gameMode == GameType.SPECTATOR) {
|
||||
@@ -1954,7 +1962,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1953,7 +1961,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
this.onUpdateAbilities();
|
||||
this.updateEffectVisibility();
|
||||
|
@ -76,7 +76,7 @@ index 4b4f5fcb51b54981d81924e3d1b9ff091e2c5ae5..364ecb81521a9490d561faddd86aa2ac
|
|||
}
|
||||
}
|
||||
|
||||
@@ -2366,6 +2374,16 @@ public class ServerPlayer extends Player {
|
||||
@@ -2365,6 +2373,16 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
|
||||
public void loadGameTypes(@Nullable CompoundTag nbt) {
|
||||
|
@ -144,7 +144,7 @@ index 6acec839ee6d7a8893016e79af76892d63a7b601..4ee35e2f717a5a55c9f90a6528f5c935
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 57839c42ca0f9925028eb4f8e3d39a252b9fcbf8..41e4c05325bb5ef5ce37caabb1c8a76f80d7abe2 100644
|
||||
index 537590236e9a0ac2946953ebbebe0044e17ccc72..55fec85c4adb6e92e371547b5c3d58e5adc53ce8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1517,7 +1517,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -48,10 +48,10 @@ index 96814e626a95e4e3c2f4df1a0339d37bb02f2e61..ba12919c3f9aec34a9e64993b143ae92
|
|||
|
||||
public boolean shouldDisconnect() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2615fbf23202c3218826d98835e327a71a5214e2..9568e922fb69ff516539aca27a599a4b2e8c647b 100644
|
||||
index 82ed16af2384c73560b66cb5a60d53fb940371c0..19158fae4c8ebd9f5cd136795723771e23dba23c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2116,7 +2116,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2104,7 +2104,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
||||
|
@ -437,10 +437,10 @@ index 9c8188a5937206448479e9e29efcee7b938fb2cc..692c9235d4a6026e3598074a93697255
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 37662f2b42d1cbaac62743ff9907434670bb93ed..50318611b3fad9e7ad4a39c8746f77a7f9b19d69 100644
|
||||
index 27ae2ac95d4f53c1c16b35f737fa6c138ddcc644..14b0f78d78b9f5bdaf96b80baface0df04f8f8fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -683,7 +683,7 @@ public abstract class PlayerList {
|
||||
@@ -682,7 +682,7 @@ public abstract class PlayerList {
|
||||
while (iterator.hasNext()) {
|
||||
entityplayer = (ServerPlayer) iterator.next();
|
||||
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
|
||||
|
@ -449,7 +449,7 @@ index 37662f2b42d1cbaac62743ff9907434670bb93ed..50318611b3fad9e7ad4a39c8746f77a7
|
|||
}
|
||||
|
||||
// Instead of kicking then returning, we need to store the kick reason
|
||||
@@ -1331,8 +1331,8 @@ public abstract class PlayerList {
|
||||
@@ -1318,8 +1318,8 @@ public abstract class PlayerList {
|
||||
// Paper end
|
||||
// CraftBukkit start - disconnect safely
|
||||
for (ServerPlayer player : this.players) {
|
||||
|
@ -491,7 +491,7 @@ index 6724d0a1af13e97bc1d3bd94fd43fef742a0deab..20ba0a0c9eae28658888a77dd2170f62
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 41e4c05325bb5ef5ce37caabb1c8a76f80d7abe2..aa145f29dfd60b19fedd4b39bc3103fb3c8fa242 100644
|
||||
index 55fec85c4adb6e92e371547b5c3d58e5adc53ce8..490e84e1b0bc72a5953ac540dc60640814ecc64a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -549,7 +549,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 364ecb81521a9490d561faddd86aa2ac6b225d12..f795699d5bb7295adee8f28ed7837f7586f83552 100644
|
||||
index 895c2cd385622fcc426e9e920ff35109f444b569..12d3809792384643e550b34e59c58d49869ec05d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2343,7 +2343,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2342,7 +2342,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
if (retainOwnership) {
|
||||
if (!itemstack1.isEmpty()) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix kick event leave message not being sent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index f795699d5bb7295adee8f28ed7837f7586f83552..f0f1c5b4dd4dffa29715e3cfe7225f0753713d98 100644
|
||||
index 12d3809792384643e550b34e59c58d49869ec05d..33829587797f9bb6efccb0e5237b2aab020f837e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -269,7 +269,6 @@ public class ServerPlayer extends Player {
|
||||
@@ -268,7 +268,6 @@ public class ServerPlayer extends Player {
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
public boolean supressTrackerForLogin = false; // Paper - Fire PlayerJoinEvent when Player is actually ready
|
||||
|
@ -96,10 +96,10 @@ index 297f9731f005c93c5d8d2d1913bd3bf74afdda47..ffe90271365138d6046b52cad2cf661d
|
|||
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 50318611b3fad9e7ad4a39c8746f77a7f9b19d69..e4cfdba803eea5092c5064ff5dcbc668976176d0 100644
|
||||
index 14b0f78d78b9f5bdaf96b80baface0df04f8f8fc..9e9d4b5cc32beef41aa6d3b0ad8dbbd158b1f148 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -569,6 +569,11 @@ public abstract class PlayerList {
|
||||
@@ -568,6 +568,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // CraftBukkit - return string // Paper - return Component
|
||||
|
|
|
@ -11,7 +11,7 @@ It does not make a lot of sense to damage players if they get crammed,
|
|||
For those who really want it a config option is provided.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index f0f1c5b4dd4dffa29715e3cfe7225f0753713d98..481732b49b9492a7010d85932554b0d466e82765 100644
|
||||
index 33829587797f9bb6efccb0e5237b2aab020f837e..974874a6e72b65f956ebb5605547e5d1be74d2e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -95,6 +95,7 @@ import net.minecraft.util.Mth;
|
||||
|
@ -22,7 +22,7 @@ index f0f1c5b4dd4dffa29715e3cfe7225f0753713d98..481732b49b9492a7010d85932554b0d4
|
|||
import net.minecraft.world.effect.MobEffectInstance;
|
||||
import net.minecraft.world.effect.MobEffects;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -1431,7 +1432,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1430,7 +1431,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public boolean isInvulnerableTo(DamageSource damageSource) {
|
||||
|
|
|
@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..a8e813ca89b033f061e695288b3383bd
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b3e11cf65548bd79413620a4a6303b530e15297e..06f14b2adacdbcc4e9f24b8e1fb2224ae3925172 100644
|
||||
index 5bf8d8de30f69e2eed92400bc75c36231a4631fe..3c29d2a8ccac5ca50d3df41262e9e767daf7035b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -303,6 +303,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -49,10 +49,10 @@ index a2d0699e8427b2262a2396495111125eccafbb66..15db9368227dbc29d07d74e85bd126b3
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 481732b49b9492a7010d85932554b0d466e82765..ef957f0dcea13097e34bf8c9f223eb9790ee282c 100644
|
||||
index 974874a6e72b65f956ebb5605547e5d1be74d2e8..5fff2d791b924e402a1b861c3cff8989c19d5e3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1308,7 +1308,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1307,7 +1307,7 @@ public class ServerPlayer extends Player {
|
||||
} else if (this.bedBlocked(blockposition, enumdirection)) {
|
||||
return Either.left(Player.BedSleepingProblem.OBSTRUCTED);
|
||||
} else {
|
||||
|
@ -61,7 +61,7 @@ index 481732b49b9492a7010d85932554b0d466e82765..ef957f0dcea13097e34bf8c9f223eb97
|
|||
if (this.level().isDay()) {
|
||||
return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW);
|
||||
} else {
|
||||
@@ -2263,44 +2263,50 @@ public class ServerPlayer extends Player {
|
||||
@@ -2262,44 +2262,50 @@ public class ServerPlayer extends Player {
|
||||
return this.respawnForced;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ index 481732b49b9492a7010d85932554b0d466e82765..ef957f0dcea13097e34bf8c9f223eb97
|
|||
} else {
|
||||
this.respawnPosition = null;
|
||||
this.respawnDimension = Level.OVERWORLD;
|
||||
@@ -2308,6 +2314,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2307,6 +2313,7 @@ public class ServerPlayer extends Player {
|
||||
this.respawnForced = false;
|
||||
}
|
||||
|
||||
|
@ -154,10 +154,10 @@ index 481732b49b9492a7010d85932554b0d466e82765..ef957f0dcea13097e34bf8c9f223eb97
|
|||
|
||||
public SectionPos getLastSectionPos() {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index e4cfdba803eea5092c5064ff5dcbc668976176d0..edeec3dd7887fbde9456e39c023d4a2dd9b6ffc5 100644
|
||||
index 9e9d4b5cc32beef41aa6d3b0ad8dbbd158b1f148..3df033f99ccc5b803eca2fe6d4f1e60399c4bee1 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -871,7 +871,7 @@ public abstract class PlayerList {
|
||||
@@ -870,7 +870,7 @@ public abstract class PlayerList {
|
||||
location = CraftLocation.toBukkit(vec3d, worldserver1.getWorld(), f1, 0.0F);
|
||||
} else if (blockposition != null) {
|
||||
entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
|
||||
|
@ -187,7 +187,7 @@ index ecaa7f0b2bf795f16187f11fa27f6d5d435ccbfe..acd5ec218b8d4c096f44ae2eec1379ee
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index aa145f29dfd60b19fedd4b39bc3103fb3c8fa242..85dd644ca86895e91ba639ba4974a05290e4e061 100644
|
||||
index 490e84e1b0bc72a5953ac540dc60640814ecc64a..c74f43450469b1158040372a59c4b49d6020a2aa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1276,9 +1276,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
|
|||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index dd3e5ee62da7b37b51e07796f6a1188e207d49e2..46e14d8bcef8ba9ba2b17f6d2e59db7247b38977 100644
|
||||
index c83f2be16953b5cc009ddef81fd082295f3b2f71..f2015ffc83696b7ab6a552d4bb6fec1d8f6c6031 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1301,9 +1301,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1270,9 +1270,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
|
@ -28,10 +28,10 @@ index dd3e5ee62da7b37b51e07796f6a1188e207d49e2..46e14d8bcef8ba9ba2b17f6d2e59db72
|
|||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index ef957f0dcea13097e34bf8c9f223eb9790ee282c..e711bb835267e09183c2af1ac0df07b9fd5cefcd 100644
|
||||
index 5fff2d791b924e402a1b861c3cff8989c19d5e3b..b04b31e599c4954d4d4176f9d99f29bf0c1fadd7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1582,6 +1582,18 @@ public class ServerPlayer extends Player {
|
||||
@@ -1581,6 +1581,18 @@ public class ServerPlayer extends Player {
|
||||
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
|
||||
this.doCloseContainer();
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ index 4ad3a4403f497f4b437209a9e63445f0d29b09f1..28ec1cc4dec6d12627761a58d635fd51
|
|||
BlockPos blockposition = NaturalSpawner.getRandomPosWithin(world, chunk);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 06f14b2adacdbcc4e9f24b8e1fb2224ae3925172..8bf110c0d9f4203559795d804cbee5b9a5f502e3 100644
|
||||
index 3c29d2a8ccac5ca50d3df41262e9e767daf7035b..20b2fd911c2d8bc530c533e883f334b5b329fa9b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2274,6 +2274,11 @@ public final class CraftServer implements Server {
|
||||
|
@ -294,7 +294,7 @@ index 06f14b2adacdbcc4e9f24b8e1fb2224ae3925172..8bf110c0d9f4203559795d804cbee5b9
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 605c04d10b47b71787b7f3369d4fdfbb98327c1d..b3a48f238e64f4de3074b1a9d7882cd5b6adfba3 100644
|
||||
index b58788161b758eee5fbaee3280c8551116e82566..b3e17c14152204e9ccbe70ee8dfab4b20583d2d6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1682,9 +1682,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
|
|
@ -7,10 +7,10 @@ Reference2BooleanOpenHashMap is going to have
|
|||
better lookups than HashMap.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 9706e08511fcfd72abd5e92d7df54dc199451499..3dc4ee8b39aabf1fdaa82d5a195691d59dd1ffa5 100644
|
||||
index 7f61b2945e5174f89936041c334d4cb2e5cdb130..7c13ef020ac183253465d691adebb0e40f24ee8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1686,7 +1686,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1677,7 +1677,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
final Entity entity;
|
||||
private final int range;
|
||||
SectionPos lastSectionPos;
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 46e14d8bcef8ba9ba2b17f6d2e59db7247b38977..2d0d1da27152654ab43aba0ffe51887137190a2e 100644
|
||||
index f2015ffc83696b7ab6a552d4bb6fec1d8f6c6031..5ed27de9be5300b22cd29b57385e93e6e97ef361 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2356,6 +2356,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2325,6 +2325,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot end
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ensure valid vehicle status
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index e711bb835267e09183c2af1ac0df07b9fd5cefcd..1287a714b50723a8512428d62c4d39edcc396ed9 100644
|
||||
index b04b31e599c4954d4d4176f9d99f29bf0c1fadd7..e418778297b89edd3cdf4ce9917dcb4d4d130023 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -528,7 +528,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -527,7 +527,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable feature seeds
|
|||
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index 38f01952153348d937e326da0ec102cd9b0f80af..2d4090b95193de431f56eaafd4d4561ecccdf99c 100644
|
||||
index 49028463ba47e760281545c2f7597e3db8d6c453..7620c72a4c243cbeea245203ce03a97cbfa7d922 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -284,7 +284,7 @@ public class TimingsExport extends Thread {
|
||||
@@ -286,7 +286,7 @@ public class TimingsExport extends Thread {
|
||||
JSONObject object = new JSONObject();
|
||||
for (String key : config.getKeys(false)) {
|
||||
String fullKey = (parentKey != null ? parentKey + "." + key : key);
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8bf110c0d9f4203559795d804cbee5b9a5f502e3..33a3a46e275a6583ca11dfd87bd9fb7e5b60914a 100644
|
||||
index 20b2fd911c2d8bc530c533e883f334b5b329fa9b..7a5fd6fb4ddcf1ba555725f1bb956333a0450d7c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2454,6 +2454,88 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -26,10 +26,10 @@ index d4658328eeecb1c9e3e25eec14dea07e9e2a8b74..ebda34825bbd10145a81d54c345e31c2
|
|||
GameProfile gameprofile = this.server.getSingleplayerProfile();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index edeec3dd7887fbde9456e39c023d4a2dd9b6ffc5..f66f7e8070cbe7628a6e4ae69418fb863f684fae 100644
|
||||
index 3df033f99ccc5b803eca2fe6d4f1e60399c4bee1..18014d03078be9081c1cbec9e8b9805f719a521d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -678,7 +678,7 @@ public abstract class PlayerList {
|
||||
@@ -677,7 +677,7 @@ public abstract class PlayerList {
|
||||
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
entityplayer = (ServerPlayer) this.players.get(i);
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9568e922fb69ff516539aca27a599a4b2e8c647b..d5436fd2037e510ccbcb195036c5056bbc1b374f 100644
|
||||
index 19158fae4c8ebd9f5cd136795723771e23dba23c..249c3e0724a0f85cd3bae9ae67cc787d3eedfbfc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -596,7 +596,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -18,7 +18,7 @@ index 9568e922fb69ff516539aca27a599a4b2e8c647b..d5436fd2037e510ccbcb195036c5056b
|
|||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 33a3a46e275a6583ca11dfd87bd9fb7e5b60914a..58d46f1a3f2b27d81fed6566e24ed0167d749751 100644
|
||||
index 7a5fd6fb4ddcf1ba555725f1bb956333a0450d7c..5161f6d2fdd7cbf30b52089ecfda56b3d480ecda 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1260,7 +1260,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -31,7 +31,7 @@ index 33a3a46e275a6583ca11dfd87bd9fb7e5b60914a..58d46f1a3f2b27d81fed6566e24ed016
|
|||
biomeProvider = generator.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index b3a48f238e64f4de3074b1a9d7882cd5b6adfba3..146dce90630325437ea57b0c496f6ac5e9fefc7a 100644
|
||||
index b3e17c14152204e9ccbe70ee8dfab4b20583d2d6..391f546e44080293fd94ff240d7809e3f471bb14 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -205,6 +205,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
|
|
@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 58d46f1a3f2b27d81fed6566e24ed0167d749751..0c7bfed8174b19797eda7cfcaf097d85dedeebaa 100644
|
||||
index 5161f6d2fdd7cbf30b52089ecfda56b3d480ecda..e9d6f40de8ce89bc6541dcb3cd847b208ee67a85 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2105,6 +2105,13 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit
|
|||
Copies appropriate checks from CraftWorld#getSpawnLimit
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0c7bfed8174b19797eda7cfcaf097d85dedeebaa..4331b58d553f1b1c3ffc3a980ee41c0a5bf11555 100644
|
||||
index e9d6f40de8ce89bc6541dcb3cd847b208ee67a85..4e64f5b74a26c16325b9778a4646f87936c994a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2282,6 +2282,8 @@ public final class CraftServer implements Server {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue