Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
patches
Dieser Commit ist enthalten in:
Ursprung
fad3fa9bde
Commit
dfac4f9df2
@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index be73d6940983672bcccc2b05a9a87b01e0a995b0..d8ca6256ad2bedc7afb92162a0e1a5487011bfbc 100644
|
||||
index 176ffe9f5007bf4bb83bfc0d1186116c98481f45..3eca99ab31f257423ca4d1d2cdcfc19a16758e6d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -167,6 +167,14 @@ public class Main {
|
@ -7,7 +7,7 @@ Co-authored-by: Evan McCarthy <evanmccarthy@outlook.com>
|
||||
Co-authored-by: lexikiq <noellekiq@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index a5d6f358aced725315f4bbb33953ef5f2cafdfde..4406d9622c6a5f817b7fbd1b448b8c3095c617b2 100644
|
||||
index aea9366215973555de88e67310b7fbe033f45cd5..773e76d940bf0ec67681d2896bcf7a8428aa94bd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -680,7 +680,7 @@ public class EnderDragon extends Mob implements Enemy {
|
@ -5,14 +5,14 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index 322e07adc556ee8131d40d89856574b185ee4c94..7056a0309c76fe8980d60afb4e6059deceb210d9 100644
|
||||
index ee43e87fca2a8ac3f63bc2f8ffcf15be373195e9..1a97dd1f9b9fcc5809aa3f103bc6efd5a548670f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -86,6 +86,7 @@ public class GameProfileCache {
|
||||
}
|
||||
};
|
||||
@@ -90,6 +90,7 @@ public class GameProfileCache {
|
||||
}
|
||||
};
|
||||
|
||||
+ if (!org.apache.commons.lang3.StringUtils.isBlank(name)) // Paper - Don't lookup a profile with a blank name)
|
||||
repository.findProfilesByNames(new String[]{name}, profilelookupcallback);
|
||||
GameProfile gameprofile = (GameProfile) atomicreference.get();
|
||||
repository.findProfilesByNames(new String[]{name}, profilelookupcallback);
|
||||
GameProfile gameprofile = (GameProfile) atomicreference.get();
|
||||
|
@ -6,20 +6,20 @@ Subject: [PATCH] Add setting for proxy online mode status
|
||||
TODO: Add isProxyOnlineMode check to Metrics
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index 7056a0309c76fe8980d60afb4e6059deceb210d9..82f6404e5c4c5b2c9aea1b1c27ebee1d3c7ee9dc 100644
|
||||
index 1a97dd1f9b9fcc5809aa3f103bc6efd5a548670f..68f95f4782c1effdee13543b702fdcc78ce14353 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -86,7 +86,8 @@ public class GameProfileCache {
|
||||
}
|
||||
};
|
||||
@@ -90,7 +90,8 @@ public class GameProfileCache {
|
||||
}
|
||||
};
|
||||
|
||||
- if (!org.apache.commons.lang3.StringUtils.isBlank(name)) // Paper - Don't lookup a profile with a blank name)
|
||||
+ if (!org.apache.commons.lang3.StringUtils.isBlank(name) // Paper - Don't lookup a profile with a blank name
|
||||
+ && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()) // Paper - only run in online mode - 100 COL
|
||||
repository.findProfilesByNames(new String[]{name}, profilelookupcallback);
|
||||
GameProfile gameprofile = (GameProfile) atomicreference.get();
|
||||
repository.findProfilesByNames(new String[]{name}, profilelookupcallback);
|
||||
GameProfile gameprofile = (GameProfile) atomicreference.get();
|
||||
|
||||
@@ -104,7 +105,7 @@ public class GameProfileCache {
|
||||
@@ -107,7 +108,7 @@ public class GameProfileCache {
|
||||
}
|
||||
|
||||
private static boolean usesAuthentication() {
|
||||
@ -29,10 +29,10 @@ index 7056a0309c76fe8980d60afb4e6059deceb210d9..82f6404e5c4c5b2c9aea1b1c27ebee1d
|
||||
|
||||
public void add(GameProfile profile) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
index 0214830d9bc98b8d435ff11f40df65596980cf77..5db27d7bcaaa2eeaeeb08401513d8d23f6cb63c7 100644
|
||||
index 78b11d6fd74fb0714a8013fdc78d096643c4f83c..6a64c58fff9bbed542bf29a029531996f2a50d00 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
@@ -65,7 +65,8 @@ public class OldUsersConverter {
|
||||
@@ -66,7 +66,8 @@ public class OldUsersConverter {
|
||||
return new String[i];
|
||||
});
|
||||
|
||||
@ -43,10 +43,10 @@ index 0214830d9bc98b8d435ff11f40df65596980cf77..5db27d7bcaaa2eeaeeb08401513d8d23
|
||||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f6e6b929c3ce5091a44bba4ab354b8dae73e7cc8..09c34d05c124e55a327e529bf1b247bc5c70ca6c 100644
|
||||
index e85017f62eb90efda8d4f3910fe543c9a4a2243a..9c971f28483661fbdbee07b8091669071f0088a8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1789,7 +1789,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1821,7 +1821,7 @@ public final class CraftServer implements Server {
|
||||
// Spigot Start
|
||||
GameProfile profile = null;
|
||||
// Only fetch an online UUID in online mode
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3fbe132d278928a55115dce116f14ac1ce1ebc69..fabb6ab9a3dc7dcf724b1505ec1172f16158f502 100644
|
||||
index d03d5629e3605626bba6ea806990443bfb151c61..3ec76a3073bb5ce95e56302eb16940b9efd23e47 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1506,13 +1506,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1533,13 +1533,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Spigot start - limit place/interactions
|
||||
private int limitedPackets;
|
||||
private long lastLimitedPacket = -1;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flying kick messages
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fabb6ab9a3dc7dcf724b1505ec1172f16158f502..8b81073813a7e31273816d1486a59ed6325589df 100644
|
||||
index 3ec76a3073bb5ce95e56302eb16940b9efd23e47..d5aff46a9f4683fa6e175ecfd1702f7da8af21a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -336,7 +336,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -339,7 +339,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
|
||||
if (++this.aboveGroundTickCount > 80) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
||||
@ -17,7 +17,7 @@ index fabb6ab9a3dc7dcf724b1505ec1172f16158f502..8b81073813a7e31273816d1486a59ed6
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -358,7 +358,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
|
||||
if (++this.aboveGroundVehicleTickCount > 80) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityZapEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 2f97e4f0078cecbcf044d0b27f375638a6ea047b..b70ee1dff0442de32a9e20ad54b246d5eae45e58 100644
|
||||
index 22f7318711041bfc2847d519933c46b9fd523d01..505e0031f2783192f1146b1b00249e7891c4f1ef 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -851,10 +851,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@ -28,7 +28,7 @@ index 2f97e4f0078cecbcf044d0b27f375638a6ea047b..b70ee1dff0442de32a9e20ad54b246d5
|
||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
|
||||
entitywitch.setNoAi(this.isNoAi());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index bbf30a36c44cd6403a2f45622f5dd186adc18772..3521d784db2754b4af99b891f69a15fe2bf7a4b8 100644
|
||||
index c6f5d282b35a40756f920906e39a4f71d277ada3..be2722c95fad0b78b27a97e64692dfe686a1f03f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1268,6 +1268,14 @@ public class CraftEventFactory {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Filter bad tile entity nbt data from falling blocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 0e349bc8dd0c31559437dc67481d5f0f81100e3b..c431ba283c31cf9bb7bfdb05dc8c181c9e1e0eb3 100644
|
||||
index 6c4224e4752b655710c5b992d9acf9563b183483..9be45ff8139c9d385c1deb1200e3718ed3add801 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -334,7 +334,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@ -13,7 +13,7 @@ index 0e349bc8dd0c31559437dc67481d5f0f81100e3b..c431ba283c31cf9bb7bfdb05dc8c181c
|
||||
}
|
||||
|
||||
- if (nbt.contains("TileEntityData", 10)) {
|
||||
+ if (nbt.contains("TileEntityData", 10) && !(this.level().paperConfig().entities.spawning.filterBadTileEntityNbtFromFallingBlocks && this.blockState.getBlock() instanceof net.minecraft.world.level.block.GameMasterBlock)) {
|
||||
this.blockData = nbt.getCompound("TileEntityData");
|
||||
+ if (nbt.contains("TileEntityData", 10) && !(this.level().paperConfig().entities.spawning.filterBadTileEntityNbtFromFallingBlocks && this.blockState.getBlock() instanceof net.minecraft.world.level.block.GameMasterBlock)) { // Paper
|
||||
this.blockData = nbt.getCompound("TileEntityData").copy();
|
||||
}
|
||||
|
@ -5,10 +5,18 @@ Subject: [PATCH] Cache user authenticator threads
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 0d1102e1b98235b8e7124321a65483a5e923d4a5..7a9094e69684c2d963411525a09872024c6f62e3 100644
|
||||
index 315f51b6c76695e204ddfae3419103c797ad2dfd..db07502d4d7b73c0e74814334be6603121f60673 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -139,8 +139,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -49,6 +49,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
|
||||
static final Logger LOGGER = LogUtils.getLogger();
|
||||
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
||||
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
|
||||
private static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response");
|
||||
private final byte[] challenge;
|
||||
@@ -140,8 +141,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
|
||||
} else {
|
||||
// Spigot start
|
||||
@ -19,7 +27,7 @@ index 0d1102e1b98235b8e7124321a65483a5e923d4a5..7a9094e69684c2d963411525a0987202
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
@@ -150,7 +150,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -151,7 +152,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex);
|
||||
}
|
||||
}
|
||||
@ -29,7 +37,7 @@ index 0d1102e1b98235b8e7124321a65483a5e923d4a5..7a9094e69684c2d963411525a0987202
|
||||
// Spigot end
|
||||
}
|
||||
|
||||
@@ -223,7 +224,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -218,7 +220,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
throw new IllegalStateException("Protocol error", cryptographyexception);
|
||||
}
|
||||
|
||||
@ -39,7 +47,7 @@ index 0d1102e1b98235b8e7124321a65483a5e923d4a5..7a9094e69684c2d963411525a0987202
|
||||
public void run() {
|
||||
String s1 = (String) Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized");
|
||||
|
||||
@@ -269,10 +271,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -264,10 +267,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
|
||||
}
|
||||
@ -52,12 +60,3 @@ index 0d1102e1b98235b8e7124321a65483a5e923d4a5..7a9094e69684c2d963411525a0987202
|
||||
}
|
||||
|
||||
// Spigot start
|
||||
@@ -333,6 +333,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
this.state = ServerLoginPacketListenerImpl.State.ACCEPTED;
|
||||
}
|
||||
|
||||
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
||||
+
|
||||
// Spigot start
|
||||
protected GameProfile createOfflineProfile(String name) {
|
||||
UUID uuid;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 09c34d05c124e55a327e529bf1b247bc5c70ca6c..23b99cc6999c6db244793f6b744e6546bd04ae72 100644
|
||||
index 9c971f28483661fbdbee07b8091669071f0088a8..cfa9f0336494de42a34ea14d9453e083574f5945 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2710,5 +2710,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2742,5 +2742,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index 8946d486dab3e639b00716ce7459c817270dad80..f25466e132cb6b0012dc336877fdf17b88a12ddc 100644
|
||||
index 79943167c7e16111a81ff608fd9ed6c06bcb9468..59bad6c92cc421dd05c7315e2ab694a669433ab4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -254,7 +254,7 @@ public class ExperienceOrb extends Entity {
|
||||
@ -18,7 +18,7 @@ index 8946d486dab3e639b00716ce7459c817270dad80..f25466e132cb6b0012dc336877fdf17b
|
||||
|
||||
--this.count;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 3521d784db2754b4af99b891f69a15fe2bf7a4b8..30831f9ef0887fde0f8180aa5d65f7d218bf0d6a 100644
|
||||
index be2722c95fad0b78b27a97e64692dfe686a1f03f..1008cd5a10d6587f7df66e6235bee5fe5c3f2eca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1221,6 +1221,17 @@ public class CraftEventFactory {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add ProjectileCollideEvent
|
||||
Deprecated now and replaced with ProjectileHitEvent
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 30831f9ef0887fde0f8180aa5d65f7d218bf0d6a..a85c6e0fe88d285908578f05562ede92a0ae336b 100644
|
||||
index 1008cd5a10d6587f7df66e6235bee5fe5c3f2eca..3b267a9a22a735af6f12427136816578c4a1e681 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1365,6 +1365,17 @@ public class CraftEventFactory {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
|
||||
Reduce method invocations for World.isLoaded(BlockPosition)Z
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 555e7efacd6cc37c6cf959e2931069be5c85fe8f..17a15f7f1ad0ce7deed8d72c8a4175634992efc9 100644
|
||||
index 48d3da58820c1d9259bc023ddd74e9632b3f62d1..e774f7930090e10889f13e8193d15e44a3b7637f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -427,6 +427,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -430,6 +430,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ index 43fb44b8cd164b0815335a32f04879b301a54728..8d0ff6e820af9a3f67e25298b34d1539
|
||||
ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true);
|
||||
MapItem.renderBiomePreviewMap(serverLevel, itemStack);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
index a926b07cd3c5d7c6b615302671fedb51eff89faf..7c8267ad6de50daaa3390debf99a354e3e575c87 100644
|
||||
index dcc6da6641e78cd80bd148ba644475811a1fbf4d..d03d9451044bddd8403fccb9eb412c5d6803a518 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
@@ -75,7 +75,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index d1f5a80e8e08ccc3ef998cfb9b1203e0c2f5b00e..5df2b26be53ac24c329ea22fc9802a870e705e95 100644
|
||||
index 412271af1581a6805f867c67abcd3d7803156bef..d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -92,6 +92,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@ -16,7 +16,7 @@ index d1f5a80e8e08ccc3ef998cfb9b1203e0c2f5b00e..5df2b26be53ac24c329ea22fc9802a87
|
||||
|
||||
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -950,4 +951,13 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -937,4 +938,13 @@ public class ArmorStand extends LivingEntity {
|
||||
public boolean canBeSeenByAnyone() {
|
||||
return !this.isInvisible() && !this.isMarker();
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] String based Action Bar API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
|
||||
index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad7dfad87f 100644
|
||||
index cb88a3a4e4c87a6d6c838183c1640b13d82c9344..0b391b0dc6262ef482c4a253a074b593127cc1d4 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.network.protocol.Packet;
|
||||
@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
|
||||
// Paper end
|
||||
buf.writeComponent(this.text);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 7363c80d35d4ff61d771fb77125a4e520f745bba..4a5f67c47b7ff2e47630bd78421dd103e6278ed4 100644
|
||||
index 07960b6ff0cd42622315a27beb1496d41950f9f4..6b8734cda9d1384d929795f69de36887acafd698 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -342,6 +342,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -349,6 +349,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
// Paper start
|
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
||||
Credit to prplz for figuring out the real issue
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 80b74383262ba8cc2f27882cb6a9548d1f505354..43e454be3f18d092913739bb6a92d5b82059ba59 100644
|
||||
index d986c09392182335112040d4b6feae6a1a740d84..75d2213aadcbd1d0a49fd4c8cef2d4d51669c73d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2393,7 +2393,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2495,7 +2495,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public boolean isImmobile() {
|
||||
@ -19,7 +19,7 @@ index 80b74383262ba8cc2f27882cb6a9548d1f505354..43e454be3f18d092913739bb6a92d5b8
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index a258a252e749e3b7ebb1a6304b7f143e93a67178..1dec537f96cb612de73a2d682392f14c872d031c 100644
|
||||
index 53833e155cf0d2328f2c2b36702970925045be3d..70168fb930c24689c98da064f7d04cc98d729358 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -145,7 +145,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
||||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 17a15f7f1ad0ce7deed8d72c8a4175634992efc9..407607babfb200152bb0e5c6d56bb66c82217077 100644
|
||||
index e774f7930090e10889f13e8193d15e44a3b7637f..c6e56303ec8ee466a6de7e6bd76c4f6814e8db30 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -116,7 +116,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -119,7 +119,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public static final int TICKS_PER_DAY = 24000;
|
||||
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||
@ -20,10 +20,10 @@ index 17a15f7f1ad0ce7deed8d72c8a4175634992efc9..407607babfb200152bb0e5c6d56bb66c
|
||||
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||
private boolean tickingBlockEntities;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 10652bb6eecc9f451181747ba314eadfe6347ad1..78ed93a3bb321bcb30d9ca456a9deb5deeb4397c 100644
|
||||
index 1f160036b433c5d1fb8ed1f94adefccab7a85bc7..0d9a491487c098b37331a9b94605993118fae403 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -157,6 +157,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -158,6 +158,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
|
||||
private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
|
||||
|
@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
|
||||
the same way we handle async chunk loads.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2ceb330e087fd397887d2f4383fcc7590119ca6c..8eca92373784616c1239b0c50fcd3af34704d508 100644
|
||||
index 34b10814b94fb3fd22f96988c74be434e41058fb..2bbbe256df74726b27359a217c0f0b71c32e6e2b 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1063,11 +1063,13 @@ public abstract class PlayerList {
|
||||
@@ -1061,11 +1061,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
@ -8,7 +8,7 @@ Adds lots of information about why this orb exists.
|
||||
Replaces isFromBottle() with logic that persists entity reloads too.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index cd57a7f3fdedd396d3b8dc4d195eb27bb32969eb..61bc50ef899d2867d4f3c762b71012b27d74e7f6 100644
|
||||
index 4f3c82f1b5ae24d5f70318fa96fae2a58ce7fd9f..45236a077d798d6a257a2e982b58901167ecd06e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -427,7 +427,7 @@ public class ServerPlayerGameMode {
|
||||
@ -21,7 +21,7 @@ index cd57a7f3fdedd396d3b8dc4d195eb27bb32969eb..61bc50ef899d2867d4f3c762b71012b2
|
||||
|
||||
return true;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index f25466e132cb6b0012dc336877fdf17b88a12ddc..9d1cce3fb02bb2c3ff71055fbafc974b6b98625a 100644
|
||||
index 59bad6c92cc421dd05c7315e2ab694a669433ab4..627fcf000f40e1bda025da874c447a99c727b98b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -39,13 +39,67 @@ public class ExperienceOrb extends Entity {
|
||||
@ -133,10 +133,10 @@ index f25466e132cb6b0012dc336877fdf17b88a12ddc..9d1cce3fb02bb2c3ff71055fbafc974b
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b60e970c604ae778cc0b5eb54cdfebceef91b2df..59d3ae122239f924d71d4e9d212b3bd343b80609 100644
|
||||
index 043c42d303970920f40bd65a90c147192ed6900b..0b6dce5015144cadee3dc856b7e0d152aa66aca3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1789,7 +1789,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1786,7 +1786,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected void dropExperience() {
|
||||
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
||||
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
||||
@ -147,10 +147,10 @@ index b60e970c604ae778cc0b5eb54cdfebceef91b2df..59d3ae122239f924d71d4e9d212b3bd3
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
index b5b93396166202cbe5a4456794fd394de932262a..be105a4460e9bf2ef4b72a307fa31291c37d5e0e 100644
|
||||
index f307f9077917f426a90523708c572b95cc7b6778..907ed82fea71254d6624eda878e2668cd26422a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
@@ -256,12 +256,14 @@ public abstract class Animal extends AgeableMob {
|
||||
@@ -258,12 +258,14 @@ public abstract class Animal extends AgeableMob {
|
||||
|
||||
public void finalizeSpawnChildFromBreeding(ServerLevel worldserver, Animal entityanimal, @Nullable AgeableMob entityageable, int experience) {
|
||||
// CraftBukkit end
|
||||
@ -169,7 +169,7 @@ index b5b93396166202cbe5a4456794fd394de932262a..be105a4460e9bf2ef4b72a307fa31291
|
||||
this.setAge(6000);
|
||||
entityanimal.setAge(6000);
|
||||
this.resetLove();
|
||||
@@ -270,7 +272,7 @@ public abstract class Animal extends AgeableMob {
|
||||
@@ -272,7 +274,7 @@ public abstract class Animal extends AgeableMob {
|
||||
if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
@ -179,7 +179,7 @@ index b5b93396166202cbe5a4456794fd394de932262a..be105a4460e9bf2ef4b72a307fa31291
|
||||
// CraftBukkit end
|
||||
}
|
||||
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 408642708961ecb3a1363f84bb9e0496bdde7827..65592c6bd1874e08037e0e5287b370e3924aea3f 100644
|
||||
index 335249181f34bfe8b0e359c591e4eae0af63b0fe..8670d8b2a08e96df787a91f36c48df8b345080dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -909,7 +909,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
@ -192,10 +192,10 @@ index 408642708961ecb3a1363f84bb9e0496bdde7827..65592c6bd1874e08037e0e5287b370e3
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
index 6dba24f47ca76a432a836178af178c2d52631eee..ed1f6e77d5fc9b6f5f52b1a10275783b514c162c 100644
|
||||
index 83dbf663cd725adcbcfee4ac633f369240375381..0dab0da65788720e56a568918de458ab7195ef5c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
@@ -464,7 +464,7 @@ public class Turtle extends Animal {
|
||||
@@ -459,7 +459,7 @@ public class Turtle extends Animal {
|
||||
RandomSource randomsource = this.animal.getRandom();
|
||||
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
@ -205,7 +205,7 @@ index 6dba24f47ca76a432a836178af178c2d52631eee..ed1f6e77d5fc9b6f5f52b1a10275783b
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 4406d9622c6a5f817b7fbd1b448b8c3095c617b2..f68aef2298c3b2994c46d34b0888f988af9190dc 100644
|
||||
index 773e76d940bf0ec67681d2896bcf7a8428aa94bd..2d8a8a9c8acfcac13e5a82cda9d7be59138b6407 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -673,7 +673,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@ -227,7 +227,7 @@ index 4406d9622c6a5f817b7fbd1b448b8c3095c617b2..f68aef2298c3b2994c46d34b0888f988
|
||||
|
||||
if (this.dragonFight != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index b70ee1dff0442de32a9e20ad54b246d5eae45e58..b3127238cea62c47d710abab44f6570103ba9364 100644
|
||||
index 505e0031f2783192f1146b1b00249e7891c4f1ef..a0a313fa5e7e4e1973c020d0262e34381a19dea7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -638,7 +638,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@ -292,10 +292,10 @@ index 8d09c134058e55a23df4e23d965a7a783aed701e..45242f0ed5a0f98953df5f27fb76874d
|
||||
|
||||
world.levelEvent(1042, blockposition, 0);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 7ed82beb538a25a5246f6288c1dddb4f5f85e997..7646b66bc5ba0288608de0d836c7307e02eebe67 100644
|
||||
index 756a8ae14ffc46d6ebe0a858a03fb2e89b8e118a..bdf5443d5974d316b9b216291fadae4346a3123f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -362,8 +362,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -369,8 +369,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
}
|
||||
|
||||
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
||||
@ -324,10 +324,10 @@ index e72ed2ed8664cbc408cbe1e38f1f0acacc3841dd..2f628f36c32752d1bac910e180b90639
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index 31a5694a0a9a504eac6c068907083eccdee94acf..b286deebacaf00ff21585cfbc75291a8d80965c4 100644
|
||||
index 0f1644d3ba208a1dc9bf584640fc7c36bc57ce0c..4ce013d8715d2090420a369678f698a9ce1983cb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -943,7 +943,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@@ -977,7 +977,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
|
||||
entity = new PrimedTnt(world, x, y, z, null);
|
||||
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) {
|
@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
||||
You can set this to 0 to disable collisions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c85833a54c79b9a6eb18bc22dae67a92dbbad724..bea207f8fc4cd1af06622e10ff904d9459d4bc66 100644
|
||||
index 1b7b3114cd6ced0587a0e7e4a4c94584c72ed17f..ffd38defdd9b56b1849a3b4e312de2cff7b964c2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -387,6 +387,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -392,6 +392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
@ -24,10 +24,10 @@ index c85833a54c79b9a6eb18bc22dae67a92dbbad724..bea207f8fc4cd1af06622e10ff904d94
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 59d3ae122239f924d71d4e9d212b3bd343b80609..47726c9d2c5384d31983e53fd17d91cd12da8961 100644
|
||||
index 0b6dce5015144cadee3dc856b7e0d152aa66aca3..b8ac19ae63579bf5325b0ebfa37293c170df6205 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3346,10 +3346,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3348,10 +3348,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
Iterator iterator1 = list.iterator();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not let armorstands drown
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 5df2b26be53ac24c329ea22fc9802a870e705e95..5a838c7070fc5ed8f8f2fdb0073221f4c22e1334 100644
|
||||
index d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c..c9c773cce59e795ed0d8449a6e70b4b968a4e5e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -959,5 +959,12 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -946,5 +946,12 @@ public class ArmorStand extends LivingEntity {
|
||||
super.move(type, movement);
|
||||
}
|
||||
}
|
@ -30,18 +30,18 @@ will have plugins and worlds saving to the disk has a high potential to result
|
||||
in corruption/dataloss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2bb21a86f49ec996b7beeb65dd0ec8e2e5634053..182ae975a0a9bf4ade6932d1bb1a376f77af130a 100644
|
||||
index e1849b879334bc9d17e6efeff061e1db6ab4ec7b..546cbd1c6086b737bcf68380e21feb9b1ffa2c2b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -233,6 +233,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -236,6 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private Map<ResourceKey<Level>, ServerLevel> levels;
|
||||
private PlayerList playerList;
|
||||
private volatile boolean running;
|
||||
+ private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||
private boolean stopped;
|
||||
private int tickCount;
|
||||
protected final Proxy proxy;
|
||||
@@ -882,7 +883,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private int ticksUntilAutosave;
|
||||
@@ -928,7 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.playerList != null) {
|
||||
MinecraftServer.LOGGER.info("Saving players");
|
||||
this.playerList.saveAll();
|
||||
@ -50,7 +50,7 @@ index 2bb21a86f49ec996b7beeb65dd0ec8e2e5634053..182ae975a0a9bf4ade6932d1bb1a376f
|
||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -933,6 +934,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -979,6 +980,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void halt(boolean waitForShutdown) {
|
||||
@ -64,7 +64,7 @@ index 2bb21a86f49ec996b7beeb65dd0ec8e2e5634053..182ae975a0a9bf4ade6932d1bb1a376f
|
||||
if (waitForShutdown) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 8eca92373784616c1239b0c50fcd3af34704d508..6dad42086e598c86a27358e12c5b72a0a79b38ee 100644
|
||||
index 2bbbe256df74726b27359a217c0f0b71c32e6e2b..2dbaf34170fd2c94cd288657a84e13084f4a89b9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1175,8 +1175,15 @@ public abstract class PlayerList {
|
@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
|
||||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8b81073813a7e31273816d1486a59ed6325589df..098d182cc8cf048eb7b4a4640dc2338150f48f2e 100644
|
||||
index d5aff46a9f4683fa6e175ecfd1702f7da8af21a8..268ce65aa944295b0107daa2824fc93b55afeb89 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2170,6 +2170,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2178,6 +2178,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
@ -32,10 +32,10 @@ index 8b81073813a7e31273816d1486a59ed6325589df..098d182cc8cf048eb7b4a4640dc23381
|
||||
case RELEASE_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(false);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index ca56004082460bc422d5898407eef9dae49071ab..fb9b81efea99b78449b453dd0e4fcdfecc71ec50 100644
|
||||
index c2725113b3ec36a79c88bcf9837c0ef2955b613e..09d5561deb40549ce6a7661ebfd9b9db24db0d12 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -594,6 +594,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -589,6 +589,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 23b99cc6999c6db244793f6b744e6546bd04ae72..e8fbecb9abee37946dd8055c1e4d8e95df324998 100644
|
||||
index cfa9f0336494de42a34ea14d9453e083574f5945..31c8013369feb57defe3f530c003eafb9468890f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2729,5 +2729,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2761,5 +2761,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
@ -252,19 +252,19 @@ index c3631efda9c7fa531a8a9f18fbee7b5f8655382b..769f6489632302627fa1730cc08e77f5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 182ae975a0a9bf4ade6932d1bb1a376f77af130a..73155c8cb02a6156c1e48f9c75f512441f8b85a1 100644
|
||||
index 546cbd1c6086b737bcf68380e21feb9b1ffa2c2b..6e6a8a7d9af2e5de6782fd5935d22d7de3f248ee 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -164,7 +164,7 @@ import com.mojang.datafixers.util.Pair;
|
||||
import com.mojang.serialization.DynamicOps;
|
||||
@@ -155,7 +155,7 @@ import org.slf4j.Logger;
|
||||
import com.mojang.serialization.Dynamic;
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import java.util.Random;
|
||||
-import jline.console.ConsoleReader;
|
||||
+// import jline.console.ConsoleReader; // Paper
|
||||
import joptsimple.OptionSet;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.resources.RegistryOps;
|
||||
@@ -278,7 +278,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
import net.minecraft.nbt.NbtException;
|
||||
import net.minecraft.nbt.ReportedNbtException;
|
||||
@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public org.bukkit.craftbukkit.CraftServer server;
|
||||
public OptionSet options;
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
@ -273,7 +273,7 @@ index 182ae975a0a9bf4ade6932d1bb1a376f77af130a..73155c8cb02a6156c1e48f9c75f51244
|
||||
public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
@@ -361,7 +361,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -370,7 +370,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.options = options;
|
||||
this.worldLoader = worldLoader;
|
||||
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
|
||||
@ -283,7 +283,7 @@ index 182ae975a0a9bf4ade6932d1bb1a376f77af130a..73155c8cb02a6156c1e48f9c75f51244
|
||||
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
||||
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
||||
Main.useJline = false;
|
||||
@@ -382,6 +384,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -391,6 +393,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.warn((String) null, ex);
|
||||
}
|
||||
}
|
||||
@ -292,7 +292,7 @@ index 182ae975a0a9bf4ade6932d1bb1a376f77af130a..73155c8cb02a6156c1e48f9c75f51244
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
// CraftBukkit end
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper
|
||||
@@ -1114,7 +1118,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1178,7 +1182,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
@ -301,7 +301,7 @@ index 182ae975a0a9bf4ade6932d1bb1a376f77af130a..73155c8cb02a6156c1e48f9c75f51244
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1586,7 +1590,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1688,7 +1692,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
@ -311,7 +311,7 @@ index 182ae975a0a9bf4ade6932d1bb1a376f77af130a..73155c8cb02a6156c1e48f9c75f51244
|
||||
|
||||
public KeyPair getKeyPair() {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 1989bbc4bcceb86ab49786b0c93ff48f3836e904..567c8fdbb0e21ec9cfc511f8c7487340785d3c62 100644
|
||||
index 772d7c1e398538b8bbbd70aedaba05199d11b358..fc2a55735b22f5a25d009a7157624fb0cdc853c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -375,10 +375,10 @@ index 75083eeb9b413e6dd5375007360dce6857a08fff..d292fdb165436f0b9b46b32110f5e09a
|
||||
if (!SwingUtilities.isEventDispatchThread()) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 6dad42086e598c86a27358e12c5b72a0a79b38ee..daabc5739b7bf6b1cbeb497fe0e9b7ed6ed30975 100644
|
||||
index 2dbaf34170fd2c94cd288657a84e13084f4a89b9..486e9e3dca76c047753b87927735c98698d5ca5a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -162,8 +162,7 @@ public abstract class PlayerList {
|
||||
@@ -160,8 +160,7 @@ public abstract class PlayerList {
|
||||
|
||||
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||
@ -389,10 +389,10 @@ index 6dad42086e598c86a27358e12c5b72a0a79b38ee..daabc5739b7bf6b1cbeb497fe0e9b7ed
|
||||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e8fbecb9abee37946dd8055c1e4d8e95df324998..7019a52796afe0fd438833c3b9690499ec120202 100644
|
||||
index 31c8013369feb57defe3f530c003eafb9468890f..f2c8a7fe1a029166701bcacbd3faa750cfe38ae4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -43,7 +43,7 @@ import java.util.logging.Level;
|
||||
@@ -44,7 +44,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.imageio.ImageIO;
|
||||
@ -401,7 +401,7 @@ index e8fbecb9abee37946dd8055c1e4d8e95df324998..7019a52796afe0fd438833c3b9690499
|
||||
import net.minecraft.advancements.AdvancementHolder;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
@@ -1296,9 +1296,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1328,9 +1328,13 @@ public final class CraftServer implements Server {
|
||||
return this.logger;
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ index e8fbecb9abee37946dd8055c1e4d8e95df324998..7019a52796afe0fd438833c3b9690499
|
||||
@Override
|
||||
public PluginCommand getPluginCommand(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index d8ca6256ad2bedc7afb92162a0e1a5487011bfbc..6f359e225eb11f22c61beb6463f9918002ce0086 100644
|
||||
index 3eca99ab31f257423ca4d1d2cdcfc19a16758e6d..de7f0db02cdc730ccc89111396c031a267198f04 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 2aa3df6ef2da77fa51c11d64124ac55a3769f567..2d0a188cca46a4d580fb76baa19e85a653e87687 100644
|
||||
index 3d054cfa5050f4b75eab4a18035655c1bfd9290b..fbcf5ddb655e6d070f24d71bd076115739cf0254 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -669,6 +669,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@@ -670,6 +670,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
ItemEntity entityitem = (ItemEntity) iterator.next();
|
||||
|
||||
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
||||
@ -21,10 +21,10 @@ index 2aa3df6ef2da77fa51c11d64124ac55a3769f567..2d0a188cca46a4d580fb76baa19e85a6
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 11dad6b6c6cf922417ab54a1db13d809c10c999e..adb8ac976397322f0b4122fd9469dd5191f207f7 100644
|
||||
index 5bb26ca5c81635d27ca59352d5184d8b4300e0b5..6905090f030c86f640e841e94c32ad90acb75d2a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -52,6 +52,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -54,6 +54,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
public UUID target;
|
||||
public final float bobOffs;
|
||||
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
||||
@ -33,7 +33,7 @@ index 11dad6b6c6cf922417ab54a1db13d809c10c999e..adb8ac976397322f0b4122fd9469dd51
|
||||
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
|
||||
super(type, world);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
index 8f1d3691132093398ceb38e2ad9bdc59c4fb6c19..7b11db70668951e5331b6d6b99f616e163d7d7d6 100644
|
||||
index fb3738f4c558796f41e3327dd41b8aec68007a8a..4456b7c438cadb4bfabad030b6871b3a8a7fd439 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
@@ -63,6 +63,18 @@ public class CraftItem extends CraftEntity implements Item {
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index adb8ac976397322f0b4122fd9469dd5191f207f7..4885c8ff438796cf7a90e73e2db32a1877f60fa4 100644
|
||||
index 6905090f030c86f640e841e94c32ad90acb75d2a..6847d100a6fe2b57d7986b121f5ce0f981cfa415 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -404,6 +404,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -423,6 +423,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
// CraftBukkit start - fire PlayerPickupItemEvent
|
||||
int canHold = player.getInventory().canHold(itemstack);
|
||||
int remaining = i - canHold;
|
||||
@ -16,7 +16,7 @@ index adb8ac976397322f0b4122fd9469dd5191f207f7..4885c8ff438796cf7a90e73e2db32a18
|
||||
|
||||
if (this.pickupDelay <= 0 && canHold > 0) {
|
||||
itemstack.setCount(canHold);
|
||||
@@ -411,8 +412,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -430,8 +431,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
|
||||
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
|
||||
this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
|
||||
@ -31,7 +31,7 @@ index adb8ac976397322f0b4122fd9469dd5191f207f7..4885c8ff438796cf7a90e73e2db32a18
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -442,6 +449,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -461,6 +468,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
// CraftBukkit end
|
||||
|
||||
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 4885c8ff438796cf7a90e73e2db32a1877f60fa4..5744d726c4e7a970db5c1c3764d530d839d95597 100644
|
||||
index 6847d100a6fe2b57d7986b121f5ce0f981cfa415..18c9c7c2b0605bee2936fbb084108dd9791f7ebe 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -36,6 +36,7 @@ import org.bukkit.entity.Player;
|
||||
@ -16,7 +16,7 @@ index 4885c8ff438796cf7a90e73e2db32a1877f60fa4..5744d726c4e7a970db5c1c3764d530d8
|
||||
|
||||
public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
@@ -406,6 +407,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -425,6 +426,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
int remaining = i - canHold;
|
||||
boolean flyAtPlayer = false; // Paper
|
||||
|
@ -10,13 +10,13 @@ out due to a sync load, as the worldgen threads will be
|
||||
stalling on profile lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index 9870eccc1dc5c2201f12f8e2affe647f6b0375f8..30237ca94a36197ce21369bdcc7bb1dfafe02680 100644
|
||||
index 114f4017c4133042178c57d424f10079163835dd..aa52b271bd556a29f774fde375b713d0d187521b 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -82,6 +82,22 @@ public class Util {
|
||||
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
||||
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
||||
@@ -89,6 +89,22 @@ public class Util {
|
||||
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main");
|
||||
private static final ExecutorService IO_POOL = makeIoExecutor("IO-Worker-", false);
|
||||
private static final ExecutorService DOWNLOAD_POOL = makeIoExecutor("Download-", true);
|
||||
+ // Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
||||
+ public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() {
|
||||
+
|
||||
@ -33,14 +33,14 @@ index 9870eccc1dc5c2201f12f8e2affe647f6b0375f8..30237ca94a36197ce21369bdcc7bb1df
|
||||
+ }
|
||||
+ });
|
||||
+ // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
||||
private static final ExecutorService IO_POOL = makeIoExecutor();
|
||||
private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
|
||||
private static final int LINEAR_LOOKUP_THRESHOLD = 8;
|
||||
public static final long NANOS_PER_MILLI = 1000000L;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index 82f6404e5c4c5b2c9aea1b1c27ebee1d3c7ee9dc..c70cd016e1978931d115cfca94664897f0158196 100644
|
||||
index 68f95f4782c1effdee13543b702fdcc78ce14353..fdf3194499512614355b02aa11e34574cdd89c59 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -167,7 +167,7 @@ public class GameProfileCache {
|
||||
@@ -170,7 +170,7 @@ public class GameProfileCache {
|
||||
} else {
|
||||
CompletableFuture<Optional<GameProfile>> completablefuture1 = CompletableFuture.supplyAsync(() -> {
|
||||
return this.get(username);
|
||||
@ -50,10 +50,10 @@ index 82f6404e5c4c5b2c9aea1b1c27ebee1d3c7ee9dc..c70cd016e1978931d115cfca94664897
|
||||
}, this.executor);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
index cf7e64eac9e3eb395a0be0a2a4fa0175a731b6e7..f5162f7171c348ff523b18e577246561d79e1c20 100644
|
||||
index bffc770105800ba78c6d9bfb56ad9ad425f19910..92b770d10f34596ce52392a0db1ccd825108730b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
@@ -222,7 +222,7 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
@@ -80,7 +80,7 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
} else {
|
||||
return Optional.empty();
|
||||
}
|
||||
@ -61,12 +61,12 @@ index cf7e64eac9e3eb395a0be0a2a4fa0175a731b6e7..f5162f7171c348ff523b18e577246561
|
||||
+ }, Util.PROFILE_EXECUTOR); // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor
|
||||
}
|
||||
|
||||
private static boolean hasTextures(GameProfile profile) {
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
||||
index 1a0ba852b89b09ba2c118903f29ae7aeabe8ed45..2fff882c02aa84ab7b14b267bc6e28b5ad94def6 100644
|
||||
index 358af0121ce3d87a9f51da2bae0699034c1560b4..91e913f8652584ffab44c44d10c0e0c47707e261 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
||||
@@ -125,7 +125,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
@@ -122,7 +122,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
|
||||
@Override
|
||||
public CompletableFuture<PlayerProfile> update() {
|
@ -587,10 +587,10 @@ index 395873f89925b495978d151efe1d91da9ad11b0a..e969a0acf06d9265fa75fc07bb637752
|
||||
* Calculates distance between 2 entities
|
||||
* @param e1
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 646cd39c46d86899f23c8179c0790e32d03f954f..1b97195394161e067312b71c81ddd448b92c5e44 100644
|
||||
index 360ecf561cde34b07929519a67485e0315e4676c..22f53d722f8e567554d2f7ed6c683e76cd74a1ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -178,7 +178,7 @@ public class Main {
|
||||
@@ -176,7 +176,7 @@ public class Main {
|
||||
}
|
||||
|
||||
File file = (File) optionset.valueOf("universe"); // CraftBukkit
|
||||
@ -600,10 +600,10 @@ index 646cd39c46d86899f23c8179c0790e32d03f954f..1b97195394161e067312b71c81ddd448
|
||||
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
||||
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index c70cd016e1978931d115cfca94664897f0158196..eac9658fa4cab7a651e10e4e18c679e040e4aed0 100644
|
||||
index fdf3194499512614355b02aa11e34574cdd89c59..4dc08b0abf0a1edb51cc586d1a89444ba790ca7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -124,6 +124,17 @@ public class GameProfileCache {
|
||||
@@ -127,6 +127,17 @@ public class GameProfileCache {
|
||||
return this.operationCount.incrementAndGet();
|
||||
}
|
||||
|
||||
@ -622,10 +622,10 @@ index c70cd016e1978931d115cfca94664897f0158196..eac9658fa4cab7a651e10e4e18c679e0
|
||||
String s1 = name.toLowerCase(Locale.ROOT);
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bdacf4220b00eea529266c7dfa563b9d858fbdba..6b9675a1170f9e536432826e52b3cb3fa5195272 100644
|
||||
index f2c8a7fe1a029166701bcacbd3faa750cfe38ae4..7c85ef9eebdfb977c4975998311e0ff356430b1a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -265,6 +265,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -266,6 +266,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
@ -635,7 +635,7 @@ index bdacf4220b00eea529266c7dfa563b9d858fbdba..6b9675a1170f9e536432826e52b3cb3f
|
||||
public final class CraftServer implements Server {
|
||||
private final String serverName = "Paper"; // Paper
|
||||
private final String serverVersion;
|
||||
@@ -307,6 +310,7 @@ public final class CraftServer implements Server {
|
||||
@@ -308,6 +311,7 @@ public final class CraftServer implements Server {
|
||||
static {
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
|
||||
@ -643,7 +643,7 @@ index bdacf4220b00eea529266c7dfa563b9d858fbdba..6b9675a1170f9e536432826e52b3cb3f
|
||||
CraftItemFactory.instance();
|
||||
}
|
||||
|
||||
@@ -2745,5 +2749,42 @@ public final class CraftServer implements Server {
|
||||
@@ -2770,5 +2774,42 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
@ -687,10 +687,10 @@ index bdacf4220b00eea529266c7dfa563b9d858fbdba..6b9675a1170f9e536432826e52b3cb3f
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
||||
index 2fff882c02aa84ab7b14b267bc6e28b5ad94def6..533d143969592f9a4f4d1ea1660474264150f211 100644
|
||||
index 91e913f8652584ffab44c44d10c0e0c47707e261..6422c58907ee289359a11054fec1e4de6f495ae3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
||||
@@ -31,7 +31,7 @@ import org.bukkit.profile.PlayerProfile;
|
||||
@@ -28,7 +28,7 @@ import org.bukkit.profile.PlayerProfile;
|
||||
import org.bukkit.profile.PlayerTextures;
|
||||
|
||||
@SerializableAs("PlayerProfile")
|
||||
@ -699,7 +699,7 @@ index 2fff882c02aa84ab7b14b267bc6e28b5ad94def6..533d143969592f9a4f4d1ea166047426
|
||||
|
||||
@Nonnull
|
||||
public static GameProfile validateSkullProfile(@Nonnull GameProfile gameProfile) {
|
||||
@@ -96,8 +96,10 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
@@ -93,8 +93,10 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
}
|
||||
}
|
||||
|
||||
@ -712,7 +712,7 @@ index 2fff882c02aa84ab7b14b267bc6e28b5ad94def6..533d143969592f9a4f4d1ea166047426
|
||||
}
|
||||
|
||||
void rebuildDirtyProperties() {
|
||||
@@ -245,6 +247,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
@@ -237,6 +239,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> serialize() {
|
||||
@ -720,7 +720,7 @@ index 2fff882c02aa84ab7b14b267bc6e28b5ad94def6..533d143969592f9a4f4d1ea166047426
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
if (this.getUniqueId() != null) {
|
||||
map.put("uniqueId", this.getUniqueId().toString());
|
||||
@@ -260,10 +263,12 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
@@ -252,10 +255,12 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
});
|
||||
map.put("properties", propertiesData);
|
||||
}
|
||||
@ -733,7 +733,7 @@ index 2fff882c02aa84ab7b14b267bc6e28b5ad94def6..533d143969592f9a4f4d1ea166047426
|
||||
UUID uniqueId = ConfigSerializationUtil.getUuid(map, "uniqueId", true);
|
||||
String name = ConfigSerializationUtil.getString(map, "name", true);
|
||||
|
||||
@@ -277,7 +282,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
@@ -269,7 +274,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
|
||||
profile.properties.put(property.name(), property);
|
||||
}
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index fb9b81efea99b78449b453dd0e4fcdfecc71ec50..cd55aa48063fa4dc9646ab487b307b87b8b41315 100644
|
||||
index 09d5561deb40549ce6a7661ebfd9b9db24db0d12..9db07751cf1321c7fd15b2345729deaa6dd5a76f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2042,20 +2042,45 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1957,20 +1957,45 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
@ -59,10 +59,10 @@ index fb9b81efea99b78449b453dd0e4fcdfecc71ec50..cd55aa48063fa4dc9646ab487b307b87
|
||||
@Override
|
||||
public abstract boolean isSpectator();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 2bc97adea45672cdb5c8891a9fa461b2a81ff4e6..32ad04d66b776aa1c300cca3c5eeb332d75ea5cc 100644
|
||||
index c27dfd3e8f3c287e74887a76b479c75563b7f280..a472bd00afb1ef4ee3043e8c8e2098014f67a888 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -516,6 +516,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -517,6 +517,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
this.getHandle().getCooldowns().addCooldown(CraftMagicNumbers.getItem(material), ticks);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren