3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

bouquet o' patches

Dieser Commit ist enthalten in:
Jake Potrebic 2022-06-07 23:25:32 -07:00
Ursprung 2304bb3d6f
Commit feca8d248c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: ECE0B3C133C016C5
37 geänderte Dateien mit 112 neuen und 103 gelöschten Zeilen

Datei anzeigen

@ -11,6 +11,8 @@ Co-authored-by: Gegy <gegy1000@gmail.com>
Co-authored-by: Dylan Xaldin <Puremin0rez515@gmail.com> Co-authored-by: Dylan Xaldin <Puremin0rez515@gmail.com>
Co-authored-by: pop4959 <pop4959@gmail.com> Co-authored-by: pop4959 <pop4959@gmail.com>
1.19: Not compatible. Was removed from lithium a while ago I think (see https://github.com/CaffeineMC/lithium-fabric/commit/94cffd161193bf51b7986379bb77b3f97e7c25d2) -MM
diff --git a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java diff --git a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java
index 3f9127f93c9720c89b578d36a1bcdb89fc01222a..9004d9d7dcb1466047da62d0a6d01e7b4ac6a216 100644 index 3f9127f93c9720c89b578d36a1bcdb89fc01222a..9004d9d7dcb1466047da62d0a6d01e7b4ac6a216 100644
--- a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java --- a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java

Datei anzeigen

@ -8,6 +8,8 @@ through the encode/decode methods of the packet that causes the precision
loss, which forces the server to lose the same precision as the client loss, which forces the server to lose the same precision as the client
keeping them in sync. keeping them in sync.
1.19: entity tracking position changes
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index ccc60a5465efa2b71fc2593d75af62c0b64fe66c..1adbceadd5df96e17796561a40eb7b760493440e 100644 index ccc60a5465efa2b71fc2593d75af62c0b64fe66c..1adbceadd5df96e17796561a40eb7b760493440e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix for large move vectors crashing server
Check movement distance also based on current position. Check movement distance also based on current position.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3c4c6edc06e992543f7f1b190d662eb326550034..1d5edba8fa2da4c8c8075bd7c165062970353830 100644 index 85841a93e17e685bb7d676995891d27c05521f31..be836a29d9d37902813ecff255b09234a3ffc77f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -509,9 +509,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -535,9 +535,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) { if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
ServerLevel worldserver = this.player.getLevel(); ServerLevel worldserver = this.player.getLevel();
@ -22,7 +22,7 @@ index 3c4c6edc06e992543f7f1b190d662eb326550034..1d5edba8fa2da4c8c8075bd7c1650629
double d3 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX()); final double toX = d3; // Paper - OBFHELPER double d3 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX()); final double toX = d3; // Paper - OBFHELPER
double d4 = ServerGamePacketListenerImpl.clampVertical(packet.getY()); final double toY = d4; // Paper - OBFHELPER double d4 = ServerGamePacketListenerImpl.clampVertical(packet.getY()); final double toY = d4; // Paper - OBFHELPER
double d5 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ()); final double toZ = d5; // Paper - OBFHELPER double d5 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ()); final double toZ = d5; // Paper - OBFHELPER
@@ -521,8 +521,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -547,8 +547,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
double d7 = d4 - this.vehicleFirstGoodY; double d7 = d4 - this.vehicleFirstGoodY;
double d8 = d5 - this.vehicleFirstGoodZ; double d8 = d5 - this.vehicleFirstGoodZ;
double d9 = entity.getDeltaMovement().lengthSqr(); double d9 = entity.getDeltaMovement().lengthSqr();
@ -44,7 +44,7 @@ index 3c4c6edc06e992543f7f1b190d662eb326550034..1d5edba8fa2da4c8c8075bd7c1650629
// CraftBukkit start - handle custom speeds and skipped ticks // CraftBukkit start - handle custom speeds and skipped ticks
this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick; this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
@@ -568,9 +579,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -594,9 +605,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D)); boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
@ -57,7 +57,7 @@ index 3c4c6edc06e992543f7f1b190d662eb326550034..1d5edba8fa2da4c8c8075bd7c1650629
boolean flag1 = entity.verticalCollisionBelow; boolean flag1 = entity.verticalCollisionBelow;
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
@@ -1253,7 +1264,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1282,7 +1293,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
double d8 = d1 - this.firstGoodY; double d8 = d1 - this.firstGoodY;
double d9 = d2 - this.firstGoodZ; double d9 = d2 - this.firstGoodZ;
double d10 = this.player.getDeltaMovement().lengthSqr(); double d10 = this.player.getDeltaMovement().lengthSqr();
@ -77,7 +77,7 @@ index 3c4c6edc06e992543f7f1b190d662eb326550034..1d5edba8fa2da4c8c8075bd7c1650629
if (this.player.isSleeping()) { if (this.player.isSleeping()) {
if (d11 > 1.0D) { if (d11 > 1.0D) {
@@ -1305,9 +1327,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1334,9 +1356,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
AABB axisalignedbb = this.player.getBoundingBox(); AABB axisalignedbb = this.player.getBoundingBox();

Datei anzeigen

@ -28,10 +28,10 @@ index 76133c77e8ebce7c9e5402e3e7cd50b30aa1c2e0..348a91a760bd728f8e732e1a35c86ab7
super(block, propertyMap, codec); super(block, propertyMap, codec);
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
index 8001245c4ba619cd357a194d60fdc2efe186efb3..07fa4e4ae5f2cfb4447a608dc645c0b7b0a217dd 100644 index 0511ac55c4e6d9736ec12e94c9899eb04d5cd2e3..75193684a71d694736087d1a368b8fb6a8c8363b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java --- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
@@ -83,7 +83,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { @@ -84,7 +84,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
public Material getBlockType(int x, int y, int z) { public Material getBlockType(int x, int y, int z) {
this.validateChunkCoordinates(x, y, z); this.validateChunkCoordinates(x, y, z);
@ -67,7 +67,7 @@ index 0a755f38fae9dc84440f43113920c5b4c6d8218b..7b9e943b391c061782fccd2b8d705cee
public void setFlag(int flag) { public void setFlag(int flag) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index afc69b0077f180c3e7ace3db11aa0eccc602516f..4cc67caac2be8c75cd60be5ac63c9aefcc6e2c9c 100644 index 37a6d050ae46461ad4b9b6c0fc9b9c2879d9b6fb..ba3c0437d416b45e6444d16fd631c94665873cbb 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -44,7 +44,7 @@ public class CraftBlockData implements BlockData { @@ -44,7 +44,7 @@ public class CraftBlockData implements BlockData {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Villager#resetOffers
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
index dddc84e233e9108f2304694e53990d0654225c5b..68bd3bb6fde77a65b5271631f6ef726dc613019b 100644 index 9960862cb5302aa44776ac294e3b9e30105adb07..6717e3d116b7bff8ab4d7b45f8c4ec00939c9c73 100644
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
@@ -115,6 +115,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa @@ -115,6 +115,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Improve inlinig for some hot IBlockData methods
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index e5e8de790b1ab546d35ddf48583461c0b8d91acd..471c4600c6663375eb340c190edaee330bf59ef2 100644 index d75eb5eef83c9b0d247c7d8cb5021e931fe3ef4c..254ac28e692cf06c3286c8f4c6edb9de412851a2 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -702,8 +702,14 @@ public abstract class BlockBehaviour { @@ -716,8 +716,14 @@ public abstract class BlockBehaviour {
return this.shapeExceedsCube; return this.shapeExceedsCube;
} }
// Paper end // Paper end
@ -23,7 +23,7 @@ index e5e8de790b1ab546d35ddf48583461c0b8d91acd..471c4600c6663375eb340c190edaee33
if (!this.getBlock().hasDynamicShape()) { if (!this.getBlock().hasDynamicShape()) {
this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState()); this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState());
} }
@@ -747,15 +753,15 @@ public abstract class BlockBehaviour { @@ -767,15 +773,15 @@ public abstract class BlockBehaviour {
return this.shapeExceedsCube; // Paper - moved into shape cache init return this.shapeExceedsCube; // Paper - moved into shape cache init
} }
@ -42,7 +42,7 @@ index e5e8de790b1ab546d35ddf48583461c0b8d91acd..471c4600c6663375eb340c190edaee33
return this.isAir; return this.isAir;
} }
@@ -829,7 +835,7 @@ public abstract class BlockBehaviour { @@ -849,7 +855,7 @@ public abstract class BlockBehaviour {
} }
} }
@ -51,7 +51,7 @@ index e5e8de790b1ab546d35ddf48583461c0b8d91acd..471c4600c6663375eb340c190edaee33
return this.canOcclude; return this.canOcclude;
} }
@@ -1030,12 +1036,12 @@ public abstract class BlockBehaviour { @@ -1047,12 +1053,12 @@ public abstract class BlockBehaviour {
return this.getBlock() == block; return this.getBlock() == block;
} }
@ -69,7 +69,7 @@ index e5e8de790b1ab546d35ddf48583461c0b8d91acd..471c4600c6663375eb340c190edaee33
public long getSeed(BlockPos pos) { public long getSeed(BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/material/FluidState.java b/src/main/java/net/minecraft/world/level/material/FluidState.java diff --git a/src/main/java/net/minecraft/world/level/material/FluidState.java b/src/main/java/net/minecraft/world/level/material/FluidState.java
index 2cad3a8ada797e0e8f3c24431eeca5b91740b009..3c3c873035908294a24c1e4f80d65f980c0f3db4 100644 index d035eaccc09dfeaedf25579b850ccdaecba3f974..66f712657ae0c4166ecd198f41081d96843296c4 100644
--- a/src/main/java/net/minecraft/world/level/material/FluidState.java --- a/src/main/java/net/minecraft/world/level/material/FluidState.java
+++ b/src/main/java/net/minecraft/world/level/material/FluidState.java +++ b/src/main/java/net/minecraft/world/level/material/FluidState.java
@@ -26,8 +26,12 @@ public final class FluidState extends StateHolder<Fluid, FluidState> { @@ -26,8 +26,12 @@ public final class FluidState extends StateHolder<Fluid, FluidState> {

Datei anzeigen

@ -10,10 +10,10 @@ In general, look at making this logic more robust (i.e properly handling
cases where a captured entry is overriden) - but for now this will do. cases where a captured entry is overriden) - but for now this will do.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 4095b3ebacb8a55744fa99fea7e08d31e42d8b47..7d7d6ac3ae38eda0aed9f52059fccd3970718890 100644 index b1cd5781620514533cf0f4d3c518ad461f98f23b..23ae163fa08311d2b41dfeafd9df32bebcc04152 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -149,7 +149,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -155,7 +155,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean captureBlockStates = false; public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false; public boolean captureTreeGeneration = false;
public Map<BlockPos, org.bukkit.craftbukkit.block.CraftBlockState> capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper public Map<BlockPos, org.bukkit.craftbukkit.block.CraftBlockState> capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Reduce blockpos allocation from 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 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 2d42df635b1ce8d975278fb36f00fe9b8b8f060f..c7926d45c32a739b32d2b97b1ed2f8b89fb18620 100644 index c48e097464977dbec22d1370c3393ba1fe105137..ede91a2fbe67480d2b6bcdeb776f87da0b69bdae 100644
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
@@ -475,7 +475,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { @@ -495,7 +495,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
return BlockPathTypes.DANGER_FIRE; return BlockPathTypes.DANGER_FIRE;
} }
@ -17,7 +17,7 @@ index 2d42df635b1ce8d975278fb36f00fe9b8b8f060f..c7926d45c32a739b32d2b97b1ed2f8b8
return BlockPathTypes.WATER_BORDER; return BlockPathTypes.WATER_BORDER;
} }
} // Paper } // Paper
@@ -506,7 +506,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { @@ -526,7 +526,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
} else if (blockState.is(Blocks.COCOA)) { } else if (blockState.is(Blocks.COCOA)) {
return BlockPathTypes.COCOA; return BlockPathTypes.COCOA;
} else { } else {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix item locations dropped from campfires
Fixes #4259 by not flooring the blockposition among other weirdness Fixes #4259 by not flooring the blockposition among other weirdness
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
index a365b60830c0e541b9a62fe2db06b8889c803fad..02cdd957e7f79f6c00ee015a0d382def8aa2aead 100644 index 0cebba557f0ba312e7911e61cb21485c81436720..003a66064c666db974c2b36f6579a87e1ad28685 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
@@ -70,7 +70,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { @@ -78,7 +78,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
result = blockCookEvent.getResult(); result = blockCookEvent.getResult();
itemstack1 = CraftItemStack.asNMSCopy(result); itemstack1 = CraftItemStack.asNMSCopy(result);
// CraftBukkit end // CraftBukkit end
@ -21,4 +21,4 @@ index a365b60830c0e541b9a62fe2db06b8889c803fad..02cdd957e7f79f6c00ee015a0d382def
+ // Paper end + // Paper end
campfire.items.set(i, ItemStack.EMPTY); campfire.items.set(i, ItemStack.EMPTY);
world.sendBlockUpdated(pos, state, state, 3); world.sendBlockUpdated(pos, state, state, 3);
} world.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state));

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0d771219023ecbe6ebc3729009eebb9a4da1e865..52e5b8561dd07078933beccfb95c5fdaca2e6126 100644 index 63ef47bc63e32d2443b3b2aa3a77258269843d9d..9cee24c3f4b36296b87467278f2af2e45266a15a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -595,6 +595,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -593,6 +593,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
throw new RuntimeException("Unknown settings type"); throw new RuntimeException("Unknown settings type");
} }

