batch o' patches

This commit is contained in:
Jake Potrebic 2022-06-08 00:40:34 -07:00
parent 89c3c31af9
commit a1d0432c2c
No known key found for this signature in database
GPG Key ID: ECE0B3C133C016C5
38 changed files with 88 additions and 96 deletions

View File

@ -21,10 +21,10 @@ index 9bb6b6c6ac26790eaf5f8efe55f8db7407fc0065..1753a28e0dc001d55385cdf0d91edde2
public boolean phantomOnlyAttackInsomniacs = true; public boolean phantomOnlyAttackInsomniacs = true;
private void phantomSettings() { private void phantomSettings() {
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index f59de70c4854b10ac39874838db33cdf784a45a1..088ad331ec088478d85aedd8d4c32eab55e18dc5 100644 index 9c5224bd63c63728e86555769702da2f9d0dbbce..452b4cddd2afa4875c760f479c22b017ab05d05e 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -367,7 +367,7 @@ public class EndDragonFight { @@ -368,7 +368,7 @@ public class EndDragonFight {
this.dragonEvent.setVisible(false); this.dragonEvent.setVisible(false);
this.spawnExitPortal(true); this.spawnExitPortal(true);
this.spawnNewGateway(); this.spawnNewGateway();

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Added PlayerStonecutterRecipeSelectEvent
Co-Authored-By: MiniDigger <admin@benndorf.dev> Co-Authored-By: MiniDigger <admin@benndorf.dev>
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
index 221b6ffb426edc034183dbaf37de29c694874c62..c597139b2b88edf629bc0021ebb65d8bea2e6a7d 100644 index b47dc7671fab2117b989d647d7e8e36d12af5f76..d4f71422b25f70abfe50481d6071abea6ad147c0 100644
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
@@ -62,7 +62,7 @@ public class StonecutterMenu extends AbstractContainerMenu { @@ -62,7 +62,7 @@ public class StonecutterMenu extends AbstractContainerMenu {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add dropLeash variable to EntityUnleashEvent
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 78e28d40292ec99ac0a22bd7f834c30c68c00098..2f347a0687e592bf00ef7e5a031a5dde5177ba3b 100644 index 9e0f1938f534a61abc00ed80c8effd7d15056195..0582c118b6206406764d1ea83ca6289cbb0a1392 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
@@ -1233,12 +1233,15 @@ public abstract class Mob extends LivingEntity { @@ -1242,12 +1242,15 @@ public abstract class Mob extends LivingEntity {
return InteractionResult.PASS; return InteractionResult.PASS;
} else if (this.getLeashHolder() == player) { } else if (this.getLeashHolder() == player) {
// CraftBukkit start - fire PlayerUnleashEntityEvent // CraftBukkit start - fire PlayerUnleashEntityEvent
@ -26,7 +26,7 @@ index 78e28d40292ec99ac0a22bd7f834c30c68c00098..2f347a0687e592bf00ef7e5a031a5dde
return InteractionResult.sidedSuccess(this.level.isClientSide); return InteractionResult.sidedSuccess(this.level.isClientSide);
} else { } else {
InteractionResult enuminteractionresult = this.checkAndHandleImportantInteractions(player, hand); InteractionResult enuminteractionresult = this.checkAndHandleImportantInteractions(player, hand);
@@ -1396,8 +1399,11 @@ public abstract class Mob extends LivingEntity { @@ -1410,8 +1413,11 @@ public abstract class Mob extends LivingEntity {
if (this.leashHolder != null) { if (this.leashHolder != null) {
if (!this.isAlive() || !this.leashHolder.isAlive()) { if (!this.isAlive() || !this.leashHolder.isAlive()) {
@ -40,7 +40,7 @@ index 78e28d40292ec99ac0a22bd7f834c30c68c00098..2f347a0687e592bf00ef7e5a031a5dde
} }
} }
@@ -1460,8 +1466,11 @@ public abstract class Mob extends LivingEntity { @@ -1474,8 +1480,11 @@ public abstract class Mob extends LivingEntity {
boolean flag1 = super.startRiding(entity, force); boolean flag1 = super.startRiding(entity, force);
if (flag1 && this.isLeashed()) { if (flag1 && this.isLeashed()) {
@ -54,7 +54,7 @@ index 78e28d40292ec99ac0a22bd7f834c30c68c00098..2f347a0687e592bf00ef7e5a031a5dde
} }
return flag1; return flag1;
@@ -1633,8 +1642,11 @@ public abstract class Mob extends LivingEntity { @@ -1653,8 +1662,11 @@ public abstract class Mob extends LivingEntity {
@Override @Override
protected void removeAfterChangingDimensions() { protected void removeAfterChangingDimensions() {
super.removeAfterChangingDimensions(); super.removeAfterChangingDimensions();
@ -69,7 +69,7 @@ index 78e28d40292ec99ac0a22bd7f834c30c68c00098..2f347a0687e592bf00ef7e5a031a5dde
if (!itemstack.isEmpty()) itemstack.setCount(0); // CraftBukkit if (!itemstack.isEmpty()) itemstack.setCount(0); // CraftBukkit
}); });
diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
index 999d18610666ec442bb038da5c452e3cd77e7428..5f256c1ac5d49e19cfccf174dd55506313c493e0 100644 index 9f2e5cd76376f0f15ed7d93018af2f605eb12e15..41fa86e009a6bc2faf32a211639e8bc6a40bb00c 100644
--- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java
+++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java +++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
@@ -49,8 +49,11 @@ public abstract class PathfinderMob extends Mob { @@ -49,8 +49,11 @@ public abstract class PathfinderMob extends Mob {
@ -101,7 +101,7 @@ index 999d18610666ec442bb038da5c452e3cd77e7428..5f256c1ac5d49e19cfccf174dd555063
} else if (f > 6.0F) { } else if (f > 6.0F) {
double d0 = (entity.getX() - this.getX()) / (double) f; double d0 = (entity.getX() - this.getX()) / (double) f;
diff --git a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java diff --git a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
index ae277032a8748b13cca6ab7892691732e78b6752..6daee9cc30fef287df81d949b6fa0b91fa21d759 100644 index 7eb315aac7737cf443c693147c2cfd871f201724..03de59302041b0bc13922ec129501417804df915 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java --- a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java +++ b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
@@ -122,11 +122,14 @@ public class LeashFenceKnotEntity extends HangingEntity { @@ -122,11 +122,14 @@ public class LeashFenceKnotEntity extends HangingEntity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Reset shield blocking on dimension change
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8d9cfbc171c51830f5005c6604333c7ff54298d7..d5df57d0692f26420fba8ca25c302dfcd9078e20 100644 index 0e712658dee832db147a73c24658a8c9116b79cc..e37bf6844a3cdc85c51787b865f0f37ce70dfaa2 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
@@ -1173,6 +1173,11 @@ public class ServerPlayer extends Player { @@ -1182,6 +1182,11 @@ public class ServerPlayer extends Player {
this.level.getCraftServer().getPluginManager().callEvent(changeEvent); this.level.getCraftServer().getPluginManager().callEvent(changeEvent);
// CraftBukkit end // CraftBukkit end
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] add DragonEggFormEvent
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index 088ad331ec088478d85aedd8d4c32eab55e18dc5..7dbe0bc8082c8e7741f40bbd69bc7d7407945754 100644 index 452b4cddd2afa4875c760f479c22b017ab05d05e..ad5b20fb16b19bb2099c2fd840e8f5c20f345577 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -367,9 +367,23 @@ public class EndDragonFight { @@ -368,9 +368,23 @@ public class EndDragonFight {
this.dragonEvent.setVisible(false); this.dragonEvent.setVisible(false);
this.spawnExitPortal(true); this.spawnExitPortal(true);
this.spawnNewGateway(); this.spawnNewGateway();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] EntityMoveEvent
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 d109ef77109fbeb710eafb55a38c803b9bb37d73..3a73d834c3c8481ff3af3eee7634309f7abe60ab 100644 index 129a93d401a2d0912b1229fa394243861506c461..d800c1e7e6e5473f2fc4a288315371ccc97806b0 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
@@ -1535,6 +1535,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1493,6 +1493,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) { while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next(); ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
@ -17,10 +17,10 @@ index d109ef77109fbeb710eafb55a38c803b9bb37d73..3a73d834c3c8481ff3af3eee7634309f
this.profiler.push(() -> { this.profiler.push(() -> {
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 5f9376afffa369ea2480fafdda5e9fadf46f236e..af99e51d26d3c80ec14d78646f8c672e20f57f5f 100644 index c2c2c5f10b1f748a90f5d72148c9a9e6bdecfaf4..e0e046e2ec8f32ef2c57a2fea77386be47c2a1bf 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
@@ -209,6 +209,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -214,6 +214,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public final LevelStorageSource.LevelStorageAccess convertable; public final LevelStorageSource.LevelStorageAccess convertable;
public final UUID uuid; public final UUID uuid;
public boolean hasPhysicsEvent = true; // Paper public boolean hasPhysicsEvent = true; // Paper
@ -29,10 +29,10 @@ index 5f9376afffa369ea2480fafdda5e9fadf46f236e..af99e51d26d3c80ec14d78646f8c672e
return new Throwable(entity + " Added to world at " + new java.util.Date()); return new Throwable(entity + " Added to world at " + new java.util.Date());
} }
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 f47b278ab6c4d88fabb9b6ff6f2a42c1e45f70a8..30d79e006f22a6cc7652b111b9307f9f1634ba60 100644 index 015e428daf0665af640cef788cfa029e8a198907..db3874f683f19ef4ae2b5e02e08c5c000ae90661 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
@@ -3246,6 +3246,20 @@ public abstract class LivingEntity extends Entity { @@ -3278,6 +3278,20 @@ public abstract class LivingEntity extends Entity {
this.pushEntities(); this.pushEntities();
this.level.getProfiler().pop(); this.level.getProfiler().pop();

View File

@ -21,10 +21,10 @@ index 1753a28e0dc001d55385cdf0d91edde23244d17b..2eef459c0512122425db1374f59935b0
public boolean phantomOnlyAttackInsomniacs = true; public boolean phantomOnlyAttackInsomniacs = true;
private void phantomSettings() { private void phantomSettings() {
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 af99e51d26d3c80ec14d78646f8c672e20f57f5f..a1df04f14fb149315e73307a81514b805ef3cb0d 100644 index e0e046e2ec8f32ef2c57a2fea77386be47c2a1bf..5ad461eb42724ade2574c0ce9c68df655a4524b4 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
@@ -1406,6 +1406,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1486,6 +1486,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
this.getChunkSource().blockChanged(pos); this.getChunkSource().blockChanged(pos);
@ -32,7 +32,7 @@ index af99e51d26d3c80ec14d78646f8c672e20f57f5f..a1df04f14fb149315e73307a81514b80
VoxelShape voxelshape = oldState.getCollisionShape(this, pos); VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos); VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
@@ -1447,6 +1448,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1527,6 +1528,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
} }

View File

@ -7,10 +7,10 @@ Removes a layer of indirection for EnumDirection.getAdjacent(X|Y|Z)(), which is
critical section for much of the server, including the lighting engine. critical section for much of the server, including the lighting engine.
diff --git a/src/main/java/net/minecraft/core/Direction.java b/src/main/java/net/minecraft/core/Direction.java diff --git a/src/main/java/net/minecraft/core/Direction.java b/src/main/java/net/minecraft/core/Direction.java
index 4eddfa6a07f9d42b5ecf9eb92cd609559b9b6b56..6b71d9433846eb4464177f09d7bfdea82200b189 100644 index d23c679485641ee1b21b7c457dccdec8f4baa792..a3bbebcdaea9e0dfddd9825272f84fc76cd13e89 100644
--- a/src/main/java/net/minecraft/core/Direction.java --- a/src/main/java/net/minecraft/core/Direction.java
+++ b/src/main/java/net/minecraft/core/Direction.java +++ b/src/main/java/net/minecraft/core/Direction.java
@@ -64,6 +64,11 @@ public enum Direction implements StringRepresentable { @@ -61,6 +61,11 @@ public enum Direction implements StringRepresentable {
}, (direction1, direction2) -> { }, (direction1, direction2) -> {
throw new IllegalArgumentException("Duplicate keys"); throw new IllegalArgumentException("Duplicate keys");
}, Long2ObjectOpenHashMap::new)); }, Long2ObjectOpenHashMap::new));
@ -22,7 +22,7 @@ index 4eddfa6a07f9d42b5ecf9eb92cd609559b9b6b56..6b71d9433846eb4464177f09d7bfdea8
private Direction(int id, int idOpposite, int idHorizontal, String name, Direction.AxisDirection direction, Direction.Axis axis, Vec3i vector) { private Direction(int id, int idOpposite, int idHorizontal, String name, Direction.AxisDirection direction, Direction.Axis axis, Vec3i vector) {
this.data3d = id; this.data3d = id;
@@ -73,6 +78,11 @@ public enum Direction implements StringRepresentable { @@ -70,6 +75,11 @@ public enum Direction implements StringRepresentable {
this.axis = axis; this.axis = axis;
this.axisDirection = direction; this.axisDirection = direction;
this.normal = vector; this.normal = vector;
@ -34,7 +34,7 @@ index 4eddfa6a07f9d42b5ecf9eb92cd609559b9b6b56..6b71d9433846eb4464177f09d7bfdea8
} }
public static Direction[] orderedByNearest(Entity entity) { public static Direction[] orderedByNearest(Entity entity) {
@@ -357,15 +367,15 @@ public enum Direction implements StringRepresentable { @@ -362,15 +372,15 @@ public enum Direction implements StringRepresentable {
} }
public int getStepX() { public int getStepX() {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add support for hex color codes in console
Converts upstream's hex color code legacy format into actual hex color codes in the console. Converts upstream's hex color code legacy format into actual hex color codes in the console.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1adbceadd5df96e17796561a40eb7b760493440e..c07257314e070d4423c4f53f58cb0962e3ead131 100644 index ccc60a5465efa2b71fc2593d75af62c0b64fe66c..3e519fcc3c2930c6e9642b93e78f8c2b8726dea3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -454,8 +454,10 @@ public class PaperConfig { @@ -449,8 +449,10 @@ public class PaperConfig {
} }
public static boolean deobfuscateStacktraces = true; public static boolean deobfuscateStacktraces = true;
@ -270,13 +270,13 @@ index 0000000000000000000000000000000000000000..ea83ee8762c126c449993a7497257b0b
+ +
+} +}
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 3a73d834c3c8481ff3af3eee7634309f7abe60ab..2914355be3f6c45b2dbd7ceb0ea65c7f22255a6d 100644 index d800c1e7e6e5473f2fc4a288315371ccc97806b0..24e1c7562efbfe4fc8c19f66587dd708f2b2702b 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
@@ -1712,7 +1712,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1670,7 +1670,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override @Override
public void sendMessage(Component message, UUID sender) { public void sendSystemMessage(Component message) {
- MinecraftServer.LOGGER.info(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors - MinecraftServer.LOGGER.info(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors
+ MinecraftServer.LOGGER.info(io.papermc.paper.console.HexFormattingConverter.SERIALIZER.serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors + MinecraftServer.LOGGER.info(io.papermc.paper.console.HexFormattingConverter.SERIALIZER.serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose Tracked Players
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 c63301472922dceb2873553bb4b0c350b37a23c3..23f3acdc37968ec76ffb57e022755c97ff02ff67 100644 index fefd03ffe3c1b4dbdf3035e80d5a00ef2fd6e670..2a3addb00244b8ba68a3eeebba016553782946fd 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
@@ -1271,5 +1271,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1282,5 +1282,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isTicking() { public boolean isTicking() {
return getHandle().isTicking(); return getHandle().isTicking();
} }

View File

@ -19,7 +19,7 @@ compared to the previous stream-based implementation.
See: https://nipafx.dev/java-stream-performance/ See: https://nipafx.dev/java-stream-performance/
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java
index 7680c269c2fe0cf2a51d0ebeb34624181826d578..49f3b25d28072b61f5cc97260df61df892a58714 100644 index a41c3365db8e9999b686f5bf4bd888458cee43a5..1dfcc5cba6ffb463acf161a23fff1ca452184290 100644
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java --- a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java +++ b/src/main/java/net/minecraft/world/entity/ai/sensing/NearestItemSensor.java
@@ -28,11 +28,15 @@ public class NearestItemSensor extends Sensor<Mob> { @@ -28,11 +28,15 @@ public class NearestItemSensor extends Sensor<Mob> {
@ -29,13 +29,13 @@ index 7680c269c2fe0cf2a51d0ebeb34624181826d578..49f3b25d28072b61f5cc97260df61df8
- Optional<ItemEntity> optional = list.stream().filter((itemEntity) -> { - Optional<ItemEntity> optional = list.stream().filter((itemEntity) -> {
- return entity.wantsToPickUp(itemEntity.getItem()); - return entity.wantsToPickUp(itemEntity.getItem());
- }).filter((itemEntity) -> { - }).filter((itemEntity) -> {
- return itemEntity.closerThan(entity, 9.0D); - return itemEntity.closerThan(entity, 32.0D);
- }).filter(entity::hasLineOfSight).findFirst(); - }).filter(entity::hasLineOfSight).findFirst();
- brain.setMemory(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, optional); - brain.setMemory(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, optional);
+ // Paper start - remove streams in favour of lists + // Paper start - remove streams in favour of lists
+ ItemEntity nearest = null; + ItemEntity nearest = null;
+ for (ItemEntity entityItem : list) { + for (ItemEntity entityItem : list) {
+ if (entity.wantsToPickUp(entityItem.getItem()) && entityItem.closerThan(entity, 9.0D) && entity.hasLineOfSight(entityItem)) { + if (entity.wantsToPickUp(entityItem.getItem()) && entityItem.closerThan(entity, 32.0D) && entity.hasLineOfSight(entityItem)) {
+ nearest = entityItem; + nearest = entityItem;
+ break; + break;
+ } + }

View File

@ -21,10 +21,10 @@ index d83bed436d2ad51cef83ecbf0c7df227a67ff404..dc96b30c70cd79d7b2a0322f32b9399a
this.saveUserBanList(); this.saveUserBanList();
this.loadIpBanList(); this.loadIpBanList();
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 8eca8825008713467a20f84d71ed0f32d5a40e47..e842e96fe566e89b37e38429c718318a2dd303f5 100644 index b789f68b84812a3a4bab50920f0c0b0aa13ef63b..d673947406c0a33465b6132aba78b3d12f9adaec 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
@@ -206,6 +206,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -199,6 +199,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings")); org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands(); org.spigotmc.SpigotConfig.registerCommands();
// Spigot end // Spigot end
@ -37,7 +37,7 @@ index 8eca8825008713467a20f84d71ed0f32d5a40e47..e842e96fe566e89b37e38429c718318a
// Paper start // Paper start
try { try {
com.destroystokyo.paper.PaperConfig.init((java.io.File) options.valueOf("paper-settings")); com.destroystokyo.paper.PaperConfig.init((java.io.File) options.valueOf("paper-settings"));
@@ -268,9 +274,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -260,9 +266,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file."); DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
} }
@ -48,10 +48,10 @@ index 8eca8825008713467a20f84d71ed0f32d5a40e47..e842e96fe566e89b37e38429c718318a
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) { if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false; return false;
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 71b6f3990ace47ac752ec825c78d7fa964011898..8e70aa9ead2ba54c7b10d134b38734f0283ddb2a 100644 index 7662e4f590d9e3146783239a662b452741b97147..a57b018e7fb82a04e90a4448c75d792337e1a212 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
@@ -174,6 +174,7 @@ public abstract class PlayerList { @@ -176,6 +176,7 @@ public abstract class PlayerList {
this.maxPlayers = maxPlayers; this.maxPlayers = maxPlayers;
this.playerIo = saveHandler; this.playerIo = saveHandler;
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent grindstones from overstacking items
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
index aa47947ea2f04afd3cca4b359891609025c112d5..0bdf874ddb951daf8d469575a44144504472d12d 100644 index 7a0c38c743ef02f5b9c052f88c2d6429a53b8286..740b778ce14f241e509f17c3a84b9ed47cdeeebe 100644
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
@@ -198,13 +198,13 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -198,13 +198,13 @@ public class GrindstoneMenu extends AbstractContainerMenu {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add recipe to cook events
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index e62fa09ca481183be2ee158b0717172c90de1b92..18eff3a00ae5137ec71c31bc3466a864c60d9fde 100644 index 1cc2c13ab07b9dc4492cec55314e12d7536d5453..9a40839ccedd6a39c2b8755e29f31a4f626fe15d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -427,7 +427,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -442,7 +442,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
CraftItemStack source = CraftItemStack.asCraftMirror(itemstack); CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1); org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
@ -18,22 +18,21 @@ index e62fa09ca481183be2ee158b0717172c90de1b92..18eff3a00ae5137ec71c31bc3466a864
if (furnaceSmeltEvent.isCancelled()) { if (furnaceSmeltEvent.isCancelled()) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
index 02cdd957e7f79f6c00ee015a0d382def8aa2aead..1d2dbaec8201de12fb65e2c01ca8a1ead7e873a7 100644 index 003a66064c666db974c2b36f6579a87e1ad28685..18b22efe9f5335bb49aa0e899727d1911dc20718 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
@@ -52,7 +52,10 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { @@ -60,7 +60,9 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) { if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack}); SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
- ItemStack itemstack1 = (ItemStack) world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world).map((recipecampfire) -> { - ItemStack itemstack1 = (ItemStack) campfire.quickCheck.getRecipeFor(inventorysubcontainer, world).map((recipecampfire) -> {
+ // Paper start + Optional<CampfireCookingRecipe> recipe = campfire.quickCheck.getRecipeFor( inventorysubcontainer, world);
+ Optional<CampfireCookingRecipe> recipe = world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world);
+ ItemStack itemstack1 = (ItemStack) recipe.map((recipecampfire) -> { + ItemStack itemstack1 = (ItemStack) recipe.map((recipecampfire) -> {
+ // Paper end + // Paper end
return recipecampfire.assemble(inventorysubcontainer); return recipecampfire.assemble(inventorysubcontainer);
}).orElse(itemstack); }).orElse(itemstack);
@@ -60,7 +63,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { @@ -68,7 +70,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
CraftItemStack source = CraftItemStack.asCraftMirror(itemstack); CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1); org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);

View File

@ -19,10 +19,10 @@ index 2eef459c0512122425db1374f59935b0bebfc754..883c8d42c471eefe4ddf68196fac0d69
+ } + }
} }
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 8b2c246f60886053beb9c4baf18c867910b9a8fd..62ed17858f8571f66c7605e2d5b447d774a53713 100644 index bf72d96c6d6efcda40eb19d30b90f63b9bc42a83..f8b298dcfaa8767f9a91ff674728671729e572cd 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
@@ -1756,7 +1756,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1770,7 +1770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
int i = this.player.level.getMaxBuildHeight(); int i = this.player.level.getMaxBuildHeight();
if (blockposition.getY() < i) { if (blockposition.getY() < i) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expand world key API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 89f75b79e8501097d2411b12ae79bb073cadba7a..cd359e6576e69184935b0852ffc6b9fb57181730 100644 index ee5e59c37301d9a806e2f696d52d9d217b232833..bb5d22125b6cd4e60d2b7e2e00af158c9ea22cd9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -913,5 +913,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -938,5 +938,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
public io.papermc.paper.world.MoonPhase getMoonPhase() { public io.papermc.paper.world.MoonPhase getMoonPhase() {
return io.papermc.paper.world.MoonPhase.getPhase(this.getHandle().dayTime() / 24000L); return io.papermc.paper.world.MoonPhase.getPhase(this.getHandle().dayTime() / 24000L);
} }
@ -20,10 +20,10 @@ index 89f75b79e8501097d2411b12ae79bb073cadba7a..cd359e6576e69184935b0852ffc6b9fb
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a4e34932e8fadf834545db6533219ecf2bf52921..6fa21f806567bc41bacd2949d7171979bc34ac6e 100644 index 83a6ceb4cb59822fc05831438585951fd0f63b40..524d04e8ee8645909b88ab32e044131d3cabea4e 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
@@ -1138,9 +1138,15 @@ public final class CraftServer implements Server { @@ -1133,9 +1133,15 @@ public final class CraftServer implements Server {
File folder = new File(this.getWorldContainer(), name); File folder = new File(this.getWorldContainer(), name);
World world = this.getWorld(name); World world = this.getWorld(name);
@ -41,7 +41,7 @@ index a4e34932e8fadf834545db6533219ecf2bf52921..6fa21f806567bc41bacd2949d7171979
if ((folder.exists()) && (!folder.isDirectory())) { if ((folder.exists()) && (!folder.isDirectory())) {
throw new IllegalArgumentException("File exists with the name '" + name + "' and isn't a folder"); throw new IllegalArgumentException("File exists with the name '" + name + "' and isn't a folder");
@@ -1232,7 +1238,7 @@ public final class CraftServer implements Server { @@ -1210,7 +1216,7 @@ public final class CraftServer implements Server {
} else if (name.equals(levelName + "_the_end")) { } else if (name.equals(levelName + "_the_end")) {
worldKey = net.minecraft.world.level.Level.END; worldKey = net.minecraft.world.level.Level.END;
} else { } else {
@ -49,8 +49,8 @@ index a4e34932e8fadf834545db6533219ecf2bf52921..6fa21f806567bc41bacd2949d7171979
+ worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper + worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper
} }
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, holder, this.getServer().progressListenerFactory.create(11), ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
@@ -1324,6 +1330,15 @@ public final class CraftServer implements Server { @@ -1302,6 +1308,15 @@ public final class CraftServer implements Server {
return null; return null;
} }
@ -67,7 +67,7 @@ index a4e34932e8fadf834545db6533219ecf2bf52921..6fa21f806567bc41bacd2949d7171979
// Check if a World already exists with the UID. // Check if a World already exists with the UID.
if (this.getWorld(world.getUID()) != null) { if (this.getWorld(world.getUID()) != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 9af0bd83c03a7e9fba04f7b9f0c66029a7f4b65a..c2d86ea45fd70e8790b2591d780dca76f08757bb 100644 index 0814dc37639693cf76aa1c628b71939150cabac6..d713ad8e3e3b9ed8b87fe754d72ed442d84303a9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -517,6 +517,11 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -517,6 +517,11 @@ public final class CraftMagicNumbers implements UnsafeValues {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Item Rarity API
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index c2d86ea45fd70e8790b2591d780dca76f08757bb..83ff35f53e8a327757aae9a437ca74640a686c56 100644 index d713ad8e3e3b9ed8b87fe754d72ed442d84303a9..bfc413c1ac8dc2f7449cbab304789285121b6185 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -522,6 +522,20 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -522,6 +522,20 @@ public final class CraftMagicNumbers implements UnsafeValues {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 05a3d736193775c1aa6ce3759e13a1f76f747d09..5e25d055665bab4d06a9b641892d4149da01218a 100644 index 3ee0d583bb6e07570071562a083462c8d67e8a1d..93f9d3035f42ad5d7d5bac924728b731b7de04e6 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java --- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -338,6 +338,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> { @@ -347,6 +347,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@Nullable @Nullable
public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
@ -22,7 +22,7 @@ index 05a3d736193775c1aa6ce3759e13a1f76f747d09..5e25d055665bab4d06a9b641892d4149
// Paper start - Call PreCreatureSpawnEvent // Paper start - Call PreCreatureSpawnEvent
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath()); org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath());
if (type != null) { if (type != null) {
@@ -353,6 +359,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> { @@ -362,6 +368,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
} }
// Paper end // Paper end
T t0 = this.create(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1); T t0 = this.create(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1);
@ -44,10 +44,10 @@ index d7cb3d8b37f225ee4796246aa907da1092fa9a0d..abb2c5c4ac481c7529aa29322babb192
@Override @Override
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
index 0eddd793fa590a68bd094d417ffb90941532522c..4e478c30714a8e4cd95f02e73615d166836d1e4b 100644 index 32bf83d659292b1f067e50eeab101f8d0fe611d9..4ee71a58aff50caf5bd715a4cbe50b134b52c9ff 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
@@ -121,7 +121,7 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -123,7 +123,7 @@ public class WanderingTraderSpawner implements CustomSpawner {
return false; return false;
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] copy TESign#isEditable from snapshots
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index 09ea221665bd17bc853274d0146987ebadefe46f..e0bb5146059ad767feca38f3816f29069239ffda 100644 index c629755ddba58eeff6f38f9396891f98f530e08e..f8d028e0a3c2546733fc5936d9a02db91efa4539 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -116,6 +116,7 @@ public class CraftSign extends CraftBlockEntityState<SignBlockEntity> implements @@ -115,6 +115,7 @@ public class CraftSign extends CraftBlockEntityState<SignBlockEntity> implements
} }
// Paper end // Paper end
} }

View File

@ -7,7 +7,7 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
Closes #5036 Closes #5036
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 8e70aa9ead2ba54c7b10d134b38734f0283ddb2a..7eafebf167e4060c73ba77636eb11e7f346f040a 100644 index a57b018e7fb82a04e90a4448c75d792337e1a212..f97583b667854cfcb1a25eda844492a03d327a76 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
@@ -618,6 +618,14 @@ public abstract class PlayerList { @@ -618,6 +618,14 @@ public abstract class PlayerList {

View File

@ -5,22 +5,14 @@ Subject: [PATCH] forced whitelist: use configurable kick message
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2914355be3f6c45b2dbd7ceb0ea65c7f22255a6d..2ec8216d19de795bbe0827f6c9b3f9cdc2ce6760 100644 index 24e1c7562efbfe4fc8c19f66587dd708f2b2702b..3b950c0a6a660d5d9b957cfc08d85fc2bdb706e4 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
@@ -73,7 +73,6 @@ import net.minecraft.gametest.framework.GameTestTicker; @@ -2080,7 +2080,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
-import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
import net.minecraft.network.protocol.status.ServerStatus;
@@ -2114,7 +2113,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next(); ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420) if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
- entityplayer.connection.disconnect(new TranslatableComponent("multiplayer.disconnect.not_whitelisted")); - entityplayer.connection.disconnect(Component.translatable("multiplayer.disconnect.not_whitelisted"));
+ entityplayer.connection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message + entityplayer.connection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message
} }
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent
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 62ed17858f8571f66c7605e2d5b447d774a53713..f413cf714654f122a9533895d54dec524f2420ee 100644 index f8b298dcfaa8767f9a91ff674728671729e572cd..6eda7565cfbc24d323d30ad8a3da149d2cdecd53 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
@@ -1191,7 +1191,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1220,7 +1220,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
} }
itemstack.addTagElement("pages", nbttaglist); itemstack.addTagElement("pages", nbttaglist);

View File

@ -61,10 +61,10 @@ index 883c8d42c471eefe4ddf68196fac0d69428dbabd..ba95a27012bcba97d6e7f6a07d68a476
private void keepLoadedRange() { private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 5e25d055665bab4d06a9b641892d4149da01218a..79abd84696ef099f6b12ddeaa6e398f18c53316a 100644 index 93f9d3035f42ad5d7d5bac924728b731b7de04e6..b3a769bd144f948b4782bf47a7d37c45b52deab0 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java --- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -564,9 +564,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> { @@ -563,9 +563,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
final Spliterator<? extends Tag> spliterator = entityNbtList.spliterator(); final Spliterator<? extends Tag> spliterator = entityNbtList.spliterator();
return StreamSupport.stream(new Spliterator<Entity>() { return StreamSupport.stream(new Spliterator<Entity>() {
@ -86,7 +86,7 @@ index 5e25d055665bab4d06a9b641892d4149da01218a..79abd84696ef099f6b12ddeaa6e398f1
return entity; return entity;
}); });
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
index edc81a67678bdcb7acb3ae4c8bfa8230792ad7a2..7d00e21ea5f93936b5fea9a9100e1dd6db9526cf 100644 index dae66dd5dbebc7fd8fc331b1f5f06ec461667830..6408eeb7434f07c30b5e9207ab5f905a593fec79 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
@@ -90,7 +90,18 @@ public class EntityStorage implements EntityPersistentStorage<Entity> { @@ -90,7 +90,18 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 83ff35f53e8a327757aae9a437ca74640a686c56..209ad4d73e7ac0c76600a4c68d9473765f09c240 100644 index bfc413c1ac8dc2f7449cbab304789285121b6185..a74efa4a5888f090d04f6cac57bee98f1132ebe7 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -536,6 +536,11 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -536,6 +536,11 @@ public final class CraftMagicNumbers implements UnsafeValues {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow for Component suggestion tooltips in
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 f413cf714654f122a9533895d54dec524f2420ee..bd40af954458ec9ff0ccbf30cb943a1b0a3054fa 100644 index 6eda7565cfbc24d323d30ad8a3da149d2cdecd53..34153902ac86ce6c518a840717f6bb099f45ea1f 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
@@ -771,12 +771,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -802,12 +802,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
// Paper start - async tab completion // Paper start - async tab completion
com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event; com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event;
@ -24,7 +24,7 @@ index f413cf714654f122a9533895d54dec524f2420ee..bd40af954458ec9ff0ccbf30cb943a1b
// If the event isn't handled, we can assume that we have no completions, and so we'll ask the server // If the event isn't handled, we can assume that we have no completions, and so we'll ask the server
if (!event.isHandled()) { if (!event.isHandled()) {
if (!event.isCancelled()) { if (!event.isCancelled()) {
@@ -795,10 +794,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -826,10 +825,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}); });
} }
} else if (!completions.isEmpty()) { } else if (!completions.isEmpty()) {

View File

@ -5,13 +5,14 @@ Subject: [PATCH] Enhance console tab completions for brigadier commands
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c07257314e070d4423c4f53f58cb0962e3ead131..affede1bcd604ce2bb1f95b037e7d7acfe21cf91 100644 index 3e519fcc3c2930c6e9642b93e78f8c2b8726dea3..39dada86032dce8573d1be40d13daca0e93e47be 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -106,6 +106,13 @@ public class PaperConfig { @@ -101,6 +101,14 @@ public class PaperConfig {
fixEntityPositionDesync = getBoolean("settings.fix-entity-position-desync", fixEntityPositionDesync); trackPluginScoreboards = getBoolean("settings.track-plugin-scoreboards", false);
} }
+
+ public static boolean enableBrigadierConsoleHighlighting = true; + public static boolean enableBrigadierConsoleHighlighting = true;
+ public static boolean enableBrigadierConsoleCompletions = true; + public static boolean enableBrigadierConsoleCompletions = true;
+ private static void consoleSettings() { + private static void consoleSettings() {
@ -216,10 +217,10 @@ index 0000000000000000000000000000000000000000..5ab8365b806dd035800ba9b449c9bc92
+ public void setErrorIndex(final int errorIndex) {} + public void setErrorIndex(final int errorIndex) {}
+} +}
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 e842e96fe566e89b37e38429c718318a2dd303f5..a97e4ac808ed746c5e6bbcbe90839beb00c57c52 100644 index d673947406c0a33465b6132aba78b3d12f9adaec..ec24ec2000124465b18b204828486ca3f3eb051c 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
@@ -185,7 +185,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -178,7 +178,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
thread.setDaemon(true); thread.setDaemon(true);
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER)); thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
@ -228,7 +229,7 @@ index e842e96fe566e89b37e38429c718318a2dd303f5..a97e4ac808ed746c5e6bbcbe90839beb
DedicatedServer.LOGGER.info("Starting minecraft server version {}", SharedConstants.getCurrentVersion().getName()); DedicatedServer.LOGGER.info("Starting minecraft server version {}", SharedConstants.getCurrentVersion().getName());
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
@@ -219,6 +219,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -212,6 +212,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.error("Unable to load server configuration", e); DedicatedServer.LOGGER.error("Unable to load server configuration", e);
return false; return false;
} }