mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 00:47:38 +01:00
Moar, fix API
This commit is contained in:
parent
0edb5458e5
commit
dfab659e53
@ -8,7 +8,7 @@ and allows full control of the response sent to the client.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5bacbd0df66953d3c8fdfde5af1338a74339cfda
|
||||
index 0000000000000000000000000000000000000000..e886ac04c0c14ae5dfb87212e262b96ec5b3b9dc
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
|
||||
@@ -0,0 +1,334 @@
|
||||
@ -56,9 +56,9 @@ index 0000000000000000000000000000000000000000..5bacbd0df66953d3c8fdfde5af1338a7
|
||||
+ private Object[] players;
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, boolean shouldSendChatPreviews, int numPlayers, int maxPlayers,
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers,
|
||||
+ @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
|
||||
+ super(client.getAddress().getAddress(), motd, shouldSendChatPreviews, numPlayers, maxPlayers);
|
||||
+ super("", client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
|
||||
+ this.client = client;
|
||||
+ this.numPlayers = numPlayers;
|
||||
+ this.version = version;
|
||||
@ -66,9 +66,9 @@ index 0000000000000000000000000000000000000000..5bacbd0df66953d3c8fdfde5af1338a7
|
||||
+ setServerIcon(favicon);
|
||||
+ }
|
||||
+
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, int numPlayers, int maxPlayers,
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers,
|
||||
+ @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
|
||||
+ super(client.getAddress().getAddress(), motd, shouldSendChatPreviews, numPlayers, maxPlayers);
|
||||
+ super("", client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
|
||||
+ this.client = client;
|
||||
+ this.numPlayers = numPlayers;
|
||||
+ this.version = version;
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate
|
||||
Can set a much shorter despawn rate for arrows that players can not pick up.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 0e3c8edf0891e815a67020bb094866fd47102d67..62cb9dff53d980399913c913893fca2c1110d184 100644
|
||||
index eff6a93af46476f173f13fc35ca6c8cec7de37c9..cfd202d32048abcd3e961d9f7f08c1bc6282e601 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -311,7 +311,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -312,7 +312,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
|
||||
protected void tickDespawn() {
|
||||
++this.life;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 29e432e9bea9da307c96d42d9b45d1c3a3161fa1..d0e069e2dd950f2fe0d51594ceddcbbe44458acd 100644
|
||||
index 2ad216a533dedb180ea10d9072ce25ebe0283b1a..ad11ff50427177042b8f7331dddfc27f10657522 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -216,7 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -219,7 +219,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
|
||||
@ -19,10 +19,10 @@ index 29e432e9bea9da307c96d42d9b45d1c3a3161fa1..d0e069e2dd950f2fe0d51594ceddcbbe
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 65fd3a3c1f0a55d034e6f91c4f222e6454e7166c..62c54a0c789ca460ec29b0c653f5abd113736fb9 100644
|
||||
index 86fc83f6ea7bbf445edf097b6ab501a09ec18e2b..aeb37e84f5760a7435530123b53276920fb19749 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -333,6 +333,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -336,6 +336,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 17426b43a16887653a63c34128aa97785a23796c..c276190251c152f343de74d9c9b4028e10532ae1 100644
|
||||
index eec1467eaaadaa66febc06e51372c5f602216fb5..29495ff2d2c31f6b6ef6e2817662d143e538f926 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3614,10 +3614,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3639,10 +3639,11 @@ public abstract class LivingEntity extends Entity {
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@ -21,7 +21,7 @@ index 17426b43a16887653a63c34128aa97785a23796c..c276190251c152f343de74d9c9b4028e
|
||||
level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -3631,6 +3632,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3656,6 +3657,13 @@ public abstract class LivingEntity extends Entity {
|
||||
} else {
|
||||
itemstack = this.useItem.finishUsingItem(this.level, this);
|
||||
}
|
||||
@ -35,7 +35,7 @@ index 17426b43a16887653a63c34128aa97785a23796c..c276190251c152f343de74d9c9b4028e
|
||||
// CraftBukkit end
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
@@ -3638,6 +3646,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3663,6 +3671,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index c276190251c152f343de74d9c9b4028e10532ae1..766711e4d32ceebf9d94e39f9bcd14ff0371ad06 100644
|
||||
index 29495ff2d2c31f6b6ef6e2817662d143e538f926..b2871726eb4dd7f16d161097cbf0f287839e10ba 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -784,7 +784,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -783,7 +783,13 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
@Override
|
||||
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||
@ -23,7 +23,7 @@ index c276190251c152f343de74d9c9b4028e10532ae1..766711e4d32ceebf9d94e39f9bcd14ff
|
||||
if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) {
|
||||
this.getAttributes().load(nbt.getList("Attributes", 10));
|
||||
}
|
||||
@@ -1271,6 +1277,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1270,6 +1276,10 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void setHealth(float health) {
|
||||
@ -34,7 +34,7 @@ index c276190251c152f343de74d9c9b4028e10532ae1..766711e4d32ceebf9d94e39f9bcd14ff
|
||||
// CraftBukkit start - Handle scaled health
|
||||
if (this instanceof ServerPlayer) {
|
||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
|
||||
@@ -3447,7 +3457,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3472,7 +3482,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void setAbsorptionAmount(float amount) {
|
||||
@ -44,10 +44,10 @@ index c276190251c152f343de74d9c9b4028e10532ae1..766711e4d32ceebf9d94e39f9bcd14ff
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 15257f9236d0c32c1c74a15ce4e7decf4d9f2f91..1e1deab4d8be5523a55daf072d7e12b08d36b560 100644
|
||||
index 921c00c2a5e7d3487c35ee27714ae6bb6666f86f..dcf6d675d9bb7befe022e722aba365d30c2ce705 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2011,6 +2011,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2013,6 +2013,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setRealHealth(double health) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
|
||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 70275d1db39c9809a5fc93cebb49beb32d616476..dd5e9dc310f30c008f0c8c60ac4305160261bad9 100644
|
||||
index 98067f625b49d93fdd91af5114790848a2228ac0..c070fd1b224aeeaa9ebb054105a0f73285956da1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -159,6 +159,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index d0e069e2dd950f2fe0d51594ceddcbbe44458acd..5f3c21172dbb9a4a0cb8aa0bffcb17bc357ef04e 100644
|
||||
index ad11ff50427177042b8f7331dddfc27f10657522..a99744982184649d927f72675f9cfd29e6909741 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -696,7 +696,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -697,7 +697,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
|
||||
Optimize getType and getBlockData to manually inline and optimize the calls
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
index 4587a3668b6be9222cdd74a38229f89f611d1af6..9f32861d791f7e4cb39d2ad01f48e1916fc2b4b1 100644
|
||||
index 3b254a89484ac8a9dba399c7eb081328ff69a7b2..a6a6aaf226655d0e44bc229288112882a9c04e3b 100644
|
||||
--- a/src/main/java/net/minecraft/core/Vec3i.java
|
||||
+++ b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
@@ -33,6 +33,12 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
@ -29,10 +29,10 @@ index 4587a3668b6be9222cdd74a38229f89f611d1af6..9f32861d791f7e4cb39d2ad01f48e191
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 62c54a0c789ca460ec29b0c653f5abd113736fb9..d612b59e04fcd01a8e2c4c7f43d8735fc208b520 100644
|
||||
index aeb37e84f5760a7435530123b53276920fb19749..3e4ebdb53b543c85c1179b591ce5569336fbb995 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -276,7 +276,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -279,7 +279,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public boolean isInWorldBounds(BlockPos pos) {
|
||||
@ -42,11 +42,11 @@ index 62c54a0c789ca460ec29b0c653f5abd113736fb9..d612b59e04fcd01a8e2c4c7f43d8735f
|
||||
|
||||
public static boolean isInSpawnableBounds(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index 0e787d877901dfcea714b0e14e9fc4358ee30bbe..41e61e6c128f22224665af3f07cd11d69a43062b 100644
|
||||
index 1b7496cec0ba5a95615a069e3168bd46308d0b40..508c2fff8d8e0c6f37b6c4e3b72ba772c2ab2ee5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -160,6 +160,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
return GameEventDispatcher.NOOP;
|
||||
return GameEventListenerRegistry.NOOP;
|
||||
}
|
||||
|
||||
+ public abstract BlockState getBlockState(final int x, final int y, final int z); // Paper
|
||||
@ -71,7 +71,7 @@ index 2eb92dde607d7c8968cb07c6f3c24e1c45e9990f..908f71721daf4305692f424d7712cbfd
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
index ac5dff35e2df23b8790bbe65c40acc6a3c77e6ac..8ffc206a858864d277ff94de7c66ffdb07d8f491 100644
|
||||
index 8033c8741a0f73919a357893652592b317bfb417..9a1cffd51aaf97f759a9057aefbf50bd6f5ed028 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
@@ -89,6 +89,12 @@ public class ImposterProtoChunk extends ProtoChunk {
|
||||
@ -88,7 +88,7 @@ index ac5dff35e2df23b8790bbe65c40acc6a3c77e6ac..8ffc206a858864d277ff94de7c66ffdb
|
||||
@Override
|
||||
public FluidState getFluidState(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index ea2176501dfa773a1114f5db4e6dbe4c2d2c7abe..0a08287d3b0471b01ee38eb62f92f542da35c07d 100644
|
||||
index b78e89eed44a06bb8c7a8a62e561574d4dc4b2de..ac67a34bee88e502b88a7cb7413f4ab33c7458b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -342,12 +342,29 @@ public class LevelChunk extends ChunkAccess {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
||||
Saves on some object allocation and processing when no plugin listens to this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 093ac159fcc34de9901395ad9450372efdf7cb5b..c5e3f7f0623731c02e4625971fc82acbc834f51a 100644
|
||||
index 8989d13eb6ee94a1dbbe986cfcf0755faaa4e85c..f725fbb64b7d801e4e4c7a6d5e1be6dd96cab047 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1350,6 +1350,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1357,6 +1357,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@ -18,10 +18,10 @@ index 093ac159fcc34de9901395ad9450372efdf7cb5b..c5e3f7f0623731c02e4625971fc82acb
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5f3c21172dbb9a4a0cb8aa0bffcb17bc357ef04e..1cfd73068455b1108a74156e9715061d2dca231f 100644
|
||||
index a99744982184649d927f72675f9cfd29e6909741..6f05f44f1123e1e152ec62d9c9f083c3d0046292 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -215,6 +215,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -218,6 +218,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
@ -30,10 +30,10 @@ index 5f3c21172dbb9a4a0cb8aa0bffcb17bc357ef04e..1cfd73068455b1108a74156e9715061d
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index d612b59e04fcd01a8e2c4c7f43d8735fc208b520..39b2071a6fc6510929416ccbdf2022cf471ab26c 100644
|
||||
index 3e4ebdb53b543c85c1179b591ce5569336fbb995..89274e7df5ab8e8681d96b20c752fa34eebc44f3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -493,7 +493,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -496,7 +496,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit start
|
||||
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
|
||||
CraftWorld world = ((ServerLevel) this).getWorld();
|
||||
@ -56,10 +56,10 @@ index d40e791529911ca81398ac267a819415da91502a..03fde6e47c4a347c62fe9b4a3351769a
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
index a90f6cc0d8c0f6d115e59d07b1b4c9b45fe0ad1e..fa97966d39f01301a8ba976c02dc697e0a74bfb1 100644
|
||||
index 12bf4125bc697092a038600955318f8436bdb5d7..e234ae13fe9793db237adb6f6216fa32638cfc4f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
@@ -93,7 +93,7 @@ public class DoublePlantBlock extends BushBlock {
|
||||
@@ -95,7 +95,7 @@ public class DoublePlantBlock extends BushBlock {
|
||||
|
||||
protected static void preventCreativeDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) {
|
||||
// CraftBukkit start
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1cfd73068455b1108a74156e9715061d2dca231f..b255f8bd65006240153cb607f65e277f8a560b75 100644
|
||||
index 6f05f44f1123e1e152ec62d9c9f083c3d0046292..3e2b5d68ebbb2b35ffb7809238468808c106d0d8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2245,6 +2245,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2226,6 +2226,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||
}
|
||||
// Paper end
|
||||
@ -16,7 +16,7 @@ index 1cfd73068455b1108a74156e9715061d2dca231f..b255f8bd65006240153cb607f65e277f
|
||||
}
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
@@ -2320,6 +2321,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2301,6 +2302,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
@ -11,7 +11,7 @@ For people who want all chunks to be treated equally, you can chose a fixed valu
|
||||
This allows to fine-tune vanilla gameplay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 0a08287d3b0471b01ee38eb62f92f542da35c07d..3a613d3fb6240a504724ba42b9aadaa0881b3ac1 100644
|
||||
index ac67a34bee88e502b88a7cb7413f4ab33c7458b4..ef0be4f5ce7f07e38dea9eb356e049bd121c82dd 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -327,6 +327,13 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -26,5 +26,5 @@ index 0a08287d3b0471b01ee38eb62f92f542da35c07d..3a613d3fb6240a504724ba42b9aadaa0
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public GameEventDispatcher getEventDispatcher(int ySectionCoord) {
|
||||
public GameEventListenerRegistry getListenerRegistry(int ySectionCoord) {
|
||||
Level world = this.level;
|
@ -6,10 +6,10 @@ Subject: [PATCH] EntityPathfindEvent
|
||||
Fires when an Entity decides to start moving to a location.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
|
||||
index 0b2e10a0f508448d9e7d003e6c822f0a56d4022f..27cd393e81f6ef9b5690c051624d8d2af50acd34 100644
|
||||
index a8f69e48937b3ebd2f57a4da747e6762c4a77934..acd0b946cab86eb173e713535194d3a9347c7d48 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
|
||||
@@ -35,7 +35,7 @@ public class FlyingPathNavigation extends PathNavigation {
|
||||
@@ -40,7 +40,7 @@ public class FlyingPathNavigation extends PathNavigation {
|
||||
|
||||
@Override
|
||||
public Path createPath(Entity entity, int distance) {
|
||||
@ -19,7 +19,7 @@ index 0b2e10a0f508448d9e7d003e6c822f0a56d4022f..27cd393e81f6ef9b5690c051624d8d2a
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||
index 27b072943328aca4489a9565bda700e7e7dcbb6a..f0248d839255763005ba333b0bfcf691407fb69b 100644
|
||||
index 6b24f94f1762570547c0fc484b3939de73fbd309..80b3fd4150d749af7d584f95ee3d0b8ed664ead9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||
@@ -39,14 +39,14 @@ public class GroundPathNavigation extends PathNavigation {
|
||||
@ -63,10 +63,10 @@ index 27b072943328aca4489a9565bda700e7e7dcbb6a..f0248d839255763005ba333b0bfcf691
|
||||
|
||||
private int getSurfaceY() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
index eaf1653b14e5fdacae38abe75260a64d0ffbfc1d..b6b6106ad2105c19273dc9f983fabd6573d35e5a 100644
|
||||
index ec1bd2fff121aa00b50b0d65c0e53e4146c3deb9..bd782c8935db6e0aa3489725d3c4ee401f9bf242 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -108,7 +108,13 @@ public abstract class PathNavigation {
|
||||
@@ -109,7 +109,13 @@ public abstract class PathNavigation {
|
||||
|
||||
@Nullable
|
||||
public Path createPath(BlockPos target, int distance) {
|
||||
@ -81,7 +81,7 @@ index eaf1653b14e5fdacae38abe75260a64d0ffbfc1d..b6b6106ad2105c19273dc9f983fabd65
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -118,7 +124,7 @@ public abstract class PathNavigation {
|
||||
@@ -119,7 +125,7 @@ public abstract class PathNavigation {
|
||||
|
||||
@Nullable
|
||||
public Path createPath(Entity entity, int distance) {
|
||||
@ -90,7 +90,7 @@ index eaf1653b14e5fdacae38abe75260a64d0ffbfc1d..b6b6106ad2105c19273dc9f983fabd65
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -128,6 +134,16 @@ public abstract class PathNavigation {
|
||||
@@ -129,6 +135,16 @@ public abstract class PathNavigation {
|
||||
|
||||
@Nullable
|
||||
protected Path createPath(Set<BlockPos> positions, int range, boolean useHeadPos, int distance, float followRange) {
|
||||
@ -107,7 +107,7 @@ index eaf1653b14e5fdacae38abe75260a64d0ffbfc1d..b6b6106ad2105c19273dc9f983fabd65
|
||||
if (positions.isEmpty()) {
|
||||
return null;
|
||||
} else if (this.mob.getY() < (double)this.level.getMinBuildHeight()) {
|
||||
@@ -137,6 +153,23 @@ public abstract class PathNavigation {
|
||||
@@ -138,6 +154,23 @@ public abstract class PathNavigation {
|
||||
} else if (this.path != null && !this.path.isDone() && positions.contains(this.targetPos)) {
|
||||
return this.path;
|
||||
} else {
|
@ -11,7 +11,7 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
|
||||
The maximum size of the RegionFileCache is also made configurable.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index ece0fd4b51d124be232e24d08f115b9267cb21cb..9a4f9251d655b86af5a410cfab8df285098e01cc 100644
|
||||
index 64e957650dafc9fc30fa997e7f7d3fd47cf60089..1a1ade7538263f4c1a91eb122086a150af3d86ba 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -57,7 +57,7 @@ public class RegionFileStorage implements AutoCloseable {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not load chunks for Pathfinding
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
index 235b01e23a8997d0d65de3655b3b3ff50a204c06..c48e097464977dbec22d1370c3393ba1fe105137 100644
|
||||
index 243740ee9debe3ca0a988b0a448af09a5845b96d..04406fdb2961a85d8e6bffbb8e233e8c4dcf4390 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
@@ -477,7 +477,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -465,7 +465,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
for(int n = -1; n <= 1; ++n) {
|
||||
if (l != 0 || n != 0) {
|
||||
pos.set(i + l, j + m, k + n);
|
||||
@ -22,7 +22,7 @@ index 235b01e23a8997d0d65de3655b3b3ff50a204c06..c48e097464977dbec22d1370c3393ba1
|
||||
if (blockState.is(Blocks.CACTUS)) {
|
||||
return BlockPathTypes.DANGER_CACTUS;
|
||||
}
|
||||
@@ -493,6 +498,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -481,6 +486,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
if (world.getFluidState(pos).is(FluidTags.WATER)) {
|
||||
return BlockPathTypes.WATER_BORDER;
|
||||
}
|
||||
@ -30,7 +30,7 @@ index 235b01e23a8997d0d65de3655b3b3ff50a204c06..c48e097464977dbec22d1370c3393ba1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -502,7 +508,8 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -490,7 +496,8 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
}
|
||||
|
||||
protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter world, BlockPos pos) {
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add PlayerUseUnknownEntityEvent
|
||||
public net.minecraft.network.protocol.game.ServerboundInteractPacket$ActionType
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
||||
index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510e20db25a 100644
|
||||
index a5d57cc862036012d83b090bb1b3ccf4115a88b3..21068f766b75c414d5818073b7dca083d8ff4409 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
||||
@@ -10,8 +10,8 @@ import net.minecraft.world.entity.Entity;
|
||||
@ -22,10 +22,10 @@ index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510
|
||||
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 5443c0008ae3bb0264dbfc1b2bb3921de306c1dd..65bd9005b722db154842978d359e0a2277bbb8b2 100644
|
||||
index 8f21a18d2ba6e9fc1c8d3076ca668c885a9ba19e..26652b91b03e1c94c05f61c99afc59ac0bb0243a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2644,8 +2644,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2519,8 +2519,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
});
|
||||
}
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b255f8bd65006240153cb607f65e277f8a560b75..67c4b724b6b799c02ee4c5034d3472e44cb591fa 100644
|
||||
index 3e2b5d68ebbb2b35ffb7809238468808c106d0d8..60a54cec367c405b1f3e69712fdbede462d6c8e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1476,6 +1476,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1459,6 +1459,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
@ -18,10 +18,10 @@ index 1294b38262505b0d54089e428df9b363219de1f0..ee37ec0de1ca969144824427ae42b0c8
|
||||
buf.writeComponent(this.playerPrefix);
|
||||
buf.writeComponent(this.playerSuffix);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c5e3f7f0623731c02e4625971fc82acbc834f51a..17ad0051afaaa0e201782228628c691b75b6cebc 100644
|
||||
index f725fbb64b7d801e4e4c7a6d5e1be6dd96cab047..aa70fb1160e8d88739ea372832a69569199ab8ab 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -580,6 +580,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -586,6 +586,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
}
|
||||
|
||||
@ -43,10 +43,10 @@ index c5e3f7f0623731c02e4625971fc82acbc834f51a..17ad0051afaaa0e201782228628c691b
|
||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||
this.connection.acceptConnections();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1357b444cf2efbd7f6a1918709b9743d230f1fd5..afbb45f2ee55f193e30c19bc20edc42434f16784 100644
|
||||
index ae492b5c184896864bb6cc7429dfd701d560ae06..796e8d85093756deb4bc25eb2af9981944ba1bf4 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -94,6 +94,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
|
||||
@@ -98,6 +98,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.scores.Objective;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
@ -54,15 +54,15 @@ index 1357b444cf2efbd7f6a1918709b9743d230f1fd5..afbb45f2ee55f193e30c19bc20edc424
|
||||
import net.minecraft.world.scores.Team;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -155,6 +156,7 @@ public abstract class PlayerList {
|
||||
@@ -160,6 +161,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
private CraftServer cserver;
|
||||
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
|
||||
+ public @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule
|
||||
|
||||
public PlayerList(MinecraftServer server, RegistryAccess.Frozen registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||
@@ -391,6 +393,13 @@ public abstract class PlayerList {
|
||||
@@ -399,6 +401,13 @@ public abstract class PlayerList {
|
||||
|
||||
player.initInventoryMenu();
|
||||
// CraftBukkit - Moved from above, added world
|
||||
@ -76,7 +76,7 @@ index 1357b444cf2efbd7f6a1918709b9743d230f1fd5..afbb45f2ee55f193e30c19bc20edc424
|
||||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
||||
}
|
||||
|
||||
@@ -510,6 +519,16 @@ public abstract class PlayerList {
|
||||
@@ -518,6 +527,16 @@ public abstract class PlayerList {
|
||||
entityplayer.doTick(); // SPIGOT-924
|
||||
// CraftBukkit end
|
||||
|
||||
@ -93,7 +93,7 @@ index 1357b444cf2efbd7f6a1918709b9743d230f1fd5..afbb45f2ee55f193e30c19bc20edc424
|
||||
this.save(entityplayer);
|
||||
if (entityplayer.isPassenger()) {
|
||||
Entity entity = entityplayer.getRootVehicle();
|
||||
@@ -1138,6 +1157,13 @@ public abstract class PlayerList {
|
||||
@@ -1148,6 +1167,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -9,22 +9,22 @@ For servers with multiple IP's, ability to bind to a specific interface.
|
||||
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index efa2dd7947f68aaec479d835f2b1e60d16254ae1..1e01277448a3cf2b2045b54b182166a66c822e20 100644
|
||||
index 666dc4b22569e1ae26ff988c7d4ac1113acd32f3..e72fb5c548a9baef09ae547863c4bdc439ce28b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -100,6 +100,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@Nullable
|
||||
private WorldGenSettings worldGenSettings;
|
||||
@@ -108,6 +108,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
private final DedicatedServerProperties.WorldDimensionData worldDimensionData;
|
||||
public final WorldOptions worldOptions;
|
||||
|
||||
+ public final String rconIp; // Paper - Add rcon ip
|
||||
+
|
||||
// CraftBukkit start
|
||||
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
||||
super(properties, optionset);
|
||||
@@ -152,6 +154,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
return s.toLowerCase(Locale.ROOT);
|
||||
@@ -165,6 +167,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
}, WorldPresets.NORMAL.location().toString()));
|
||||
this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", ""));
|
||||
this.initialDataPackConfiguration = DedicatedServerProperties.getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled())));
|
||||
+ // Paper start - Configurable rcon ip
|
||||
+ final String rconIp = this.getStringRaw("rcon.ip");
|
||||
+ this.rconIp = rconIp == null ? this.serverIp : rconIp;
|
@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
|
||||
Don't even get me started
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 766711e4d32ceebf9d94e39f9bcd14ff0371ad06..a0d6273a8a5613ee732c3dbb6eff46ecf42b5f4a 100644
|
||||
index b2871726eb4dd7f16d161097cbf0f287839e10ba..16ec3763e6d13a2dd3e1cc8cd898c6d783ac070c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1250,10 +1250,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1249,10 +1249,16 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
||||
to stop IDE complaining about potential NPE
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 17ad0051afaaa0e201782228628c691b75b6cebc..e24bd9c2be84dd11bf109e65ea4e1e577fe647ca 100644
|
||||
index aa70fb1160e8d88739ea372832a69569199ab8ab..dfb9bcfebb064a8445b19d149edcef45334367c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -181,6 +181,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@@ -193,6 +193,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||
|
||||
@ -17,15 +17,15 @@ index 17ad0051afaaa0e201782228628c691b75b6cebc..e24bd9c2be84dd11bf109e65ea4e1e57
|
||||
public static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final String VANILLA_BRAND = "vanilla";
|
||||
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
|
||||
@@ -307,6 +308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -318,6 +319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, DynamicOps<Tag> registryreadops, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
super("Server");
|
||||
+ SERVER = this; // Paper - better singleton
|
||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||
this.profiler = this.metricsRecorder.getProfiler();
|
||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||
@@ -2291,9 +2293,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2304,9 +2306,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return false;
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
|
||||
Additionally, numerous issues to player position tracking on maps has been fixed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 67c4b724b6b799c02ee4c5034d3472e44cb591fa..ec2d94e7b34b4384c5c37265869e6ddb15d6e6eb 100644
|
||||
index 60a54cec367c405b1f3e69712fdbede462d6c8e5..fab7a0f66874c5da029005310f990d7fcd61c1bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2266,6 +2266,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2247,6 +2247,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
{
|
||||
if ( iter.next().player == entity )
|
||||
{
|
||||
@ -25,10 +25,10 @@ index 67c4b724b6b799c02ee4c5034d3472e44cb591fa..ec2d94e7b34b4384c5c37265869e6ddb
|
||||
}
|
||||
}
|
||||
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 4751fea5e7319600422c4fb3e40026a36db85a6a..845e52baf57492cfb0eb20318c84585e30001f0b 100644
|
||||
index 08c76c56e493f01bc159312aef512886631682f3..379834a8b197a2f32aaebf4ebed635e7eba84479 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -763,6 +763,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -758,6 +758,14 @@ public abstract class Player extends LivingEntity {
|
||||
return null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -44,7 +44,7 @@ index 4751fea5e7319600422c4fb3e40026a36db85a6a..845e52baf57492cfb0eb20318c84585e
|
||||
return entityitem;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index b8d33dc1dc31fb2bcde0d74504f3972b0cc28f17..7254e7a42c58737cfc04f09aaca2fe1ebeec6d08 100644
|
||||
index 1fd305ccedfd311dc5238810003889b2c1897089..984da6264cdaf57a49a15861b9ce834a9efac1a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -63,6 +63,7 @@ public class MapItemSavedData extends SavedData {
|
@ -490,7 +490,7 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dd5e9dc310f30c008f0c8c60ac4305160261bad9..a6b5527e97e8a5b2eeca762477a7b695223a0d4d 100644
|
||||
index c070fd1b224aeeaa9ebb054105a0f73285956da1..0c0060cdc35e0d8d3098a0ade8080f91dbc81a2b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -232,6 +232,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -542,7 +542,7 @@ index 9347faecdaa3ef8c375fe8b0a89fc3385b6823bd..b8fb7b5a347298ada16bc8b818edf186
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
index abb35b675fc075c1004a85cd8f0c6f65d290a809..ba14657c6911bfd54da6ee9e248b3a050455d68a 100644
|
||||
index e1c4289ff790c691fdae8f7653414a60eb196dc2..a9fb2d5e95d5caa71b794eda0f2749ff795ed4e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
@@ -65,12 +65,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
@ -560,7 +560,7 @@ index abb35b675fc075c1004a85cd8f0c6f65d290a809..ba14657c6911bfd54da6ee9e248b3a05
|
||||
this.readChestVehicleSaveData(nbt);
|
||||
}
|
||||
|
||||
@@ -223,6 +225,20 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
@@ -226,6 +228,20 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
this.itemStacks = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e24bd9c2be84dd11bf109e65ea4e1e577fe647ca..f438056c74dd24142bd94b505160711d0f94a5d5 100644
|
||||
index dfb9bcfebb064a8445b19d149edcef45334367c5..1ba7fe6b51b5e1555617bc65619c4ff82fd564cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -926,7 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -934,7 +934,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} catch (java.lang.InterruptedException ignored) {} // Paper
|
||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||
@ -18,10 +18,10 @@ index e24bd9c2be84dd11bf109e65ea4e1e577fe647ca..f438056c74dd24142bd94b505160711d
|
||||
// Spigot end
|
||||
io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 528bf80bdd786b13b3c46eaf922bf6870865f040..f3c65b5f4a0cc3bc0004cc6f8cc974a87a1123bb 100644
|
||||
index 18f7d73fd8a780753e2249a9fec6bb335ebfdeed..35904c69e14c4c0addda204d5e3788518c2e16c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -247,7 +247,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.convertOldUsers()) {
|
@ -5,12 +5,12 @@ Subject: [PATCH] Optional TNT doesn't move in water
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 8b3ca38f029b8918f02c51995e4359cbbf741c76..d6f34adbdf45bbef4a39e629dd7cb6d7fcb5db0f 100644
|
||||
index 6b372ac843e992820ac0a8ebb9c3c5d9795cc6b0..841bb7741ae6b0e9cb98120ee1649b93ef4c3dab 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -65,7 +65,7 @@ public class ServerEntity {
|
||||
private boolean wasRiding;
|
||||
private boolean wasOnGround;
|
||||
@@ -69,7 +69,7 @@ public class ServerEntity {
|
||||
@Nullable
|
||||
private List<SynchedEntityData.DataValue<?>> trackedDataValues;
|
||||
// CraftBukkit start
|
||||
- private final Set<ServerPlayerConnection> trackedPlayers;
|
||||
+ final Set<ServerPlayerConnection> trackedPlayers; // Paper - private -> package
|
||||
@ -18,10 +18,10 @@ index 8b3ca38f029b8918f02c51995e4359cbbf741c76..d6f34adbdf45bbef4a39e629dd7cb6d7
|
||||
public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) {
|
||||
this.trackedPlayers = trackedPlayers;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 7a2ec239cd59b95dfd87ab1164d17bad23c4e558..65f0aa076dbfc4cd72d14ec485d1edf5533d825e 100644
|
||||
index aa0dfd08aefbb9363ec96080432f0f75d71b0b95..4b81d62d3250b99cbcb4eb2468ef81c149bf177e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -97,6 +97,27 @@ public class PrimedTnt extends Entity {
|
||||
@@ -94,6 +94,27 @@ public class PrimedTnt extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,9 +49,9 @@ index 7a2ec239cd59b95dfd87ab1164d17bad23c4e558..65f0aa076dbfc4cd72d14ec485d1edf5
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
@@ -152,4 +173,11 @@ public class PrimedTnt extends Entity {
|
||||
public Packet<?> getAddEntityPacket() {
|
||||
return new ClientboundAddEntityPacket(this);
|
||||
@@ -144,4 +165,11 @@ public class PrimedTnt extends Entity {
|
||||
public int getFuse() {
|
||||
return (Integer) this.entityData.get(PrimedTnt.DATA_FUSE_ID);
|
||||
}
|
||||
+
|
||||
+ // Paper start - Optional prevent TNT from moving in water
|
@ -6,10 +6,10 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
|
||||
Only resize the the redstone torch list once, since resizing arrays / lists is costly
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 39b2071a6fc6510929416ccbdf2022cf471ab26c..807df663f710311276d69288875bb80e7fa37893 100644
|
||||
index 89274e7df5ab8e8681d96b20c752fa34eebc44f3..3c8d4d439d40a8dc340286e0a9852b8911ce607f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -167,6 +167,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
||||
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
@ -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 dbdb2a30c5dbe4f02bc1d1a8ce7294d25e1749d4..e15375f6985f841ca42dd41eb0035aab0b64a9fb 100644
|
||||
index 76487bb730f7915f4eac4b3f2394e02436e527cd..a8971e81ff8bb9041f0ec22f0c178148c64f503f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -156,6 +156,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 dd1d606543da93e6068b8fa4239d369a4b648523..127aab56eef67d7f02f5c3de80d8f445ba70e7db 100644
|
||||
index fb26b6919acfb036affbe5519f5e4bd77955534f..89366ca29386fcbd03c3fc94d58451e714a1d779 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
|
||||
@@ -654,7 +654,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@ -20,10 +20,10 @@ index dd1d606543da93e6068b8fa4239d369a4b648523..127aab56eef67d7f02f5c3de80d8f445
|
||||
double deltaZ = this.getZ() - player.getZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index 78bffaddbc9e478fb53639396e9c4970e9961b21..0d36a903b7aa8d26232e6edcb0fdbba1defde660 100644
|
||||
index ae3931d65f6d8b91a654f3a7a4448d168eb526fc..807c8e18fdf5b0704638d7d084d6892556cc1525 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -272,7 +272,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
@@ -270,7 +270,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.globalLevelEvent(1023, new BlockPosition(this), 0);
|
||||
int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16;
|
@ -9,7 +9,7 @@ Subject: [PATCH] Fix Old Sign Conversion
|
||||
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index c518704386f14cd033307dd976455c35760d7236..148e79ae4e24fe16dbbb17550c3f258d4362c266 100644
|
||||
index 63acd109a79ed752a05df3d4f1b99309297c2055..b701a1344db066b9368841f2377ee493514bf282 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -32,6 +32,7 @@ public abstract class BlockEntity {
|
||||
@ -21,10 +21,10 @@ index c518704386f14cd033307dd976455c35760d7236..148e79ae4e24fe16dbbb17550c3f258d
|
||||
private final BlockEntityType<?> type;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
index 715873e52708762b25c29caf6d41d7cb8f79ce57..39bd98b9496e4a27fd69a2de7c83c40689017ebc 100644
|
||||
index 15695c9da294caf8531c59f72279aaeda6ceb23b..149728fa6371b4d8b0afaae769aacac27401ea03 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
@@ -93,7 +93,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
@@ -112,7 +112,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
s = "\"\"";
|
||||
}
|
||||
|
||||
@ -34,10 +34,10 @@ index 715873e52708762b25c29caf6d41d7cb8f79ce57..39bd98b9496e4a27fd69a2de7c83c406
|
||||
continue;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
index 3112173b3449f2c4c9b0851ceaf02abb01853362..9c45e49f480ccd72f6d6c94e5dec41c4becc76cf 100644
|
||||
index 4f3a247a844844aa55d73089595d5f0b7ed49965..76666318690368bab672c2302c90dd3abb050299 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
@@ -285,7 +285,9 @@ public class StructureTemplate {
|
||||
@@ -286,7 +286,9 @@ public class StructureTemplate {
|
||||
definedstructure_blockinfo.nbt.putLong("LootTableSeed", random.nextLong());
|
||||
}
|
||||
|
@ -43,10 +43,10 @@ index da98f074ccd5a40c635824112c97fd174c393cb1..6599f874d9f97e9ef4862039ecad7277
|
||||
} 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 943971ce16c0c39085f029ab5b57685dda1c6b0f..0d6dcb670c583f47a299cd96574426932d3b98c8 100644
|
||||
index 0b8f2a747b0e869dfd62ef463261941988d8dd16..d1392d0afe23004794803affd11f5d1fc82bf7ca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1706,7 +1706,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1730,7 +1730,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 65bd9005b722db154842978d359e0a2277bbb8b2..3978ba09a5e29aaf9e48d5e4f800b1027181a4ad 100644
|
||||
index 26652b91b03e1c94c05f61c99afc59ac0bb0243a..b93cb3d18ecc050bef4b789a67eab9808f113e1e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1611,13 +1611,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1604,13 +1604,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// 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 3978ba09a5e29aaf9e48d5e4f800b1027181a4ad..e032a9f72aa5d55daa9c680734e45e3dda13ca9b 100644
|
||||
index b93cb3d18ecc050bef4b789a67eab9808f113e1e..2684096f29bc88802fcf7116aa8d3308fd6bec9f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -358,7 +358,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -351,7 +351,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) {
|
||||
if (++this.aboveGroundTickCount > 80) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
||||
@ -17,7 +17,7 @@ index 3978ba09a5e29aaf9e48d5e4f800b1027181a4ad..e032a9f72aa5d55daa9c680734e45e3d
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -377,7 +377,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -370,7 +370,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
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,10 +5,10 @@ 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 2a7c82be934a965ba26dc7bf1f60689360bda487..33d1a6b31afec4dbeb00dcabf50c5840852102d6 100644
|
||||
index 18ba4b9d9b68088afd48d1f12cec6b155ea84159..dfc67cd0ef52939be5e5a9952cfcdb4d87bf0d82 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -836,9 +836,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -837,10 +837,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@Override
|
||||
public void thunderHit(ServerLevel world, LightningBolt lightning) {
|
||||
if (world.getDifficulty() != Difficulty.PEACEFUL) {
|
||||
@ -16,19 +16,19 @@ index 2a7c82be934a965ba26dc7bf1f60689360bda487..33d1a6b31afec4dbeb00dcabf50c5840
|
||||
+ // Paper - move log down, event can cancel
|
||||
Witch entitywitch = (Witch) EntityType.WITCH.create(world);
|
||||
|
||||
+ // Paper start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, lightning, entitywitch).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
if (entitywitch != null) {
|
||||
+ // Paper start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, lightning, entitywitch).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (org.spigotmc.SpigotConfig.logVillagerDeaths) Villager.LOGGER.info("Villager {} was struck by lightning {}.", this, lightning); // Move down
|
||||
+ // Paper end
|
||||
+
|
||||
+ if (org.spigotmc.SpigotConfig.logVillagerDeaths) Villager.LOGGER.info("Villager {} was struck by lightning {}.", this, lightning); // Paper - move log down, event can cancel
|
||||
+
|
||||
entitywitch.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
|
||||
entitywitch.setNoAi(this.isNoAi());
|
||||
entitywitch.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
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 2766f670f7bbe03c23552eb2ccf71d6397cfb150..5ccaa797f0f794c71c9402c3b440c681defd0952 100644
|
||||
index e303445b64ce59158567a2ab7388e7fe3627e055..04510bb66453a42badf268548aed45d3a3d6ad9d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1157,6 +1157,14 @@ public class CraftEventFactory {
|
@ -5,13 +5,13 @@ Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items
|
||||
|
||||
|
||||
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 9ef526b3da1185f32257b8fb2fa79ff281855713..108c9ea0eb4a7f381042bfe0203ac40a9c4f27a7 100644
|
||||
index 561b8d6fcf4d511fb026bcc2c02054e56589d0b7..e7404619877099aa2223da349e15090d2c9be1d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -316,6 +316,18 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -318,6 +318,18 @@ public class FallingBlockEntity extends Entity {
|
||||
@Override
|
||||
protected void readAdditionalSaveData(CompoundTag nbt) {
|
||||
this.blockState = NbtUtils.readBlockState(nbt.getCompound("BlockState"));
|
||||
this.blockState = NbtUtils.readBlockState(this.level.holderLookup(Registries.BLOCK), nbt.getCompound("BlockState"));
|
||||
+ // Paper start - Block FallingBlocks with Command Blocks
|
||||
+ final Block b = this.blockState.getBlock();
|
||||
+ if (this.level.paperConfig().entities.spawning.filterNbtDataFromSpawnEggsAndRelated
|
@ -5,10 +5,10 @@ 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 5d2687d3f73529fd45011c011710e2386ff17c82..9011b43dbf28f1f19809c1b45898b727d679c12f 100644
|
||||
index a6e90e70730e106d1cac01abf7a41df8df787d89..d14b7265a075f883f39d078b0d57bccdd7b3ff41 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -117,6 +117,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -112,6 +112,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
}
|
||||
|
||||
@ -17,8 +17,8 @@ index 5d2687d3f73529fd45011c011710e2386ff17c82..9011b43dbf28f1f19809c1b45898b727
|
||||
// Spigot start
|
||||
public void initUUID()
|
||||
{
|
||||
@@ -241,8 +243,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce));
|
||||
@@ -208,8 +210,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
|
||||
} else {
|
||||
// Spigot start
|
||||
- new Thread("User Authenticator #" + ServerLoginPacketListenerImpl.UNIQUE_THREAD_ID.incrementAndGet()) {
|
||||
@ -28,7 +28,7 @@ index 5d2687d3f73529fd45011c011710e2386ff17c82..9011b43dbf28f1f19809c1b45898b727
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
@@ -253,7 +255,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -220,7 +222,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex);
|
||||
}
|
||||
}
|
||||
@ -38,7 +38,7 @@ index 5d2687d3f73529fd45011c011710e2386ff17c82..9011b43dbf28f1f19809c1b45898b727
|
||||
// Spigot end
|
||||
}
|
||||
|
||||
@@ -296,7 +299,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -257,7 +260,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
throw new IllegalStateException("Protocol error", cryptographyexception);
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ index 5d2687d3f73529fd45011c011710e2386ff17c82..9011b43dbf28f1f19809c1b45898b727
|
||||
public void run() {
|
||||
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile;
|
||||
|
||||
@@ -341,10 +345,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -302,10 +306,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
|
||||
}
|
@ -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 0d6dcb670c583f47a299cd96574426932d3b98c8..8072e45c656e8de0f9061360d353675554ae0182 100644
|
||||
index d1392d0afe23004794803affd11f5d1fc82bf7ca..e8f13e113ed2befbc1f83721073f6ebd62df9a5e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2563,5 +2563,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2587,5 +2587,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
@ -5,10 +5,10 @@ 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 7942338e300cf5c70cb52e6ddce32f8cf9163c27..63b57d47d7dbb7a8a655b1447241e20c67a3f9c2 100644
|
||||
index baa5cc93ec210032fcbe493d473396964288933f..c12493cc369f632c4aa9535cde9b8629a0b2eb86 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -247,7 +247,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -248,7 +248,7 @@ public class ExperienceOrb extends Entity {
|
||||
int i = this.repairPlayerItems(player, this.value);
|
||||
|
||||
if (i > 0) {
|
||||
@ -18,7 +18,7 @@ index 7942338e300cf5c70cb52e6ddce32f8cf9163c27..63b57d47d7dbb7a8a655b1447241e20c
|
||||
|
||||
--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 5ccaa797f0f794c71c9402c3b440c681defd0952..e74335de3685e90abc97fbefe91a0c5837ed0551 100644
|
||||
index 04510bb66453a42badf268548aed45d3a3d6ad9d..35d7dbd3d7cb445a631b4105ae61a4808cc1759a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1116,6 +1116,17 @@ public class CraftEventFactory {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ProjectileCollideEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 62cb9dff53d980399913c913893fca2c1110d184..da92f324322f4fb18f9aa72c4298ffc8ab040953 100644
|
||||
index cfd202d32048abcd3e961d9f7f08c1bc6282e601..f268fc2914996698490b84c4a30bac819c581d05 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -226,6 +226,17 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -227,6 +227,17 @@ public abstract class AbstractArrow extends Projectile {
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,10 +27,10 @@ index 62cb9dff53d980399913c913893fca2c1110d184..da92f324322f4fb18f9aa72c4298ffc8
|
||||
this.preOnHit((HitResult) object); // CraftBukkit - projectile hit event
|
||||
this.hasImpulse = true;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
|
||||
index 867e50769af3c5bdbed15cfd637e429dcfcb6920..d71dc286673fa7ed708be5bec4c5a6868874c090 100644
|
||||
index edc9f3450b56e0c5c12387b6fd51b9628732c372..6dbbd129d05ad52008fb7b70cb1dc3b8818701ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.world.entity.Entity;
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
@ -38,7 +38,7 @@ index 867e50769af3c5bdbed15cfd637e429dcfcb6920..d71dc286673fa7ed708be5bec4c5a686
|
||||
import net.minecraft.world.phys.HitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
||||
@@ -82,7 +83,16 @@ public abstract class AbstractHurtingProjectile extends Projectile {
|
||||
@@ -83,7 +84,16 @@ public abstract class AbstractHurtingProjectile extends Projectile {
|
||||
|
||||
HitResult movingobjectposition = ProjectileUtil.getHitResult(this, this::canHitEntity);
|
||||
|
||||
@ -87,7 +87,7 @@ index 88181c59e604ba3b132b9e695cef5eaf5b836029..94d09b05737679b133ec462815b010b1
|
||||
|
||||
this.checkInsideBlocks();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e74335de3685e90abc97fbefe91a0c5837ed0551..b267e220e0b8fcd69f1b672db27273e76a46731a 100644
|
||||
index 35d7dbd3d7cb445a631b4105ae61a4808cc1759a..03637eb7237a4caeb01bc84bda65a8c6513b2014 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1260,6 +1260,16 @@ public class CraftEventFactory {
|
@ -13,10 +13,10 @@ by adding code to all overrides in:
|
||||
to return BLOCKED if it is outside the world border.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
index b6b6106ad2105c19273dc9f983fabd6573d35e5a..185f0bce91f03dfe9a37412710aa7319a15f57ff 100644
|
||||
index bd782c8935db6e0aa3489725d3c4ee401f9bf242..bf89b3a484334ec23f96426bdcf29e54725512c3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -156,7 +156,7 @@ public abstract class PathNavigation {
|
||||
@@ -157,7 +157,7 @@ public abstract class PathNavigation {
|
||||
// Paper start - Pathfind event
|
||||
boolean copiedSet = false;
|
||||
for (BlockPos possibleTarget : positions) {
|
@ -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 807df663f710311276d69288875bb80e7fa37893..64b763d6dc695e9cb9dd381deb5609e4902713dd 100644
|
||||
index 3c8d4d439d40a8dc340286e0a9852b8911ce607f..a3ff278b5a2caa8132025f6cbee46500e97f58c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -334,6 +334,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -337,6 +337,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ index 6ec5a1525d0b8ced8fe78d3eab29c5eb82996844..2442c287a7f26cfee10a19e9015558cd
|
||||
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index f284eefe5de6ad8b42f7d4185fc4c3b8b2cd5895..6e2185bbaac889d51a54ec97907da3b1faa465c4 100644
|
||||
index de9aac5a8ef1c95385d0dc532c7764fe2c394f12..f6241ee705a3827df9d716f199fd070ab8605ea6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -390,6 +390,7 @@ public abstract class ChunkGenerator {
|
||||
@@ -218,6 +218,7 @@ public abstract class ChunkGenerator {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();
|
@ -9,7 +9,7 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
|
||||
which are limited in quantity.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
index f95999daa1955dd4d919d0e668fe099901a0481c..770a91fcc351a2d1de4762c0fd9bae2b49c363b5 100644
|
||||
index 155301c03e6553de8aed55e87ece40e8f5f3f495..44a237426739fad0096b2f5108f1d25bd388ea08 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
@@ -386,7 +386,8 @@ public class VillagerTrades {
|
||||
@ -23,7 +23,7 @@ index f95999daa1955dd4d919d0e668fe099901a0481c..770a91fcc351a2d1de4762c0fd9bae2b
|
||||
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 321384730cacbdc22eedc53651e4d24f06c73b99..b734c0f9b831c20a239b5341ff3a0b4d6a6c102c 100644
|
||||
index 5762bb0725a0e206a24d3056d9330af45afea1bd..a4806eb60d5dde1f1bd11d9501f3cc4f1805311d 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
|
||||
@@ -68,7 +68,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize ItemStack.isEmpty()
|
||||
Remove hashMap lookup every check, simplify code to remove ternary
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 28a8ad5f42a5ba2e2a9d4c9a04a7add621b28e82..7b61f9c45b9e23562bd5cf448df319ba9e1e091a 100644
|
||||
index 6ca9a5cf426befde4882d78df5fd8202b73ddbeb..504a56fb2f2901c67ed22b9f0a57eb8db10ca4df 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -245,7 +245,7 @@ public final class ItemStack {
|
||||
@@ -249,7 +249,7 @@ public final class ItemStack {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
@ -17,4 +17,4 @@ index 28a8ad5f42a5ba2e2a9d4c9a04a7add621b28e82..7b61f9c45b9e23562bd5cf448df319ba
|
||||
+ return this == ItemStack.EMPTY || this.item == null || this.item == Items.AIR || this.count <= 0; // Paper
|
||||
}
|
||||
|
||||
public ItemStack split(int amount) {
|
||||
public boolean isItemEnabled(FeatureFlagSet enabledFeatures) {
|
@ -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 1e1deab4d8be5523a55daf072d7e12b08d36b560..87c8e494aa374b8bfb8b8432723783b00ba94763 100644
|
||||
index dcf6d675d9bb7befe022e722aba365d30c2ce705..98d8585a8bc2acbb8d98c73e3aca404f0ebe66d3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -355,6 +355,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -357,6 +357,26 @@ 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 3cea2ceb5d30329aa84f6659330eea075387fe18..0fded4890038de77781c27565fa3c8fe60e50aac 100644
|
||||
index 91380d37ddd0c03301618849ea8fd9a72c333ae5..1d04f135f33e9db68153f5db19360f30aa0113eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2203,7 +2203,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2243,7 +2243,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public boolean isImmobile() {
|
||||
@ -19,10 +19,10 @@ index 3cea2ceb5d30329aa84f6659330eea075387fe18..0fded4890038de77781c27565fa3c8fe
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e032a9f72aa5d55daa9c680734e45e3dda13ca9b..6282cebfa3786c9ac72fcebeee1b8c4cdf5d7238 100644
|
||||
index 2684096f29bc88802fcf7116aa8d3308fd6bec9f..ad72e852e05c50effa195b112ff67b6d18a1eea2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3283,7 +3283,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3163,7 +3163,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public final boolean isDisconnected() {
|
@ -7,13 +7,13 @@ Subject: [PATCH] Firework API's
|
||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
index ba13507263d78d34eb8d3038c437229c0469d476..61252ef8a79bac0ea2d3d231ec6b12166f39d072 100644
|
||||
index 4abcdc515411372006ff5d33510bdd64092c186a..5406925cd66f46ab8744123c670d72cea7bfc3a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
public int lifetime;
|
||||
@Nullable
|
||||
public LivingEntity attachedToEntity; // PAIL private -> public
|
||||
public LivingEntity attachedToEntity;
|
||||
+ public java.util.UUID spawningEntity; // Paper
|
||||
|
||||
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
||||
@ -44,7 +44,7 @@ index ba13507263d78d34eb8d3038c437229c0469d476..61252ef8a79bac0ea2d3d231ec6b1216
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
index 17b797a036ac0f58b58f627dc61ac503c8f321db..d86ec8c4c1c3e7974463a545d80ed9744de0fbbb 100644
|
||||
index 4b8ad27c8682f112c4964849d9bdfcf4c355701f..48626d564c9fb4630b51858edd124b56af2d7ca0 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
@@ -220,6 +220,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
|
||||
@ -56,10 +56,10 @@ index 17b797a036ac0f58b58f627dc61ac503c8f321db..d86ec8c4c1c3e7974463a545d80ed974
|
||||
object = CrossbowItem.getArrow(world, shooter, crossbow, projectile);
|
||||
if (creative || simulated != 0.0F) {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
index cdf35c5873f68245891241c0efa3bcf5658c3f6d..766af1f45b14654d3655a06ae0bfb0d4cfbdff7a 100644
|
||||
index 1d99d03c1ce0a647b053e8b7bd1e2da58805c4f8..854856ca742dff800ac5d7bf0af4f79cf631540b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
@@ -44,6 +44,7 @@ public class FireworkRocketItem extends Item {
|
||||
@@ -45,6 +45,7 @@ public class FireworkRocketItem extends Item {
|
||||
Vec3 vec3 = context.getClickLocation();
|
||||
Direction direction = context.getClickedFace();
|
||||
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(level, context.getPlayer(), vec3.x + (double)direction.getStepX() * 0.15D, vec3.y + (double)direction.getStepY() * 0.15D, vec3.z + (double)direction.getStepZ() * 0.15D, itemStack);
|
||||
@ -67,7 +67,7 @@ index cdf35c5873f68245891241c0efa3bcf5658c3f6d..766af1f45b14654d3655a06ae0bfb0d4
|
||||
level.addFreshEntity(fireworkRocketEntity);
|
||||
itemStack.shrink(1);
|
||||
}
|
||||
@@ -57,6 +58,7 @@ public class FireworkRocketItem extends Item {
|
||||
@@ -58,6 +59,7 @@ public class FireworkRocketItem extends Item {
|
||||
ItemStack itemStack = user.getItemInHand(hand);
|
||||
if (!world.isClientSide) {
|
||||
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user);
|
@ -6,10 +6,10 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
||||
Allows you to access the Gateway being used in a teleport event
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 0a792513ac71df24aa8ea4e5d47caad07c22c65e..575e9ced37b6b865de342d305af2c5762ae6fcb9 100644
|
||||
index 553f8314118adc64a6af9aee9351598b2991d18d..9c4469d46cb7a2cc781f6498d3e4ec6a9415d12e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
@ -17,7 +17,7 @@ index 0a792513ac71df24aa8ea4e5d47caad07c22c65e..575e9ced37b6b865de342d305af2c576
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.util.Mth;
|
||||
@@ -210,7 +211,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -211,7 +212,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
location.setPitch(player.getLocation().getPitch());
|
||||
location.setYaw(player.getLocation().getYaw());
|
||||
|
@ -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 64b763d6dc695e9cb9dd381deb5609e4902713dd..1954a93a1f566c1c79cdc2e0eb1b41141d6b5fde 100644
|
||||
index a3ff278b5a2caa8132025f6cbee46500e97f58c4..6a5ede377a2e5e7c39ebf6db6708b4f234f96dc7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -112,7 +112,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -115,7 +115,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 64b763d6dc695e9cb9dd381deb5609e4902713dd..1954a93a1f566c1c79cdc2e0eb1b4114
|
||||
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 fe2f5364e526cfe9e25760301165934b7fbbdd85..2636ef8f827b30315693f1b406debcdea0716170 100644
|
||||
index 3ad15c0909d14c6f974e9bf82055c3c332577526..5a17b0c2e185bd50201a5d954322e41d42e2dae3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -152,6 +152,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -151,6 +151,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 afbb45f2ee55f193e30c19bc20edc42434f16784..51add7e60fbd9eebbddc4893de044edc35854409 100644
|
||||
index 796e8d85093756deb4bc25eb2af9981944ba1bf4..70b19aeba089f48cf53e259fce1339c7b31cd133 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1042,11 +1042,13 @@ public abstract class PlayerList {
|
||||
@@ -1052,11 +1052,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a6b5527e97e8a5b2eeca762477a7b695223a0d4d..86fa079f9f1f958ed586c966467d26a44e09b11c 100644
|
||||
index 0c0060cdc35e0d8d3098a0ade8080f91dbc81a2b..a28aa788f46dc944e174957fbed23dfeeff1eb72 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2385,6 +2385,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2404,6 +2404,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
@ -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 cd3b4c97374d44f5a0e710e03f4ac38938757e25..b18bb06caf5f034dffbb72120c8f21da482ae3df 100644
|
||||
index 7f87800a8371c80ef216f4ed0526639f43a20232..2775203a5bb7392428f1305730761e425300a8a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -419,7 +419,7 @@ public class ServerPlayerGameMode {
|
||||
@ -21,10 +21,10 @@ index cd3b4c97374d44f5a0e710e03f4ac38938757e25..b18bb06caf5f034dffbb72120c8f21da
|
||||
|
||||
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 63b57d47d7dbb7a8a655b1447241e20c67a3f9c2..0c19aa68dc444373bf1a9bd3b349d12df7d8dd9d 100644
|
||||
index c12493cc369f632c4aa9535cde9b8629a0b2eb86..2ba92563f95e2899db29bf9b017e1b385a5bda3c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -37,13 +37,65 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -38,13 +38,65 @@ public class ExperienceOrb extends Entity {
|
||||
public int value;
|
||||
private int count;
|
||||
private Player followingPlayer;
|
||||
@ -92,7 +92,7 @@ index 63b57d47d7dbb7a8a655b1447241e20c67a3f9c2..0c19aa68dc444373bf1a9bd3b349d12d
|
||||
}
|
||||
|
||||
public ExperienceOrb(EntityType<? extends ExperienceOrb> type, Level world) {
|
||||
@@ -153,12 +205,20 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -154,12 +206,20 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
|
||||
public static void award(ServerLevel world, Vec3 pos, int amount) {
|
||||
@ -114,7 +114,7 @@ index 63b57d47d7dbb7a8a655b1447241e20c67a3f9c2..0c19aa68dc444373bf1a9bd3b349d12d
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,6 +288,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -229,6 +289,7 @@ public class ExperienceOrb extends Entity {
|
||||
nbt.putShort("Age", (short) this.age);
|
||||
nbt.putShort("Value", (short) this.value);
|
||||
nbt.putInt("Count", this.count);
|
||||
@ -122,7 +122,7 @@ index 63b57d47d7dbb7a8a655b1447241e20c67a3f9c2..0c19aa68dc444373bf1a9bd3b349d12d
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -236,6 +297,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -237,6 +298,7 @@ public class ExperienceOrb extends Entity {
|
||||
this.age = nbt.getShort("Age");
|
||||
this.value = nbt.getShort("Value");
|
||||
this.count = Math.max(nbt.getInt("Count"), 1);
|
||||
@ -131,10 +131,10 @@ index 63b57d47d7dbb7a8a655b1447241e20c67a3f9c2..0c19aa68dc444373bf1a9bd3b349d12d
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index a0d6273a8a5613ee732c3dbb6eff46ecf42b5f4a..a42983b4d7dbd360bbe4206dcf6aa95375ef9b2b 100644
|
||||
index 16ec3763e6d13a2dd3e1cc8cd898c6d783ac070c..728370332d284fbe95fed57f4e5a88cabbe3f146 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1726,7 +1726,8 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1727,7 +1727,8 @@ public abstract class LivingEntity extends Entity {
|
||||
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
|
||||
@ -158,10 +158,10 @@ index 3cdd7180a41b87caa942d2b3436ba90726686ecb..6216513805add7c8f52e1ed6c77e2d26
|
||||
// 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 113b31a5a0247abc436d04ba2fe03cb41ca86f15..fb3b42611d8386b110ea079094d5d50fefceac1a 100644
|
||||
index 125498c2cd1c3846e05a91774bb028e7a01fb238..dd124ccbdc7efe0e41b3a04abddcb328cac44948 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -892,7 +892,7 @@ public class Fox extends Animal {
|
||||
@@ -897,7 +897,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
@ -171,10 +171,10 @@ index 113b31a5a0247abc436d04ba2fe03cb41ca86f15..fb3b42611d8386b110ea079094d5d50f
|
||||
// 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 7c90063be2a7eb66b7f0981059018f20413256c6..37125ffe47fcd5fe93ab62ad8a46e8188f362436 100644
|
||||
index 721b6a5b4775877cc9f75d25379b4fb7c7cb3178..ab4e8ff5fe4f53bfda1d7b152aa89e6772bc3a16 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
@@ -448,7 +448,7 @@ public class Turtle extends Animal {
|
||||
@@ -450,7 +450,7 @@ public class Turtle extends Animal {
|
||||
RandomSource randomsource = this.animal.getRandom();
|
||||
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
@ -184,10 +184,10 @@ index 7c90063be2a7eb66b7f0981059018f20413256c6..37125ffe47fcd5fe93ab62ad8a46e818
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index fe660bbaa4113fb2ffa1ea2f10e4e1e674fbb86d..bb6063ae7f4438916306ce876057f7488537b444 100644
|
||||
index 8852cc6253c8bc1a9f7591cd2b0beb95bb4f4d33..f2e84e832ad95df26fe3b9ba439ce38fc59b3585 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -274,7 +274,7 @@ public class Frog extends Animal {
|
||||
@@ -277,7 +277,7 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE);
|
||||
world.broadcastEntityEvent(this, (byte)18);
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
@ -197,7 +197,7 @@ index fe660bbaa4113fb2ffa1ea2f10e4e1e674fbb86d..bb6063ae7f4438916306ce876057f748
|
||||
|
||||
}
|
||||
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 127aab56eef67d7f02f5c3de80d8f445ba70e7db..6eada8313e468e4ea851094976ac98c11710fb45 100644
|
||||
index 89366ca29386fcbd03c3fc94d58451e714a1d779..a889be9dd2a94b531a227ff69a5e761e103067be 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
|
||||
@@ -647,7 +647,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@ -219,7 +219,7 @@ index 127aab56eef67d7f02f5c3de80d8f445ba70e7db..6eada8313e468e4ea851094976ac98c1
|
||||
|
||||
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 33d1a6b31afec4dbeb00dcabf50c5840852102d6..25cd8a4101cf44955d95924c9794c238ddde2901 100644
|
||||
index dfc67cd0ef52939be5e5a9952cfcdb4d87bf0d82..bbbb26550b0c5b36d9c7204f075aa90b79b85ff0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -624,7 +624,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@ -245,10 +245,10 @@ index 9bc9307966b77e34cb091fc895db3d3a66f7be82..e594cf4b8084b7448c29208a2070e766
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 00fe96650e4d973e97b46968297f55f4c3674629..11ac510ad4095438d4904d521bfb18aa5f743faf 100644
|
||||
index 354fed07a1c8d88c97350be11388925e5bf82f9e..ff7b5fea13be9a64e5886f8fe337802cbc5d19b2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -513,7 +513,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -514,7 +514,7 @@ public class FishingHook extends Projectile {
|
||||
this.level.addFreshEntity(entityitem);
|
||||
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
||||
if (playerFishEvent.getExpToDrop() > 0) {
|
||||
@ -271,7 +271,7 @@ index db6b1a9804a6d75dce22b780044beb04ca69cc94..dcbbff3a8dfcac869f07025e0e8e3d9c
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
index dbdba510d8ff3c622ed928151cf525cfd1d1b1b5..aa0ba9c7dcb0ee81c9081031c447eeab61d92a10 100644
|
||||
index ec7a95173a67052e841a3fe69a8d2621a1ccd2b9..9010656b7f013d50872017a298368ec8a3016e9c 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
@@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
@ -284,10 +284,10 @@ index dbdba510d8ff3c622ed928151cf525cfd1d1b1b5..aa0ba9c7dcb0ee81c9081031c447eeab
|
||||
|
||||
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 4b3dc4648709abbdd6ac0972c298a64a875e5f6c..77125720fcbeb7bfc180effb27cfb78c74832ce5 100644
|
||||
index 6b22de4b22aeec101076199f1e20376dd4b31f4d..11b0b1a217648496ccf08f09bb3aa53904ffa9cb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -376,8 +376,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -374,8 +374,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
}
|
||||
|
||||
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
||||
@ -303,10 +303,10 @@ index 4b3dc4648709abbdd6ac0972c298a64a875e5f6c..77125720fcbeb7bfc180effb27cfb78c
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index e90fa66b4716f55844818a2770d9e02d68658e46..bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4 100644
|
||||
index 04e7716f7a9b5d203aacd83b89b610760a19bb9e..8137682be60eb617738f7b257780a49182ef970c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -642,7 +642,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -636,7 +636,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
j = event.getExpToDrop();
|
||||
// CraftBukkit end
|
||||
|
||||
@ -316,10 +316,10 @@ index e90fa66b4716f55844818a2770d9e02d68658e46..bbccb2f97ee88fe43af4eec30fbb2ece
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index e1f478359d959157f60b866ab59bba3b5b16521c..c4f8d2c090e3cde562a2ab6103da53ded666599b 100644
|
||||
index 6dbfd907766422258790f23a3279d2013db3de24..7e16cb08ca1ab2c0b6c0079ac7ffe00cfd758e18 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -909,7 +909,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@@ -915,7 +915,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,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
||||
You can set this to 0 to disable collisions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 86fa079f9f1f958ed586c966467d26a44e09b11c..58256b341aa15e946abef464453c0ffcaf55b372 100644
|
||||
index a28aa788f46dc944e174957fbed23dfeeff1eb72..760596375e26b4cd73cc378758f4bf761c3352a5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -379,6 +379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -24,19 +24,19 @@ index 86fa079f9f1f958ed586c966467d26a44e09b11c..58256b341aa15e946abef464453c0ffc
|
||||
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 a42983b4d7dbd360bbe4206dcf6aa95375ef9b2b..6295c89211ba86c10009775f4d399f597d240fd0 100644
|
||||
index 728370332d284fbe95fed57f4e5a88cabbe3f146..b6aaebb5359c8162359b377b3485c3fcf91587e1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3289,8 +3289,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3313,8 +3313,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- for (j = 0; j < list.size(); ++j) {
|
||||
- for (j = 0; j < list.size(); ++j) {
|
||||
+ this.numCollisions = Math.max(0, this.numCollisions - this.level.paperConfig().collisions.maxEntityCollisions); // Paper
|
||||
+ for (j = 0; j < list.size() && this.numCollisions < this.level.paperConfig().collisions.maxEntityCollisions; ++j) { // Paper
|
||||
Entity entity = (Entity) list.get(j);
|
||||
Entity entity = (Entity) list.get(j);
|
||||
+ entity.numCollisions++; // Paper
|
||||
+ this.numCollisions++; // Paper
|
||||
|
||||
this.doPush(entity);
|
||||
}
|
||||
this.doPush(entity);
|
||||
}
|
@ -30,10 +30,10 @@ 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 f438056c74dd24142bd94b505160711d0f94a5d5..f852c1315cf9dcba56f5877063254d4c608abd61 100644
|
||||
index 1ba7fe6b51b5e1555617bc65619c4ff82fd564cb..cdfbee9657c7a1664eb8e2f88bfa4f702fb46d4a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -221,6 +221,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -233,6 +233,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private Map<ResourceKey<Level>, ServerLevel> levels;
|
||||
private PlayerList playerList;
|
||||
private volatile boolean running;
|
||||
@ -41,7 +41,7 @@ index f438056c74dd24142bd94b505160711d0f94a5d5..f852c1315cf9dcba56f5877063254d4c
|
||||
private boolean stopped;
|
||||
private int tickCount;
|
||||
protected final Proxy proxy;
|
||||
@@ -894,7 +895,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -902,7 +903,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.playerList != null) {
|
||||
MinecraftServer.LOGGER.info("Saving players");
|
||||
this.playerList.saveAll();
|
||||
@ -50,24 +50,24 @@ index f438056c74dd24142bd94b505160711d0f94a5d5..f852c1315cf9dcba56f5877063254d4c
|
||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -945,6 +946,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -953,6 +954,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void halt(boolean flag) {
|
||||
public void halt(boolean waitForShutdown) {
|
||||
+ // Paper start - allow passing of the intent to restart
|
||||
+ this.safeShutdown(flag, false);
|
||||
+ this.safeShutdown(waitForShutdown, false);
|
||||
+ }
|
||||
+ public void safeShutdown(boolean flag, boolean isRestarting) {
|
||||
+ public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
+ this.isRestarting = isRestarting;
|
||||
+ // Paper end
|
||||
this.running = false;
|
||||
if (flag) {
|
||||
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 51add7e60fbd9eebbddc4893de044edc35854409..dbc8f0b962371902fc5e84f1171046d794eb1367 100644
|
||||
index 70b19aeba089f48cf53e259fce1339c7b31cd133..67e13b8510eeecf16caae9fbbbeb463b794c460d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1153,8 +1153,15 @@ public abstract class PlayerList {
|
||||
@@ -1163,8 +1163,15 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void removeAll() {
|
@ -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 6282cebfa3786c9ac72fcebeee1b8c4cdf5d7238..5a8008b507b93768526184ddaca170bccb67f92a 100644
|
||||
index ad72e852e05c50effa195b112ff67b6d18a1eea2..ca894b92215f431a31b69ee2910ce023177f3e6e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2464,6 +2464,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2327,6 +2327,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
@ -32,10 +32,10 @@ index 6282cebfa3786c9ac72fcebeee1b8c4cdf5d7238..5a8008b507b93768526184ddaca170bc
|
||||
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 845e52baf57492cfb0eb20318c84585e30001f0b..d68ad0bc89565d207f46b106bacce8e6efc890dc 100644
|
||||
index 379834a8b197a2f32aaebf4ebed635e7eba84479..a07ca7eca7ca38c47ae2c23f048c02a7869197aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -588,7 +588,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -583,7 +583,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 8072e45c656e8de0f9061360d353675554ae0182..a458cf93af182e2b6b7c7ef89a4a7fe7f64f7be5 100644
|
||||
index e8f13e113ed2befbc1f83721073f6ebd62df9a5e..0f2967f133fa5a3477179252286cbe8c9badb8ad 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2582,5 +2582,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2606,5 +2606,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
@ -19,7 +19,7 @@ Other changes:
|
||||
configuration
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index cfdb20447e6ad3efcdee8889712f77931773beaf..d4141a24cb5ba20e8c53c85206b32120ff18eb48 100644
|
||||
index ebf3d64afbb5679b97a7565a2f8e5490e4a38275..8407beb0c47660f7d310d27f3a47120b80c5b189 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -8,7 +8,17 @@ plugins {
|
||||
@ -38,7 +38,7 @@ index cfdb20447e6ad3efcdee8889712f77931773beaf..d4141a24cb5ba20e8c53c85206b32120
|
||||
+ */
|
||||
+ runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1")
|
||||
+ // Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
@ -112,19 +112,19 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f852c1315cf9dcba56f5877063254d4c608abd61..b404a222e741064185269a42a102d3e4c1f481d7 100644
|
||||
index cdfbee9657c7a1664eb8e2f88bfa4f702fb46d4a..ece65ae90a71517a374a3ebbe0cb0ba514b44e2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -156,7 +156,7 @@ import org.slf4j.Logger;
|
||||
@@ -168,7 +168,7 @@ import com.mojang.datafixers.util.Pair;
|
||||
import com.mojang.serialization.DynamicOps;
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import java.util.Random;
|
||||
-import jline.console.ConsoleReader;
|
||||
+// import jline.console.ConsoleReader; // Paper
|
||||
import joptsimple.OptionSet;
|
||||
import net.minecraft.server.bossevents.CustomBossEvents;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
@@ -271,7 +271,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.resources.RegistryOps;
|
||||
@@ -282,7 +282,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public OptionSet options;
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
@ -133,9 +133,9 @@ index f852c1315cf9dcba56f5877063254d4c608abd61..b404a222e741064185269a42a102d3e4
|
||||
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;
|
||||
@@ -355,7 +355,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.datapackconfiguration = datapackconfiguration;
|
||||
this.registryreadops = registryreadops;
|
||||
@@ -367,7 +367,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.options = options;
|
||||
this.worldLoader = worldLoader;
|
||||
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
|
||||
+ // Paper start - Handled by TerminalConsoleAppender
|
||||
// Try to see if we're actually running in a terminal, disable jline if not
|
||||
@ -143,7 +143,7 @@ index f852c1315cf9dcba56f5877063254d4c608abd61..b404a222e741064185269a42a102d3e4
|
||||
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
||||
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
||||
Main.useJline = false;
|
||||
@@ -376,6 +378,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -388,6 +390,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.warn((String) null, ex);
|
||||
}
|
||||
}
|
||||
@ -152,7 +152,7 @@ index f852c1315cf9dcba56f5877063254d4c608abd61..b404a222e741064185269a42a102d3e4
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper
|
||||
}
|
||||
@@ -1129,7 +1133,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1136,7 +1140,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
@ -161,7 +161,7 @@ index f852c1315cf9dcba56f5877063254d4c608abd61..b404a222e741064185269a42a102d3e4
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1564,7 +1568,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1562,7 +1566,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
@ -171,10 +171,10 @@ index f852c1315cf9dcba56f5877063254d4c608abd61..b404a222e741064185269a42a102d3e4
|
||||
|
||||
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 f3c65b5f4a0cc3bc0004cc6f8cc974a87a1123bb..bada827fe2a8a58d029d9459bf576d598e4a196f 100644
|
||||
index 35904c69e14c4c0addda204d5e3788518c2e16c4..e6826cd0a596f063e8737dcde3c8c6c5b3f71970 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -103,6 +103,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
if (!org.bukkit.craftbukkit.Main.useConsole) {
|
||||
return;
|
||||
}
|
||||
@ -184,7 +184,7 @@ index f3c65b5f4a0cc3bc0004cc6f8cc974a87a1123bb..bada827fe2a8a58d029d9459bf576d59
|
||||
jline.console.ConsoleReader bufferedreader = reader;
|
||||
|
||||
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
|
||||
@@ -134,7 +137,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -129,7 +132,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
continue;
|
||||
}
|
||||
if (s.trim().length() > 0) { // Trim to filter lines which are just spaces
|
||||
@ -193,7 +193,7 @@ index f3c65b5f4a0cc3bc0004cc6f8cc974a87a1123bb..bada827fe2a8a58d029d9459bf576d59
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
@@ -142,6 +145,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -137,6 +140,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ index f3c65b5f4a0cc3bc0004cc6f8cc974a87a1123bb..bada827fe2a8a58d029d9459bf576d59
|
||||
}
|
||||
};
|
||||
|
||||
@@ -153,6 +158,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -148,6 +153,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
|
||||
|
||||
@ -212,7 +212,7 @@ index f3c65b5f4a0cc3bc0004cc6f8cc974a87a1123bb..bada827fe2a8a58d029d9459bf576d59
|
||||
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
|
||||
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
|
||||
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
|
||||
@@ -161,6 +169,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -156,6 +164,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start();
|
||||
@ -222,12 +222,12 @@ index f3c65b5f4a0cc3bc0004cc6f8cc974a87a1123bb..bada827fe2a8a58d029d9459bf576d59
|
||||
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
|
||||
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index dbc8f0b962371902fc5e84f1171046d794eb1367..4f47a48aad54bec10fa8d79be2e6401cd8166591 100644
|
||||
index 67e13b8510eeecf16caae9fbbbeb463b794c460d..07be6f1e87b62772728abd2e48af91f1bd756a2e 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -160,8 +160,7 @@ public abstract class PlayerList {
|
||||
@@ -165,8 +165,7 @@ public abstract class PlayerList {
|
||||
|
||||
public PlayerList(MinecraftServer server, RegistryAccess.Frozen registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||
- server.console = org.bukkit.craftbukkit.command.ColouredConsoleSender.getInstance();
|
||||
- server.reader.addCompleter(new org.bukkit.craftbukkit.command.ConsoleCommandCompleter(server.server));
|
||||
@ -236,10 +236,10 @@ index dbc8f0b962371902fc5e84f1171046d794eb1367..4f47a48aad54bec10fa8d79be2e6401c
|
||||
|
||||
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 a458cf93af182e2b6b7c7ef89a4a7fe7f64f7be5..eb7dd4143f545ab93e55ffac7f3322ce676dfb92 100644
|
||||
index 0f2967f133fa5a3477179252286cbe8c9badb8ad..565f9d18b529974c53e6aa8cefa5fc01ad7ad0fd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -45,7 +45,6 @@ import java.util.logging.Level;
|
||||
@@ -48,7 +48,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.imageio.ImageIO;
|
||||
@ -247,7 +247,7 @@ index a458cf93af182e2b6b7c7ef89a4a7fe7f64f7be5..eb7dd4143f545ab93e55ffac7f3322ce
|
||||
import net.minecraft.advancements.Advancement;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
@@ -1276,9 +1275,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1300,9 +1299,13 @@ public final class CraftServer implements Server {
|
||||
return this.logger;
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ index a458cf93af182e2b6b7c7ef89a4a7fe7f64f7be5..eb7dd4143f545ab93e55ffac7f3322ce
|
||||
@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 e15375f6985f841ca42dd41eb0035aab0b64a9fb..5cae8fdd1ad63f49580d69a8c337ae22c0923c5c 100644
|
||||
index a8971e81ff8bb9041f0ec22f0c178148c64f503f..be564acab5459313bd7c76c0f128f7e4b620fcdc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -12,7 +12,7 @@ import java.util.logging.Level;
|
@ -6,7 +6,7 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
index 7a5eea3a2eaff5e08589fc240307da2beb44c307..441eee3d3a639b8eccc4369de0d9e3e7d28bac27 100644
|
||||
index 93a0d0ab483fd525accc8bf8b9df5bbbd81c644e..c418c0b2fa757f29dfa3c07977093c67416959f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -281,7 +281,7 @@ public class Creeper extends Monster implements PowerableMob {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Item#canEntityPickup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index d315d9e0e6724e210924ec5814545e8c52ba2d8b..4f3d3bb811ea767bbcc4327eeefcdc6d58ed5230 100644
|
||||
index bb7c459c126be789bb12d08a569fe344e08914b8..458a90529959d3ceae424236461cdeb4c588eedb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -635,6 +635,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@ -21,10 +21,10 @@ index d315d9e0e6724e210924ec5814545e8c52ba2d8b..4f3d3bb811ea767bbcc4327eeefcdc6d
|
||||
}
|
||||
}
|
||||
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 a938d75e229ce77973182c9dd25c995a16ef17f6..581725ab12f6bea1216dbf62d5cf3923d4340844 100644
|
||||
index 9e986a9efcda63fa20aef392aaca314478b1fbea..b98ebf2d580c27a7e55afe3a54827e471cc5e845 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 {
|
||||
@@ -50,6 +50,7 @@ public class ItemEntity extends Entity {
|
||||
private UUID owner;
|
||||
public final float bobOffs;
|
||||
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
@ -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 581725ab12f6bea1216dbf62d5cf3923d4340844..bd78031511b8c7facc3f61f3a23cbf4264fa2d0c 100644
|
||||
index b98ebf2d580c27a7e55afe3a54827e471cc5e845..6a1bc0874ca0d07a2fcb98f3a8d1fff4625a35f0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -388,6 +388,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -386,6 +386,7 @@ public class ItemEntity extends Entity {
|
||||
// CraftBukkit start - fire PlayerPickupItemEvent
|
||||
int canHold = player.getInventory().canHold(itemstack);
|
||||
int remaining = i - canHold;
|
||||
@ -16,7 +16,7 @@ index 581725ab12f6bea1216dbf62d5cf3923d4340844..bd78031511b8c7facc3f61f3a23cbf42
|
||||
|
||||
if (this.pickupDelay <= 0 && canHold > 0) {
|
||||
itemstack.setCount(canHold);
|
||||
@@ -395,8 +396,14 @@ public class ItemEntity extends Entity {
|
||||
@@ -393,8 +394,14 @@ public class ItemEntity extends Entity {
|
||||
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.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 581725ab12f6bea1216dbf62d5cf3923d4340844..bd78031511b8c7facc3f61f3a23cbf42
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -426,7 +433,11 @@ public class ItemEntity extends Entity {
|
||||
@@ -424,7 +431,11 @@ public class ItemEntity extends Entity {
|
||||
// CraftBukkit end
|
||||
|
||||
if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
|
@ -5,10 +5,10 @@ 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 bd78031511b8c7facc3f61f3a23cbf4264fa2d0c..6ecab1dd5932c4c346cde987cb9463b00a32d385 100644
|
||||
index 6a1bc0874ca0d07a2fcb98f3a8d1fff4625a35f0..42b056d58146991b86de0690fce595716ee5455b 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 net.minecraft.util.Mth;
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.util.Mth;
|
||||
import org.bukkit.event.entity.EntityPickupItemEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
// CraftBukkit end
|
||||
@ -16,7 +16,7 @@ index bd78031511b8c7facc3f61f3a23cbf4264fa2d0c..6ecab1dd5932c4c346cde987cb9463b0
|
||||
|
||||
public class ItemEntity extends Entity {
|
||||
|
||||
@@ -390,6 +391,22 @@ public class ItemEntity extends Entity {
|
||||
@@ -388,6 +389,22 @@ public class ItemEntity extends Entity {
|
||||
int remaining = i - canHold;
|
||||
boolean flyAtPlayer = false; // Paper
|
||||
|
@ -10,7 +10,7 @@ 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 168ab805ecc48dd55db90eb7fe1c56fda3f2776c..336a26733b5bf73455f8ec10347c1e08b8e866f7 100644
|
||||
index 4423140df56e64527db470ada17a117656b93114..c085ed233eb4d1f2100ec23a77447ef799ecdf1f 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -81,6 +81,22 @@ public class Util {
|
||||
@ -50,10 +50,10 @@ index 58e923f4ef1980bc7fff1e3b3fcdaad8c4eded53..4038bb76339d43f18770624bd7fecc79
|
||||
}, this.executor).whenCompleteAsync((optional, throwable) -> {
|
||||
consumer.accept(optional);
|
||||
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 0c7e29b589ab106013d979a20edc415b4b32a677..c5d5d90d10b30f30d1262367b3d75df43fbdb231 100644
|
||||
index 8fa6b788c4c330ad50e9833bbf7082da540b109c..91fb6678214d5f23b33d5d3b65a29fdfbb003c58 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
|
||||
@@ -120,7 +120,7 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
@@ -137,7 +137,7 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
public static void updateGameprofile(@Nullable GameProfile owner, Consumer<GameProfile> callback) {
|
||||
if (owner != null && !StringUtil.isNullOrEmpty(owner.getName()) && (!owner.isComplete() || !owner.getProperties().containsKey("textures")) && profileCache != null && sessionService != null) {
|
||||
profileCache.getAsync(owner.getName(), (profile) -> {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add UnknownCommandEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index eb7dd4143f545ab93e55ffac7f3322ce676dfb92..75b9d496860d7f3a9d5f680cbdfe89860286522e 100644
|
||||
index 565f9d18b529974c53e6aa8cefa5fc01ad7ad0fd..19386ae876637051f42567acc5749dc13b5e71f6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -892,7 +892,13 @@ public final class CraftServer implements Server {
|
||||
@@ -905,7 +905,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
// Spigot start
|
||||
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
@ -596,10 +596,10 @@ index cf3e083c2ada3275a52c303de16a62576696e83f..b19850ae31f6c796cb3491dd5070d28e
|
||||
* 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 45db9f1b1d19319e7f92bd4e61be9ea9b06dd5e5..151b13e257c09fc5c4bbccfc388b15ad76133909 100644
|
||||
index e600563a9d2ddbfa37c106481decb13e67f71524..7c1ad1e39c3b3dfd476133ef4d938187b7a11f09 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -155,7 +155,7 @@ public class Main {
|
||||
@@ -158,7 +158,7 @@ public class Main {
|
||||
}
|
||||
|
||||
File file = (File) optionset.valueOf("universe"); // CraftBukkit
|
||||
@ -631,10 +631,10 @@ index 4038bb76339d43f18770624bd7fecc79b8d7f2a9..2456edc11b29a92b1648937cd3dd6a9a
|
||||
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 75b9d496860d7f3a9d5f680cbdfe89860286522e..7013b11fc0cd5fbb5a7e62be45d84d54d3052237 100644
|
||||
index 19386ae876637051f42567acc5749dc13b5e71f6..2e00f77ce6bbc84551cd74acfc77c113991e83a0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -244,6 +244,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -257,6 +257,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
@ -644,7 +644,7 @@ index 75b9d496860d7f3a9d5f680cbdfe89860286522e..7013b11fc0cd5fbb5a7e62be45d84d54
|
||||
public final class CraftServer implements Server {
|
||||
private final String serverName = "Paper"; // Paper
|
||||
private final String serverVersion;
|
||||
@@ -284,6 +287,7 @@ public final class CraftServer implements Server {
|
||||
@@ -297,6 +300,7 @@ public final class CraftServer implements Server {
|
||||
static {
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
|
||||
@ -652,7 +652,7 @@ index 75b9d496860d7f3a9d5f680cbdfe89860286522e..7013b11fc0cd5fbb5a7e62be45d84d54
|
||||
CraftItemFactory.instance();
|
||||
}
|
||||
|
||||
@@ -2596,5 +2600,37 @@ public final class CraftServer implements Server {
|
||||
@@ -2620,5 +2624,37 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
@ -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 d68ad0bc89565d207f46b106bacce8e6efc890dc..2fd52878415fca31d053d8d83a53748e8743e352 100644
|
||||
index a07ca7eca7ca38c47ae2c23f048c02a7869197aa..05b32ac76dbc3c0a16380cab82415dac6aff25de 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2036,20 +2036,44 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2008,20 +2008,44 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 9011b43dbf28f1f19809c1b45898b727d679c12f..187692ea25983195a0fe14a7dc070fd33acb0037 100644
|
||||
index d14b7265a075f883f39d078b0d57bccdd7b3ff41..0d55dc89e4577fb6804e08281aaa12ac783bbbe0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -76,6 +76,12 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -71,6 +71,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
@Override
|
||||
public void tick() {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 58256b341aa15e946abef464453c0ffcaf55b372..36beb42ccdb348c91020502f935b3a1590a7472e 100644
|
||||
index 760596375e26b4cd73cc378758f4bf761c3352a5..66b727c533d3a2b7b5938ab9b9b7b4a76bb62966 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -380,6 +380,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -16,7 +16,7 @@ index 58256b341aa15e946abef464453c0ffcaf55b372..36beb42ccdb348c91020502f935b3a15
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
@@ -2020,6 +2021,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2035,6 +2036,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -27,7 +27,7 @@ index 58256b341aa15e946abef464453c0ffcaf55b372..36beb42ccdb348c91020502f935b3a15
|
||||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2159,6 +2164,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2174,6 +2179,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.originWorld = originWorld;
|
||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
}
|
||||
@ -37,10 +37,10 @@ index 58256b341aa15e946abef464453c0ffcaf55b372..36beb42ccdb348c91020502f935b3a15
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 02ee392c810d96d05f5ad27b1d75fa06dd28ee4c..d09d586fd649f5b13c1515a8b0f869c1d6033cce 100644
|
||||
index cf9a0addcbec3f78a541fad85697961ed8ec884b..6b6f81f3e9e55c1f41599ccbf65e35d79749a77d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -159,6 +159,7 @@ public abstract class BaseSpawner {
|
||||
@@ -163,6 +163,7 @@ public abstract class BaseSpawner {
|
||||
}
|
||||
// Spigot End
|
||||
}
|
||||
@ -49,10 +49,10 @@ index 02ee392c810d96d05f5ad27b1d75fa06dd28ee4c..d09d586fd649f5b13c1515a8b0f869c1
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
Entity vehicle = entity.getVehicle();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index b9599f4f431098d63be98b5175890371103f8813..d3a8c68f5186f69432fb8af8b34b174b04368fc1 100644
|
||||
index 91c0354f554edbf2fc68748a8fbf182cd8d93de5..5199609a6eec4f3785f31091f294612d4941e71c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1260,5 +1260,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1262,5 +1262,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
//noinspection ConstantConditions
|
||||
return originVector.toLocation(world);
|
||||
}
|
@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
|
||||
to ensure it meets latest minecraft expectations.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index a06f9775a43a245380edabde63e7999082e7958a..5f83838f3f40b778088187904b747abff703c3f2 100644
|
||||
index 881ba2026976c1304a6cada9dab22f8ca7b39899..7d8ba88706edf6634f134de58e255fce26a152ba 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -386,5 +386,11 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -411,5 +411,11 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
public net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component displayName(@org.jetbrains.annotations.NotNull ItemStack itemStack) {
|
||||
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
||||
}
|
@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
|
||||
You must replace the language file embedded in the server jar.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index 5f83838f3f40b778088187904b747abff703c3f2..f05923a6292f02a01791627abce2770daff24b6a 100644
|
||||
index 7d8ba88706edf6634f134de58e255fce26a152ba..6cdce121f1f04e2ca23cdbdf0844aa118be5dec8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -392,5 +392,18 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -417,5 +417,18 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
public ItemStack ensureServerConversions(ItemStack item) {
|
||||
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4f47a48aad54bec10fa8d79be2e6401cd8166591..4dcc44b925ac261aaa2f4ee84e321d6c8852e835 100644
|
||||
index 07be6f1e87b62772728abd2e48af91f1bd756a2e..216ad4d729d8996bb4f5bc696fd168f65b076994 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -621,9 +621,9 @@ public abstract class PlayerList {
|
||||
@@ -629,9 +629,9 @@ public abstract class PlayerList {
|
||||
|
||||
// return chatmessage;
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
||||
@ -21,7 +21,7 @@ index 4f47a48aad54bec10fa8d79be2e6401cd8166591..4dcc44b925ac261aaa2f4ee84e321d6c
|
||||
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||
|
||||
@@ -1005,7 +1005,23 @@ public abstract class PlayerList {
|
||||
@@ -1015,7 +1015,23 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
@ -9,10 +9,10 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa
|
||||
and to provide some level of hint without being disruptive.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||
index e359919de57f97d18667df1b2f1bf54a19a49c2f..c5822637e48fad4ca4e8cf210431b5eafbf5abb1 100644
|
||||
index b5aa358638b9d0638dfe47f7ebac04cca1dd80b9..0d3a8f576c037886ccdd6068ce953c4ce010ae2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
||||
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||
@@ -46,7 +46,7 @@ public class Bootstrap {
|
||||
@@ -40,7 +40,7 @@ public class Bootstrap {
|
||||
public static void bootStrap() {
|
||||
if (!Bootstrap.isBootstrapped) {
|
||||
// CraftBukkit start
|
||||
@ -21,7 +21,7 @@ index e359919de57f97d18667df1b2f1bf54a19a49c2f..c5822637e48fad4ca4e8cf210431b5ea
|
||||
switch (name) {
|
||||
case "DispenserRegistry":
|
||||
break;
|
||||
@@ -60,7 +60,7 @@ public class Bootstrap {
|
||||
@@ -54,7 +54,7 @@ public class Bootstrap {
|
||||
System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
|
||||
System.err.println("**********************************************************************");
|
||||
break;
|
||||
@ -29,14 +29,14 @@ index e359919de57f97d18667df1b2f1bf54a19a49c2f..c5822637e48fad4ca4e8cf210431b5ea
|
||||
+ }*/ // Paper
|
||||
// CraftBukkit end
|
||||
Bootstrap.isBootstrapped = true;
|
||||
if (Registry.REGISTRY.keySet().isEmpty()) {
|
||||
if (BuiltInRegistries.REGISTRY.keySet().isEmpty()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 5cae8fdd1ad63f49580d69a8c337ae22c0923c5c..d7d2618bed5188c6e6cc4db6669f3842d0bfff0c 100644
|
||||
index be564acab5459313bd7c76c0f128f7e4b620fcdc..d4f6d7fee1012adaef516f283ef8d12b5804af46 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -241,10 +241,12 @@ public class Main {
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
- System.err.println("*** Error, this build is outdated ***");
|
||||
+ // Paper start - This is some stupid bullshit
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||
index 4b9e3729279f3bfabab4227c511c4bf89488ff8c..6a459435493295ee5bb44fe2ba79cba6acea2e35 100644
|
||||
index 49cd7fea60d3d962e88a1380608e1b7174d44c28..5ad029e3c1eaeae33784b55d04181cdd119ef8c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index d09d586fd649f5b13c1515a8b0f869c1d6033cce..796e3bde04a118076ea004b0d58fd25641a7611e 100644
|
||||
index 6b6f81f3e9e55c1f41599ccbf65e35d79749a77d..e9e0286083337ccd027e01ec80125fc69550ad07 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -160,6 +160,7 @@ public abstract class BaseSpawner {
|
||||
@@ -164,6 +164,7 @@ public abstract class BaseSpawner {
|
||||
// Spigot End
|
||||
}
|
||||
entity.spawnedViaMobSpawner = true; // Paper
|
||||
@ -16,7 +16,7 @@ index d09d586fd649f5b13c1515a8b0f869c1d6033cce..796e3bde04a118076ea004b0d58fd256
|
||||
// Spigot Start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
Entity vehicle = entity.getVehicle();
|
||||
@@ -184,7 +185,7 @@ public abstract class BaseSpawner {
|
||||
@@ -188,7 +189,7 @@ public abstract class BaseSpawner {
|
||||
((Mob) entity).spawnAnim();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 187692ea25983195a0fe14a7dc070fd33acb0037..1cbcee5b2cebe9f2c2ede3d7628ace6452a480f0 100644
|
||||
index 0d55dc89e4577fb6804e08281aaa12ac783bbbe0..9cbd0174ca4cd4a74a04295d34217c1581ca3912 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -333,7 +333,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -294,7 +294,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
ServerLoginPacketListenerImpl.this.gameProfile = gameprofile;
|
||||
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
|
||||
} else {
|
@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
|
||||
the plugin logger.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index d4141a24cb5ba20e8c53c85206b32120ff18eb48..a57fad0a75fe18f70d3dd6cd5c6a2ab90eb0498d 100644
|
||||
index 8407beb0c47660f7d310d27f3a47120b80c5b189..8f8e6dea5f5f2a537a753efcc38484e3cd6a888f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -17,7 +17,7 @@ dependencies {
|
||||
@ -25,10 +25,10 @@ index d4141a24cb5ba20e8c53c85206b32120ff18eb48..a57fad0a75fe18f70d3dd6cd5c6a2ab9
|
||||
- runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1")
|
||||
+ implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 051d7c7fc5796ad056ae1ba5e5e630fde8794108..c2e3d32e51902503af88f089e366e784f42d999a 100644
|
||||
index 0a0aa6de31a94a701074cc5f43c94be7515a185c..489ce6f439778b26eb33ede9432681d4bf9e0116 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -290,7 +290,7 @@ public class SpigotConfig
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 5a8008b507b93768526184ddaca170bccb67f92a..4f677103cdbda994355924ebeb822009a97345cd 100644
|
||||
index ca894b92215f431a31b69ee2910ce023177f3e6e..f4f7d9947edc35e02739adc06a8f3c3c2a431771 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1293,7 +1293,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1285,7 +1285,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
boolean flag = d8 > 0.0D;
|
||||
|
||||
if (this.player.isOnGround() && !packet.isOnGround() && flag) {
|
@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
|
||||
random disconnections for clients.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 4f677103cdbda994355924ebeb822009a97345cd..66668dbd2a26f566b3a965921de25a1998fbcd53 100644
|
||||
index f4f7d9947edc35e02739adc06a8f3c3c2a431771..f774583cce32d70f32ed7dd0ec1b45b8f00b029a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3242,14 +3242,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3122,14 +3122,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
@ -90,10 +90,10 @@ index 8284d49c8e30645d00be952c847bab7ce5753d78..a738b79e775a0a4abed1a05e12495d85
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 87c8e494aa374b8bfb8b8432723783b00ba94763..6dd5deecd404a3b9858e63da6837caf2d5d382f0 100644
|
||||
index 98d8585a8bc2acbb8d98c73e3aca404f0ebe66d3..70e5ef461f02e6aa8a73363753687d0cf5e7c4fb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -299,6 +299,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -301,6 +301,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients,
|
||||
at the cost of dead connections being kept open for longer.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 66668dbd2a26f566b3a965921de25a1998fbcd53..f1e3955625e3ae3e4b47cd53d3af7ec70892add6 100644
|
||||
index f774583cce32d70f32ed7dd0ec1b45b8f00b029a..0e4691ab7ad4459282398e4c2160df4e442fdcb4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -256,7 +256,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -255,7 +255,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public ServerPlayer player;
|
||||
private int tickCount;
|
||||
private int ackBlockChangesUpTo = -1;
|
||||
@ -30,14 +30,14 @@ index 66668dbd2a26f566b3a965921de25a1998fbcd53..f1e3955625e3ae3e4b47cd53d3af7ec7
|
||||
private long keepAliveChallenge;
|
||||
// CraftBukkit start - multithreaded fields
|
||||
@@ -293,6 +293,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private final SignedMessageChain.Decoder signedMessageDecoder;
|
||||
private final LastSeenMessagesValidator lastSeenMessagesValidator;
|
||||
private final LastSeenMessagesValidator lastSeenMessages;
|
||||
private final MessageSignatureCache messageSignatureCache;
|
||||
private final FutureChain chatMessageChain;
|
||||
+ private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
@@ -391,18 +392,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -384,18 +385,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
this.server.getProfiler().push("keepAlive");
|
@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
|
||||
|
||||
|
||||
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 2fd52878415fca31d053d8d83a53748e8743e352..0dc19e4701b35e94e94f07d261b3dbbdf9567d7b 100644
|
||||
index 05b32ac76dbc3c0a16380cab82415dac6aff25de..acd84748204bad0dbfc59fbd516f873e0aa16a40 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1246,7 +1246,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1228,7 +1228,7 @@ public abstract class Player extends LivingEntity {
|
||||
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
|
||||
|
||||
if (this.isSprinting() && flag) {
|
||||
@ -18,7 +18,7 @@ index 2fd52878415fca31d053d8d83a53748e8743e352..0dc19e4701b35e94e94f07d261b3dbbd
|
||||
++i;
|
||||
flag1 = true;
|
||||
}
|
||||
@@ -1321,7 +1321,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1303,7 +1303,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ index 2fd52878415fca31d053d8d83a53748e8743e352..0dc19e4701b35e94e94f07d261b3dbbd
|
||||
this.sweepAttack();
|
||||
}
|
||||
|
||||
@@ -1349,15 +1349,15 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1331,15 +1331,15 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@ -46,7 +46,7 @@ index 2fd52878415fca31d053d8d83a53748e8743e352..0dc19e4701b35e94e94f07d261b3dbbd
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1409,7 +1409,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1391,7 +1391,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
||||
} else {
|
||||
@ -55,7 +55,7 @@ index 2fd52878415fca31d053d8d83a53748e8743e352..0dc19e4701b35e94e94f07d261b3dbbd
|
||||
if (flag4) {
|
||||
target.clearFire();
|
||||
}
|
||||
@@ -1871,6 +1871,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1843,6 +1843,14 @@ public abstract class Player extends LivingEntity {
|
||||
public int getXpNeededForNextLevel() {
|
||||
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 6295c89211ba86c10009775f4d399f597d240fd0..e49803f36ffea3329a67542882ee58e4762a08e5 100644
|
||||
index b6aaebb5359c8162359b377b3485c3fcf91587e1..6d599fb38607cf841eef6d48bcaad81b378f667e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -15,10 +15,10 @@ index 6295c89211ba86c10009775f4d399f597d240fd0..e49803f36ffea3329a67542882ee58e4
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -3002,6 +3003,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3019,6 +3020,13 @@ public abstract class LivingEntity extends Entity {
|
||||
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
|
||||
|
||||
if (!ItemStack.matches(itemstack1, itemstack)) {
|
||||
if (this.equipmentHasChanged(itemstack, itemstack1)) {
|
||||
+ // Paper start - PlayerArmorChangeEvent
|
||||
+ if (this instanceof ServerPlayer && enumitemslot.getType() == EquipmentSlot.Type.ARMOR) {
|
||||
+ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack);
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 1cbcee5b2cebe9f2c2ede3d7628ace6452a480f0..07784c0e6eea2a4a91f1453e937e14a4a1faedf5 100644
|
||||
index 9cbd0174ca4cd4a74a04295d34217c1581ca3912..b2a7fc9bc4a168304f83411559558e3a218934a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -83,7 +83,11 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -78,7 +78,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
// Paper end
|
||||
if (this.state == ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 1954a93a1f566c1c79cdc2e0eb1b41141d6b5fde..6cc047624746d33ed971ec2dc8f64490bdcaeea8 100644
|
||||
index 6a5ede377a2e5e7c39ebf6db6708b4f234f96dc7..f39d927df5997cb0dd3d8c677a10099afa84da09 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -696,6 +696,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -721,6 +721,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Spigot start
|
||||
// Iterator iterator = this.blockEntityTickers.iterator();
|
||||
int tilesThisCycle = 0;
|
||||
@ -17,7 +17,7 @@ index 1954a93a1f566c1c79cdc2e0eb1b41141d6b5fde..6cc047624746d33ed971ec2dc8f64490
|
||||
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
||||
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
|
||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition);
|
||||
@@ -703,7 +705,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -728,7 +730,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (tickingblockentity == null) {
|
||||
this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
|
||||
tilesThisCycle--;
|
||||
@ -25,7 +25,7 @@ index 1954a93a1f566c1c79cdc2e0eb1b41141d6b5fde..6cc047624746d33ed971ec2dc8f64490
|
||||
continue;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -711,12 +712,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -736,12 +737,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (tickingblockentity.isRemoved()) {
|
||||
// Spigot start
|
||||
tilesThisCycle--;
|
@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping
|
||||
information on restoration when the event is cancelled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 6cc047624746d33ed971ec2dc8f64490bdcaeea8..e11e3ee5a11ebed7a1550da14c3c5c54962e4fdf 100644
|
||||
index f39d927df5997cb0dd3d8c677a10099afa84da09..995278298b7feb61255cd8c1fea396ed0850099e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -148,7 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -151,7 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
|
||||
public boolean captureBlockStates = false;
|
||||
public boolean captureTreeGeneration = false;
|
||||
@ -30,7 +30,7 @@ index 6cc047624746d33ed971ec2dc8f64490bdcaeea8..e11e3ee5a11ebed7a1550da14c3c5c54
|
||||
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
|
||||
public List<ItemEntity> captureDrops;
|
||||
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
|
||||
@@ -376,7 +376,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -379,7 +379,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
|
||||
// CraftBukkit start - tree generation
|
||||
if (this.captureTreeGeneration) {
|
||||
@ -39,7 +39,7 @@ index 6cc047624746d33ed971ec2dc8f64490bdcaeea8..e11e3ee5a11ebed7a1550da14c3c5c54
|
||||
if (blockstate == null) {
|
||||
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
|
||||
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
||||
@@ -396,7 +396,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -399,7 +399,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit start - capture blockstates
|
||||
boolean captured = false;
|
||||
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
|
||||
@ -49,7 +49,7 @@ index 6cc047624746d33ed971ec2dc8f64490bdcaeea8..e11e3ee5a11ebed7a1550da14c3c5c54
|
||||
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
||||
captured = true;
|
||||
}
|
||||
@@ -608,7 +609,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -611,7 +612,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
// CraftBukkit start - tree generation
|
||||
if (this.captureTreeGeneration) {
|
@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
|
||||
If Tile Entity was null, correct Sign to return empty lines instead of null
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 148e79ae4e24fe16dbbb17550c3f258d4362c266..06beb18e5e1950aeb6cb427876fcc4c5ea95adb2 100644
|
||||
index b701a1344db066b9368841f2377ee493514bf282..5768ff2c3e15c038d132c7ad391332fb36251871 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -45,6 +45,7 @@ public abstract class BlockEntity {
|
||||
@ -51,10 +51,10 @@ index 148e79ae4e24fe16dbbb17550c3f258d4362c266..06beb18e5e1950aeb6cb427876fcc4c5
|
||||
return null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index 52fc42050d5df0882586c8f4bb4890ef1dbf979e..ba8f9ffed49bf377be8b37532d4f2bdcb8c44d82 100644
|
||||
index 14e1c7c40761b1bd8123b4b351d5d77d7c1c52c2..13da02b84d7e748d61fdf5db01d92a8d8cd5c799 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -329,6 +329,13 @@ public class CraftBlock implements Block {
|
||||
@@ -331,6 +331,13 @@ public class CraftBlock implements Block {
|
||||
return CraftBlockStates.getBlockState(this);
|
||||
}
|
||||
|
||||
@ -114,10 +114,10 @@ index 7629a51ec284cab0db7e9238027d6acfa4f3083c..a76cce199acdcecfdd8b998ec08974c2
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
||||
index 521d981e72955b1e2c96427882e336b034456678..e609cfeaf5aa6807f57360dde9b0dccf40a23eb1 100644
|
||||
index 55cf35ec1bd867ae8106d00c101fd4797b6e9919..812eb8c75bf5308a3a0771a1faabdb22a3d80c28 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
||||
@@ -336,15 +336,30 @@ public final class CraftBlockStates {
|
||||
@@ -368,15 +368,30 @@ public final class CraftBlockStates {
|
||||
}
|
||||
|
||||
public static BlockState getBlockState(Block block) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user