Datei anzeigen

@ -8,7 +8,7 @@ This can realistically only happen if there's custom loot active on fishing
which can return 0 items. This would disconnect the player who's fishing. which can return 0 items. This would disconnect the player who's fishing.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index ce43f33ffd8726d3fb592348ac1b10f37645eb0e..3789a0db398766f0fbc9e5ac5bf4228a0a0dac88 100644 index d9256fe99309b7d085b2cc64c770cfcb61e3ef54..eb62756029ddda53c68d681f70b155df54a2c3ae 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -494,9 +494,15 @@ public class FishingHook extends Projectile { @@ -494,9 +494,15 @@ public class FishingHook extends Projectile {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ce09a46ed430a80471af48b7a8ca1bf7726395c9..a4e34932e8fadf834545db6533219ecf2bf52921 100644 index a1a8578929a08396f9762dec0ef99956e7eeb459..83a6ceb4cb59822fc05831438585951fd0f63b40 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1800,6 +1800,28 @@ public final class CraftServer implements Server { @@ -1783,6 +1783,28 @@ public final class CraftServer implements Server {
return result; return result;
} }

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add ignore discounts API
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java 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 f7b8804394ad55e3f6c7c8c3a8f0fe7894385c90..089fb4640cb4e74d7cc90088a8772743d5cbe0c4 100644 index 39fc94b1e1555fd6706391223dd2783139b16016..1d2b7950e3c498945a2ff85fda0e3bb30acd22cb 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -489,6 +489,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -489,6 +489,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@ -25,11 +25,11 @@ index f7b8804394ad55e3f6c7c8c3a8f0fe7894385c90..089fb4640cb4e74d7cc90088a8772743
int k = (int) Math.floor(d0 * (double) merchantrecipe1.getBaseCostA().getCount()); int k = (int) Math.floor(d0 * (double) merchantrecipe1.getBaseCostA().getCount());
diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
index f3cf16ce1e1d6c8f76ca5823f532925253ae64aa..c9cb0717c2793acd5b5870a6cc4d672d69a40026 100644 index 8b46e494ecd0cce5ab0b2bf8e50cf50dc7e2a7e5..8a9a701baabdaf066cd9b28c05430f673fcafb4e 100644
--- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java --- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
+++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java +++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
@@ -19,6 +19,7 @@ public class MerchantOffer { @@ -19,6 +19,7 @@ public class MerchantOffer {
public int demand; // PAIL private -> public public int demand;
public float priceMultiplier; public float priceMultiplier;
public int xp; public int xp;
+ public boolean ignoreDiscounts; // Paper + public boolean ignoreDiscounts; // Paper

Datei anzeigen

@ -24,10 +24,10 @@ index 34754f8d3cc03a93d148d026780eacc7dc0a20e0..6d89bc4804dc0b23ab86b93a6ad030e1
private void keepLoadedRange() { private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index b1a0654ba01c265385db877d528c1aa2103b2eb0..f59de70c4854b10ac39874838db33cdf784a45a1 100644 index 2eb6e548889cd05c9bd6fe5947ea5bce3b43eaaa..9c5224bd63c63728e86555769702da2f9d0dbbce 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -216,7 +216,7 @@ public class EndDragonFight { @@ -217,7 +217,7 @@ public class EndDragonFight {
this.dragonUUID = enderDragon.getUUID(); this.dragonUUID = enderDragon.getUUID();
LOGGER.info("Found that there's a dragon still alive ({})", (Object)enderDragon); LOGGER.info("Found that there's a dragon still alive ({})", (Object)enderDragon);
this.dragonKilled = false; this.dragonKilled = false;

Datei anzeigen

@ -15,7 +15,7 @@ manually reload the advancement data for all players, which
normally takes place as a part of the datapack reloading. normally takes place as a part of the datapack reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index b2ead915b12830c68a21ae994f0c8b728431013f..5540c5a881a9d34a8c50d6b6f0694303c76aa610 100644 index ab417ed4be57613c73fa26a42cecd548c51a1f8e..dd22329e6ebdaf319039b736f019be9bf7543ef9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -340,7 +340,13 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -340,7 +340,13 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -17,25 +17,26 @@ This lets us get faster foreach iteration, as well as avoids map lookups on
the values when needed. the values when needed.
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
index 118cc040f156b96a2b6357ad8817808823595629..3dc896a7ded8d5d109100a393c8299e308954d99 100644 index 300c812d513e0b948a7e79c0ed241f514c7a09fc..d23481453717f715124156b5d83f6448f720d049 100644
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java --- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
@@ -35,27 +35,31 @@ public class PathFinder { @@ -38,9 +38,12 @@ public class PathFinder {
this.openSet.clear(); if (node == null) {
this.nodeEvaluator.prepare(world, mob); return null;
Node node = this.nodeEvaluator.getStart(); } else {
- Map<Target, BlockPos> map = positions.stream().collect(Collectors.toMap((pos) -> { - Map<Target, BlockPos> map = positions.stream().collect(Collectors.toMap((pos) -> {
- return this.nodeEvaluator.getGoal((double)pos.getX(), (double)pos.getY(), (double)pos.getZ()); - return this.nodeEvaluator.getGoal((double)pos.getX(), (double)pos.getY(), (double)pos.getZ());
- }, Function.identity())); - }, Function.identity()));
+ // Paper start - remove streams - and optimize collection + // Paper start - remove streams - and optimize collection
+ List<Map.Entry<Target, BlockPos>> map = Lists.newArrayList(); + List<Map.Entry<Target, BlockPos>> map = Lists.newArrayList();
+ for (BlockPos blockPos : positions) { + for (BlockPos pos : positions) {
+ map.add(new java.util.AbstractMap.SimpleEntry<>(this.nodeEvaluator.getGoal(blockPos.getX(), blockPos.getY(), blockPos.getZ()), blockPos)); + map.add(new java.util.AbstractMap.SimpleEntry<>(this.nodeEvaluator.getGoal(pos.getX(), pos.getY(), pos.getZ()), pos));
+ } + }
+ // Paper end + // Paper end
Path path = this.findPath(world.getProfiler(), node, map, followRange, distance, rangeMultiplier); Path path = this.findPath(world.getProfiler(), node, map, followRange, distance, rangeMultiplier);
this.nodeEvaluator.done(); this.nodeEvaluator.done();
return path; return path;
@@ -48,18 +51,19 @@ public class PathFinder {
} }
@Nullable @Nullable
@ -45,7 +46,7 @@ index 118cc040f156b96a2b6357ad8817808823595629..3dc896a7ded8d5d109100a393c8299e3
profiler.push("find_path"); profiler.push("find_path");
profiler.markForCharting(MetricCategory.PATH_FINDING); profiler.markForCharting(MetricCategory.PATH_FINDING);
- Set<Target> set = positions.keySet(); - Set<Target> set = positions.keySet();
+ //Set<Target> set = positions.keySet(); + // Set<Target> set = positions.keySet();
startNode.g = 0.0F; startNode.g = 0.0F;
- startNode.h = this.getBestH(startNode, set); - startNode.h = this.getBestH(startNode, set);
+ startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection + startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection
@ -53,14 +54,14 @@ index 118cc040f156b96a2b6357ad8817808823595629..3dc896a7ded8d5d109100a393c8299e3
this.openSet.clear(); this.openSet.clear();
this.openSet.insert(startNode); this.openSet.insert(startNode);
- Set<Node> set2 = ImmutableSet.of(); - Set<Node> set2 = ImmutableSet.of();
+ //Set<Node> set2 = ImmutableSet.of(); // Paper - unused - diff on change + // Set<Node> set2 = ImmutableSet.of(); // Paper - unused - diff on change
int i = 0; int i = 0;
- Set<Target> set3 = Sets.newHashSetWithExpectedSize(set.size()); - Set<Target> set3 = Sets.newHashSetWithExpectedSize(set.size());
+ List<Map.Entry<Target, BlockPos>> entryList = Lists.newArrayListWithExpectedSize(positions.size()); // Paper - optimize collection + List<Map.Entry<Target, BlockPos>> entryList = Lists.newArrayListWithExpectedSize(positions.size()); // Paper - optimize collection
int j = (int)((float)this.maxVisitedNodes * rangeMultiplier); int j = (int)((float)this.maxVisitedNodes * rangeMultiplier);
while(!this.openSet.isEmpty()) { while(!this.openSet.isEmpty()) {
@@ -67,14 +71,18 @@ public class PathFinder { @@ -71,14 +75,18 @@ public class PathFinder {
Node node = this.openSet.pop(); Node node = this.openSet.pop();
node.closed = true; node.closed = true;
@ -82,7 +83,7 @@ index 118cc040f156b96a2b6357ad8817808823595629..3dc896a7ded8d5d109100a393c8299e3
break; break;
} }
@@ -89,7 +97,7 @@ public class PathFinder { @@ -93,7 +101,7 @@ public class PathFinder {
if (node2.walkedDistance < followRange && (!node2.inOpenSet() || g < node2.g)) { if (node2.walkedDistance < followRange && (!node2.inOpenSet() || g < node2.g)) {
node2.cameFrom = node; node2.cameFrom = node;
node2.g = g; node2.g = g;
@ -91,12 +92,12 @@ index 118cc040f156b96a2b6357ad8817808823595629..3dc896a7ded8d5d109100a393c8299e3
if (node2.inOpenSet()) { if (node2.inOpenSet()) {
this.openSet.changeCost(node2, node2.g + node2.h); this.openSet.changeCost(node2, node2.g + node2.h);
} else { } else {
@@ -101,19 +109,27 @@ public class PathFinder { @@ -105,23 +113,31 @@ public class PathFinder {
} }
} }
- Optional<Path> optional = !set3.isEmpty() ? set3.stream().map((target) -> { - Optional<Path> optional = !set3.isEmpty() ? set3.stream().map((node) -> {
- return this.reconstructPath(target.getBestNode(), positions.get(target), true); - return this.reconstructPath(node.getBestNode(), positions.get(node), true);
- }).min(Comparator.comparingInt(Path::getNodeCount)) : set.stream().map((target) -> { - }).min(Comparator.comparingInt(Path::getNodeCount)) : set.stream().map((target) -> {
- return this.reconstructPath(target.getBestNode(), positions.get(target), false); - return this.reconstructPath(target.getBestNode(), positions.get(target), false);
- }).min(Comparator.comparingDouble(Path::getDistToTarget).thenComparingInt(Path::getNodeCount)); - }).min(Comparator.comparingDouble(Path::getDistToTarget).thenComparingInt(Path::getNodeCount));
@ -116,6 +117,10 @@ index 118cc040f156b96a2b6357ad8817808823595629..3dc896a7ded8d5d109100a393c8299e3
+ // Paper end + // Paper end
} }
protected float distance(Node a, Node b) {
return a.distanceTo(b);
}
- private float getBestH(Node node, Set<Target> targets) { - private float getBestH(Node node, Set<Target> targets) {
+ private float getBestH(Node node, List<Map.Entry<Target, BlockPos>> targets) { // Paper - optimize collection - Set<Target> -> List<Map.Entry<Target, BlockPos>> + private float getBestH(Node node, List<Map.Entry<Target, BlockPos>> targets) { // Paper - optimize collection - Set<Target> -> List<Map.Entry<Target, BlockPos>>
float f = Float.MAX_VALUE; float f = Float.MAX_VALUE;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Beacon API - custom effect ranges
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index 4b7da0df927f669845c7d4c9b4a0acfab8efe657..82976b3675f581a9f3ccb9e23048bd44864203f8 100644 index 349b89dd4d34b92d1077ddadb30c36642fd85622..812d21393ed2ed0623b7445585f1b0b3dcefb55d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -77,6 +77,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { @@ -76,6 +76,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null; return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null;
} }
// CraftBukkit end // CraftBukkit end
@ -35,7 +35,7 @@ index 4b7da0df927f669845c7d4c9b4a0acfab8efe657..82976b3675f581a9f3ccb9e23048bd44
public BeaconBlockEntity(BlockPos pos, BlockState state) { public BeaconBlockEntity(BlockPos pos, BlockState state) {
super(BlockEntityType.BEACON, pos, state); super(BlockEntityType.BEACON, pos, state);
@@ -180,7 +200,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { @@ -186,7 +206,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
} }
if (blockEntity.levels > 0 && !blockEntity.beamSections.isEmpty()) { if (blockEntity.levels > 0 && !blockEntity.beamSections.isEmpty()) {
@ -44,7 +44,7 @@ index 4b7da0df927f669845c7d4c9b4a0acfab8efe657..82976b3675f581a9f3ccb9e23048bd44
BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT); BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT);
} }
} }
@@ -266,8 +286,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { @@ -272,8 +292,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
} }
public static List getHumansInRange(Level world, BlockPos blockposition, int i) { public static List getHumansInRange(Level world, BlockPos blockposition, int i) {
@ -59,7 +59,7 @@ index 4b7da0df927f669845c7d4c9b4a0acfab8efe657..82976b3675f581a9f3ccb9e23048bd44
AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D); AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D);
List<Player> list = world.getEntitiesOfClass(Player.class, axisalignedbb); List<Player> list = world.getEntitiesOfClass(Player.class, axisalignedbb);
@@ -308,12 +333,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { @@ -314,12 +339,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
} }
private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect) { private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect) {
@ -78,7 +78,7 @@ index 4b7da0df927f669845c7d4c9b4a0acfab8efe657..82976b3675f581a9f3ccb9e23048bd44
BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0, true, pos); // Paper - BeaconEffectEvent BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0, true, pos); // Paper - BeaconEffectEvent
@@ -363,6 +393,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { @@ -369,6 +399,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
} }
this.lockKey = LockCode.fromTag(nbt); this.lockKey = LockCode.fromTag(nbt);
@ -86,7 +86,7 @@ index 4b7da0df927f669845c7d4c9b4a0acfab8efe657..82976b3675f581a9f3ccb9e23048bd44
} }
@Override @Override
@@ -376,6 +407,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { @@ -382,6 +413,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
} }
this.lockKey.addToTag(nbt); this.lockKey.addToTag(nbt);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add API for quit reason
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 1c63947958d202d00593e2b76d113c8b327706d7..932b494ea2a5e849b233c73bd2472d5c85f5ba52 100644 index 2ea1895be13eef99a87a7d1b0348699f46f281fc..4798ac3a9c7a7d34eaca5cb50b013b071793ed94 100644
--- a/src/main/java/net/minecraft/network/Connection.java --- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java
@@ -152,12 +152,15 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> { @@ -152,12 +152,15 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@ -16,31 +16,31 @@ index 1c63947958d202d00593e2b76d113c8b327706d7..932b494ea2a5e849b233c73bd2472d5c
if (throwable instanceof TimeoutException) { if (throwable instanceof TimeoutException) {
Connection.LOGGER.debug("Timeout", throwable); Connection.LOGGER.debug("Timeout", throwable);
+ if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.TIMED_OUT; // Paper + if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.TIMED_OUT; // Paper
this.disconnect(new TranslatableComponent("disconnect.timeout")); this.disconnect(Component.translatable("disconnect.timeout"));
} else { } else {
TranslatableComponent chatmessage = new TranslatableComponent("disconnect.genericReason", new Object[]{"Internal Exception: " + throwable}); MutableComponent ichatmutablecomponent = Component.translatable("disconnect.genericReason", "Internal Exception: " + throwable);
+ if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.ERRONEOUS_STATE; // Paper + if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.ERRONEOUS_STATE; // Paper
if (flag) { if (flag) {
Connection.LOGGER.debug("Failed to sent packet", throwable); Connection.LOGGER.debug("Failed to sent packet", throwable);
ConnectionProtocol enumprotocol = this.getCurrentProtocol(); ConnectionProtocol enumprotocol = this.getCurrentProtocol();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c363b5f48253cd77c6b986b85f068a38df5319b8..8003ede966f760d660575c56d6f949dda900cf21 100644 index 8ffec264b8656f56a8370ea84b495a576b5007bb..50af351200d5bc4ce292e4fd123e0b0cb5adb334 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -257,6 +257,7 @@ public class ServerPlayer extends Player { @@ -264,6 +264,7 @@ public class ServerPlayer extends Player {
public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
+ public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event + public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile, publicKey);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1d5edba8fa2da4c8c8075bd7c165062970353830..c1a21932f54b86a9824bf510d9a2a07aa058457b 100644 index be836a29d9d37902813ecff255b09234a3ffc77f..4b144b1b17ea6f498eeeaa8cd4795fa5ce2c4e0f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -442,6 +442,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -468,6 +468,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
// CraftBukkit end // CraftBukkit end
@ -49,7 +49,7 @@ index 1d5edba8fa2da4c8c8075bd7c165062970353830..c1a21932f54b86a9824bf510d9a2a07a
this.connection.disconnect(ichatbasecomponent); this.connection.disconnect(ichatbasecomponent);
}); });
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f9ef6e64b95f90d69a897dd996a587749776350d..8443938a2aa6e6fdbba1f9bcf4e5c5afd883140e 100644 index 2f3edb1383dd88514cddc271850b7f0a7f6c9230..797249116d8fd1aeef914eb9f54b19945f13d20f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -600,7 +600,7 @@ public abstract class PlayerList { @@ -600,7 +600,7 @@ public abstract class PlayerList {

Datei anzeigen

@ -35,7 +35,7 @@ index 6d89bc4804dc0b23ab86b93a6ad030e1e633d61c..9147b408b35b7d15ced3749e34706087
private void keepLoadedRange() { private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
index 7215501f554f88c49fa35a063743caa8af46369c..0eddd793fa590a68bd094d417ffb90941532522c 100644 index 0130c5e7e1b42024f88c6d7dadd246b7744d7f91..32bf83d659292b1f067e50eeab101f8d0fe611d9 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
@@ -43,43 +43,53 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -43,43 +43,53 @@ public class WanderingTraderSpawner implements CustomSpawner {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Expose world spawn angle
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 8443938a2aa6e6fdbba1f9bcf4e5c5afd883140e..8d5154cad319d7762db696cd9cd2bf8ab69f632e 100644 index 797249116d8fd1aeef914eb9f54b19945f13d20f..bec5dbb3b103403e76cd42b942b352c453574ce1 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -878,7 +878,7 @@ public abstract class PlayerList { @@ -878,7 +878,7 @@ public abstract class PlayerList {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 52e5b8561dd07078933beccfb95c5fdaca2e6126..a55dc36244c7a60300c988504d214eef546dfa36 100644 index 9cee24c3f4b36296b87467278f2af2e45266a15a..b8cc0116f5ffaa5c9c6fd2a8661c88a7e7f70370 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2257,7 +2257,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2255,7 +2255,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null && !particle.getDataType().isInstance(data)) { if (data != null && !particle.getDataType().isInstance(data)) {
throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass()); throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass());
} }

Datei anzeigen

@ -21,10 +21,10 @@ index 9147b408b35b7d15ced3749e34706087d2cdffd8..340e610b6af2dab7d916c530d3cce9aa
private void keepLoadedRange() { private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index f8876446fe73681d0a4ed72759ae4080f85c572a..78dbc89bb247b2765bd2d7d81013d18dfe35539f 100644 index 367f5d5a6310a2feb1b28b15d130c0f61106f57b..202eca5204ab5eea2d63a1900046e3e15d45f97f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1748,6 +1748,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -1796,6 +1796,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} }
public boolean isPushable() { public boolean isPushable() {
@ -61,10 +61,10 @@ index 22f36cd3df49160f1b6668befdd05c2268edaa49..e39965c2e50bc8ee424ea07819346e06
} else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) { } else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
return false; return false;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 795b24ff5357a52624abc994bcfcc772ca7f5e7b..f47b278ab6c4d88fabb9b6ff6f2a42c1e45f70a8 100644 index ddfa929499aa65d40d44d70a8dc6f2656f0242d4..015e428daf0665af640cef788cfa029e8a198907 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3300,7 +3300,7 @@ public abstract class LivingEntity extends Entity { @@ -3332,7 +3332,7 @@ public abstract class LivingEntity extends Entity {
return; return;
} }
// Paper end - don't run getEntities if we're not going to use its result // Paper end - don't run getEntities if we're not going to use its result
@ -73,7 +73,7 @@ index 795b24ff5357a52624abc994bcfcc772ca7f5e7b..f47b278ab6c4d88fabb9b6ff6f2a42c1
if (!list.isEmpty()) { if (!list.isEmpty()) {
// Paper - move up // Paper - move up
@@ -3463,9 +3463,16 @@ public abstract class LivingEntity extends Entity { @@ -3495,9 +3495,16 @@ public abstract class LivingEntity extends Entity {
return !this.isRemoved() && this.collides; // CraftBukkit return !this.isRemoved() && this.collides; // CraftBukkit
} }
@ -92,7 +92,7 @@ index 795b24ff5357a52624abc994bcfcc772ca7f5e7b..f47b278ab6c4d88fabb9b6ff6f2a42c1
// CraftBukkit start - collidable API // CraftBukkit start - collidable API
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
index f37f9118ff3305d688f55ba978b6fd5f3a428fc7..ed617223942b410fb6f799be7db2001909db67ed 100644 index e9f6e31cd557410a4ad4ced7086c4a846f13a4f6..50d4595b81f24949011c7565c5e3fc8c26c86019 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java --- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
@@ -82,7 +82,7 @@ public class Bat extends AmbientCreature { @@ -82,7 +82,7 @@ public class Bat extends AmbientCreature {
@ -105,10 +105,10 @@ index f37f9118ff3305d688f55ba978b6fd5f3a428fc7..ed617223942b410fb6f799be7db20019
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
index 5f690ffab2a8305ee1229e552ba9d282fcb479a2..eb66cfebce7e8bb9ebce066e5aabff256a8a518d 100644 index 90b98b823855037ce6efab1f478d875f225f65ed..a2977596c672a5a435f56bb20fbfb7b59882dda6 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java --- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
@@ -381,8 +381,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { @@ -382,8 +382,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
} }
@Override @Override
@ -120,10 +120,10 @@ index 5f690ffab2a8305ee1229e552ba9d282fcb479a2..eb66cfebce7e8bb9ebce066e5aabff25
@Override @Override
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
index e63f55df91d301b18c63ba94dc19966155916b65..cd278a859c87fc89c421378ffab1bd36a45bd65d 100644 index 119ee27ceb873c67d1d0904da903401e216eb450..04a119e6641898454253e2478bc1b4dff181b5ee 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
@@ -241,7 +241,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, @@ -243,7 +243,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
} }
@Override @Override
@ -133,10 +133,10 @@ index e63f55df91d301b18c63ba94dc19966155916b65..cd278a859c87fc89c421378ffab1bd36
} }
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 0d468631b9c260091e732925da43c177ebda892f..e5ef24d92de21c4c0e6a98e06985e52d47bfdce0 100644 index b8c0a1b5703460d4c4d8923e18b56ab937b8226c..593f210e5bf842d38955205757c162c2fdede511 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -344,7 +344,7 @@ public class ArmorStand extends LivingEntity { @@ -342,7 +342,7 @@ public class ArmorStand extends LivingEntity {
} }
@Override @Override
@ -146,7 +146,7 @@ index 0d468631b9c260091e732925da43c177ebda892f..e5ef24d92de21c4c0e6a98e06985e52d
} }
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
index 46ceed03caed9015acfcc45a5afc0d0c9521c9df..110006087af3f87457031dad7756235363af0506 100644 index 7d60f56b2e8206e8e546abdd06ea74a2ead6e75d..4984b2b3294e425247b595bcf36812728fb4cd16 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -147,7 +147,7 @@ public abstract class AbstractMinecart extends Entity { @@ -147,7 +147,7 @@ public abstract class AbstractMinecart extends Entity {
@ -159,7 +159,7 @@ index 46ceed03caed9015acfcc45a5afc0d0c9521c9df..110006087af3f87457031dad77562353
} }
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
index a7f248394d11f0e4a9d5056ffb6fc66cac53cd02..c75e45bcb8cd6da154c7ca1719711622c009f463 100644 index 94ae97c7297641ba05402337d1cff28995055b08..904ef44f6bb25a617c6e80d025fa0780a3bd63ec 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
@@ -157,7 +157,7 @@ public class Boat extends Entity { @@ -157,7 +157,7 @@ public class Boat extends Entity {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerShearBlockEvent
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
index e5a544dee741bf0df9b4be8b7cef6fe74938f6a2..e9974415e8f016f50a93a5eea117afe25a6b735d 100644 index 8dff119fa83e44d71b10bb3ea6e5f4e886a48c9c..1aaab26c59bb9255955aff34ea1d057b88152768 100644
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
@@ -113,7 +113,7 @@ public class BeehiveBlock extends BaseEntityBlock { @@ -113,7 +113,7 @@ public class BeehiveBlock extends BaseEntityBlock {

Datei anzeigen

@ -24,10 +24,10 @@ index 340e610b6af2dab7d916c530d3cce9aac003aa4d..d6cbd9ea2eb70e25a5e37e0bdda2396a
private void keepLoadedRange() { private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java 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 089fb4640cb4e74d7cc90088a8772743d5cbe0c4..268524e256a034520438d5c825e5e419d72d29ce 100644 index 1d2b7950e3c498945a2ff85fda0e3bb30acd22cb..98debcec829ddaa9d37b7e9cc1f42dfd9123393c 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -1066,6 +1066,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -976,6 +976,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override @Override
public void onReputationEventFrom(ReputationEventType interaction, Entity entity) { public void onReputationEventFrom(ReputationEventType interaction, Entity entity) {
if (interaction == ReputationEventType.ZOMBIE_VILLAGER_CURED) { if (interaction == ReputationEventType.ZOMBIE_VILLAGER_CURED) {

Datei anzeigen

@ -23,10 +23,10 @@ index 4bd335699f5f53b8303a86758a9dedae75bf8464..ccc60a5465efa2b71fc2593d75af62c0
public static boolean velocityOnlineMode; public static boolean velocityOnlineMode;
public static byte[] velocitySecretKey; public static byte[] velocitySecretKey;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c1a21932f54b86a9824bf510d9a2a07aa058457b..2a5eb98c6e0f54f098c24ec09c68c3a4dda21aa8 100644 index 4b144b1b17ea6f498eeeaa8cd4795fa5ce2c4e0f..ac3219f3a26f9f7fab57de0f9277695423ef46d7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -230,6 +230,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -247,6 +247,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
// CraftBukkit start - multithreaded fields // CraftBukkit start - multithreaded fields
private final AtomicInteger chatSpamTickCount = new AtomicInteger(); private final AtomicInteger chatSpamTickCount = new AtomicInteger();
private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits
@ -34,7 +34,7 @@ index c1a21932f54b86a9824bf510d9a2a07aa058457b..2a5eb98c6e0f54f098c24ec09c68c3a4
// CraftBukkit end // CraftBukkit end
private int dropSpamTickCount; private int dropSpamTickCount;
private double firstGoodX; private double firstGoodX;
@@ -374,6 +375,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -399,6 +400,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
// CraftBukkit start // CraftBukkit start
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable
@ -42,7 +42,7 @@ index c1a21932f54b86a9824bf510d9a2a07aa058457b..2a5eb98c6e0f54f098c24ec09c68c3a4
/* Use thread-safe field access instead /* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) { if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount; --this.chatSpamTickCount;
@@ -2847,6 +2849,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -3018,6 +3020,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@Override @Override
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player Chunk Load/Unload Events
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8003ede966f760d660575c56d6f949dda900cf21..8d9cfbc171c51830f5005c6604333c7ff54298d7 100644 index 50af351200d5bc4ce292e4fd123e0b0cb5adb334..0e712658dee832db147a73c24658a8c9116b79cc 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2113,11 +2113,21 @@ public class ServerPlayer extends Player { @@ -2139,11 +2139,21 @@ public class ServerPlayer extends Player {
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) { public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
this.connection.send(chunkDataPacket); this.connection.send(chunkDataPacket);