3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 03:20:07 +01:00

more more more more more more more more more more work

Dieser Commit ist enthalten in:
Noah van der Aa 2023-09-22 17:35:51 +02:00
Ursprung 4875ee4814
Commit 3aa8e7ef3f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 547D90BC6FF753CF
32 geänderte Dateien mit 102 neuen und 103 gelöschten Zeilen

Datei anzeigen

@ -20,10 +20,10 @@ index e05eb08a9c229b371887676da510df948b896a85..ceeedbd88c56c08ec8b047c9ca2f14cc
Date date = new Date(); Date date = new Date();
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 0a980eb63e6116f91322fd8bf94db7c5dae7b79a..6c8fc3a00109c3c64f9dc32ecdcc98e1b5d0d622 100644 index 17eaf05dbf0542f7867e92421148cf4edf47bd80..097ceaa948469f6b63362dfa00525cd0fd01d907 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
@@ -1774,7 +1774,7 @@ public final class CraftServer implements Server { @@ -1777,7 +1777,7 @@ public final class CraftServer implements Server {
// Paper end // Paper end
Set<CommandSender> recipients = new HashSet<>(); Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {

Datei anzeigen

@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
Just simply prevent them from being added to the world instead. Just simply prevent them from being added to the world instead.
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 653c9c41ab7c5cd332565436564396d18f26c17c..06df21e55fdb70558b85fc095a04b3bb64fbe770 100644 index 0a57c11f1b9811e4fb980268bc561df4290494cf..565b5aca5854876ae640d9d93b3ae24da6e12b70 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
@@ -1645,6 +1645,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1296,6 +1296,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false; return false;
} else { } else {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add Player#getFishHook
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 3f64d57b7d92820226c323d1d560432f5c27e650..6f694f68c2792da7088c2aba1d2b201f802b3a5c 100644 index 268d0abadb1c6de78f7b2de964808ca7029970a8..beefbb0d04bd995bc8750707487183c3ffc22239 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -161,6 +161,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -161,6 +161,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
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 34f5919448a408e7f4c72299fe72d8daabe34402..f9704cefbc1a3b6546dfefd0708fa5485e0a8e72 100644 index a45f7b96fb3afc9ebe1354d9c61c4a66a67fae69..56060d5d962a1827873d3b2311f30b766c64575f 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
@@ -2677,6 +2677,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2559,6 +2559,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
entityitem.setDefaultPickUpDelay(); entityitem.setDefaultPickUpDelay();
@ -37,10 +37,10 @@ index 1c4b8b29faac3dbcfc14a07b24c64650982ece00..8448c5d778998390cf2b683f36e4e18c
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index 24ae11d300d0856350f185f03552ba592f3d218a..5052bcf16bb09b7bcf39566fef1378b1c4970fe6 100644 index df06cad9447982ebe57d07c9967cb68c6dd20ca3..9f24fb3ea75b9dcb41f70f6e4b0d6cd5dca57ff6 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -503,14 +503,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> { @@ -509,14 +509,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
entityitem.setPickUpDelay(40); entityitem.setPickUpDelay(40);
entityitem.setThrower(this.getUUID()); entityitem.setThrower(this.getUUID());
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F); this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
@ -58,10 +58,10 @@ index 24ae11d300d0856350f185f03552ba592f3d218a..5052bcf16bb09b7bcf39566fef1378b1
@Override @Override
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
index a3a5dbaed7a7647249747154ac0c024bddd7eb13..c7b914cc0d702c6dd04add5247ec509d5870abb3 100644 index 3ec2f590dfe9410f1a9d2afb530eebfcce917798..363892e0c26bab89d2abaa44d8736e2fd84d292f 100644
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
@@ -355,8 +355,7 @@ public class Goat extends Animal { @@ -357,8 +357,7 @@ public class Goat extends Animal {
double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F); double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F);
ItemEntity entityitem = new ItemEntity(this.level(), vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2); ItemEntity entityitem = new ItemEntity(this.level(), vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2);
@ -72,10 +72,10 @@ index a3a5dbaed7a7647249747154ac0c024bddd7eb13..c7b914cc0d702c6dd04add5247ec509d
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
index c0f19138c6a00ce6ae837c972ae4af522ddd2895..3de0424a18e0a3b0cd2f755adfa859e474d5c643 100644 index 1d9913cbc7fd0c6e29278b02c38703b52af1245b..36b3945832733b5ad66d25aa3a31335234d2acff 100644
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java --- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -355,8 +355,9 @@ public class Sniffer extends Animal { @@ -352,8 +352,9 @@ public class Sniffer extends Animal {
entityitem.setDefaultPickUpDelay(); entityitem.setDefaultPickUpDelay();
this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob) null); this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob) null);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors
TODO: potentially add some kick leeway TODO: potentially add some kick leeway
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 5c4a4b7efff2a00d7a35d902b4e18e02d4489122..e60478b96c6dc67a16b08e418971aa3bef63c0fc 100644 index aabd4a28cef4a31e0eed34d2e7c490199203bfd5..5d62bf8a1031295ca63289ebbdc11cf0910ccb14 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
@@ -2295,7 +2295,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2134,7 +2134,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
if (!this.updateChatOrder(timestamp)) { if (!this.updateChatOrder(timestamp)) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
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 e60478b96c6dc67a16b08e418971aa3bef63c0fc..f876cd2320788570137d9f59411bf7e908e9e81b 100644 index 5d62bf8a1031295ca63289ebbdc11cf0910ccb14..4428b7310bcce3fd1471e5b89bc4eb9ec16deb4e 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
@@ -2515,7 +2515,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2354,7 +2354,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
// Spigot end // Spigot end
// this.chatSpamTickCount += 20; // this.chatSpamTickCount += 20;

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] More Teleport API
public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)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 f876cd2320788570137d9f59411bf7e908e9e81b..13e5c0bc9e3cef3dd68f2d415649a183583eb606 100644 index 4428b7310bcce3fd1471e5b89bc4eb9ec16deb4e..57d2bffd55db5f7833121c6781984985689c4188 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
@@ -1713,11 +1713,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1591,11 +1591,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return false; // CraftBukkit - Return event status return false; // CraftBukkit - Return event status
} }
@ -31,7 +31,7 @@ index f876cd2320788570137d9f59411bf7e908e9e81b..13e5c0bc9e3cef3dd68f2d415649a183
d0 = to.getX(); d0 = to.getX();
d1 = to.getY(); d1 = to.getY();
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 f61d3cd3cdbfe17f6818fbbb163f80ba3de50ca1..df554fa92065bc4c8566a9638f4f6f6ca9ba54db 100644 index 87c303ff576cd05291d50d5676e86ca93a13b301..b19665fd570c86274caef62dc3e365f0e6a7ca8e 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
@@ -567,15 +567,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -567,15 +567,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -74,10 +74,10 @@ index f61d3cd3cdbfe17f6818fbbb163f80ba3de50ca1..df554fa92065bc4c8566a9638f4f6f6c
// Let the server handle cross world teleports // Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
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 166c7d1c23862b65b332ca6573a2a75c5926c9e8..5ad3f284f0d25ec4f7ea8789c2205f88b349f715 100644 index 91d572075ea018e4768f11115723d67b06018bf0..17a4390514b72481de6dc0676eb8130428fabf89 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
@@ -1210,13 +1210,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1170,13 +1170,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setRotation(float yaw, float pitch) { public void setRotation(float yaw, float pitch) {
@ -180,7 +180,7 @@ index 166c7d1c23862b65b332ca6573a2a75c5926c9e8..5ad3f284f0d25ec4f7ea8789c2205f88
location.checkFinite(); location.checkFinite();
ServerPlayer entity = this.getHandle(); ServerPlayer entity = this.getHandle();
@@ -1229,7 +1317,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1189,7 +1277,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false; return false;
} }
@ -189,7 +189,7 @@ index 166c7d1c23862b65b332ca6573a2a75c5926c9e8..5ad3f284f0d25ec4f7ea8789c2205f88
return false; return false;
} }
@@ -1247,7 +1335,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1207,7 +1295,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// If this player is riding another entity, we must dismount before teleporting. // If this player is riding another entity, we must dismount before teleporting.
@ -198,7 +198,7 @@ index 166c7d1c23862b65b332ca6573a2a75c5926c9e8..5ad3f284f0d25ec4f7ea8789c2205f88
// SPIGOT-5509: Wakeup, similar to riding // SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) { if (this.isSleeping()) {
@@ -1263,13 +1351,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1223,13 +1311,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle(); ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
// Close any foreign inventory // Close any foreign inventory

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityPortalReadyEvent
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 f9704cefbc1a3b6546dfefd0708fa5485e0a8e72..e09a4ebbbcd2e3f55b8b764cbc36d72bc3092085 100644 index 56060d5d962a1827873d3b2311f30b766c64575f..2a13d5f4cf86b4ae5e5cf2d0602fbcd275b1c080 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
@@ -3016,6 +3016,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2922,6 +2922,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
this.level().getProfiler().push("portal"); this.level().getProfiler().push("portal");
this.portalTime = i; this.portalTime = i;
@ -22,7 +22,7 @@ index f9704cefbc1a3b6546dfefd0708fa5485e0a8e72..e09a4ebbbcd2e3f55b8b764cbc36d72b
this.setPortalCooldown(); this.setPortalCooldown();
// CraftBukkit start // CraftBukkit start
if (this instanceof ServerPlayer) { if (this instanceof ServerPlayer) {
@@ -3023,6 +3030,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2929,6 +2936,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} else { } else {
this.changeDimension(worldserver1); this.changeDimension(worldserver1);
} }

