[ci skip] Move chunk system patch back a bit

This commit is contained in:
Nassim Jahnke 2024-01-24 13:07:40 +01:00
parent 51bef80755
commit ad2cf68a7f
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
207 changed files with 892 additions and 869 deletions

View file

@ -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 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cf05dd46b17e69e09b97d955e9c2198e78ba7f1f..668263f6b58e04461564687f75ae75504beb1996 100644 index f7ff043c99268d5d8d139e2a4d8cd0817b7bb96b..67129bf8c109486b65504536224666b1cb033b44 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -422,6 +422,35 @@ public final class CraftServer implements Server { @@ -422,6 +422,35 @@ public final class CraftServer implements Server {
@ -47,7 +47,7 @@ index cf05dd46b17e69e09b97d955e9c2198e78ba7f1f..668263f6b58e04461564687f75ae7550
if (type == PluginLoadOrder.STARTUP) { if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear(); this.helpMap.clear();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ff503ab0ef9f3245d8ead4519507936f1c2288cf..3436351140383f53404d37b8f974181724d13627 100644 index 5158d536de16c93358d1b335b0fcfbe0d6ce848e..c312c450055965d63db0ccdee8aa8e34e7051d0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -160,6 +160,12 @@ public class Main { @@ -160,6 +160,12 @@ public class Main {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 6a3a8c4cc09a045134a7c3751b33f2763e5a4953..ad3a289af7922bfc8d503eb1da93db72b31a03f6 100644 index fcef34d7c88f7f8e21f9789ce3d0962e64d2f092..aad1bfb515556ed98a55b181057d3ebb178ee52d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -879,11 +879,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -768,11 +768,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftChatMessage.fromJSONComponent(this.displayName); return CraftChatMessage.fromJSONComponent(this.displayName);
} }
@ -32,7 +32,7 @@ index 6a3a8c4cc09a045134a7c3751b33f2763e5a4953..ad3a289af7922bfc8d503eb1da93db72
@Override @Override
public boolean hasDisplayName() { public boolean hasDisplayName() {
return this.displayName != null; return this.displayName != null;
@@ -1024,6 +1036,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -913,6 +925,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromJSONComponent)); return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromJSONComponent));
} }
@ -47,7 +47,7 @@ index 6a3a8c4cc09a045134a7c3751b33f2763e5a4953..ad3a289af7922bfc8d503eb1da93db72
@Override @Override
public void setLore(List<String> lore) { public void setLore(List<String> lore) {
if (lore == null || lore.isEmpty()) { if (lore == null || lore.isEmpty()) {
@@ -1038,6 +1058,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -927,6 +947,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
} }
@ -69,7 +69,7 @@ index 6a3a8c4cc09a045134a7c3751b33f2763e5a4953..ad3a289af7922bfc8d503eb1da93db72
@Override @Override
public boolean hasCustomModelData() { public boolean hasCustomModelData() {
return this.customModelData != null; return this.customModelData != null;
@@ -1506,6 +1541,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1362,6 +1397,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
for (Object object : addFrom) { for (Object object : addFrom) {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d3a7de8d3fd92d36d3df257cae5686fc7f61d3c3..0d3ce1ad077128585bb8960d2d6d38b567bbe5d3 100644 index aa22d4024cdd0ecb1c0442ecdeae00822597362e..9cfc60863caeaa1fd0df153889cadd88fef9e111 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -264,6 +264,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -264,6 +264,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 75b39c8a8471bc37add3a012453c74217357535a..44715334bc69cc9b12f53cecb64381b8aef6fae3 100644 index a6a8b5079ceaad90a79a09cab5c38a6fde6d33ee..de8b12b5014e653cb96d422c74307c7fbfd1b5b5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1546,7 +1546,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1552,7 +1552,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate @DontObfuscate
public String getServerModName() { public String getServerModName() {
@ -19,7 +19,7 @@ index 75b39c8a8471bc37add3a012453c74217357535a..44715334bc69cc9b12f53cecb64381b8
public SystemReport fillSystemReport(SystemReport details) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c41e0fe3421a9066a4a32e74fcc3a414d7006bbd..452fcc1106e25db87c1dd29fb839c45c63a0ce89 100644 index 67129bf8c109486b65504536224666b1cb033b44..58c0fc6c0d5df7cd8331d742dc93aad37d6139c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -261,7 +261,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -261,7 +261,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -63,10 +63,10 @@ index c312c450055965d63db0ccdee8aa8e34e7051d0b..9f4c5a6f22719ae30d88ca02a1db4a3f
net.minecraft.server.Main.main(options); net.minecraft.server.Main.main(options);
} catch (Throwable t) { } catch (Throwable t) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 7621bf889ef765ed57af221edf95b07346f4ae43..cacbde8ac27a70b5e3bcd76ad90bc667abee3817 100644 index c4bf7053d83d207caca0e13e19f5c1afa7062de3..231b4e3552b17f7803815a433a5ece440c227cc6 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java --- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -19,7 +19,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -19,7 +19,7 @@ public class WatchdogThread extends Thread
private WatchdogThread(long timeoutTime, boolean restart) private WatchdogThread(long timeoutTime, boolean restart)
{ {
@ -75,7 +75,7 @@ index 7621bf889ef765ed57af221edf95b07346f4ae43..cacbde8ac27a70b5e3bcd76ad90bc667
this.timeoutTime = timeoutTime; this.timeoutTime = timeoutTime;
this.restart = restart; this.restart = restart;
} }
@@ -65,14 +65,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -65,14 +65,14 @@ public class WatchdogThread extends Thread
{ {
Logger log = Bukkit.getServer().getLogger(); Logger log = Bukkit.getServer().getLogger();
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
@ -93,12 +93,12 @@ index 7621bf889ef765ed57af221edf95b07346f4ae43..cacbde8ac27a70b5e3bcd76ad90bc667
// //
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null ) if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
{ {
@@ -82,7 +82,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -82,7 +82,7 @@ public class WatchdogThread extends Thread
} }
// //
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" ); - log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper + log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log ); WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
//

View file

@ -209,7 +209,7 @@ index 0000000000000000000000000000000000000000..660b2ec6b63a4ceffee44ab11f54dfa7
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 0f516d126ce834adadd6a57a762e34c996403ab2..69e8a7551762ab6de03f43d823e2149f5f9eca70 100644 index dfb37ddb89c2f43d9f9a34a6b2d38616575eb39b..10bf1f9237436b68b855fb63b83a4aeeddf0f0c0 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -190,6 +190,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -190,6 +190,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

View file

@ -98,10 +98,10 @@ index d156f7e3430685947d2b4c30aa867e8002ca70ad..e888cf862662ae6baa6d0de8188aa74a
public void clientTick(Level world, BlockPos pos) { public void clientTick(Level world, BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..1872de0804862be1986b4eb2e6cfe28f952fdde6 100644 index b6a3c75b84d9f768afee33aa0f226207b307c1c0..07e7851ca27ea0f8166be52b086a6504c0deea09 100644
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java --- a/src/main/java/net/minecraft/world/level/EntityGetter.java
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java +++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
@@ -82,6 +82,11 @@ public interface EntityGetter { @@ -70,6 +70,11 @@ public interface EntityGetter {
} }
} }
@ -113,7 +113,7 @@ index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..1872de0804862be1986b4eb2e6cfe28f
@Nullable @Nullable
default Player getNearestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate) { default Player getNearestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate) {
double d = -1.0D; double d = -1.0D;
@@ -111,6 +116,20 @@ public interface EntityGetter { @@ -99,6 +104,20 @@ public interface EntityGetter {
return this.getNearestPlayer(x, y, z, maxDistance, predicate); return this.getNearestPlayer(x, y, z, maxDistance, predicate);
} }
@ -135,10 +135,10 @@ index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..1872de0804862be1986b4eb2e6cfe28f
for(Player player : this.players()) { for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) { if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 29cefb53474080d5e524ae54e9295dd11aa6546d..e1647bc92cc3a7e887cacb8d204ffb120114ff05 100644 index cf8a5b3ba642d4829725bc488c074b1b3b142867..aefd38e71c7c664e3eaa366b5546bb1999c2f2c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2312,6 +2312,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2270,6 +2270,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().language; return this.getHandle().language;
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e1647bc92cc3a7e887cacb8d204ffb120114ff05..7aa9787b96862e427cfd0011bccc0895b0c8f4cd 100644 index aefd38e71c7c664e3eaa366b5546bb1999c2f2c8..eb021cd3d2eb1d4c3f4f2f42b9dbb69572fe98de 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1984,12 +1984,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1942,12 +1942,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setFlying(boolean value) { public void setFlying(boolean value) {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] fix ItemMeta removing CustomModelData
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index fcef34d7c88f7f8e21f9789ce3d0962e64d2f092..814c4cf3f3b0fee53cbad9855525fb18e6631748 100644 index aad1bfb515556ed98a55b181057d3ebb178ee52d..9e11d7bccd04b4c2e6913de56a299190c22aa9c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -353,7 +353,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -353,7 +353,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ded164bbc983a058c944ebf43d2f46f3deeb59da..ef26da06b13254b2b745e7e62540f78615c81252 100644 index d00b789d8deb0163726acbcb10edb0965ac9f326..5b304c0c701a74398ba46ef8766a3d707bbe6a07 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2403,6 +2403,15 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2149,6 +2149,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit
@ -25,7 +25,7 @@ index ded164bbc983a058c944ebf43d2f46f3deeb59da..ef26da06b13254b2b745e7e62540f786
public void onTrackingEnd(Entity entity) { public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..3afb2a7b02e10976eca5bcd9cf9f29223326a1cd 100644 index 8811646495f37587e7976edd8b9558cda412edb1..b58b5b5fa710dc453966f7ff0dea6ac16a88c99d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -319,7 +319,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -319,7 +319,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -56,7 +56,7 @@ index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..3afb2a7b02e10976eca5bcd9cf9f2922
public float getBukkitYaw() { public float getBukkitYaw() {
return this.yRot; return this.yRot;
} }
@@ -2095,6 +2115,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -2043,6 +2063,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.bukkitEntity.storeBukkitValues(nbttagcompound); this.bukkitEntity.storeBukkitValues(nbttagcompound);
} }
// CraftBukkit end // CraftBukkit end
@ -72,7 +72,7 @@ index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..3afb2a7b02e10976eca5bcd9cf9f2922
return nbttagcompound; return nbttagcompound;
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -2222,6 +2251,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -2170,6 +2199,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
// CraftBukkit end // CraftBukkit end

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent block entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0d3ce1ad077128585bb8960d2d6d38b567bbe5d3..99133791afe8a8b5edfbe45eadfa3e0f4e4484a7 100644 index 9cfc60863caeaa1fd0df153889cadd88fef9e111..dfe8eea789a6dd5476da0c194236dba3868a2cb7 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -739,11 +739,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -734,11 +734,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try { try {
tickConsumer.accept(entity); tickConsumer.accept(entity);
} catch (Throwable throwable) { } catch (Throwable throwable) {
@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..66757716b401d4f5b690c895effbbaa4
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index a664126bbcd29026e9d6770e362aa04c2c0b3fc8..ae62ef9bad1774cc6aecb686660ef19244bd1365 100644 index 3e51fb9fe05d5b974ae41ccc0acbb516a07c114b..e7cfac251ebef4eda9105c4f64783a9bc3e0e59e 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1159,11 +1159,11 @@ public class LevelChunk extends ChunkAccess { @@ -1069,11 +1069,11 @@ public class LevelChunk extends ChunkAccess {
gameprofilerfiller.pop(); gameprofilerfiller.pop();
} catch (Throwable throwable) { } catch (Throwable throwable) {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Configurable top of nether void damage
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3afb2a7b02e10976eca5bcd9cf9f29223326a1cd..47dc48fcf1e0d3a717479ce2738bfb79961bbed3 100644 index b58b5b5fa710dc453966f7ff0dea6ac16a88c99d..8e4f8849acfede8eec04527b67a3405ae805633d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -722,7 +722,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -670,7 +670,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
public void checkBelowWorld() { public void checkBelowWorld() {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Always tick falling blocks
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index a5ab3e1d52ff68730a4b9069e6d25a3d31c25da5..2cb5bbe371333f566b4d6d3ee8016857986e9af0 100644 index a5da6c1cae0afbde684be250e2fc3c0c32a1265b..e5ff35531a933268f2b8b6c15c234de4482931d5 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -92,6 +92,7 @@ public class ActivationRange @@ -92,6 +92,7 @@ public class ActivationRange

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 682388297375ea43515388bbdf9f7d2b949a7a62..11d2a3fd4e7baa00276f358c9b97752dbc6a76fd 100644 index 61d4afb6b76fdffdda9f01af5005f005e21f4807..c1006a1991e294fa69b1eb35f4224154b064671b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1074,6 +1074,7 @@ public class ServerPlayer extends Player { @@ -1030,6 +1030,7 @@ public class ServerPlayer extends Player {
this.unRide(); this.unRide();
this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.wonGame) { if (!this.wonGame) {

View file

@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion. an entity's exposure during an explosion.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 44715334bc69cc9b12f53cecb64381b8aef6fae3..bb66ed2fa4bbf4e8836022b210ca754b821adf95 100644 index de8b12b5014e653cb96d422c74307c7fbfd1b5b5..cb7dcb4dc310f1857600b340e4101e2829fcf6b6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1420,6 +1420,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1426,6 +1426,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop(); this.profiler.pop();
this.profiler.pop(); this.profiler.pop();
@ -120,7 +120,7 @@ index c5d644876e0c92a444a574ee7571227e19b28482..4e382cfae7a3a1889bc36bad24c6ea38
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 99133791afe8a8b5edfbe45eadfa3e0f4e4484a7..6c1fe1f24f79c28508e41c55d34b7a5c6c8f5d28 100644 index dfe8eea789a6dd5476da0c194236dba3868a2cb7..7ead83d46e7bb3ee3586acf695b08f197f61f04a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ef26da06b13254b2b745e7e62540f78615c81252..6a3caf6107430e210ee1e689af2cd6d44d9c3713 100644 index 5b304c0c701a74398ba46ef8766a3d707bbe6a07..40287f5dbdfb5526f4cba901ded9740009e29b00 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -846,7 +846,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -609,7 +609,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
ProfilerFiller gameprofilerfiller = this.getProfiler(); ProfilerFiller gameprofilerfiller = this.getProfiler();
gameprofilerfiller.push("thunder"); gameprofilerfiller.push("thunder");

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6a3caf6107430e210ee1e689af2cd6d44d9c3713..a09299befdab37bfd3ceb42f9608e285eae5fde6 100644 index 40287f5dbdfb5526f4cba901ded9740009e29b00..4b6fc197c6e0544f2ec993ea863e9dd560b05f11 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -876,11 +876,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -639,11 +639,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.popPush("iceandsnow"); gameprofilerfiller.popPush("iceandsnow");

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ee35514f0bfb0499e8aab7ce702bd2e2ef09d5db..917175e54ac8979659bbfb2c2cf06431f63e01df 100644 index c1006a1991e294fa69b1eb35f4224154b064671b..b0a548ed0abbe08df2cae771248a811fba3891da 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -222,7 +222,7 @@ public class ServerPlayer extends Player { @@ -222,7 +222,7 @@ public class ServerPlayer extends Player {
@ -17,7 +17,7 @@ index ee35514f0bfb0499e8aab7ce702bd2e2ef09d5db..917175e54ac8979659bbfb2c2cf06431
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
@Nullable @Nullable
private Vec3 startingToFallPosition; private Vec3 startingToFallPosition;
@@ -316,7 +316,7 @@ public class ServerPlayer extends Player { @@ -272,7 +272,7 @@ public class ServerPlayer extends Player {
this.lastActionTime = Util.getMillis(); this.lastActionTime = Util.getMillis();
this.recipeBook = new ServerRecipeBook(); this.recipeBook = new ServerRecipeBook();
this.requestedViewDistance = 2; this.requestedViewDistance = 2;
@ -26,7 +26,7 @@ index ee35514f0bfb0499e8aab7ce702bd2e2ef09d5db..917175e54ac8979659bbfb2c2cf06431
this.lastSectionPos = SectionPos.of(0, 0, 0); this.lastSectionPos = SectionPos.of(0, 0, 0);
this.chunkTrackingView = ChunkTrackingView.EMPTY; this.chunkTrackingView = ChunkTrackingView.EMPTY;
this.respawnDimension = Level.OVERWORLD; this.respawnDimension = Level.OVERWORLD;
@@ -1964,9 +1964,10 @@ public class ServerPlayer extends Player { @@ -1920,9 +1920,10 @@ public class ServerPlayer extends Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event); this.server.server.getPluginManager().callEvent(event);
} }
@ -39,10 +39,10 @@ index ee35514f0bfb0499e8aab7ce702bd2e2ef09d5db..917175e54ac8979659bbfb2c2cf06431
// CraftBukkit end // CraftBukkit end
this.language = clientOptions.language(); this.language = clientOptions.language();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7aa9787b96862e427cfd0011bccc0895b0c8f4cd..49d0e2988d2267c4721d8ce37a96eb1d3944ea5a 100644 index eb021cd3d2eb1d4c3f4f2f42b9dbb69572fe98de..70a5ced9e39d6ce0e38f9ee04883584f40d49971 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2310,7 +2310,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2268,7 +2268,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public String getLocale() { public String getLocale() {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable container update tick rate
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 94571a63353b014f7aa30d8d0453332265c1d53f..ca511ec40965eb33f1e0e5c257ed9ae4e3d26d62 100644 index b0a548ed0abbe08df2cae771248a811fba3891da..7e777ab6998203e031fb8387b1521bff3d86f11a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -247,6 +247,7 @@ public class ServerPlayer extends Player { @@ -247,6 +247,7 @@ public class ServerPlayer extends Player {
@ -16,7 +16,7 @@ index 94571a63353b014f7aa30d8d0453332265c1d53f..ca511ec40965eb33f1e0e5c257ed9ae4
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
@@ -683,7 +684,12 @@ public class ServerPlayer extends Player { @@ -639,7 +640,12 @@ public class ServerPlayer extends Player {
--this.invulnerableTime; --this.invulnerableTime;
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index fcf3be628e5ee6155ebc4e73c24043731f2f7894..f7407f5204a2cbfcc46987d5e0a34770b2e5abbf 100644 index 7ead83d46e7bb3ee3586acf695b08f197f61f04a..6fbadd278138743f87fcf6b3c3d3c57af41d437c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -712,9 +712,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -707,9 +707,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally(); boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0; int tilesThisCycle = 0;

View file

@ -12,7 +12,7 @@ improve setPosition to use raw
public net.minecraft.world.entity.Entity setRot(FF)V public net.minecraft.world.entity.Entity setRot(FF)V
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index fdf3bf3decb14378f5e59e41bab26e965bc7be14..ffd73624360e76caef477aeb0074fc8eba13c1c6 100644 index f5a4191977e8675952fc689744c8a39e86f62a07..e870be760f00bac1d5eb32ed6d22c4dc8a8ebf78 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -227,7 +227,7 @@ public abstract class PlayerList { @@ -227,7 +227,7 @@ public abstract class PlayerList {

View file

@ -17,10 +17,10 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com> Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e8e5773776060b7b6861c80ec736bc5740a262c8..64b5af3745642d2a2e2075cb70ef4defbee64d15 100644 index ce7caf08865df9ff032ba6c42308ea3ce4de6226..04e68886a5385234701962f2502948052074515e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1937,7 +1937,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1930,7 +1930,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
OutgoingChatMessage outgoing = OutgoingChatMessage.create(original); OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
@ -29,7 +29,7 @@ index e8e5773776060b7b6861c80ec736bc5740a262c8..64b5af3745642d2a2e2075cb70ef4def
this.handleCommand(s); this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin // Do nothing, this is coming from a plugin
@@ -2024,7 +2024,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2017,7 +2017,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
} }
@ -40,7 +40,7 @@ index e8e5773776060b7b6861c80ec736bc5740a262c8..64b5af3745642d2a2e2075cb70ef4def
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 73ed8a00ed83a0f7da7a5f69e743850d7a5b76cc..7e7dfec65f1756e21eb79359e13d429fe1955bba 100644 index 58c0fc6c0d5df7cd8331d742dc93aad37d6139c9..c370a3be48d3582eb23e0831a3e21798ade9affd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -885,7 +885,7 @@ public final class CraftServer implements Server { @@ -885,7 +885,7 @@ public final class CraftServer implements Server {
@ -53,10 +53,10 @@ index 73ed8a00ed83a0f7da7a5f69e743850d7a5b76cc..7e7dfec65f1756e21eb79359e13d429f
if (this.commandMap.dispatch(sender, commandLine)) { if (this.commandMap.dispatch(sender, commandLine)) {
return true; return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 49d0e2988d2267c4721d8ce37a96eb1d3944ea5a..1ebbd53d545d4b9ac3341c6a68ec97a2f468fb48 100644 index 70a5ced9e39d6ce0e38f9ee04883584f40d49971..d37ff41c7266f6811988272e32e035469fe30f46 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -498,7 +498,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -456,7 +456,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return; if (this.getHandle().connection == null) return;

View file

@ -18,10 +18,10 @@ index 8b2206c5c56341ecd96837bdb3e0c6ab7c874af5..897c815fb448d1e9ca75b7f8b93b4021
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) { if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random); return checkMobSpawnRules(type, world, spawnReason, pos, random);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 7687a81bfa420e8377308fea3d6738141bc945d3..df02963faaf8f514f4175d394e67d2df10c8a3ea 100644 index b1aeb021e53a233bfb0439d38f1a889ed6fc301d..491416754e1c5e8c2b345b57f45289906c7932ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -171,7 +171,7 @@ public class CraftChunk implements Chunk { @@ -215,7 +215,7 @@ public class CraftChunk implements Chunk {
@Override @Override
public boolean isSlimeChunk() { public boolean isSlimeChunk() {
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk // 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk

View file

@ -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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7e7dfec65f1756e21eb79359e13d429fe1955bba..6cd22b11b1fec22087dca1b8dcfbc9c19a499399 100644 index c370a3be48d3582eb23e0831a3e21798ade9affd..fa77a985087acf3398f65b58be7c1d12ea8f7f66 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2112,6 +2112,7 @@ public final class CraftServer implements Server { @@ -2112,6 +2112,7 @@ public final class CraftServer implements Server {

View file

@ -64,7 +64,7 @@ index 7bb08db97c324d13836303cc8a4623c71d6c8a2c..5e9045f7722481e1f83a3d36d7b3d86e
// Paper end // Paper end
buf.writeComponent(this.text); buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 054ada5455c6570f86d9a010fcb8eaf57bf7151d..6d8b46743473832b2c7c604b3023541a22e3abc9 100644 index d37ff41c7266f6811988272e32e035469fe30f46..cfa95917b39b32917bf32b2e97211d232d9037fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -74,7 +74,7 @@ index 054ada5455c6570f86d9a010fcb8eaf57bf7151d..6d8b46743473832b2c7c604b3023541a
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding; import com.google.common.io.BaseEncoding;
@@ -340,6 +341,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -298,6 +299,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 16fa26878fc7bcf5d22d779ce7b37a59582ba033..927428f11e005fff28f01cfb584a2789aad02afb 100644 index 8e4f8849acfede8eec04527b67a3405ae805633d..bef8f3574ecb0d957f9041639b56c94b41913f99 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3233,7 +3233,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -3181,7 +3181,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType()); double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType());
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0); BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
// CraftBukkit start // CraftBukkit start
@ -24,7 +24,7 @@ index 16fa26878fc7bcf5d22d779ce7b37a59582ba033..927428f11e005fff28f01cfb584a2789
return null; return null;
} }
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
index 0762bb248b3bd43a06e89aa1893a6189f0e13866..431f1cf004471dbfb149f697300c3c7fe6bfda4d 100644 index 550b7bc694d861c084769265f6c49c4d44033296..afdd4ecbff21e2172b390bcbdf74f3c1bbddafcc 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -43,7 +43,7 @@ public class PortalForcer { @@ -43,7 +43,7 @@ public class PortalForcer {

View file

@ -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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 236bbec16b90a71d42d7b55fb5fedbf1a8b350dc..95e864de78b7e1825c4899295ee7c1970f888b14 100644 index fa77a985087acf3398f65b58be7c1d12ea8f7f66..b7707cccbdc1b55f49cc70218949aacdceeb2651 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -298,6 +298,7 @@ public final class CraftServer implements Server { @@ -298,6 +298,7 @@ public final class CraftServer implements Server {
@ -17,7 +17,7 @@ index 236bbec16b90a71d42d7b55fb5fedbf1a8b350dc..95e864de78b7e1825c4899295ee7c197
static { static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index acfe67911d052933bbf62e5c68181f4472b6e4c9..9ff8190002d25a13e6166e076b54a006cff0b47d 100644 index 49294a8d580d891f21d8d4cbae14ae477c01ff8d..74937603e7b8308fd314d650d9d966e8abd2c725 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -128,10 +128,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -128,10 +128,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -62,27 +62,24 @@ index acfe67911d052933bbf62e5c68181f4472b6e4c9..9ff8190002d25a13e6166e076b54a006
public double getHeight() { public double getHeight() {
return this.getHandle().getBbHeight(); return this.getHandle().getBbHeight();
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index cacbde8ac27a70b5e3bcd76ad90bc667abee3817..b5a2cbc21165e80820d6f7e2690e6e18de54c420 100644 index 231b4e3552b17f7803815a433a5ece440c227cc6..fd3fe8f00981230f1115ad6821a6be9c9f09f7d3 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java --- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -80,7 +80,19 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -130,6 +130,17 @@ public class WatchdogThread extends Thread
log.log( Level.SEVERE, "During the run of the server, a physics stackoverflow was supressed" ); }
log.log( Level.SEVERE, "near " + net.minecraft.world.level.Level.lastPhysicsProblem ); log.log( Level.SEVERE, "\tStack:" );
} //
- // + // Paper start - Warn in watchdog if an excessive velocity was ever set
+ // Paper start - Warn in watchdog if an excessive velocity was ever set + if (org.bukkit.craftbukkit.CraftServer.excessiveVelEx != null) {
+ if ( org.bukkit.craftbukkit.CraftServer.excessiveVelEx != null ) + log.log(Level.SEVERE, "------------------------------");
+ { + log.log(Level.SEVERE, "During the run of the server, a plugin set an excessive velocity on an entity");
+ log.log( Level.SEVERE, "------------------------------" ); + log.log(Level.SEVERE, "This may be the cause of the issue, or it may be entirely unrelated");
+ log.log( Level.SEVERE, "During the run of the server, a plugin set an excessive velocity on an entity" ); + log.log(Level.SEVERE, org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getMessage());
+ log.log( Level.SEVERE, "This may be the cause of the issue, or it may be entirely unrelated" ); + for (StackTraceElement stack : org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getStackTrace()) {
+ log.log( Level.SEVERE, org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getMessage()); + log.log( Level.SEVERE, "\t\t" + stack );
+ for ( StackTraceElement stack : org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getStackTrace() ) + }
+ { + }
+ log.log( Level.SEVERE, "\t\t" + stack ); + // Paper end
+ } for ( StackTraceElement stack : thread.getStackTrace() )
+ } {
+ // Paper end log.log( Level.SEVERE, "\t\t" + stack );
log.log( Level.SEVERE, "------------------------------" );
log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system

View file

@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds. This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1cb9dbb01a320081188320048d36f61434efa109..73b6740cf50d878b98438f58c2291c0d13f412b7 100644 index cfa95917b39b32917bf32b2e97211d232d9037fd..2de70507a03e662afa45dd9f2e3c28c857a8037c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1168,7 +1168,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1126,7 +1126,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entity.connection.teleport(to); entity.connection.teleport(to);
} else { } else {
// The respawn reason should never be used if the passed location is non null. // The respawn reason should never be used if the passed location is non null.

View file

@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff5
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 19f1be39c5e245c7e999ade36e53bff8d011dedb..0023f4f4572261e38136d3629cc35679454294f5 100644 index 6fbadd278138743f87fcf6b3c3d3c57af41d437c..aee40ef7ae18ad00d8af88dd1e2397fe8df78309 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1,5 +1,10 @@ @@ -1,5 +1,10 @@
@ -102,7 +102,7 @@ index 19f1be39c5e245c7e999ade36e53bff8d011dedb..0023f4f4572261e38136d3629cc35679
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.mojang.serialization.Codec; import com.mojang.serialization.Codec;
import java.io.IOException; import java.io.IOException;
@@ -741,6 +746,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -736,6 +741,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent block entity and entity crashes // Paper start - Prevent block entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable); MinecraftServer.LOGGER.error(msg, throwable);
@ -131,7 +131,7 @@ index 5d65baba605dd83e5f74d526aeda36d8ede8c014..604766a286d00bb4b40c20482376fe80
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index ae62ef9bad1774cc6aecb686660ef19244bd1365..54aed742984809601d64f22ccf5db2d68b3831a2 100644 index e7cfac251ebef4eda9105c4f64783a9bc3e0e59e..30c0f59d521de5e7c9d5bbc0a7f1f272e165f389 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
@ -142,7 +142,7 @@ index ae62ef9bad1774cc6aecb686660ef19244bd1365..54aed742984809601d64f22ccf5db2d6
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.UnmodifiableIterator; import com.google.common.collect.UnmodifiableIterator;
import com.mojang.logging.LogUtils; import com.mojang.logging.LogUtils;
@@ -581,10 +582,16 @@ public class LevelChunk extends ChunkAccess { @@ -580,10 +581,16 @@ public class LevelChunk extends ChunkAccess {
// CraftBukkit start // CraftBukkit start
} else { } else {
@ -163,7 +163,7 @@ index ae62ef9bad1774cc6aecb686660ef19244bd1365..54aed742984809601d64f22ccf5db2d6
// CraftBukkit end // CraftBukkit end
} }
} }
@@ -1162,6 +1169,7 @@ public class LevelChunk extends ChunkAccess { @@ -1072,6 +1079,7 @@ public class LevelChunk extends ChunkAccess {
// Paper start - Prevent block entity and entity crashes // Paper start - Prevent block entity and entity crashes
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
@ -172,10 +172,10 @@ index ae62ef9bad1774cc6aecb686660ef19244bd1365..54aed742984809601d64f22ccf5db2d6
// Paper end - Prevent block entity and entity crashes // Paper end - Prevent block entity and entity crashes
// Spigot start // Spigot start
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
index 5103081e8469dd5a393595eae00c6f6c9d0a5028..9623a7bac79af37016ba5a5b37d4ef0b3dcb7312 100644 index d9daf07132c46548964a75588b69d7a74680e917..66994aa135037919219e0bbcabe7de9f6f2c9dcd 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
@@ -275,6 +275,7 @@ public class RegionFile implements AutoCloseable { @@ -274,6 +274,7 @@ public class RegionFile implements AutoCloseable {
return true; return true;
} }
} catch (IOException ioexception) { } catch (IOException ioexception) {
@ -183,7 +183,7 @@ index 5103081e8469dd5a393595eae00c6f6c9d0a5028..9623a7bac79af37016ba5a5b37d4ef0b
return false; return false;
} }
} }
@@ -356,6 +357,7 @@ public class RegionFile implements AutoCloseable { @@ -355,6 +356,7 @@ public class RegionFile implements AutoCloseable {
((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error ((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error
filechannel.write(buf); filechannel.write(buf);
} catch (Throwable throwable) { } catch (Throwable throwable) {

View file

@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true. logic which is most likely to be true.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 927428f11e005fff28f01cfb584a2789aad02afb..939707c42db4509aa71ccd43bbfe4c17e6bc2c3f 100644 index bef8f3574ecb0d957f9041639b56c94b41913f99..c4168fa278dacf9f50058bb7dc98bb12aef717f2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2860,6 +2860,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -2808,6 +2808,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Nullable @Nullable
public PlayerTeam getTeam() { public PlayerTeam getTeam() {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Chunk Save Reattempt
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
index 9623a7bac79af37016ba5a5b37d4ef0b3dcb7312..f3d169436ce05f1c56599cfe15a56671b7d13516 100644 index 66994aa135037919219e0bbcabe7de9f6f2c9dcd..140d6e455c1729f6e31e95facba5520b75ad838c 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
@@ -275,7 +275,7 @@ public class RegionFile implements AutoCloseable { @@ -274,7 +274,7 @@ public class RegionFile implements AutoCloseable {
return true; return true;
} }
} catch (IOException ioexception) { } catch (IOException ioexception) {
@ -19,33 +19,38 @@ index 9623a7bac79af37016ba5a5b37d4ef0b3dcb7312..f3d169436ce05f1c56599cfe15a56671
} }
} }
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 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 2b6ba2e30c9a4682d6deb2ab750d6923ad8469e4..fa592d5db10dbd4824de74658655ef61230ed431 100644 index 1988063a0cac0350ae3b3388b8f2a0c95b8b259f..a7bf0ce6eefa60ba61975afb8885fc1857fb7959 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -209,6 +209,7 @@ public class RegionFileStorage implements AutoCloseable { @@ -132,6 +132,12 @@ public class RegionFileStorage implements AutoCloseable {
}
// Paper end - rewrite chunk system protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException {
try { // Paper RegionFile regionfile = this.getRegionFile(pos, false); // CraftBukkit
+ int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper - Chunk save reattempt + // Paper start - Chunk save reattempt
+ int attempts = 0;
+ Exception lastException = null;
+ while (attempts++ < 5) {
+ try {
+ // Paper end - Chunk save reattempt
if (nbt == null) { if (nbt == null) {
regionfile.clear(pos); regionfile.clear(pos);
@@ -233,7 +234,18 @@ public class RegionFileStorage implements AutoCloseable { @@ -156,7 +162,18 @@ public class RegionFileStorage implements AutoCloseable {
dataoutputstream.close(); dataoutputstream.close();
} }
} }
+ // Paper start - Chunk save reattempt + // Paper start - Chunk save reattempt
+ return; + return;
+ } catch (Exception ex) { + } catch (Exception ex) {
+ laste = ex; + lastException = ex;
+ } + }
+ } + }
+ if (laste != null) { + if (lastException != null) {
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(laste); + com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(lastException);
+ net.minecraft.server.MinecraftServer.LOGGER.error("Failed to save chunk " + pos, laste); + net.minecraft.server.MinecraftServer.LOGGER.error("Failed to save chunk {}", pos, lastException);
+ } + }
+ // Paper end - Chunk save reattempt + // Paper end - Chunk save reattempt
} finally { // Paper start }
regionfile.fileLock.unlock();
} // Paper end public void close() throws IOException {

View file

@ -22,7 +22,7 @@ index c8041492b7b2a1ff67b95d9944cfccd476b3ee1d..66497960995dc30abe60d26200979a78
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 533aad9a2ed3e9f49307696146b34e0a1bf61cf4..5fef370f164e78a336cfe598aee15e277dd6b946 100644 index 2de70507a03e662afa45dd9f2e3c28c857a8037c..5042d57ae8bf8cadcb22c89f6bb80724a0480f96 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -189,6 +189,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -189,6 +189,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -33,7 +33,7 @@ index 533aad9a2ed3e9f49307696146b34e0a1bf61cf4..5fef370f164e78a336cfe598aee15e27
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity); super(server, entity);
@@ -1997,6 +1998,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1955,6 +1956,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper end - adventure // Paper end - adventure

View file

@ -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. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 95e864de78b7e1825c4899295ee7c1970f888b14..fb2b1c13538ed7123beb3d1bc9169a2b313e87ea 100644 index b7707cccbdc1b55f49cc70218949aacdceeb2651..64541619b92f58a9e2621f754c8494ab5c7014c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -456,6 +456,7 @@ public final class CraftServer implements Server { @@ -456,6 +456,7 @@ public final class CraftServer implements Server {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 41422f3a54e5ee749b7389bfe761b4430e24f274..f03bacff1963650327bc94664b1ac00eb12d362d 100644 index 64541619b92f58a9e2621f754c8494ab5c7014c8..73e29dc1cce2999e81d250a9cc8fae55df97698a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2709,5 +2709,23 @@ public final class CraftServer implements Server { @@ -2709,5 +2709,23 @@ public final class CraftServer implements Server {

View file

@ -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. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4eb1a2bbdb03973e38ec7cdc93601ddab3e44f8e..1d08a65fa782d8150bc6253d11f0a9ffa25ea325 100644 index 73e29dc1cce2999e81d250a9cc8fae55df97698a..7555a74c90082d4164fbfda9d467514ccf7815bb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -952,8 +952,16 @@ public final class CraftServer implements Server { @@ -952,8 +952,16 @@ public final class CraftServer implements Server {

View file

@ -168,7 +168,7 @@ index cba729914a3adaee2507e2916a4cfb585869746d..a05f01ca9a9bc88e414c8cf89c01c7e9
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) { static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index fcef34d7c88f7f8e21f9789ce3d0962e64d2f092..9dbadab7134c7bb56572cf8c89148b6c743e9bcd 100644 index 9e11d7bccd04b4c2e6913de56a299190c22aa9c1..c76fe9599b4f2458cac6e2477f1f963451b357b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
@ -254,7 +254,7 @@ index fcef34d7c88f7f8e21f9789ce3d0962e64d2f092..9dbadab7134c7bb56572cf8c89148b6c
for (Map.Entry<?, ?> entry : ench.entrySet()) { for (Map.Entry<?, ?> entry : ench.entrySet()) {
// Doctor older enchants // Doctor older enchants
String enchantKey = entry.getKey().toString(); String enchantKey = entry.getKey().toString();
@@ -833,14 +836,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -845,14 +848,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override @Override
public Map<Enchantment, Integer> getEnchants() { public Map<Enchantment, Integer> getEnchants() {
@ -271,7 +271,7 @@ index fcef34d7c88f7f8e21f9789ce3d0962e64d2f092..9dbadab7134c7bb56572cf8c89148b6c
} }
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1227,7 +1230,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1262,7 +1265,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData; clone.customModelData = this.customModelData;
clone.blockData = this.blockData; clone.blockData = this.blockData;
if (this.enchantments != null) { if (this.enchantments != null) {
@ -280,7 +280,7 @@ index fcef34d7c88f7f8e21f9789ce3d0962e64d2f092..9dbadab7134c7bb56572cf8c89148b6c
} }
if (this.hasAttributeModifiers()) { if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
@@ -1469,4 +1472,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1509,4 +1512,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftMetaItem.HANDLED_TAGS; return CraftMetaItem.HANDLED_TAGS;
} }
} }

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic. Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 813a79866794bad9d0da105345641a6e9136ddf8..e8b2e1f45ecd13ac4bfc2c3eb09f2d397b997b78 100644 index aee40ef7ae18ad00d8af88dd1e2397fe8df78309..c48e62063609634a0660c75b9305e9d73e10b4aa 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -352,6 +352,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -352,6 +352,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a43539db71a7344e9477918dc5c7b07d46903bea..08ffa37aaf23c410c670ed1703c5eb2c10efa0f4 100644 index 3eeb40c2176a80b9e2a472d43671ae0fe087d9e7..3179fc1b33f503b0cdd462ad160edee760b5a7eb 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3698,10 +3698,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3698,10 +3698,11 @@ public abstract class LivingEntity extends Entity implements Attackable {

View file

@ -44,10 +44,10 @@ index 3179fc1b33f503b0cdd462ad160edee760b5a7eb..428a9d21b24e9c349bf766c16172ffd9
protected void internalSetAbsorptionAmount(float absorptionAmount) { protected void internalSetAbsorptionAmount(float absorptionAmount) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1d48824c4cfd99ced6a70284aa3b7bce46af81fa..b15df5f55dc12c358df74df500f210976eaba048 100644 index 5042d57ae8bf8cadcb22c89f6bb80724a0480f96..bfbd69635c4a2565cc9a72147ff9585efe40e861 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2232,6 +2232,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2190,6 +2190,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void setRealHealth(double health) { public void setRealHealth(double health) {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 939707c42db4509aa71ccd43bbfe4c17e6bc2c3f..6d3c575d12b3c1cc7c06a4cf1b671a2de894892a 100644 index c4168fa278dacf9f50058bb7dc98bb12aef717f2..b5138df02005e30c1788c97bd9dcbcf2c5fb5d34 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -165,6 +165,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -165,6 +165,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -89,7 +89,7 @@ index 939707c42db4509aa71ccd43bbfe4c17e6bc2c3f..6d3c575d12b3c1cc7c06a4cf1b671a2d
private CraftEntity bukkitEntity; private CraftEntity bukkitEntity;
public CraftEntity getBukkitEntity() { public CraftEntity getBukkitEntity() {
@@ -413,7 +486,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -361,7 +434,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.bb = Entity.INITIAL_AABB; this.bb = Entity.INITIAL_AABB;
this.stuckSpeedMultiplier = Vec3.ZERO; this.stuckSpeedMultiplier = Vec3.ZERO;
this.nextStep = 1.0F; this.nextStep = 1.0F;

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 5a5bb0daf8074a428f18e01bb522a46e4672b2a6..817e0ddc8821dd112fc5aa72bbbe11fdd1b56488 100644 index 4b6fc197c6e0544f2ec993ea863e9dd560b05f11..22f6260ffa7b9fb2f5f226e505e81b3e29760437 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -851,7 +851,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -614,7 +614,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (this.isRainingAt(blockposition)) { if (this.isRainingAt(blockposition)) {
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index bb66ed2fa4bbf4e8836022b210ca754b821adf95..b7854ac5fc753302cf1ab171c561e073cc2fb3e3 100644 index cb7dcb4dc310f1857600b340e4101e2829fcf6b6..07bd44752a8af3e44577484416b89c9acaa3769b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1388,6 +1388,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1394,6 +1394,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) { while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next(); ServerLevel worldserver = (ServerLevel) iterator.next();
@ -18,7 +18,7 @@ index bb66ed2fa4bbf4e8836022b210ca754b821adf95..b7854ac5fc753302cf1ab171c561e073
this.profiler.push(() -> { this.profiler.push(() -> {
return worldserver + " " + worldserver.dimension().location(); 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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6283b7ef17a7c128efb24206fe4f7201fcc48a3e..b389c99d6c19f4d63a3bf220aa165052ea28bf7d 100644 index 22f6260ffa7b9fb2f5f226e505e81b3e29760437..b4fdcfa28347beafe75339782d6e0cd7fc0b6256 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -30,10 +30,10 @@ index 6283b7ef17a7c128efb24206fe4f7201fcc48a3e..b389c99d6c19f4d63a3bf220aa165052
public LevelChunk getChunkIfLoaded(int x, int z) { public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunk(x, z, false); return this.chunkSource.getChunk(x, z, false);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index feaa6e1eaaa8f99f9d68b2da98be63b583e09b68..4f7d59c32db29ac95f237124c19d5a29272c8d42 100644 index c48e62063609634a0660c75b9305e9d73e10b4aa..a617c69054523dda56b78f175fc8b9c134b60ae2 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -506,7 +506,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -501,7 +501,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start // CraftBukkit start
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
CraftWorld world = ((ServerLevel) this).getWorld(); CraftWorld world = ((ServerLevel) this).getWorld();

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index b389c99d6c19f4d63a3bf220aa165052ea28bf7d..31439413aa5ed26b7983ac22fe9ac44786fe0e33 100644 index b4fdcfa28347beafe75339782d6e0cd7fc0b6256..f5c271c604dc74d9d82b44591ffc09e04567e3ab 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2415,6 +2415,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2161,6 +2161,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
} }
// Paper end - Entity origin API // Paper end - Entity origin API
@ -16,7 +16,7 @@ index b389c99d6c19f4d63a3bf220aa165052ea28bf7d..31439413aa5ed26b7983ac22fe9ac447
} }
public void onTrackingEnd(Entity entity) { public void onTrackingEnd(Entity entity) {
@@ -2490,6 +2491,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2236,6 +2237,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
} }
// CraftBukkit end // CraftBukkit end

View file

@ -11,10 +11,10 @@ For people who want all chunks to be treated equally, you can chose a fixed valu
This allows to fine-tune vanilla gameplay. This allows to fine-tune vanilla gameplay.
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 7208b7b916ff179e8dbe9925fb246e3652b4f9c2..31d2de67d3facf00491814f775ef1468b33eb51b 100644 index 30c0f59d521de5e7c9d5bbc0a7f1f272e165f389..8288be49fc0fbedefef799cb1038d5f79b7cf0a3 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -277,6 +277,13 @@ public class LevelChunk extends ChunkAccess { @@ -276,6 +276,13 @@ public class LevelChunk extends ChunkAccess {
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks); return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
} }

View file

@ -11,15 +11,15 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
The maximum size of the RegionFileCache is also made configurable. 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 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 fa592d5db10dbd4824de74658655ef61230ed431..e9cfbee008c1dda2eeac55196d490984fa62ab09 100644 index a7bf0ce6eefa60ba61975afb8885fc1857fb7959..50f8e12c964a7a0f388568e4df512ddffdda4a64 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -92,7 +92,7 @@ public class RegionFileStorage implements AutoCloseable { @@ -37,7 +37,7 @@ public class RegionFileStorage implements AutoCloseable {
return null; if (regionfile != null) {
} return regionfile;
// Paper end - cache regionfile does not exist state } else {
- if (this.regionCache.size() >= 256) { - if (this.regionCache.size() >= 256) {
+ if (this.regionCache.size() >= io.papermc.paper.configuration.GlobalConfiguration.get().misc.regionFileCacheSize) { // Paper - Sanitise RegionFileCache and make configurable. + if (this.regionCache.size() >= io.papermc.paper.configuration.GlobalConfiguration.get().misc.regionFileCacheSize) { // Paper - Sanitise RegionFileCache and make configurable
((RegionFile) this.regionCache.removeLast()).close(); ((RegionFile) this.regionCache.removeLast()).close();
} }

View file

@ -28,10 +28,10 @@ index 644a0fdea6576647539b96528717dbaeab498d93..221e64a66ff12a8de5c75992fc26a54a
+ // Paper end - PlayerUseUnknownEntityEvent + // Paper end - PlayerUseUnknownEntityEvent
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 64b5af3745642d2a2e2075cb70ef4defbee64d15..21d3b837b6875dd9833a70f6f8bca2070016c5a0 100644 index 04e68886a5385234701962f2502948052074515e..a91ba515265c869529776521345887574e1d4076 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2407,8 +2407,38 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2400,8 +2400,38 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}); });
} }
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 449f2ebc77a1850fc948bffc66e605f7bdc8efdd..ad9b4e88e2aaa5d7e70f65536c86742beafc91df 100644 index f5c271c604dc74d9d82b44591ffc09e04567e3ab..dcf2b9820eb9ad92dc7dc559e509a694d3949f02 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1623,6 +1623,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1384,6 +1384,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Override @Override
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) { public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {

View file

@ -18,7 +18,7 @@ index 3d2a689d11bfa230bab61a2a65c6051328f6b78d..cf31771648549ab6d7e4e38b30409ca4
buf.writeComponent(this.playerPrefix); buf.writeComponent(this.playerPrefix);
buf.writeComponent(this.playerSuffix); buf.writeComponent(this.playerSuffix);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 53a135f9f61a29ddfff5aa7eb20b96a2f0fc1fdf..9697e189cf79994ed7d231c7801761791c128310 100644 index 07bd44752a8af3e44577484416b89c9acaa3769b..8d81dcd07a5a9d32d19ff5b4d246dae503651ebd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -621,6 +621,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -621,6 +621,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -43,7 +43,7 @@ index 53a135f9f61a29ddfff5aa7eb20b96a2f0fc1fdf..9697e189cf79994ed7d231c780176179
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP)); this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
this.connection.acceptConnections(); this.connection.acceptConnections();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ffd73624360e76caef477aeb0074fc8eba13c1c6..e3195f03ac449e6e4870489d530ef40918cd5556 100644 index e870be760f00bac1d5eb32ed6d22c4dc8a8ebf78..a8a0b00a6bcc52a94b99d520915c21cc3155bb06 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -156,6 +156,7 @@ public abstract class PlayerList { @@ -156,6 +156,7 @@ public abstract class PlayerList {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e7e892234d4ff95f628e1c368161345f47fa1efc..b27c991d4b7615d0305d01155c908cfcaa8cd4ab 100644 index 8d81dcd07a5a9d32d19ff5b4d246dae503651ebd..635fdf6f809667d3981ca88e1c71bdeff4c80030 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
@ -25,7 +25,7 @@ index e7e892234d4ff95f628e1c368161345f47fa1efc..b27c991d4b7615d0305d01155c908cfc
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
this.profiler = this.metricsRecorder.getProfiler(); this.profiler = this.metricsRecorder.getProfiler();
this.onMetricsRecordingStopped = (methodprofilerresults) -> { this.onMetricsRecordingStopped = (methodprofilerresults) -> {
@@ -2361,9 +2363,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2367,9 +2369,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return false; return false;
} }

View file

@ -504,7 +504,7 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6d3c575d12b3c1cc7c06a4cf1b671a2de894892a..34bd4a3f8639295d4980d2b36fe07e2be0ec0d1e 100644 index b5138df02005e30c1788c97bd9dcbcf2c5fb5d34..a914d2906ae7433164d7f439a0f2f0d781b14747 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -238,6 +238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -238,6 +238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S

View file

@ -5,10 +5,10 @@ Subject: [PATCH] System property for disabling watchdoge
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index b5a2cbc21165e80820d6f7e2690e6e18de54c420..e2bafc68e88c733873638ce7695b684d119f55da 100644 index fd3fe8f00981230f1115ad6821a6be9c9f09f7d3..ab3279be007553cface478795ace34e455615c7b 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java --- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -61,7 +61,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -61,7 +61,7 @@ public class WatchdogThread extends Thread
while ( !this.stopping ) while ( !this.stopping )
{ {
// //

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index da845f0e07e1541514c60252192d49a85163b1a8..3410a2b68146f34f37446c9daeb20f8860b37292 100644 index 635fdf6f809667d3981ca88e1c71bdeff4c80030..730dab49d8216ed458a8d75e873cf5e949b4e4c0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -960,7 +960,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -979,7 +979,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} catch (java.lang.InterruptedException ignored) {} // Paper } catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json"); MinecraftServer.LOGGER.info("Saving usercache.json");
@ -16,9 +16,9 @@ index da845f0e07e1541514c60252192d49a85163b1a8..3410a2b68146f34f37446c9daeb20f88
+ this.getProfileCache().save(false); // Paper - Perf: Async GameProfileCache saving + this.getProfileCache().save(false); // Paper - Perf: Async GameProfileCache saving
} }
// Spigot end // Spigot end
io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 69e8a7551762ab6de03f43d823e2149f5f9eca70..1df4c9b12852ac05652260678597d13ced40f80d 100644 index 10bf1f9237436b68b855fb63b83a4aeeddf0f0c0..726bb3fcb25321d80caa5967cca86733a234b939 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
Only resize the the redstone torch list once, since resizing arrays / lists is costly Only resize the the redstone torch list once, since resizing arrays / lists is costly
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c6c8e76a2820b3bd4724344db5e6852a745e663a..28ff413396312df9de73805e06da70a6fc0e8201 100644 index a617c69054523dda56b78f175fc8b9c134b60ae2..7c977fad2084a849266caf8e424d0e8e24e8626f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -176,6 +176,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -176,6 +176,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2134330bafb9312a26f0259b8410f608d87d8247..faf58b6263f45a3b36014eaf628c2dac23a0ccde 100644 index 9f4c5a6f22719ae30d88ca02a1db4a3f39957943..4fb377d967d13ed920ea1246e84b3b94cda25be6 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -167,6 +167,14 @@ public class Main { @@ -167,6 +167,14 @@ public class Main {

View file

@ -11,10 +11,10 @@ Co-authored-by: lexikiq <noellekiq@gmail.com>
Co-authored-by: Aikar <aikar@aikar.co> Co-authored-by: Aikar <aikar@aikar.co>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ad9b4e88e2aaa5d7e70f65536c86742beafc91df..87cd4d17d618cd9d69a38838a05dbe5d0fe807d4 100644 index dcf2b9820eb9ad92dc7dc559e509a694d3949f02..54b3103d558adacba5f7a7b9fd230649623c7702 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1557,7 +1557,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1318,7 +1318,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Override @Override
public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) { public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) {
@ -81,14 +81,13 @@ index 5bc68514a1e8a212e2681f06b918548c0ec565b6..1977e702f6af39ebf100c1f2f2edc2d1
double deltaLength = Math.sqrt(distanceSquared); double deltaLength = Math.sqrt(distanceSquared);
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance; double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d57235720e701f765dffeafaad644cf2d7207d28..945c620d9ab369d798d1abb03ad8fa4eb02cfb5a 100644 index 7c977fad2084a849266caf8e424d0e8e24e8626f..bffd24f48e509c9049d4c35687bfd35b505db255 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1289,4 +1289,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1273,4 +1273,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return ret;
private ExplosionInteraction() {}
} }
// Paper end
+
+ // Paper start - respect global sound events gamerule + // Paper start - respect global sound events gamerule
+ public List<net.minecraft.server.level.ServerPlayer> getPlayersForGlobalSoundGamerule() { + public List<net.minecraft.server.level.ServerPlayer> getPlayersForGlobalSoundGamerule() {
+ return this.getGameRules().getBoolean(GameRules.RULE_GLOBAL_SOUND_EVENTS) ? ((ServerLevel) this).getServer().getPlayerList().players : ((ServerLevel) this).players(); + return this.getGameRules().getBoolean(GameRules.RULE_GLOBAL_SOUND_EVENTS) ? ((ServerLevel) this).getServer().getPlayerList().players : ((ServerLevel) this).players();

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Add setting for proxy online mode status
TODO: Add isProxyOnlineMode check to Metrics TODO: Add isProxyOnlineMode check to Metrics
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 1df4c9b12852ac05652260678597d13ced40f80d..eb740abb5f51b9423f76faae1701dca4cc127569 100644 index 726bb3fcb25321d80caa5967cca86733a234b939..1e73010b292b4d46daaa33ea5b9480bf00944390 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -584,7 +584,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -557,7 +557,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
public boolean enforceSecureProfile() { public boolean enforceSecureProfile() {
DedicatedServerProperties dedicatedserverproperties = this.getProperties(); DedicatedServerProperties dedicatedserverproperties = this.getProperties();
@ -60,7 +60,7 @@ index b3c6e76105ee26a79a84a203935530f859460652..e697b8f7b165d2394d8155cbee7453e2
} else { } else {
String[] astring1 = astring; String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f8613718893c778cac3396fcedba1cf8144f0f0e..6d45d5f149211eaad9a07019290dac2c3d04084c 100644 index 7555a74c90082d4164fbfda9d467514ccf7815bb..b765da78ff380ffdf6472f850eab73d75fd6f469 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1821,7 +1821,7 @@ public final class CraftServer implements Server { @@ -1821,7 +1821,7 @@ public final class CraftServer implements Server {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 21d3b837b6875dd9833a70f6f8bca2070016c5a0..9d23e60b166caf31856b2592f844af7d6ac68469 100644 index a91ba515265c869529776521345887574e1d4076..4440648589d28d006dee314b6199d005ae17d7f8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1536,13 +1536,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1529,13 +1529,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Spigot start - limit place/interactions // Spigot start - limit place/interactions
private int limitedPackets; private int limitedPackets;
private long lastLimitedPacket = -1; private long lastLimitedPacket = -1;

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 9d23e60b166caf31856b2592f844af7d6ac68469..4c689d2a794e53a2d9915f1ba46435c41bfa74e9 100644 index 4440648589d28d006dee314b6199d005ae17d7f8..63b2028bc880b39e679637228ba86c2cc470490f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -338,7 +338,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -338,7 +338,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Filter bad block entity nbt data from falling blocks
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 6c4224e4752b655710c5b992d9acf9563b183483..ffed5f2295f60416535015a28635975aa2d211dd 100644 index 67088152004caeecf4a678618be19419862e7ff1..1b9dfc32ce13dc9ec2fab60750dc1184dbddc5bd 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -334,7 +334,7 @@ public class FallingBlockEntity extends Entity { @@ -334,7 +334,7 @@ public class FallingBlockEntity extends Entity {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ae361c8a5350b1072df5f672a8208a562b6a4312..914e551d7b2bc383c7247f1f584c6ea4f541887f 100644 index b765da78ff380ffdf6472f850eab73d75fd6f469..b8eac20a5df37408321d3b05f4c55f091f808f50 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2735,5 +2735,24 @@ public final class CraftServer implements Server { @@ -2735,5 +2735,24 @@ public final class CraftServer implements Server {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Optimize Level.hasChunkAt(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 945c620d9ab369d798d1abb03ad8fa4eb02cfb5a..b25505d7053aa6cbe8e2c10e27d9c810dd7c9529 100644 index bffd24f48e509c9049d4c35687bfd35b505db255..0a9b7693a19179a2e8903da76266adf589ae7abb 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -353,6 +353,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -353,6 +353,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View file

@ -34,7 +34,7 @@ index 52325a99ea38530ad69a39ac0215233139f35268..bf5ac907507bf3b5bfcef45b566c0bc1
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ(); return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index e124ae2711bcd4681fe0b41bd266de67bef8344f..1eacb6998f99833441dd1dcb8301f25759675f53 100644 index b2f9429e0d437cf70bf56410e163e957b80ebdf1..3e57142dd9cb23d43857d5a4cb30962e4b696b74 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -217,6 +217,7 @@ public abstract class ChunkGenerator { @@ -217,6 +217,7 @@ public abstract class ChunkGenerator {

View file

@ -26,10 +26,10 @@ index cb88a3a4e4c87a6d6c838183c1640b13d82c9344..0b391b0dc6262ef482c4a253a074b593
// Paper end // Paper end
buf.writeComponent(this.text); buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b15df5f55dc12c358df74df500f210976eaba048..028be33a35e2630cdd49aa03b58e3cf32e565d49 100644 index bfbd69635c4a2565cc9a72147ff9585efe40e861..53d33699b8389a46d27e897b1c24fb250ae025f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -343,6 +343,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -301,6 +301,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper start // Paper start

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ac0b8d569a71098f92aa3d02f1f3d459e20755ab..ede3afab5c2a1d175a5beea85ffa362a3481a857 100644 index 7e777ab6998203e031fb8387b1521bff3d86f11a..5197fc02a080c3f603030d5c4fa59e10f8c0e3b6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2495,7 +2495,7 @@ public class ServerPlayer extends Player { @@ -2451,7 +2451,7 @@ public class ServerPlayer extends Player {
@Override @Override
public boolean isImmobile() { public boolean isImmobile() {

View file

@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections. which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 537d532a2663a0f0384a4af1ffe008dfa395cb38..4e1b8ce73f07b8ea12f9f2b7883cd994aed73648 100644 index 0a9b7693a19179a2e8903da76266adf589ae7abb..1a23790dea064d0e19b58858f9693cb5ec5e5552 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -119,7 +119,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -119,7 +119,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -20,7 +20,7 @@ index 537d532a2663a0f0384a4af1ffe008dfa395cb38..4e1b8ce73f07b8ea12f9f2b7883cd994
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList(); private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
private boolean tickingBlockEntities; private boolean tickingBlockEntities;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3c7fdf150f39a75794a6927bd545c3eb9c480d6f..e60992a618f05174f887ce85741a127161cef408 100644 index 68a7db9c840f101950435b386058f4cf409bfc05..27f7b2cacd3113289b852c767e379d9769a9fa01 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -157,6 +157,56 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -157,6 +157,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View file

@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads. the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index e3195f03ac449e6e4870489d530ef40918cd5556..e93b9c103e9b48fc4eab4ca41ce77c807d3d11ed 100644 index a8a0b00a6bcc52a94b99d520915c21cc3155bb06..18d1056b9a3d936a851f7e7a49981dd4bb203f1d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1061,11 +1061,13 @@ public abstract class PlayerList { @@ -1061,11 +1061,13 @@ public abstract class PlayerList {

View file

@ -247,7 +247,7 @@ index d4d1cad7963a5adcc8c32e1bc02104eb70514331..0321b4bb622930bfe57661b0e6b893d7
} }
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index af6829c25fcd186adc3575d50cab6d46db9a2fac..5c77992e0c49eb217dd66657b35164225b400518 100644 index 8b27b5118cbeeb0b25fb6a23056e51899be32035..94bdd467108bc5fd0211f67a792787ef7c356619 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -522,7 +522,7 @@ public class FishingHook extends Projectile { @@ -522,7 +522,7 @@ public class FishingHook extends Projectile {

View file

@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
You can set this to 0 to disable collisions. You can set this to 0 to disable collisions.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5a69e9b6872426e94d8b4d7a47790e4fd051f157..5903cbf0b5fe99453c74e2abc4e07415507d70dc 100644 index a914d2906ae7433164d7f439a0f2f0d781b14747..05cb13a5636f82d48bf0bd8b9d27abdd80a8df71 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -393,6 +393,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -393,6 +393,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S

View file

@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss. in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3410a2b68146f34f37446c9daeb20f8860b37292..5ab790ed036215d8b09f63f4f13a32a4af07e1c6 100644 index 730dab49d8216ed458a8d75e873cf5e949b4e4c0..0b4b9b0dc80db7cc0287ccdfcdc0cb73dd15bef4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -236,6 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -236,6 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -41,7 +41,7 @@ index 3410a2b68146f34f37446c9daeb20f8860b37292..5ab790ed036215d8b09f63f4f13a32a4
private boolean stopped; private boolean stopped;
private int tickCount; private int tickCount;
private int ticksUntilAutosave; private int ticksUntilAutosave;
@@ -928,7 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -918,7 +919,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.playerList != null) { if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players"); MinecraftServer.LOGGER.info("Saving players");
this.playerList.saveAll(); this.playerList.saveAll();
@ -50,7 +50,7 @@ index 3410a2b68146f34f37446c9daeb20f8860b37292..5ab790ed036215d8b09f63f4f13a32a4
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
} }
@@ -979,6 +980,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -998,6 +999,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void halt(boolean waitForShutdown) { public void halt(boolean waitForShutdown) {
@ -64,7 +64,7 @@ index 3410a2b68146f34f37446c9daeb20f8860b37292..5ab790ed036215d8b09f63f4f13a32a4
if (waitForShutdown) { if (waitForShutdown) {
try { try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index e93b9c103e9b48fc4eab4ca41ce77c807d3d11ed..b38496b2a4d10c7f51667fca2a19129ac7db0016 100644 index 18d1056b9a3d936a851f7e7a49981dd4bb203f1d..40af2325afea3e4831a9d8795ce1932a6a5663bf 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1175,8 +1175,15 @@ public abstract class PlayerList { @@ -1175,8 +1175,15 @@ public abstract class PlayerList {

View file

@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4c689d2a794e53a2d9915f1ba46435c41bfa74e9..03bc7ae947360a721fef5a772ecadb4a18ac73b2 100644 index 63b2028bc880b39e679637228ba86c2cc470490f..2f34ff72f8932a8cac9af48003dfa505f19f07d0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2184,6 +2184,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2177,6 +2177,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
switch (packet.getAction()) { switch (packet.getAction()) {
case PRESS_SHIFT_KEY: case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true); this.player.setShiftKeyDown(true);

View file

@ -6,7 +6,7 @@ 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 914e551d7b2bc383c7247f1f584c6ea4f541887f..e5c3ee4c53dd1c09e35f1d1a47f4467a6a06ae71 100644 index b8eac20a5df37408321d3b05f4c55f091f808f50..83eb0a8aec7b54f15af033a1018d6cd7901e6ce7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2754,5 +2754,10 @@ public final class CraftServer implements Server { @@ -2754,5 +2754,10 @@ public final class CraftServer implements Server {

View file

@ -250,7 +250,7 @@ index 8323f135d6bf2e1f12525e05094ffa3f2420e7e1..a143ea1e58464a3122fbd8ccafe417bd
} }
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1aed25e485a45c6bf77f0baebc1a7745f441af5b..1e1c6f8b22da3e51d001db11392f3ea8d3d3573d 100644 index 0b4b9b0dc80db7cc0287ccdfcdc0cb73dd15bef4..e63fc78259cc802251450e6d73f9837ebcd2f4e6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -155,7 +155,7 @@ import org.slf4j.Logger; @@ -155,7 +155,7 @@ import org.slf4j.Logger;
@ -289,7 +289,7 @@ index 1aed25e485a45c6bf77f0baebc1a7745f441af5b..1e1c6f8b22da3e51d001db11392f3ea8
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
// CraftBukkit end // CraftBukkit end
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
@@ -1113,7 +1116,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1124,7 +1127,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Spigot org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings // CraftBukkit start - Restore terminal to original settings
try { try {
@ -298,7 +298,7 @@ index 1aed25e485a45c6bf77f0baebc1a7745f441af5b..1e1c6f8b22da3e51d001db11392f3ea8
} catch (Exception ignored) { } catch (Exception ignored) {
} }
// CraftBukkit end // CraftBukkit end
@@ -1616,7 +1619,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1622,7 +1625,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override @Override
public void sendSystemMessage(Component message) { public void sendSystemMessage(Component message) {
@ -308,7 +308,7 @@ index 1aed25e485a45c6bf77f0baebc1a7745f441af5b..1e1c6f8b22da3e51d001db11392f3ea8
public KeyPair getKeyPair() { public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index eb740abb5f51b9423f76faae1701dca4cc127569..5b64c7f2f36bdf03f8a764d6c8d77524a0774ad1 100644 index 1e73010b292b4d46daaa33ea5b9480bf00944390..6aede562955799fae90a1234b6300ba3a91ba2f2 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -372,7 +372,7 @@ index 75083eeb9b413e6dd5375007360dce6857a08fff..d292fdb165436f0b9b46b32110f5e09a
if (!SwingUtilities.isEventDispatchThread()) { if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b38496b2a4d10c7f51667fca2a19129ac7db0016..466ca062eaeb9108c59f308a8212cbaf79ad0fc3 100644 index 40af2325afea3e4831a9d8795ce1932a6a5663bf..db4480778e4b917a073c61f29cd45663ed859597 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -160,8 +160,7 @@ public abstract class PlayerList { @@ -160,8 +160,7 @@ public abstract class PlayerList {
@ -386,7 +386,7 @@ index b38496b2a4d10c7f51667fca2a19129ac7db0016..466ca062eaeb9108c59f308a8212cbaf
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e5c3ee4c53dd1c09e35f1d1a47f4467a6a06ae71..44cb33b24fa9d9b8ed42e0fab5b8bd8a3f6ff8ea 100644 index 83eb0a8aec7b54f15af033a1018d6cd7901e6ce7..42b2ec78b8a4089c4d35e92a5450b95a97e057ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -42,7 +42,7 @@ import java.util.logging.Level; @@ -42,7 +42,7 @@ import java.util.logging.Level;

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 3d054cfa5050f4b75eab4a18035655c1bfd9290b..374a91e712c2a6a8ad87d1047bb07d44eaa9908a 100644 index 3fcd93f6d5a7553b032b44e7e919838ad2120dc9..15ad425b9c091ee27965fe166f9021509199aa18 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -670,6 +670,11 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -670,6 +670,11 @@ public abstract class Mob extends LivingEntity implements Targeting {

View file

@ -546,7 +546,7 @@ index 0000000000000000000000000000000000000000..7ac27392a8647ef7d0dc78efe78703e9
+ @NotNull GameProfile buildGameProfile(); + @NotNull GameProfile buildGameProfile();
+} +}
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
index 3a00e24d78acb99d226289ccb9ba419dfc607a45..209594863c2aa965055412adb7db009cca4795a8 100644 index 6d60bb9f77198de3f0692c24b3b0ae085f3a80d0..e5a7a77fda0c7e81c8535ef8cfaca2222b0d79fb 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java --- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java +++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -557,15 +557,15 @@ index 3a00e24d78acb99d226289ccb9ba419dfc607a45..209594863c2aa965055412adb7db009c
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.papermc.paper.math.BlockPosition; import io.papermc.paper.math.BlockPosition;
import io.papermc.paper.math.FinePosition; import io.papermc.paper.math.FinePosition;
@@ -30,6 +32,7 @@ import net.minecraft.world.level.chunk.ChunkAccess; @@ -17,6 +19,7 @@ import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.lang.exception.ExceptionUtils;
+import com.mojang.authlib.GameProfile; +import com.mojang.authlib.GameProfile;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.CraftWorld;
@@ -377,6 +380,10 @@ public final class MCUtil { @@ -361,6 +364,10 @@ public final class MCUtil {
return run.get(); return run.get();
} }
@ -577,7 +577,7 @@ index 3a00e24d78acb99d226289ccb9ba419dfc607a45..209594863c2aa965055412adb7db009c
* Calculates distance between 2 entities * Calculates distance between 2 entities
* @param e1 * @param e1
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 9ead836c08ff48430bc6d3ba225864f48d335eee..0c9f6443663bc567a181393b13311a909602f4a4 100644 index ba58580f4c60205d1c7a7b7dfcdc22c4fafc9bc6..5374a6b70a9780cfe9f62207b290b9a3ab82c7e9 100644
--- a/src/main/java/net/minecraft/server/Main.java --- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java
@@ -176,7 +176,7 @@ public class Main { @@ -176,7 +176,7 @@ public class Main {
@ -612,7 +612,7 @@ index adb472c175cc6f6ced7075a37423d6c898fd5ccb..1ec0f3a7148c2f412421772f6e1dff0b
String s1 = name.toLowerCase(Locale.ROOT); String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 44cb33b24fa9d9b8ed42e0fab5b8bd8a3f6ff8ea..6e5f7936ff7e2838ca88990343e553a6f1213821 100644 index 42b2ec78b8a4089c4d35e92a5450b95a97e057ed..0ba93b1fe563a76dae12cef93ae4a33ca92ff4e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -260,6 +260,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -260,6 +260,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;

View file

@ -100,7 +100,7 @@ index 495a7b713a7ab9c19aad34512b76523bad43b89d..15a5059994371da4850adcf726034a71
return null; return null;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f06afed5f786aad4415cd369903d97a0912dfac7..b56bfa447a15d56bf24c1bb4c05f74584cf37ad3 100644 index 0ba93b1fe563a76dae12cef93ae4a33ca92ff4e6..24fe763be314cd80b37f929a20a1af8da12ae9e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -527,6 +527,7 @@ public final class CraftServer implements Server { @@ -527,6 +527,7 @@ public final class CraftServer implements Server {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5903cbf0b5fe99453c74e2abc4e07415507d70dc..23f233adc1a3910237bb065a41e5d3d074d5bfd0 100644 index 05cb13a5636f82d48bf0bd8b9d27abdd80a8df71..d96fc02a8b84dbcfc17496ca476a5dee8821b785 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -394,6 +394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -394,6 +394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -16,7 +16,7 @@ index 5903cbf0b5fe99453c74e2abc4e07415507d70dc..23f233adc1a3910237bb065a41e5d3d0
// Paper start - Entity origin API // Paper start - Entity origin API
@javax.annotation.Nullable @javax.annotation.Nullable
private org.bukkit.util.Vector origin; private org.bukkit.util.Vector origin;
@@ -2202,6 +2203,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -2150,6 +2151,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
} }
@ -27,7 +27,7 @@ index 5903cbf0b5fe99453c74e2abc4e07415507d70dc..23f233adc1a3910237bb065a41e5d3d0
// Paper end // Paper end
return nbttagcompound; return nbttagcompound;
} catch (Throwable throwable) { } catch (Throwable throwable) {
@@ -2342,6 +2347,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -2290,6 +2295,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.originWorld = originWorld; this.originWorld = originWorld;
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2)); origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
} }

View file

@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 466ca062eaeb9108c59f308a8212cbaf79ad0fc3..38329fe27594c3047d948aaf091fcea33ab270dd 100644 index db4480778e4b917a073c61f29cd45663ed859597..7552d1b9e6c286daaa6b094af0fdebc2b300272a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -631,9 +631,9 @@ public abstract class PlayerList { @@ -631,9 +631,9 @@ public abstract class PlayerList {

View file

@ -31,7 +31,7 @@ index 8ff786c366332588a2df053438f23cc9fb7e2b84..c887d34171f89c731d76c4ca92c70be2
Bootstrap.isBootstrapped = true; Bootstrap.isBootstrapped = true;
Instant instant = Instant.now(); Instant instant = Instant.now();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 09164f4c446d3e80708f1bcb9da333821ee5733d..4d2ebb7af055d1c78a648914c5a1862fe9bc8b8f 100644 index 659b32d49016a23475f3bbda1548a78101b468ce..623c7304a6849e994e22cd559177d9de0dd2f4c4 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -258,10 +258,12 @@ public class Main { @@ -258,10 +258,12 @@ public class Main {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 1a5fb001e28997a113ad8133e9dc946206b85c35..393b77043cbaf58200fca6e56c22c36aa2aa2cfb 100644 index 487e4211d6486d2b3052c931c27cee9729e7841b..fdd1fd084c46b0220c9e7e0389e9b52e782d2878 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -168,6 +168,7 @@ public abstract class BaseSpawner { @@ -168,6 +168,7 @@ public abstract class BaseSpawner {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 03bc7ae947360a721fef5a772ecadb4a18ac73b2..dd1de1632900fd3a3771241c5f3ce69c673f64d7 100644 index 2f34ff72f8932a8cac9af48003dfa505f19f07d0..ba2628f22907b386fe5638220e5f10e39bc1f80b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1225,7 +1225,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1218,7 +1218,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean flag = d7 > 0.0D; boolean flag = d7 > 0.0D;
if (this.player.onGround() && !packet.isOnGround() && flag) { if (this.player.onGround() && !packet.isOnGround() && flag) {

View file

@ -90,10 +90,10 @@ index ce51bde4db395ff30c7d75e3badd68d6395fa40f..3dfec4462d85f3223071b4e78465587d
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 028be33a35e2630cdd49aa03b58e3cf32e565d49..f35a53f6e4af319a4ce6f8e5dc8eb65edb47b6ed 100644 index 53d33699b8389a46d27e897b1c24fb250ae025f8..c3eb39a30a70d7e289caba49749cf1f9c812be90 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -289,6 +289,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -247,6 +247,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: Block entity unload lag spike
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 4e55288250fdefcd55d98f94b58ce8c2411fe1b4..6e3b4a0ace95331e318ce587cb3e03670a1f5c9d 100644 index 1a23790dea064d0e19b58858f9693cb5ec5e5552..2c135093e8eee614e23676a2f07ee4a22ca8203c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -739,6 +739,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -734,6 +734,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally(); boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0; int tilesThisCycle = 0;
@ -17,7 +17,7 @@ index 4e55288250fdefcd55d98f94b58ce8c2411fe1b4..6e3b4a0ace95331e318ce587cb3e0367
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0; this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition); TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
@@ -747,12 +749,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -742,12 +744,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity.isRemoved()) { if (tickingblockentity.isRemoved()) {
// Spigot start // Spigot start
tilesThisCycle--; tilesThisCycle--;

View file

@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled. information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 6e3b4a0ace95331e318ce587cb3e03670a1f5c9d..9d2cf866cf4f0c93dea028e3673d9a51615059af 100644 index 2c135093e8eee614e23676a2f07ee4a22ca8203c..19d6a829edb977d064c5d5a42ae3cab4fc806bb6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -157,7 +157,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -157,7 +157,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -49,7 +49,7 @@ index 6e3b4a0ace95331e318ce587cb3e03670a1f5c9d..9d2cf866cf4f0c93dea028e3673d9a51
this.capturedBlockStates.put(pos.immutable(), blockstate); this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true; captured = true;
} }
@@ -621,7 +622,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -616,7 +617,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) { public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation // CraftBukkit start - tree generation
if (this.captureTreeGeneration) { if (this.captureTreeGeneration) {

View file

@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
If Tile Entity was null, correct Sign to return empty lines instead of null If Tile Entity was null, correct Sign to return empty lines instead of null
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index 63acd109a79ed752a05df3d4f1b99309297c2055..d156f7cc71050f13b2feca00c52ca6b64572b60e 100644 index 66757716b401d4f5b690c895effbbaa46f169238..53443b472d21633f49c102b330c8406c92f09d8d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -44,6 +44,7 @@ public abstract class BlockEntity { @@ -44,6 +44,7 @@ public abstract class BlockEntity {

View file

@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent
Co-authored-by: Aikar <aikar@aikar.co> Co-authored-by: Aikar <aikar@aikar.co>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dd1de1632900fd3a3771241c5f3ce69c673f64d7..14e891458fad814e374f14ef5710a352efb9dac4 100644 index ba2628f22907b386fe5638220e5f10e39bc1f80b..2d633b9921e04dac21d705ffdf0f5a92b41c2e30 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -688,12 +688,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -688,27 +688,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
@ -37,10 +37,6 @@ index dd1de1632900fd3a3771241c5f3ce69c673f64d7..14e891458fad814e374f14ef5710a352
+ server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam"))); // Paper - AsyncTabCompleteEvent + server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam"))); // Paper - AsyncTabCompleteEvent
return; return;
} }
// Paper start
@@ -704,18 +708,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// Paper end
// CraftBukkit end // CraftBukkit end
+ // Paper start - AsyncTabCompleteEvent + // Paper start - AsyncTabCompleteEvent
+ TAB_COMPLETE_EXECUTOR.execute(() -> { + TAB_COMPLETE_EXECUTOR.execute(() -> {
@ -91,7 +87,7 @@ index dd1de1632900fd3a3771241c5f3ce69c673f64d7..14e891458fad814e374f14ef5710a352
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b56bfa447a15d56bf24c1bb4c05f74584cf37ad3..9bc095ccb142e83e419a7f88591bf1219d09bacb 100644 index 24fe763be314cd80b37f929a20a1af8da12ae9e8..26a5e44fdb0078b2711228ac4f0eb827fe03f037 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2227,7 +2227,7 @@ public final class CraftServer implements Server { @@ -2227,7 +2227,7 @@ public final class CraftServer implements Server {

View file

@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f35a53f6e4af319a4ce6f8e5dc8eb65edb47b6ed..62c531603c68597add75de31749943bd47e4580f 100644 index c3eb39a30a70d7e289caba49749cf1f9c812be90..ee5d14413f27e61df0adc8c151cee438a912e6cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1543,7 +1543,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1501,7 +1501,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
@Override @Override

View file

@ -9,10 +9,10 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world 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 diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 2a52f5fc867f35b9d94b813d5cdd92249c60ee8b..b2d679ba18e5f095d1c3e0249022fc564b1a553e 100644 index ed095afdf8be843b9a608130040739c0b21dbe0a..57b344459b670742edc81a5046f1dfc2dae52c9f 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -704,7 +704,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1212,7 +1212,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange;
@ -23,7 +23,7 @@ index 2a52f5fc867f35b9d94b813d5cdd92249c60ee8b..b2d679ba18e5f095d1c3e0249022fc56
// Spigot end // Spigot end
if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) { if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) {
return false; return false;
@@ -719,6 +721,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1227,6 +1229,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} }
entityplayer = (ServerPlayer) iterator.next(); entityplayer = (ServerPlayer) iterator.next();
@ -40,10 +40,10 @@ index 2a52f5fc867f35b9d94b813d5cdd92249c60ee8b..b2d679ba18e5f095d1c3e0249022fc56
return true; return true;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 1ad6b62ee53e2ee4a710211dfc750780519004f9..de1d5da6318958e11a9da56ddd8fef1174d0a537 100644 index 5cd680d2ed47aadb5e65a775d70bc662a92e3d7a..5fc48485aa2045c19c5ec2ba9cb6fafabb1ae8f1 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -557,6 +557,15 @@ public class ServerChunkCache extends ChunkSource { @@ -710,6 +710,15 @@ public class ServerChunkCache extends ChunkSource {
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
Util.shuffle(list, this.level.random); Util.shuffle(list, this.level.random);
@ -60,7 +60,7 @@ index 1ad6b62ee53e2ee4a710211dfc750780519004f9..de1d5da6318958e11a9da56ddd8fef11
boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
Iterator iterator1 = list.iterator(); Iterator iterator1 = list.iterator();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ede3afab5c2a1d175a5beea85ffa362a3481a857..708d1033306da34844827854edaf8a68ed67a936 100644 index 5197fc02a080c3f603030d5c4fa59e10f8c0e3b6..d51244c634d0209efb98be965ce7318480220b96 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -265,6 +265,7 @@ public class ServerPlayer extends Player { @@ -265,6 +265,7 @@ public class ServerPlayer extends Player {
@ -69,5 +69,5 @@ index ede3afab5c2a1d175a5beea85ffa362a3481a857..708d1033306da34844827854edaf8a68
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
+ public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent + public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
// Paper start - replace player chunk loader public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
private final java.util.concurrent.atomic.AtomicReference<io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances> viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1)); super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);

View file

@ -97,7 +97,7 @@ index f0d5e45d0d6ac51106379d20690d34a032a24c39..bfd156acbae31619234fffb180472609
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 393b77043cbaf58200fca6e56c22c36aa2aa2cfb..db4beb22cf54bb3b53561ec0fe06209c478977ff 100644 index fdd1fd084c46b0220c9e7e0389e9b52e782d2878..28f63a211f4ae207b2400d16b1725808ad87f334 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -130,6 +130,27 @@ public abstract class BaseSpawner { @@ -130,6 +130,27 @@ public abstract class BaseSpawner {

View file

@ -255,10 +255,10 @@ index b77f5832265be5aaf96d95fcac4737919720fa6e..e15723080445b09852512132039ca2cd
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 9dbadab7134c7bb56572cf8c89148b6c743e9bcd..ff199678850d848c5d2ce76270d674738eec58f7 100644 index c76fe9599b4f2458cac6e2477f1f963451b357b4..76982348d76ecbcc3db1d81ebb5d2a8805b81e94 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -1462,6 +1462,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1502,6 +1502,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaCrossbow.CHARGED.NBT, CraftMetaCrossbow.CHARGED.NBT,
CraftMetaCrossbow.CHARGED_PROJECTILES.NBT, CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
CraftMetaSuspiciousStew.EFFECTS.NBT, CraftMetaSuspiciousStew.EFFECTS.NBT,

View file

@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..6b0bdc266109cdfb874f08bf74323603
+ +
+} +}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1e1c6f8b22da3e51d001db11392f3ea8d3d3573d..3d066e2a985ed46bc73d9856490d4aa692de26f3 100644 index e63fc78259cc802251450e6d73f9837ebcd2f4e6..1f5f8c7398e974fc8771265b1bc27f68065f944a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -3,6 +3,9 @@ package net.minecraft.server; @@ -3,6 +3,9 @@ package net.minecraft.server;
@ -194,7 +194,7 @@ index 1e1c6f8b22da3e51d001db11392f3ea8d3d3573d..3d066e2a985ed46bc73d9856490d4aa6
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@@ -1364,7 +1367,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1370,7 +1373,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hidesOnlinePlayers()) { if (this.hidesOnlinePlayers()) {
return new ServerStatus.Players(i, list.size(), List.of()); return new ServerStatus.Players(i, list.size(), List.of());
} else { } else {

View file

@ -9,10 +9,10 @@ This can be useful for changing name or skins after a player has logged in.
public-f net.minecraft.world.entity.player.Player gameProfile public-f net.minecraft.world.entity.player.Player gameProfile
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 14e891458fad814e374f14ef5710a352efb9dac4..51d5bed032f89333917accca242772a09ee98d93 100644 index 2d633b9921e04dac21d705ffdf0f5a92b41c2e30..32724550974616c1a17ee3c58fb34fed45898c36 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1468,7 +1468,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1461,7 +1461,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet()); this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
} }
@ -40,7 +40,7 @@ index c05c4258c48d967be7bde8570ac7bd91a9f3bdda..b23b7560854a9904e28bbd06afccf5bb
playerName = gameprofile.getName(); playerName = gameprofile.getName();
uniqueId = gameprofile.getId(); uniqueId = gameprofile.getId();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 38329fe27594c3047d948aaf091fcea33ab270dd..99ba7c82f8a8db9d5841cce18ed5f39439b512b0 100644 index 7552d1b9e6c286daaa6b094af0fdebc2b300272a..9f8a95c8f46a11f36ff16863922a91a8d81d0bb3 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -862,10 +862,16 @@ public abstract class PlayerList { @@ -862,10 +862,16 @@ public abstract class PlayerList {
@ -77,10 +77,10 @@ index 477d3245facb5ae59c786d4f696f64226cb540a6..e8490a58dd4d9bc39a5bb2f9fc109526
public Server getServer() { public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 62c531603c68597add75de31749943bd47e4580f..8c64222f2b0d725c54543911efb0f7d9e98b7bd1 100644 index ee5d14413f27e61df0adc8c151cee438a912e6cf..0f78ff8b4a7143388416563d964c467d29617b36 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -272,11 +272,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -230,11 +230,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.server.getPlayer(this.getUniqueId()) != null; return this.server.getPlayer(this.getUniqueId()) != null;
} }
@ -92,7 +92,7 @@ index 62c531603c68597add75de31749943bd47e4580f..8c64222f2b0d725c54543911efb0f7d9
@Override @Override
public InetSocketAddress getAddress() { public InetSocketAddress getAddress() {
if (this.getHandle().connection == null) return null; if (this.getHandle().connection == null) return null;
@@ -1693,8 +1688,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1651,8 +1646,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) { private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
// Remove this entity from the hidden player's EntityTrackerEntry // Remove this entity from the hidden player's EntityTrackerEntry
@ -109,7 +109,7 @@ index 62c531603c68597add75de31749943bd47e4580f..8c64222f2b0d725c54543911efb0f7d9
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId()); ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) { if (entry != null) {
entry.removePlayer(this.getHandle()); entry.removePlayer(this.getHandle());
@@ -1707,8 +1709,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1665,8 +1667,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID()))); this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
} }
} }
@ -118,7 +118,7 @@ index 62c531603c68597add75de31749943bd47e4580f..8c64222f2b0d725c54543911efb0f7d9
} }
void resetAndHideEntity(org.bukkit.entity.Entity entity) { void resetAndHideEntity(org.bukkit.entity.Entity entity) {
@@ -1773,12 +1773,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1731,12 +1731,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
private void trackAndShowEntity(org.bukkit.entity.Entity entity) { private void trackAndShowEntity(org.bukkit.entity.Entity entity) {
@ -144,7 +144,7 @@ index 62c531603c68597add75de31749943bd47e4580f..8c64222f2b0d725c54543911efb0f7d9
} }
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId()); ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
@@ -1788,6 +1801,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1746,6 +1759,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
} }
@ -184,7 +184,7 @@ index 62c531603c68597add75de31749943bd47e4580f..8c64222f2b0d725c54543911efb0f7d9
void resetAndShowEntity(org.bukkit.entity.Entity entity) { void resetAndShowEntity(org.bukkit.entity.Entity entity) {
// SPIGOT-7312: Can't show/hide self // SPIGOT-7312: Can't show/hide self
@@ -1799,6 +1845,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1757,6 +1803,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.trackAndShowEntity(entity); this.trackAndShowEntity(entity);
} }
} }

View file

@ -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 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9bc095ccb142e83e419a7f88591bf1219d09bacb..8c987d3a3042fadee01508ad0a62eb9878e8dd54 100644 index 26a5e44fdb0078b2711228ac4f0eb827fe03f037..43406c5d7fdd3cd7c88aad5a86252eab28a88c0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1826,6 +1826,25 @@ public final class CraftServer implements Server { @@ -1826,6 +1826,25 @@ public final class CraftServer implements Server {

View file

@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk. provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8c64222f2b0d725c54543911efb0f7d9e98b7bd1..bcbe11807186d2d79a155f6be7bda029ca5f555d 100644 index 0f78ff8b4a7143388416563d964c467d29617b36..e0ce56ab1a1980800402e55ee49df3b896afee60 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -190,6 +190,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -190,6 +190,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -20,7 +20,7 @@ index 8c64222f2b0d725c54543911efb0f7d9e98b7bd1..bcbe11807186d2d79a155f6be7bda029
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity); super(server, entity);
@@ -2160,7 +2161,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2118,7 +2119,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void addChannel(String channel) { public void addChannel(String channel) {

View file

@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID public net.minecraft.world.entity.projectile.Projectile ownerUUID
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 87cd4d17d618cd9d69a38838a05dbe5d0fe807d4..f27472e03a6dc0781168c5862c57b501f7ae2dc9 100644 index 54b3103d558adacba5f7a7b9fd230649623c7702..85e63061856a49c8e531eb0de8d1ca7b9805f424 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2368,6 +2368,12 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2114,6 +2114,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTickingEnd(Entity entity) { public void onTickingEnd(Entity entity) {
ServerLevel.this.entityTickList.remove(entity); ServerLevel.this.entityTickList.remove(entity);

View file

@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use. This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index f27472e03a6dc0781168c5862c57b501f7ae2dc9..6c6ccdf7fb1cab27af720b2c8ef9d68b4521a20d 100644 index 85e63061856a49c8e531eb0de8d1ca7b9805f424..aa9d514f26fbe70edf3a8b7443fbaf577cf3a030 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1742,12 +1742,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1503,12 +1503,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
@ -34,10 +34,10 @@ index f27472e03a6dc0781168c5862c57b501f7ae2dc9..6c6ccdf7fb1cab27af720b2c8ef9d68b
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e60992a618f05174f887ce85741a127161cef408..6abf000543cb842ff43f0adbde035fff595e553d 100644 index 27f7b2cacd3113289b852c767e379d9769a9fa01..8fbc232ce409951d67eee1dbe34bc5bf4d069d01 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1948,13 +1948,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1919,13 +1919,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {

View file

@ -9,10 +9,10 @@ Co-authored-by: aerulion <aerulion@gmail.com>
This event is called when an entity receives knockback by another entity. This event is called when an entity receives knockback by another entity.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 23f233adc1a3910237bb065a41e5d3d074d5bfd0..fad0460ac5d6792384fa46ff9741fee1887e792c 100644 index d96fc02a8b84dbcfc17496ca476a5dee8821b785..94c6914a7af6329e4bed8a8d470563b7901fb248 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1909,8 +1909,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -1857,8 +1857,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
public void push(double deltaX, double deltaY, double deltaZ) { public void push(double deltaX, double deltaY, double deltaZ) {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location. Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 6abf000543cb842ff43f0adbde035fff595e553d..fd73f71cf9ab267c8904012062fc6030897d0de4 100644 index 8fbc232ce409951d67eee1dbe34bc5bf4d069d01..4f631eced3403df0339d3d7b4a49b5c8f68408dd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -719,6 +719,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -729,6 +729,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled; return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled;
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index fd73f71cf9ab267c8904012062fc6030897d0de4..ca6bc987d0bbff0a835fe7b28a2692e1a8d27a6d 100644 index 4f631eced3403df0339d3d7b4a49b5c8f68408dd..845e16bec244a59a89d790363ddd5fe1d7bfdbf7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1048,6 +1048,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1058,6 +1058,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return list; return list;
} }

View file

@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not. to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e85390265dca2a55d0bb6f8dd4682d5a8a6cf478..518a900888b0ab51646f12e6b43a3cc12de55564 100644 index aa9d514f26fbe70edf3a8b7443fbaf577cf3a030..35ed4ba377eadb72d59a7984bc40f3834136174c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1474,7 +1474,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1235,7 +1235,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
if (tileentity instanceof net.minecraft.world.Container) { if (tileentity instanceof net.minecraft.world.Container) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
@ -19,7 +19,7 @@ index e85390265dca2a55d0bb6f8dd4682d5a8a6cf478..518a900888b0ab51646f12e6b43a3cc1
} }
} }
} }
@@ -2458,7 +2458,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2204,7 +2204,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start // Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
@ -29,10 +29,10 @@ index e85390265dca2a55d0bb6f8dd4682d5a8a6cf478..518a900888b0ab51646f12e6b43a3cc1
} }
// Spigot End // Spigot End
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index eadc58dd6ccec5e2f1604b94709181a0754d9802..6c31597821e087f690941c997096153ed06e9707 100644 index d51244c634d0209efb98be965ce7318480220b96..33108a55c1cc305d44238d0862755af874f19395 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -692,7 +692,7 @@ public class ServerPlayer extends Player { @@ -648,7 +648,7 @@ public class ServerPlayer extends Player {
} }
// Paper end - Configurable container update tick rate // Paper end - Configurable container update tick rate
if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) { if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
@ -41,7 +41,7 @@ index eadc58dd6ccec5e2f1604b94709181a0754d9802..6c31597821e087f690941c997096153e
this.containerMenu = this.inventoryMenu; this.containerMenu = this.inventoryMenu;
} }
@@ -885,7 +885,7 @@ public class ServerPlayer extends Player { @@ -841,7 +841,7 @@ public class ServerPlayer extends Player {
// SPIGOT-943 - only call if they have an inventory open // SPIGOT-943 - only call if they have an inventory open
if (this.containerMenu != this.inventoryMenu) { if (this.containerMenu != this.inventoryMenu) {
@ -50,7 +50,7 @@ index eadc58dd6ccec5e2f1604b94709181a0754d9802..6c31597821e087f690941c997096153e
} }
net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure
@@ -1509,7 +1509,7 @@ public class ServerPlayer extends Player { @@ -1465,7 +1465,7 @@ public class ServerPlayer extends Player {
} }
// CraftBukkit end // CraftBukkit end
if (this.containerMenu != this.inventoryMenu) { if (this.containerMenu != this.inventoryMenu) {
@ -59,7 +59,7 @@ index eadc58dd6ccec5e2f1604b94709181a0754d9802..6c31597821e087f690941c997096153e
} }
// this.nextContainerCounter(); // CraftBukkit - moved up // this.nextContainerCounter(); // CraftBukkit - moved up
@@ -1537,7 +1537,13 @@ public class ServerPlayer extends Player { @@ -1493,7 +1493,13 @@ public class ServerPlayer extends Player {
@Override @Override
public void closeContainer() { public void closeContainer() {
@ -75,7 +75,7 @@ index eadc58dd6ccec5e2f1604b94709181a0754d9802..6c31597821e087f690941c997096153e
this.doCloseContainer(); this.doCloseContainer();
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 51d5bed032f89333917accca242772a09ee98d93..678c46517757e3f37d5051fc88c481cbe8bf861b 100644 index 32724550974616c1a17ee3c58fb34fed45898c36..1e40b7933e9e984ae4b3683c7cf82a564a723048 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType; @@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType;
@ -86,7 +86,7 @@ index 51d5bed032f89333917accca242772a09ee98d93..678c46517757e3f37d5051fc88c481cb
import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryCreativeEvent;
import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.event.inventory.SmithItemEvent; import org.bukkit.event.inventory.SmithItemEvent;
@@ -2538,10 +2539,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2531,10 +2532,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override @Override
public void handleContainerClose(ServerboundContainerClosePacket packet) { public void handleContainerClose(ServerboundContainerClosePacket packet) {
@ -104,7 +104,7 @@ index 51d5bed032f89333917accca242772a09ee98d93..678c46517757e3f37d5051fc88c481cb
this.player.doCloseContainer(); this.player.doCloseContainer();
} }
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 99ba7c82f8a8db9d5841cce18ed5f39439b512b0..5517f873e709b6f3b9206f0ad0212a9524f2c691 100644 index 9f8a95c8f46a11f36ff16863922a91a8d81d0bb3..e68a0c86f73325189a67186b058062509663f6e7 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -518,7 +518,7 @@ public abstract class PlayerList { @@ -518,7 +518,7 @@ public abstract class PlayerList {
@ -173,10 +173,10 @@ index 092d2bfab7e8fd9840e853f09adc85311ab29046..af6f8d11f0384c353332f5c5bb0967e5
@Override @Override
public boolean isBlocking() { public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index bcbe11807186d2d79a155f6be7bda029ca5f555d..91ca962588fffc486ca44289f2eb0bac6fcd808d 100644 index e0ce56ab1a1980800402e55ee49df3b896afee60..28b51b1ecf54f9a43678d21cd1b40da32a63d645 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1194,7 +1194,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1152,7 +1152,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory // Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {

View file

@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem. cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 678c46517757e3f37d5051fc88c481cbe8bf861b..90574b9bd5eb9dcb89baf280e0a9503d7b975c01 100644 index 1e40b7933e9e984ae4b3683c7cf82a564a723048..7080f19eab36df503ee285ed81a00624c12e056f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2419,6 +2419,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2412,6 +2412,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
if (event.isCancelled()) { if (event.isCancelled()) {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d6437a6b6b90ceb6fe7d2375ab2fc9e28b469c9b..47ba1f8fbbe3e5a052028ee1dbff31844bc61f78 100644 index 94c6914a7af6329e4bed8a8d470563b7901fb248..7abb4ba10029ad8df5ed520d1d3deb9d2819ca8d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3202,7 +3202,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -3150,7 +3150,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public String toString() { public String toString() {
String s = this.level() == null ? "~NULL~" : this.level().toString(); String s = this.level() == null ? "~NULL~" : this.level().toString();

Some files were not shown because too many files have changed in this diff Show more