Datei anzeigen

@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua
block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent. block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 96fde7b84ce4d195d0c54deff71df9fcf8447979..6cc9c28032cafd15d884223a01208ce6f027c151 100644 index f968dee743f58fe71935097701866800c0f382a1..73e2948210139e40e234b5e2107f9008f3094964 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -62,6 +62,8 @@ public class ServerPlayerGameMode { @@ -62,6 +62,8 @@ public class ServerPlayerGameMode {
@ -43,7 +43,7 @@ index 96fde7b84ce4d195d0c54deff71df9fcf8447979..6cc9c28032cafd15d884223a01208ce6
return; return;
} }
// CraftBukkit end // CraftBukkit end
@@ -394,10 +390,12 @@ public class ServerPlayerGameMode { @@ -392,10 +388,12 @@ public class ServerPlayerGameMode {
} }
// Update any tile entity data for this block // Update any tile entity data for this block
@ -57,10 +57,10 @@ index 96fde7b84ce4d195d0c54deff71df9fcf8447979..6cc9c28032cafd15d884223a01208ce6
} }
} }
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 13e5c0bc9e3cef3dd68f2d415649a183583eb606..bf73cdaa4f05e4415b9d072ad46774361deddad8 100644 index 57d2bffd55db5f7833121c6781984985689c4188..58fdede705e55801c4dff11db1b9d29b2430c19c 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
@@ -1859,8 +1859,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1737,8 +1737,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return; return;
} }
// Paper end - Don't allow digging in unloaded chunks // Paper end - Don't allow digging in unloaded chunks

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Warn on plugins accessing faraway 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 af7ffeb70ea696e03d3b8188ed167aa4755e308d..6b9b5af04fe06c3f5f20a56955bd12bd2ddb7e5c 100644 index 7d39cdfec62884a8ee98af3ca71aa3c9908cc3d8..aa5879aef6e6e517ead13a422fed7674f715c994 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
@@ -505,7 +505,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -440,7 +440,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
} }
private static boolean isInWorldBoundsHorizontal(BlockPos pos) { private static boolean isInWorldBoundsHorizontal(BlockPos pos) {
@ -18,7 +18,7 @@ index af7ffeb70ea696e03d3b8188ed167aa4755e308d..6b9b5af04fe06c3f5f20a56955bd12bd
private static boolean isOutsideSpawnableHeight(int y) { private static boolean isOutsideSpawnableHeight(int y) {
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 e36c535ede104fe6c60348558e31ad5571c5ac2a..550dcb7d595221b221e4710890d8a3cad789fc07 100644 index 2ec9d65ce7c9947021cf95f0827c3bc1cc2166ab..c7e6e73507ab198224de1b549f7c71887341c6a6 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
@@ -310,9 +310,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -310,9 +310,24 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -54,7 +54,7 @@ index e36c535ede104fe6c60348558e31ad5571c5ac2a..550dcb7d595221b221e4710890d8a3ca
// Paper start - implement regenerateChunk method // Paper start - implement regenerateChunk method
final ServerLevel serverLevel = this.world; final ServerLevel serverLevel = this.world;
final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource(); final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource();
@@ -522,6 +538,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -514,6 +530,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
@ -62,7 +62,7 @@ index e36c535ede104fe6c60348558e31ad5571c5ac2a..550dcb7d595221b221e4710890d8a3ca
// Paper start - Optimize this method // Paper start - Optimize this method
ChunkPos chunkPos = new ChunkPos(x, z); ChunkPos chunkPos = new ChunkPos(x, z);
ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper
@@ -585,6 +602,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -577,6 +594,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { public boolean addPluginChunkTicket(int x, int z, Plugin plugin) {
@ -70,7 +70,7 @@ index e36c535ede104fe6c60348558e31ad5571c5ac2a..550dcb7d595221b221e4710890d8a3ca
Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin != null, "null plugin");
Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled");
@@ -653,6 +671,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -658,6 +676,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public void setChunkForceLoaded(int x, int z, boolean forced) { public void setChunkForceLoaded(int x, int z, boolean forced) {
@ -78,7 +78,7 @@ index e36c535ede104fe6c60348558e31ad5571c5ac2a..550dcb7d595221b221e4710890d8a3ca
this.getHandle().setChunkForced(x, z, forced); this.getHandle().setChunkForced(x, z, forced);
} }
@@ -965,6 +984,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -970,6 +989,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
@ -86,7 +86,7 @@ index e36c535ede104fe6c60348558e31ad5571c5ac2a..550dcb7d595221b221e4710890d8a3ca
// Transient load for this tick // Transient load for this tick
return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
} }
@@ -2376,6 +2396,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -2342,6 +2362,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
// Spigot end // Spigot end
// Paper start // Paper start
public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
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 5ad3f284f0d25ec4f7ea8789c2205f88b349f715..d4fd2fa83d1d8e9d97465b92edd913c05d20c69c 100644 index 17a4390514b72481de6dc0676eb8130428fabf89..ba93dbec8b22809133335e975f64caa85df30c9b 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
@@ -650,6 +650,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -610,6 +610,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false); this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false);
} }

Datei anzeigen

@ -22,7 +22,7 @@ index 5be114bc70c6fdbcb7d804e7558a5172c4461b96..3b9d7f92f4e47da2d7eb1e9cb9e996ee
// Paper end // Paper end
} }
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 df554fa92065bc4c8566a9638f4f6f6ca9ba54db..bc0a46a6f2ae24b40d3997074c9084cdbb595602 100644 index b19665fd570c86274caef62dc3e365f0e6a7ca8e..ba0c1be4f5303bd6a33fd27f4e8c9910a8325695 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
@@ -1419,4 +1419,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1419,4 +1419,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions
This is a bug accidentally introduced in upstream CB This is a bug accidentally introduced in upstream CB
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index f967e9039c87ec458da3f133743df834437b3e02..80c2c8d565f03ae0ea24fbdecdbe2bc5b9aa4b82 100644 index c704761bd5dae98f7c77780a4f7058b737fdb664..3eec879bf3975636739b2491cc05b8177032d16d 100644
--- a/src/main/java/net/minecraft/commands/Commands.java --- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -342,7 +342,7 @@ public class Commands { @@ -348,7 +348,7 @@ public class Commands {
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) { if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor()); int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> { MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {

Datei anzeigen

@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..c4934979b1ed85bfc4f8d9e6f8848b2b
+ } + }
+} +}
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 23c39cc77ae0d2ab7100fff0a3e8ff6752706dbb..c49802c936ae8e3f4dc1badd98414d96714ecd60 100644 index f1e5798c47ee6c8d8b9d599fa503e8cefe18aa19..c1882185ad93315925ca97a085482197f6ae9f4a 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
@@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -123,18 +123,18 @@ index 23c39cc77ae0d2ab7100fff0a3e8ff6752706dbb..c49802c936ae8e3f4dc1badd98414d96
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose."); DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 3fcd7bfdb8945b276c94a263e9da6b85ce470366..3431b1132e55c53cda7cf47f021f23068b63322d 100644 index ced150fa9160310408f57e89d115de740097eaf5..5012405cc3dd98c05d271ee4003968717f93f3e9 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -61,6 +61,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -62,6 +62,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@Nullable private final String serverId;
private ServerPlayer delayedAcceptPlayer; private ServerPlayer player; // CraftBukkit
public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding
+ private int velocityLoginMessageId = -1; // Paper - Velocity support + private int velocityLoginMessageId = -1; // Paper - Velocity support
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) {
this.state = ServerLoginPacketListenerImpl.State.HELLO; this.state = ServerLoginPacketListenerImpl.State.HELLO;
@@ -256,6 +257,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -175,6 +176,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
this.state = ServerLoginPacketListenerImpl.State.KEY; this.state = ServerLoginPacketListenerImpl.State.KEY;
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge)); this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
} else { } else {
@ -151,23 +151,23 @@ index 3fcd7bfdb8945b276c94a263e9da6b85ce470366..3431b1132e55c53cda7cf47f021f2306
// Spigot start // Spigot start
// Paper start - Cache authenticator threads // Paper start - Cache authenticator threads
authenticatorPool.execute(new Runnable() { authenticatorPool.execute(new Runnable() {
@@ -363,6 +374,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -318,6 +329,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
public class LoginHandler { public class LoginHandler {
public void fireEvents() throws Exception { public void fireEvents(GameProfile gameprofile) throws Exception {
+ // Paper start - Velocity support + // Paper start - Velocity support
+ if (ServerLoginPacketListenerImpl.this.velocityLoginMessageId == -1 && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) { + if (ServerLoginPacketListenerImpl.this.velocityLoginMessageId == -1 && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) {
+ disconnect("This server requires you to connect with Velocity."); + disconnect("This server requires you to connect with Velocity.");
+ return; + return;
+ } + }
+ // Paper end + // Paper end
String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName(); String playerName = gameprofile.getName();
java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress();
java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) connection.channel.remoteAddress()).getAddress(); // Paper java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.channel.remoteAddress()).getAddress(); // Paper
@@ -411,6 +428,47 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -367,6 +384,47 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
// Spigot end
public void handleCustomQueryPacket(ServerboundCustomQueryPacket packet) { @Override
public void handleCustomQueryPacket(ServerboundCustomQueryAnswerPacket packet) {
+ // Paper start - Velocity support + // Paper start - Velocity support
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled && packet.getTransactionId() == this.velocityLoginMessageId) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled && packet.getTransactionId() == this.velocityLoginMessageId) {
+ net.minecraft.network.FriendlyByteBuf buf = packet.getData(); + net.minecraft.network.FriendlyByteBuf buf = packet.getData();
@ -193,30 +193,30 @@ index 3fcd7bfdb8945b276c94a263e9da6b85ce470366..3431b1132e55c53cda7cf47f021f2306
+ } + }
+ this.connection.address = new java.net.InetSocketAddress(com.destroystokyo.paper.proxy.VelocityProxy.readAddress(buf), port); + this.connection.address = new java.net.InetSocketAddress(com.destroystokyo.paper.proxy.VelocityProxy.readAddress(buf), port);
+ +
+ this.gameProfile = com.destroystokyo.paper.proxy.VelocityProxy.createProfile(buf); + this.authenticatedProfile = com.destroystokyo.paper.proxy.VelocityProxy.createProfile(buf);
+ +
+ //TODO Update handling for lazy sessions, might not even have to do anything? + //TODO Update handling for lazy sessions, might not even have to do anything?
+ +
+ // Proceed with login + // Proceed with login
+ authenticatorPool.execute(() -> { + authenticatorPool.execute(() -> {
+ try { + try {
+ new LoginHandler().fireEvents(); + new LoginHandler().fireEvents(this.authenticatedProfile);
+ } catch (Exception ex) { + } catch (Exception ex) {
+ disconnect("Failed to verify username!"); + disconnect("Failed to verify username!");
+ server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + gameProfile.getName(), ex); + server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + this.authenticatedProfile.getName(), ex);
+ } + }
+ }); + });
+ return; + return;
+ } + }
+ // Paper end + // Paper end
this.disconnect(Component.translatable("multiplayer.disconnect.unexpected_query_response")); this.disconnect(ServerLoginPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY);
} }
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 6c8fc3a00109c3c64f9dc32ecdcc98e1b5d0d622..03fcdb0eb145d60b96bf241523ade1f4595abdef 100644 index 097ceaa948469f6b63362dfa00525cd0fd01d907..615baf99dd8680b97aa1f03d4a961e15bcdd832b 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
@@ -803,7 +803,7 @@ public final class CraftServer implements Server { @@ -806,7 +806,7 @@ public final class CraftServer implements Server {
@Override @Override
public long getConnectionThrottle() { public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations // Spigot Start - Automatically set connection throttle for bungee configurations

Datei anzeigen

@ -5,14 +5,13 @@ Subject: [PATCH] Use thread safe random in ServerLoginPacketListenerImpl
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 3431b1132e55c53cda7cf47f021f23068b63322d..2ff578e4a953ffcf5176815ba8e3f06f73499989 100644 index 5012405cc3dd98c05d271ee4003968717f93f3e9..dc8e2d31cf90d76e64d0b6a4783040df91ae2568 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -49,7 +49,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -50,6 +50,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
static final Logger LOGGER = LogUtils.getLogger(); static final Logger LOGGER = LogUtils.getLogger();
private static final int MAX_TICKS_BEFORE_LOGIN = 600; private static final int MAX_TICKS_BEFORE_LOGIN = 600;
- private static final RandomSource RANDOM = RandomSource.create(); private static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response");
+ private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe + private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe
private final byte[] challenge; private final byte[] challenge;
final MinecraftServer server; final MinecraftServer server;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
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 e8e26cca7fc8090a3b22925ae37e2362a44ced80..83cef5ec27c31f133a23cd27349f722799c786ea 100644 index e169c16626e967c30c6f9a324a40550adf5476dd..58f2eaf81f24f1548bdc9f46528cb4b94b18de69 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
@@ -609,6 +609,19 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -610,6 +610,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(material.isBlock(), material + " is not a block"); Preconditions.checkArgument(material.isBlock(), material + " is not a block");
return getBlock(material).hasCollision; return getBlock(material).hasCollision;
} }

Datei anzeigen

@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc
+ } + }
+} +}
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 42f566c9155b70e04d457eb05934d678a92fcdb1..f1b8ebb9718c8ff824d2707a0d1eb08cdcd18f39 100644 index ff70a2d03ffb85b64829e15bfdfd7a2f35dc9323..bf9e396505c5004b0fb640837b41a4885bcab08e 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
@@ -997,6 +997,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -998,6 +998,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender
} catch (Exception e) { } catch (Exception e) {
} }
@ -49,7 +49,7 @@ index 42f566c9155b70e04d457eb05934d678a92fcdb1..f1b8ebb9718c8ff824d2707a0d1eb08c
// Paper end // Paper end
} }
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 3250274384fabb11e241837007e543cb81dd3b6d..2b27feda982ca55257b55c801ec772a18157bd01 100644 index 224be855fd16b37c8766c3c07b81905d50d5518d..6f816ec287f35dca6e196f86d016a2c28617bab6 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
@@ -18,6 +18,12 @@ public class Main { @@ -18,6 +18,12 @@ public class Main {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Stop large look changes from crashing the server
Co-authored-by: Jaren Knodel <Jaren@Knodel.com> Co-authored-by: Jaren Knodel <Jaren@Knodel.com>
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 418853323314597f746b2f8e74b9766efcbf98be..66a2ae4b03a99613be03458dab23a904956fcfee 100644 index a3fc80627627a4ad991ec8e674ac528fd69580df..c3b9d590497bf96fd0df4c00f863ab64ec91115e 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
@@ -3027,37 +3027,15 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3062,37 +3062,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getProfiler().pop(); this.level().getProfiler().pop();
this.level().getProfiler().push("rangeChecks"); this.level().getProfiler().push("rangeChecks");

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Fire EntityChangeBlockEvent in more places
Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com> Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
index 611028d65925053c47510185abc526201e5df6bb..a01a8ba27534d2b0d544423bc2c48fd29d0a6d64 100644 index 80740ca823915fb2c854f13445d81964e0e971e5..255fb5e922c63130708e4bcab208b4db52a58387 100644
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java --- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java +++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java
@@ -98,7 +98,7 @@ public class LightningBolt extends Entity { @@ -98,7 +98,7 @@ public class LightningBolt extends Entity {
@ -59,7 +59,7 @@ index 611028d65925053c47510185abc526201e5df6bb..a01a8ba27534d2b0d544423bc2c48fd2
- Optional<BlockPos> optional = LightningBolt.randomStepCleaningCopper(world, mutablePos); - Optional<BlockPos> optional = LightningBolt.randomStepCleaningCopper(world, mutablePos);
+ Optional<BlockPos> optional = LightningBolt.randomStepCleaningCopper(world, mutablePos, lightning); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent + Optional<BlockPos> optional = LightningBolt.randomStepCleaningCopper(world, mutablePos, lightning); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent
if (!optional.isPresent()) { if (optional.isEmpty()) {
break; break;
@@ -234,7 +239,7 @@ public class LightningBolt extends Entity { @@ -234,7 +239,7 @@ public class LightningBolt extends Entity {
@ -260,7 +260,7 @@ index 4f24d5453522c68c22f15beed87e5237163c701a..38cb52d185e543c4df9eebfcd856df6f
generatoraccess.setBlock(blockposition, iblockdata1, 3); generatoraccess.setBlock(blockposition, iblockdata1, 3);
generatoraccess.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, iblockdata1)); generatoraccess.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, iblockdata1));
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index 80026dcdb66cc88a080b33ef290a6a7fb7bcbbaa..0b7d882551bcb8be149754209aad5fe4142f0fac 100644 index 0bb9cbdceaca055860e7a2a887426c6ba3194b3e..9cfb2d3dbb06b189765293233a28b3ebd1898946 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -120,7 +120,7 @@ public class DummyGeneratorAccess implements WorldGenLevel { @@ -120,7 +120,7 @@ public class DummyGeneratorAccess implements WorldGenLevel {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Missing eating regain reason
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
index 438d7c26cc3a4a3b5a1affffbbe26e4d272b0c00..90ce201bc7c47cef9bc59d7b535a7453854bac75 100644 index 40af8405c6f3ecc5a8168bb62607eb79862cefa6..de51ce9875e12961e6e549e87d76f492d2f19787 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
@@ -386,7 +386,7 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> { @@ -387,7 +387,7 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
if (!(item instanceof DyeItem)) { if (!(item instanceof DyeItem)) {
if (item.isEdible() && this.isFood(itemstack) && this.getHealth() < this.getMaxHealth()) { if (item.isEdible() && this.isFood(itemstack) && this.getHealth() < this.getMaxHealth()) {
this.usePlayerItem(player, hand, itemstack); this.usePlayerItem(player, hand, itemstack);
@ -18,10 +18,10 @@ index 438d7c26cc3a4a3b5a1affffbbe26e4d272b0c00..90ce201bc7c47cef9bc59d7b535a7453
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
index c853123c451c41beb42209c7edc14a5dcffa2a50..2030fdb3124f793d7b545135b1db32fe9be27050 100644 index 3aa98f7c282cb4884589cb83b1546b924e66f096..faf3e31f23d71bbc345bf98d4240490ac4677843 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -386,7 +386,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider @@ -384,7 +384,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
} else { } else {
boolean bl = this.getHealth() < this.getMaxHealth(); boolean bl = this.getHealth() < this.getMaxHealth();
if (bl) { if (bl) {
@ -31,10 +31,10 @@ index c853123c451c41beb42209c7edc14a5dcffa2a50..2030fdb3124f793d7b545135b1db32fe
boolean bl2 = this.isTamed() && this.getAge() == 0 && this.canFallInLove(); boolean bl2 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
index 7379e99c4d599aa0119bae9ebdc5e2058ada10cb..d28089c37707f323f73e60cb0ebed4e3cdf8c0fd 100644 index 91fb62807b3c5600c83d4dc8d3fadf36e94e2133..5f61c97478f005aaaaad1b027118079db7275cf7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
@@ -216,7 +216,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V @@ -196,7 +196,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
} }
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) { if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Missing effect cause
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
index 10029f37fd70955483f12ba525ec3a598f9994f1..2682a49cd3948e0f80e2d7e58abcd3e6d8f7ac4e 100644 index c1b95715a1ae8c89ce98848332b1e9e1c905a6f5..aa850cfaa0534d57e83f37360724da2428a48a18 100644
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java --- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
@@ -429,7 +429,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo @@ -424,7 +424,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
} }
@ -18,7 +18,7 @@ index 10029f37fd70955483f12ba525ec3a598f9994f1..2682a49cd3948e0f80e2d7e58abcd3e6
@Override @Override
diff --git a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java diff --git a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java
index b9dbe5301b04cb1aa5da3a3ee7560c806ce6a411..c8d6b5e60b6c8c612fa8580c63a32c4a8f8b0a7b 100644 index c8e783014a6a09d59e85715a7fbf2a5f65201e77..5cba503c7342f66018af568be200999e14aa8d6e 100644
--- a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java --- a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java
+++ b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java +++ b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java
@@ -28,7 +28,7 @@ public class HoneyBottleItem extends Item { @@ -28,7 +28,7 @@ public class HoneyBottleItem extends Item {
@ -31,15 +31,15 @@ index b9dbe5301b04cb1aa5da3a3ee7560c806ce6a411..c8d6b5e60b6c8c612fa8580c63a32c4a
if (stack.isEmpty()) { if (stack.isEmpty()) {
diff --git a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java diff --git a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
index 27873b16b82cac251c756f81844a4f8818a9c94c..1efcec68a3a32b0b6195add7a487bffde4f713ad 100644 index e6d4dfdbe824cc3dbbad988cdc2ca7c7f6c7a99f..5cf732818a1f1811de2a408d9165c48a61466b3e 100644
--- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java --- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
+++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java +++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
@@ -71,7 +71,7 @@ public class SuspiciousStewItem extends Item { @@ -66,7 +66,7 @@ public class SuspiciousStewItem extends Item {
@Override
public ItemStack finishUsingItem(ItemStack stack, Level world, LivingEntity user) { public ItemStack finishUsingItem(ItemStack stack, Level world, LivingEntity user) {
ItemStack itemStack = super.finishUsingItem(stack, world, user); ItemStack itemStack = super.finishUsingItem(stack, world, user);
- listPotionEffects(itemStack, user::addEffect); listPotionEffects(itemStack, (effect) -> {
+ listPotionEffects(itemStack, effect -> user.addEffect(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD)); // Paper - user.addEffect(effect.createEffectInstance());
+ user.addEffect(effect.createEffectInstance(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper
});
return user instanceof Player && ((Player)user).getAbilities().instabuild ? itemStack : new ItemStack(Items.BOWL); return user instanceof Player && ((Player)user).getAbilities().instabuild ? itemStack : new ItemStack(Items.BOWL);
} }
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1377400a8762158fa1dd40e425bd0999a9275895..9add16b4bacd5b823f5f0ffa957f8d79b063edb5 100644 index 661638716cd4d1b20745f3a196f6d060b3de570c..c45d7e1262534255025392a804c9e4f47213f637 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -509,8 +509,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -509,8 +509,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -38,10 +38,10 @@ index 1377400a8762158fa1dd40e425bd0999a9275895..9add16b4bacd5b823f5f0ffa957f8d79
world.addFreshEntity(launch); world.addFreshEntity(launch);
return (T) launch.getBukkitEntity(); return (T) launch.getBukkitEntity();
diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
index 9d5194676f1d84c69ddc756a94ae6e5ca628727b..1cb5875ae9a55fba589697ec66d3e95c35e0e6a0 100644 index 7f9a716ea65f98d1c8487438949f1d5bc8becc4a..24156e1cd819584c1856cf6d30b4d510691136b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java --- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
+++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java +++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
@@ -57,6 +57,13 @@ public class CraftBlockProjectileSource implements BlockProjectileSource { @@ -56,6 +56,13 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
@Override @Override
public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity) { public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity) {
@ -54,8 +54,8 @@ index 9d5194676f1d84c69ddc756a94ae6e5ca628727b..1cb5875ae9a55fba589697ec66d3e95c
+ // Paper end - launchProjectile consumer + // Paper end - launchProjectile consumer
Preconditions.checkArgument(this.getBlock().getType() == Material.DISPENSER, "Block is no longer dispenser"); Preconditions.checkArgument(this.getBlock().getType() == Material.DISPENSER, "Block is no longer dispenser");
// Copied from BlockDispenser.dispense() // Copied from BlockDispenser.dispense()
BlockSourceImpl isourceblock = new BlockSourceImpl((ServerLevel) this.dispenserBlock.getLevel(), this.dispenserBlock.getBlockPos()); BlockSource sourceblock = new BlockSource((ServerLevel) this.dispenserBlock.getLevel(), this.dispenserBlock.getBlockPos(), this.dispenserBlock.getBlockState(), this.dispenserBlock);
@@ -147,6 +154,11 @@ public class CraftBlockProjectileSource implements BlockProjectileSource { @@ -146,6 +153,11 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
if (velocity != null) { if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity); ((T) launch.getBukkitEntity()).setVelocity(velocity);
} }

Datei anzeigen

@ -5,14 +5,14 @@ Subject: [PATCH] Call BlockPhysicsEvent more often
diff --git a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java diff --git a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
index a0d035dde5a4976db2d4a9b0ae474e944583f722..ec81be70cd6f92bbf9011395cb361f0ce54c5ad0 100644 index 7d54abc2553f4b319df4d533a0b689c1807b6102..598dc0d3a2b9387e76d7e4e19e54c4573a24bc54 100644
--- a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java --- a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
+++ b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java +++ b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
@@ -119,7 +119,27 @@ public class CollectingNeighborUpdater implements NeighborUpdater { @@ -119,7 +119,27 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
public boolean runNext(Level world) { public boolean runNext(Level world) {
BlockPos blockPos = this.sourcePos.relative(NeighborUpdater.UPDATE_ORDER[this.idx++]); BlockPos blockPos = this.sourcePos.relative(NeighborUpdater.UPDATE_ORDER[this.idx++]);
BlockState blockState = world.getBlockState(blockPos); BlockState blockState = world.getBlockState(blockPos);
- blockState.neighborChanged(world, blockPos, this.sourceBlock, this.sourcePos, false); - NeighborUpdater.executeUpdate(world, blockState, blockPos, this.sourceBlock, this.sourcePos, false);
+ // Paper start + // Paper start
+ try { + try {
+ boolean cancelled = false; + boolean cancelled = false;
@ -28,7 +28,7 @@ index a0d035dde5a4976db2d4a9b0ae474e944583f722..ec81be70cd6f92bbf9011395cb361f0c
+ } + }
+ } + }
+ if (!cancelled) { // continue to check for adjacent block (increase idx) + if (!cancelled) { // continue to check for adjacent block (increase idx)
+ blockState.neighborChanged(world, blockPos, this.sourceBlock, this.sourcePos, false); + NeighborUpdater.executeUpdate(world, blockState, blockPos, this.sourceBlock, this.sourcePos, false);
+ } + }
+ } catch (StackOverflowError ex) { + } catch (StackOverflowError ex) {
+ world.lastPhysicsProblem = new BlockPos(blockPos); + world.lastPhysicsProblem = new BlockPos(blockPos);

Datei anzeigen

@ -22,10 +22,10 @@ is actually processed, this is honestly really just exposed for the misnomers or
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index 3a5abb89d3742a6f38799c183a098947686e16ab..3bc7230ca62ebe3426da293e436a962bb0134f85 100644 index 4b3bb5fad1d80c9baea20ca224663b1ebc2b83e9..eb4a70f4e21e46f61e60235fb0569c0d6b2672f9 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -286,13 +286,26 @@ public class GlobalConfiguration extends ConfigurationPart { @@ -262,13 +262,26 @@ public class GlobalConfiguration extends ConfigurationPart {
public Misc misc; public Misc misc;
public class Misc extends ConfigurationPart { public class Misc extends ConfigurationPart {