Dieser Commit ist enthalten in:
Jake Potrebic 2024-06-13 13:14:13 -07:00
Ursprung ec05cb8b38
Commit 0bc9aeef26
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: ECE0B3C133C016C5
122 geänderte Dateien mit 402 neuen und 448 gelöschten Zeilen

Datei anzeigen

@ -7022,7 +7022,7 @@ index aede9b65e799a1f123f71f9390fb05acddda676b..2510589400b3012b827efcab477c6483
@Override
public void tell(R runnable) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 687c0683ee5b3366d936a178fb4bf9faffc2a556..6041033b3ea201bde1a73ce4e429e8b80e05e2eb 100644
index 586acbb52b0fcb09cda195b49b6c737a29a4e35e..b0843917caedc32f800c50cc54706ace9523f64f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -339,6 +339,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -1301,7 +1301,7 @@ index 9807c5b2b248a62a476bfe3ae023d57d35811049..62174dae20bd9ff092238f1437f7e2b0
public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6041033b3ea201bde1a73ce4e429e8b80e05e2eb..4f321f13352636999c3abc5332e50c747fb45cc9 100644
index b0843917caedc32f800c50cc54706ace9523f64f..63f45a77c8511e05954030cf117c5e4cda0a518f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -140,7 +140,6 @@ import org.bukkit.command.CommandSender;

Datei anzeigen

@ -25,7 +25,7 @@ index 9675d91e4e7ed46147c3f7a11dd65122fe998dc2..711318ddc706e72dbd8cea1c541058c8
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4f321f13352636999c3abc5332e50c747fb45cc9..c355e8d71b4941b2ad43740763209927a3279336 100644
index 63f45a77c8511e05954030cf117c5e4cda0a518f..dbe5239b1a1769ef9f2ef66c32b1a68cd684428e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -328,7 +328,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Configurable top of nether void damage
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index c355e8d71b4941b2ad43740763209927a3279336..fafccc1c98cbc630dc71db623184a62f08618b03 100644
index dbe5239b1a1769ef9f2ef66c32b1a68cd684428e..d5f5864b7c1ad4c30f37b360b317b63c129e3a3f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -706,7 +706,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -11,7 +11,7 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index fafccc1c98cbc630dc71db623184a62f08618b03..b5c03b3495f5eb5ac6b054d4ca986a6a597c713c 100644
index d5f5864b7c1ad4c30f37b360b317b63c129e3a3f..82e57978b79b5275b98a1fa7731c6a23ee861a2f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2934,6 +2934,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -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 b5c03b3495f5eb5ac6b054d4ca986a6a597c713c..ea25e9ab6c1d54e834a05951d2369d6e2e3a3fb3 100644
index 82e57978b79b5275b98a1fa7731c6a23ee861a2f..bd17157631a74f80e3b5ce50bb1f681abe1dd6a7 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -175,6 +175,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -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 ea25e9ab6c1d54e834a05951d2369d6e2e3a3fb3..78cb145f72efaaf535b6f933b3ca990a3f909608 100644
index bd17157631a74f80e3b5ce50bb1f681abe1dd6a7..46a21ed2408a42aafd16647e17e556730e799cbd 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -401,6 +401,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -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 78cb145f72efaaf535b6f933b3ca990a3f909608..439e8b4f52ba88456fb8ae5ab960d715f5c0d131 100644
index 46a21ed2408a42aafd16647e17e556730e799cbd..946f289e0e681524c6fde696921965dbdedda372 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -402,6 +402,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityTeleportEndGatewayEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 439e8b4f52ba88456fb8ae5ab960d715f5c0d131..d790aec175e61bd9dd9c14cbbbd4c3c354bf867a 100644
index 946f289e0e681524c6fde696921965dbdedda372..d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3301,8 +3301,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -11,7 +11,7 @@ Co-authored-by: aerulion <aerulion@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d790aec175e61bd9dd9c14cbbbd4c3c354bf867a..35edebe672c72849e9f8a9a38f86354f2e987271 100644
index d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4..5e7cf17779685355011bb0f684c110807a7736c7 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1962,6 +1962,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 35edebe672c72849e9f8a9a38f86354f2e987271..0355f2d1deb9fcb85efa015249d5ba81c0f27302 100644
index 5e7cf17779685355011bb0f684c110807a7736c7..4ba77d4b109bc33d47130519c1fac704434d393d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3280,7 +3280,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -43,7 +43,7 @@ index ce6be7aed7b392c3e0c851f3f6e1e216bccceaf5..b151506b96a51c74ba408cb555a4d385
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0355f2d1deb9fcb85efa015249d5ba81c0f27302..8368342ea699851f3f2926414a49b9dd3d8be327 100644
index 4ba77d4b109bc33d47130519c1fac704434d393d..3830440b913bd2693f2922483e57419c76117315 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -250,6 +250,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -41,7 +41,7 @@ index 8de0b92285fe2413a4e2fb52fc7bc7a13dad5e90..fcbb0b64feb8d5624de3805d4db6d489
Iterator iterator = entityliving.getActiveEffects().iterator();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8368342ea699851f3f2926414a49b9dd3d8be327..ab69b0a0c85009e8857aff85a46b1aab9cec14af 100644
index 3830440b913bd2693f2922483e57419c76117315..5b3de422b07f680e6639ee84f076bffb3c901d0e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2706,17 +2706,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

Datei anzeigen

@ -22,7 +22,7 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 04a9c48b9a9895ffe6ec0721bdfafb1b524bf386..e728b9f317d12c3c452db70ba7d1e930c84e345d 100644
index 26228dbf1830134c185e884b22487e3e40ccf3aa..528c902b5434875b111812ff3a8099f945404d3c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -33,7 +33,7 @@ index 04a9c48b9a9895ffe6ec0721bdfafb1b524bf386..e728b9f317d12c3c452db70ba7d1e930
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
super(server, connection, clientData, player); // CraftBukkit
@@ -3134,7 +3135,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -3151,7 +3152,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f472d6eb337de1274424dabe39d4e8a094710165..f91e145a748dc524e1e95ee3afe00aa74a1aee9a 100644
index 92e81514ce85f32303506d6ffc501946c0320c83..f82728bece2723a8f676ebc5b09885c7833174e4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1157,6 +1157,7 @@ public abstract class PlayerList {
@@ -1126,6 +1126,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {

Datei anzeigen

@ -22,10 +22,10 @@ index bf72cf288ade52ee8cc41ca978f368b3ad575951..798999be50d26be357ef3c6d5b9383ce
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 42dd9ab70c07e92258da70ad29b51c7780401a5d..2b524c41daa4fe1605a40c151a90de101d96e8af 100644
index b151506b96a51c74ba408cb555a4d38507b2f8c1..bbcee9d8dbf17085b11bb5e38eb37271c51219ba 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1209,6 +1209,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1207,6 +1207,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
return true;
}
// Paper end - extra debug info
@ -34,7 +34,7 @@ index 42dd9ab70c07e92258da70ad29b51c7780401a5d..2b524c41daa4fe1605a40c151a90de10
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f91e145a748dc524e1e95ee3afe00aa74a1aee9a..e3ce13685499e2adea5b776ec4abbdd978b6af58 100644
index f82728bece2723a8f676ebc5b09885c7833174e4..f9794c0eaced71d242cb04b0815bad322ed7165d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -223,6 +223,11 @@ public abstract class PlayerList {
@ -49,7 +49,7 @@ index f91e145a748dc524e1e95ee3afe00aa74a1aee9a..e3ce13685499e2adea5b776ec4abbdd9
player.setServerLevel(worldserver1);
String s1 = connection.getLoggableAddress(this.server.logIPs());
@@ -355,7 +360,7 @@ public abstract class PlayerList {
@@ -348,7 +353,7 @@ public abstract class PlayerList {
CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle");
ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error
Entity entity = EntityType.loadEntityRecursive(nbttagcompound.getCompound("Entity"), worldserver1, (entity1) -> {
@ -59,10 +59,10 @@ index f91e145a748dc524e1e95ee3afe00aa74a1aee9a..e3ce13685499e2adea5b776ec4abbdd9
if (entity != null) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ea8abc813809360b51cd67072d12efa03f4b4f20..7544a013111a830618371b9b929c950d8f791bd8 100644
index 5b3de422b07f680e6639ee84f076bffb3c901d0e..631f2d70b5fd6dabc06062e3c77802d2b61398ae 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -241,6 +241,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -247,6 +247,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
// Paper end - Share random for entities to make them more random
@ -70,7 +70,7 @@ index ea8abc813809360b51cd67072d12efa03f4b4f20..7544a013111a830618371b9b929c950d
private CraftEntity bukkitEntity;
@@ -2205,6 +2206,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2276,6 +2277,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -80,7 +80,7 @@ index ea8abc813809360b51cd67072d12efa03f4b4f20..7544a013111a830618371b9b929c950d
// Save entity's from mob spawner status
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
@@ -2351,6 +2355,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2422,6 +2426,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@ -120,10 +120,10 @@ index ee897b8c9462dbb3d7be9a2994753155065ce205..1d0964a7f544735a0213d5c7832c71f5
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
index 570957f00ad4817d5631c72060e85f85af634619..baa876db3a58a3c756a72ef1ad081964b358f58e 100644
index dbc0b69603dcffbf3d41d79719aa0f2b7da4a131..dd86f5ec5b2051aeea4e19ff97146362b1e8d019 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
@@ -183,7 +183,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
@@ -189,7 +189,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
private boolean trySummonWarden(ServerLevel world) {
return this.warningLevel >= 4
@ -133,10 +133,10 @@ index 570957f00ad4817d5631c72060e85f85af634619..baa876db3a58a3c756a72ef1ad081964
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 621970006f21d219784dc58d7aa8d6062c4620f1..571b8352de4070622cdc47a50643beada0b16c36 100644
index bddf98bdf60473eb1d2e533cf533ed7eee797aaa..ce70c8fddbe63d0af2b1f988ce9a2b40c5d48066 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1001,4 +1001,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1018,4 +1018,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.getHandle().spawnedViaMobSpawner;
}
// Paper end - Entity#fromMobSpawner

Datei anzeigen

@ -0,0 +1,55 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MisterVector <whizkid3000@hotmail.com>
Date: Fri, 26 Oct 2018 21:31:00 -0700
Subject: [PATCH] Add PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f9794c0eaced71d242cb04b0815bad322ed7165d..7fa13f1fe02a1bdfa93c76e9c2eefc81c9bded50 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -738,6 +738,10 @@ public abstract class PlayerList {
entityplayer1.addTag(s);
}
+ // Paper start - Add PlayerPostRespawnEvent
+ boolean isBedSpawn = false;
+ boolean isRespawn = false;
+ // Paper end - Add PlayerPostRespawnEvent
// CraftBukkit start - fire PlayerRespawnEvent
DimensionTransition dimensiontransition;
@@ -745,6 +749,7 @@ public abstract class PlayerList {
dimensiontransition = entityplayer.findRespawnPositionAndUseSpawnBlock(flag, DimensionTransition.DO_NOTHING, reason);
if (!flag) entityplayer.reset(); // SPIGOT-4785
+ isRespawn = true; // Paper - Add PlayerPostRespawnEvent
} else {
dimensiontransition = new DimensionTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3.ZERO, location.getYaw(), location.getPitch(), DimensionTransition.DO_NOTHING);
}
@@ -795,6 +800,11 @@ public abstract class PlayerList {
if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
entityplayer1.connection.send(new ClientboundSoundPacket(SoundEvents.RESPAWN_ANCHOR_DEPLETE, SoundSource.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F, worldserver.getRandom().nextLong()));
}
+ // Paper start - Add PlayerPostRespawnEvent
+ if (iblockdata.is(net.minecraft.tags.BlockTags.BEDS) && !dimensiontransition.missingRespawnBlock()) {
+ isBedSpawn = true;
+ }
+ // Paper end - Add PlayerPostRespawnEvent
}
// Added from changeDimension
this.sendAllPlayerInfo(entityplayer); // Update health, etc...
@@ -816,6 +826,13 @@ public abstract class PlayerList {
if (entityplayer.connection.isDisconnected()) {
this.save(entityplayer);
}
+
+ // Paper start - Add PlayerPostRespawnEvent
+ if (isRespawn) {
+ cserver.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerPostRespawnEvent(entityplayer.getBukkitEntity(), location, isBedSpawn));
+ }
+ // Paper end - Add PlayerPostRespawnEvent
+
// CraftBukkit end
return entityplayer1;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0
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 d97e12a2dca072ae102b029fb67472dacc2c5b40..f0e6375236d61f32235ed23c3bae49db1545d1a2 100644
index f9dfd6e7b610cfee75524a525ab0e72bed5522da..6dfa43036afeba75a7ecc5a82637f081624d5c69 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -148,6 +148,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -149,6 +149,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
@ -17,7 +17,7 @@ index d97e12a2dca072ae102b029fb67472dacc2c5b40..f0e6375236d61f32235ed23c3bae49db
if (this.age != -32768) this.age += elapsedTicks;
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
@@ -233,6 +234,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -234,6 +235,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8cf548656f7ec76c1663cd16b83d94bf3582d020..3b6517cb569a6c702dabb60e8f98cd5f9c367e5b 100644
index 6494b92c6a6444a66ea0e5f8f2890c47f334c938..12f530044d918ddc1ba4b2376419f9ed72283b98 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1407,6 +1407,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1435,6 +1435,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
// Paper end
@ -17,7 +17,7 @@ index 8cf548656f7ec76c1663cd16b83d94bf3582d020..3b6517cb569a6c702dabb60e8f98cd5f
++this.tickCount;
this.tickRateManager.tick();
@@ -1433,6 +1434,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1461,6 +1462,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.runAllTasks();
}
// Paper end

Datei anzeigen

@ -11,10 +11,10 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
public net.minecraft.world.entity.player.Inventory compartments
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 3354c929142b56a992348ff1a6f262b36d24d3a5..d15fed8770c672b1d387f6cd3b11577ba54ebedb 100644
index dfa3542035924ed53a1fafb032334b0bffbe0282..187cbb9e3c39204f1fb53e85788c954059dc7efc 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -890,6 +890,46 @@ public class ServerPlayer extends Player {
@@ -899,6 +899,46 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
});
}
@ -61,8 +61,8 @@ index 3354c929142b56a992348ff1a6f262b36d24d3a5..d15fed8770c672b1d387f6cd3b11577b
@Override
public void die(DamageSource damageSource) {
// this.gameEvent(GameEvent.ENTITY_DIE); // Paper - move below event cancellation check
@@ -974,7 +1014,12 @@ public class ServerPlayer extends Player {
this.dropExperience();
@@ -983,7 +1023,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.dropExperience(damageSource.getEntity());
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {
- this.getInventory().clearContent();

Datei anzeigen

@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 30ceb1e2765217e284abcb786b2c1f7b60f9c3dc..895c263570acf0f8ac2e8d680a6187bc189a205e 100644
index 8e2acb3c6f815b5b1d3237a2f4e0b5f3683d2c60..5a3a89c568d42a2adbc2b6e2631fd4b70e54f0bf 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -907,9 +907,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -912,9 +912,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Nullable
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add Heightmap API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f3d52650e9dd338396d325c9fb7a46e3927d3b36..77395861f528b0443db84bf882351c7f5ccfd3ba 100644
index eafb186d158c6cf26b97b1982597bde377396172..deb9685b1279e734e4789ba7a2113b0d71ab1cc6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -229,6 +229,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index a0dc17702fb6c8c96f262bc917624a46a40920fa..289a74e35836717bd20c777e9fc8c17722e90411 100644
index e2a07d4e006d90132102a6449d57dd9e9642e6af..adf953994d2c7e8f1e15075722ee2b9213e4bf94 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -366,7 +366,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
This also fixes the adding sound playing when the item frame direction is changed.
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
index d4f498789ae1d93533f058b0ce4981eed1ce8ea2..5a0658932cc45c49c9285b1419d574dd83041732 100644
index 84dcd662981b1eeb03128e7717f6af44c2b9cff6..fdb6898519acfb27baf25d8bbad2013956c1361f 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -313,7 +313,7 @@ public class ItemFrame extends HangingEntity {
@@ -278,7 +278,7 @@ public class ItemFrame extends HangingEntity {
this.onItemChanged(itemstack);
this.getEntityData().set(ItemFrame.DATA_ITEM, itemstack);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eb1b151560ef77cd8208f44880c860626caf8d3b..10b638183a06702ce97159e634b18a9c8b55d049 100644
index 006cc9b7817e0413a332c21839549b127ad67cb4..264b5781a472f706f525cb07d4ccebac17d4a5d3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2902,5 +2902,10 @@ public final class CraftServer implements Server {
@@ -2910,5 +2910,10 @@ public final class CraftServer implements Server {
profile.getGameProfile().getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
return profile;
}

Datei anzeigen

@ -25,12 +25,12 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
server-internal fix makes this change future-proof.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 516999dc425d23c570dabfe4f3c829650a6d205d..40348e45b02be9a0b397a883940a476fb6738ef4 100644
index 30eb86b52f00cfa61af4f93aca50ffc3547c95e8..7863625d49baa13ea87f2ee295b16706071fb960 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -176,7 +176,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
@@ -183,7 +183,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
Vec3 vec3d = shooter.getDeltaMovement();
Vec3 vec3d = shooter.getKnownMovement();
- this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z));
+ if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity) this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity

Datei anzeigen

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Tue, 30 Jul 2019 03:17:16 +0500
Subject: [PATCH] offset item frame ticking
diff --git a/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java b/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
index e4eece7bbd14514ec60da26a8744672baa8956f9..7bc612890f941177da11da0ce047d5a74d8ebb33 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
@@ -26,7 +26,7 @@ import org.bukkit.event.hanging.HangingBreakEvent;
public abstract class BlockAttachedEntity extends Entity {
private static final Logger LOGGER = LogUtils.getLogger();
- private int checkInterval;
+ private int checkInterval; { this.checkInterval = this.getId() % this.level().spigotConfig.hangingTickFrequency; } // Paper - Perf: offset item frame ticking
protected BlockPos pos;
protected BlockAttachedEntity(EntityType<? extends BlockAttachedEntity> type, Level world) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 7a9e6671ac38a3473d5562b0eb1de9eecc95c6c5..73738ef71f2698a6116cd5371f80c26a97c0a77c 100644
index 6bac6b338302ff0e0e93d5b66d2fd3ea0e666114..3a9c823193e939a6bbf6a43cd440d3fae129a252 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3805,9 +3805,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3827,9 +3827,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void startUsingItem(InteractionHand hand) {
@ -22,9 +22,9 @@ index 7a9e6671ac38a3473d5562b0eb1de9eecc95c6c5..73738ef71f2698a6116cd5371f80c26a
- if (!itemstack.isEmpty() && !this.isUsingItem()) {
+ if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper - Prevent consuming the wrong itemstack
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration();
this.useItemRemaining = itemstack.getUseDuration(this);
if (!this.level().isClientSide) {
@@ -3887,6 +3892,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3914,6 +3919,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@ -32,7 +32,7 @@ index 7a9e6671ac38a3473d5562b0eb1de9eecc95c6c5..73738ef71f2698a6116cd5371f80c26a
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -3921,8 +3927,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3948,8 +3954,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();

Datei anzeigen

@ -32,11 +32,11 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f026ce66d 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -906,6 +906,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
index e2b72817857a7a203aae4c9de4e01ba1396dc95b..8fa2dec0e4827421d41a9d14e19cf3ac3579bf1c 100644
--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
+++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
@@ -189,10 +189,51 @@ public class ChunkStatusTasks {
entity.discard(null); // CraftBukkit - add Bukkit remove cause
needsRemoval = true;
}
@ -44,20 +44,20 @@ index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f
return !needsRemoval;
}));
// CraftBukkit end
@@ -948,6 +949,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
});
}
}
}
+
+ // Paper start - duplicate uuid resolving
+ // rets true if to prevent the entity from being added
+ public static boolean checkDupeUUID(ServerLevel level, Entity entity) {
+ public static boolean checkDupeUUID(ServerLevel level, net.minecraft.world.entity.Entity entity) {
+ io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode mode = level.paperConfig().entities.spawning.duplicateUuid.mode;
+ if (mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.WARN
+ && mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.DELETE
+ && mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.SAFE_REGEN) {
+ return false;
+ }
+ Entity other = level.getEntity(entity.getUUID());
+ net.minecraft.world.entity.Entity other = level.getEntity(entity.getUUID());
+
+ if (other == null || other == entity) {
+ return false;
@ -87,7 +87,4 @@ index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f
+ return false;
+ }
+ // Paper end - duplicate uuid resolving
+
public CompletableFuture<ChunkResult<LevelChunk>> prepareTickingChunk(ChunkHolder holder) {
CompletableFuture<ChunkResult<List<ChunkAccess>>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> {
return ChunkStatus.FULL;
}

Datei anzeigen

@ -5,15 +5,15 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d15fed8770c672b1d387f6cd3b11577ba54ebedb..932b68089c55c8f1b84a15272378d4322a0a5a91 100644
index 187cbb9e3c39204f1fb53e85788c954059dc7efc..f77edea8a82ef0b77ebe22ec1ee0fc22f94f67a5 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1011,7 +1011,7 @@ public class ServerPlayer extends Player {
@@ -1020,7 +1020,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.tellNeutralMobsThatIDied();
}
// SPIGOT-5478 must be called manually now
- this.dropExperience();
+ if (event.shouldDropExperience()) this.dropExperience(); // Paper - tie to event
- this.dropExperience(damageSource.getEntity());
+ if (event.shouldDropExperience()) this.dropExperience(damageSource.getEntity()); // Paper - tie to event
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {
// Paper start - PlayerDeathEvent#getItemsToKeep

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
index 8b0d13513656752a0b40e25c5041d41491b9eef0..5ecf8a87a31a0243c281e2a69823f5f79be69ca5 100644
index 048d03c8ef3ef865641b2276477cf84e8d4397a1..58536ee8707c5ad0625cae2f26a58cf03b3f85d7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -499,6 +499,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -510,6 +510,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
} else if (this.isTooFarAway(this.hivePos)) {
return false;
} else {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
Use the PlayerList map instead of iterating over all players
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 2b524c41daa4fe1605a40c151a90de101d96e8af..51644c24900600d95c3f6df073769b68be702b2d 100644
index bbcee9d8dbf17085b11bb5e38eb37271c51219ba..ccb72d13cce7db74a6754498bab41a017a469418 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -329,6 +329,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -330,6 +330,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
// Paper end

Datei anzeigen

@ -15,10 +15,10 @@ This patch resolves the conflict by offsetting checking Spigot's entity
activation range check from an item's move method.
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 f0e6375236d61f32235ed23c3bae49db1545d1a2..5782033cbe408f60340833ddb49dbca3623aaa83 100644
index 6dfa43036afeba75a7ecc5a82637f081624d5c69..8351e46f667a8f8dd96d97ec15c0165261a2fab4 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -175,7 +175,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -176,7 +176,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize call to getFluid for explosions
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index d15f216193613504c456d63a1c358973afad3ed1..03c25fec51562f652a8060cde4aabfe9e8bbcfe0 100644
index 512d79b66fed3d1bef645c3ecb59bda032c81d15..1350c8df69b4ffcf9daa73549e496627db8bc6f7 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -192,7 +192,7 @@ public class Explosion {
@@ -193,7 +193,7 @@ public class Explosion {
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
BlockPos blockposition = BlockPos.containing(d4, d5, d6);
BlockState iblockdata = this.level.getBlockState(blockposition);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate
Should help if something dumb happens
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index b0518725a2e145d29bd5bc0aa7e6998a47dcb511..b3f8df13e97cbde7dd914b42004d186f90b78646 100644
index 47f5f3d58bb3bf85cf35f9baae77df7fab5c844f..0dd6f1bce4913cb84ba21a20df5573bab3a64645 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -88,8 +88,20 @@ public class ChunkSerializer {
@@ -88,8 +88,21 @@ public class ChunkSerializer {
public ChunkSerializer() {}
@ -25,17 +25,18 @@ index b0518725a2e145d29bd5bc0aa7e6998a47dcb511..b3f8df13e97cbde7dd914b42004d186f
+ }
+ }
+ // Paper end - guard against serializing mismatching coordinates
public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt) {
+
public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, RegionStorageInfo key, ChunkPos chunkPos, CompoundTag nbt) {
- ChunkPos chunkcoordintpair1 = new ChunkPos(nbt.getInt("xPos"), nbt.getInt("zPos"));
+ ChunkPos chunkcoordintpair1 = new ChunkPos(nbt.getInt("xPos"), nbt.getInt("zPos")); // Paper - guard against serializing mismatching coordinates; diff on change, see ChunkSerializer#getChunkCoordinate
if (!Objects.equals(chunkPos, chunkcoordintpair1)) {
ChunkSerializer.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", new Object[]{chunkPos, chunkPos, chunkcoordintpair1});
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
index 5ed1b824978c3805e91aeed8e172206ada9fb720..09a73383867d1ffadababd24428ee7a61ab98959 100644
index 3e194944e50f8395074d68d4abe4c084c3fadcc1..9aa9ab894080a5819fc45698771afd034906d36a 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
@@ -168,6 +168,13 @@ public class ChunkStorage implements AutoCloseable {
@@ -172,6 +172,13 @@ public class ChunkStorage implements AutoCloseable {
}
public CompletableFuture<Void> write(ChunkPos chunkPos, CompoundTag nbt) {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Alternative item-despawn-rate
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
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 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a1619238cff94c 100644
index 8351e46f667a8f8dd96d97ec15c0165261a2fab4..2e550c7db6cebc941590c35337fd47416407a5aa 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -61,6 +61,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -62,6 +62,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public final float bobOffs;
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
public boolean canMobPickup = true; // Paper - Item#canEntityPickup
@ -17,7 +17,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world);
@@ -215,7 +216,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -216,7 +217,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
}
@ -26,7 +26,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
// CraftBukkit start - fire ItemDespawnEvent
if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
@@ -239,7 +240,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -240,7 +241,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
@ -35,7 +35,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
// CraftBukkit start - fire ItemDespawnEvent
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
@@ -295,7 +296,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -296,7 +297,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
private boolean isMergable() {
ItemStack itemstack = this.getItem();
@ -44,7 +44,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
}
private void tryToMerge(ItemEntity other) {
@@ -543,6 +544,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -544,6 +545,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public void setItem(ItemStack stack) {
this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
@ -52,7 +52,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
}
@Override
@@ -597,7 +599,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -598,7 +600,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public void makeFakeItem() {
this.setNeverPickUp();

Datei anzeigen

@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
Also ignores Enderdragon, defaulting it to Mojang's setting
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 6fa52a83d343ff151667cd9ade0ec60f026ce66d..f13f8119cf43711b96b4dc5834fceaa0282d632d 100644
index e2f176d34443f0d1b00649efa45c65138042a015..3784fbe3548727ab5ad8cfefef2d8d594a76123f 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1774,6 +1774,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1613,6 +1613,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
int j = entity.getType().clientTrackingRange() * 16;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
index 5ecf8a87a31a0243c281e2a69823f5f79be69ca5..210e65919082205ea9227520e9cccc064cd94369 100644
index 58536ee8707c5ad0625cae2f26a58cf03b3f85d7..4134ee48909110f8c338f5d553d4cc1e9e31aaba 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -144,7 +144,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
public Bee(EntityType<? extends Bee> type, Level world) {
super(type, world);
this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60);

Datei anzeigen

@ -18,7 +18,7 @@ public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraf
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java
index 46ee66d06c727a3ad6638f09ac97cd0f07676a7b..4bfe53e3a231a7bec461759e78c7a6cbcb8bb625 100644
index 363dd6ab9c7b650913795ef350374d5c4e7e4925..e862814c1e54776f11050623b52476accc2f1f79 100644
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
@@ -35,6 +35,11 @@ public class IceBlock extends HalfTransparentBlock {
@ -30,7 +30,7 @@ index 46ee66d06c727a3ad6638f09ac97cd0f07676a7b..4bfe53e3a231a7bec461759e78c7a6cb
+ }
+ public void afterDestroy(Level world, BlockPos pos, ItemStack tool) {
+ // Paper end - Improve Block#breakNaturally API
if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) == 0) {
if (!EnchantmentHelper.hasTag(tool, EnchantmentTags.PREVENTS_ICE_MELTING)) {
if (world.dimensionType().ultraWarm()) {
world.removeBlock(pos, false);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java

Datei anzeigen

@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
then unwrap it...
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index fe0521ad6f0601ebdf7a616c0500479ecb34cabb..fa2df210b05529d228c5ee208f125dcf5288dfec 100644
index 6032cdc1b169c8ed0890091bce5066fbbb73ae30..86453364a0433a0196099a8cd271fa2bc7924fbb 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -252,6 +252,12 @@ public class ServerChunkCache extends ChunkSource {
@@ -253,6 +253,12 @@ public class ServerChunkCache extends ChunkSource {
return this.getChunk(x, z, leastStatus, create);
}, this.mainThreadProcessor).join();
} else {
@ -23,17 +23,18 @@ index fe0521ad6f0601ebdf7a616c0500479ecb34cabb..fa2df210b05529d228c5ee208f125dcf
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
gameprofilerfiller.incrementCounter("getChunk");
@@ -295,39 +301,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -296,33 +302,7 @@ public class ServerChunkCache extends ChunkSource {
if (Thread.currentThread() != this.mainThread) {
return null;
} else {
- this.level.getProfiler().incrementCounter("getChunkNow");
- long k = ChunkPos.asLong(chunkX, chunkZ);
-
- ChunkAccess ichunkaccess;
-
- for (int l = 0; l < 4; ++l) {
- if (k == this.lastChunkPos[l] && this.lastChunkStatus[l] == ChunkStatus.FULL) {
- ChunkAccess ichunkaccess = this.lastChunk[l];
-
- ichunkaccess = this.lastChunk[l];
- return ichunkaccess instanceof LevelChunk ? (LevelChunk) ichunkaccess : null;
- }
- }
@ -43,22 +44,15 @@ index fe0521ad6f0601ebdf7a616c0500479ecb34cabb..fa2df210b05529d228c5ee208f125dcf
- if (playerchunk == null) {
- return null;
- } else {
- ChunkResult<ChunkAccess> chunkresult = (ChunkResult) playerchunk.getFutureIfPresent(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error
-
- if (chunkresult == null) {
- return null;
- } else {
- ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
-
- if (ichunkaccess1 != null) {
- this.storeInCache(k, ichunkaccess1, ChunkStatus.FULL);
- if (ichunkaccess1 instanceof LevelChunk) {
- return (LevelChunk) ichunkaccess1;
- }
- ichunkaccess = playerchunk.getChunkIfPresent(ChunkStatus.FULL);
- if (ichunkaccess != null) {
- this.storeInCache(k, ichunkaccess, ChunkStatus.FULL);
- if (ichunkaccess instanceof LevelChunk) {
- return (LevelChunk) ichunkaccess;
- }
-
- return null;
- }
-
- return null;
- }
+ return this.getChunkAtIfLoadedMainThread(chunkX, chunkZ); // Paper - Perf: Optimise getChunkAt calls for loaded chunks
}

Datei anzeigen

@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index fa2df210b05529d228c5ee208f125dcf5288dfec..0e89cf0742b9443f5256081987242554de24d893 100644
index 86453364a0433a0196099a8cd271fa2bc7924fbb..7b85cf6aba07cb64f58b913dda5da9124146bddd 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -279,6 +279,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -280,6 +280,7 @@ public class ServerChunkCache extends ChunkSource {
Objects.requireNonNull(completablefuture);
if (!completablefuture.isDone()) { // Paper
@ -312,10 +312,10 @@ index fa2df210b05529d228c5ee208f125dcf5288dfec..0e89cf0742b9443f5256081987242554
chunkproviderserver_b.managedBlock(completablefuture::isDone);
this.level.timings.syncChunkLoad.stopTiming(); // Paper
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 51644c24900600d95c3f6df073769b68be702b2d..1170a0031368ede2e45d24720506f6519cbd55da 100644
index ccb72d13cce7db74a6754498bab41a017a469418..33cb58e7298e7900dbcd37dbdb21de83bfca6a26 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -421,6 +421,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -422,6 +422,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check
Co-Authored-By: MiniDigger <admin@benndorf.dev>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 1f62158072d7503f0148a9af4e9fbebab30e6fd7..6048e80241246cabf0390e11d217cd8c291d31b6 100644
index faa228698c7dd60bde0f3767cc27957ece04b8be..f3bce016e729d553aaa6185470bbf4317f94352b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -203,23 +203,27 @@ public class Main {

Datei anzeigen

@ -7,10 +7,10 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem
(dispensers can throw eggs to hatch them, too).
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
index 02da4d1ff3c72e8adad2f4cee449ad21dec34e02..82bb8004635865f5202578d5a6f520048e7269d5 100644
index 62850e899955732afdd255ea1e55fc84b7c6c96b..dbd60cc8c39f5d2d4c77e2de4f2567e7fa456cd2 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
@@ -83,6 +83,13 @@ public class ThrownEgg extends ThrowableItemProjectile {
@@ -86,6 +86,13 @@ public class ThrownEgg extends ThrowableItemProjectile {
}
}
// CraftBukkit end

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 73738ef71f2698a6116cd5371f80c26a97c0a77c..639357aa6335b96da3723973a754db763ecbc0f8 100644
index 3a9c823193e939a6bbf6a43cd440d3fae129a252..191ec36c917f377246e3379c410c9aa2d930cebc 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3385,8 +3385,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3405,8 +3405,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
this.jumpInLiquid(FluidTags.LAVA);
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
@ -22,10 +22,10 @@ index 73738ef71f2698a6116cd5371f80c26a97c0a77c..639357aa6335b96da3723973a754db76
} else {
this.noJumpDelay = 0;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
index 4a1b25bb8a3d342400cb657781e9eab68decd479..fb4c7220c4edad54813036d62db7e3eefeda92a3 100644
index 228cfb77e12ed5979e422dc5dbb5e8dcf363b509..8df42121aa22ec9f95a1b8627b64b0ff71e36314 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
@@ -536,7 +536,9 @@ public class Panda extends Animal {
@@ -541,7 +541,9 @@ public class Panda extends Animal {
Panda entitypanda = (Panda) iterator.next();
if (!entitypanda.isBaby() && entitypanda.onGround() && !entitypanda.isInWater() && entitypanda.canPerformAction()) {
@ -36,10 +36,10 @@ index 4a1b25bb8a3d342400cb657781e9eab68decd479..fb4c7220c4edad54813036d62db7e3ee
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
index 1264fb03d2dcab088fc4a7c2788c9f9df53cba5d..cec801ba14bed8b043b2375f1bf9e7811a63e995 100644
index 4d91bc4b90a208fec789325dbcec8cc56d1a2a8b..aa4111eef22546f8aa630228c51ef5761c9b373b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
@@ -159,7 +159,9 @@ public class Ravager extends Raider {
@@ -160,7 +160,9 @@ public class Ravager extends Raider {
}
if (!flag && this.onGround()) {
@ -50,10 +50,10 @@ index 1264fb03d2dcab088fc4a7c2788c9f9df53cba5d..cec801ba14bed8b043b2375f1bf9e781
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index b2172a8c70ab77ba7c98b6b2b27595765d7eba11..539280a0265a4746ebc9ede6667df3699dfb8125 100644
index 5de2da8f473b6ee59be1b49c5002a0161981136c..ccb779066fb5f3ebf9e4bdabdffc9c18c1a75cbb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -961,4 +961,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -963,4 +963,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand());
}
// Paper end - active item API

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b454ab757 100644
index 631f2d70b5fd6dabc06062e3c77802d2b61398ae..d890331b9bd8c7b29efb21454af34a0b246b1674 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -398,6 +398,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -404,6 +404,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void inactiveTick() { }
// Spigot end
protected int numCollisions = 0; // Paper - Cap entity collisions
@ -16,7 +16,7 @@ index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
// Paper start - Entity origin API
@javax.annotation.Nullable
@@ -2213,6 +2214,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2284,6 +2285,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
}
@ -26,7 +26,7 @@ index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
@@ -2355,6 +2359,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2426,6 +2430,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@ -35,10 +35,10 @@ index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b
String spawnReasonName = nbt.getString("Paper.SpawnReason");
try {
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
index f0d4c16fffe7af7e913f4bb300c72f7bdf91e0e8..d3f2c0e3107a781b462a2b67c10cd1e5f05feefb 100644
index 19c813ab9e71eed150ae569f903287e9283d9292..ab1cbcf5ef1ebffd39373bacb2b0983d2c8fa15a 100644
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
@@ -71,6 +71,8 @@ public class NetherPortalBlock extends Block {
@@ -88,6 +88,8 @@ public class NetherPortalBlock extends Block implements Portal {
if (entity != null) {
entity.setPortalCooldown();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 3d8c4cc4d1bdd8c5ceea65fc2189070098410849..c0f0627d3c303e625be584c6eba5865f5622490f 100644
index 3405d27c360cde4e735aef1d5a01a53bbd00b0e0..a073dd7a0d8440aa00f0f02dc02187b4ff48bc7f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -401,13 +401,18 @@ public class CraftEventFactory {
@@ -402,13 +402,18 @@ public class CraftEventFactory {
}
org.bukkit.inventory.ItemStack item;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air
diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
index 3a51d3722ef8dba0e4b3ebcff0de8cede3bf3371..932fae98c551052cadba4c6fc6e575fc30a25d58 100644
index 615be0b85fb3d28a044c6bae6a0fe93ec4fca061..1807da10d07d1f6e4ddbc0fa1b8da34a688d67c3 100644
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
@@ -317,7 +317,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
@@ -325,7 +325,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
BlockPos blockposition1 = blockposition.below();
BlockState iblockdata = world.getBlockState(blockposition1);

Datei anzeigen

@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where:
* On normal difficulty they will have a 50% of getting infected or dying.
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 2d6cf6ea1717b28871c40de69120336c59a4d347..66fa70762ba3387aa200caa4d8a4e557498cfff1 100644
index d981f8679149669f6ca4ea950d744149974532b2..e2a3978899497b6622829d6577cfaa723092da9d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -443,10 +443,8 @@ public class Zombie extends Monster {
@@ -454,10 +454,8 @@ public class Zombie extends Monster {
public boolean killedEntity(ServerLevel world, LivingEntity other) {
boolean flag = super.killedEntity(world, other);

Datei anzeigen

@ -8,10 +8,10 @@ faster on its own, however removing the try catch makes it
easier to inline due to code size
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 963d86e7505e4d9c3854d35d9b59aed3369e8a57..744db9eec4f7bdeb32f83300960a7fce63b393d8 100644
index 00f6ef5ffe33d6d45b5356e215324cbe0eadfda4..cda4413901fb465a855396e42356adaadefd4195 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -370,18 +370,20 @@ public class LevelChunk extends ChunkAccess {
@@ -369,18 +369,20 @@ public class LevelChunk extends ChunkAccess {
}
public FluidState getFluidState(int x, int y, int z) {
@ -38,7 +38,7 @@ index 963d86e7505e4d9c3854d35d9b59aed3369e8a57..744db9eec4f7bdeb32f83300960a7fce
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Getting fluid state");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Block being got");
@@ -391,6 +393,7 @@ public class LevelChunk extends ChunkAccess {
@@ -390,6 +392,7 @@ public class LevelChunk extends ChunkAccess {
});
throw new ReportedException(crashreport);
}

Datei anzeigen

@ -125,10 +125,10 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
public static void registerCommands(final MinecraftServer server) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd394f597362 100644
index 12f530044d918ddc1ba4b2376419f9ed72283b98..2a2b5205692573c9886a2696f376958809b899ac 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -258,6 +258,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private int playerIdleTimeout;
private final long[] tickTimesNanos;
private long aggregatedTickTimesNanos;
@ -140,7 +140,7 @@ index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd39
@Nullable
private KeyPair keyPair;
@Nullable
@@ -1447,6 +1452,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1475,6 +1480,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.aggregatedTickTimesNanos += j;
this.tickTimesNanos[k] = j;
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) j / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
@ -152,7 +152,7 @@ index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd39
this.logTickMethodTime(i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -2787,4 +2797,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2863,4 +2873,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
}
@ -184,10 +184,10 @@ index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd39
+ // Paper end - Add tick times API and /mspt command
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 10b638183a06702ce97159e634b18a9c8b55d049..428a2738008c14f7e0179c15026494eda44fa14f 100644
index 264b5781a472f706f525cb07d4ccebac17d4a5d3..edf6921ed70ea3281cf870dfb779e908ea3d1905 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2673,6 +2673,16 @@ public final class CraftServer implements Server {
@@ -2681,6 +2681,16 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 428a2738008c14f7e0179c15026494eda44fa14f..af99292c4461819c4c7d304134f3f3ffb88c175d 100644
index edf6921ed70ea3281cf870dfb779e908ea3d1905..cb6f6762b41ca78ff7c13a65690ce0be1bdac292 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2917,5 +2917,10 @@ public final class CraftServer implements Server {
@@ -2925,5 +2925,10 @@ public final class CraftServer implements Server {
public int getCurrentTick() {
return net.minecraft.server.MinecraftServer.currentTick;
}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 9730a3fe6b1e2734d897936dc8bff7c06edb3687..3fc189cd1e54f91c1713315214da9b6af2923074 100644
index 7800e0a5aa381181d6a19d55f90490154de05c04..890beb473c240c084c4dd12c5dd792895117358e 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -483,6 +483,53 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
world and the world age for the start day.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 932b68089c55c8f1b84a15272378d4322a0a5a91..10369280138e3baf563cd1099af5eb878cd2a39b 100644
index f77edea8a82ef0b77ebe22ec1ee0fc22f94f67a5..f47f95f44252a1be48efbbec284a8dbcd494c760 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -265,6 +265,7 @@ public class ServerPlayer extends Player {
@@ -269,6 +269,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public boolean wonGame;
private int containerUpdateDelay; // Paper - Configurable container update tick rate
public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 3736fdd1dba4fc86012c687c5525a52cb8094f47..539a8ddfcf660bf824325516c88cf91f4a32a746 100644
index b15cee6f21ff300b596922a8eed35a5f8a89fe22..d6dc8c983d26ce89f17a990be4284fdc78ad164b 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -412,11 +412,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -416,11 +416,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
if (this.rconThread != null) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Do not allow bees to load chunks for beehives
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd499ab39b68 100644
index 4134ee48909110f8c338f5d553d4cc1e9e31aaba..615b57fac9def18d9dcaefcfe397c74c11cac627 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -410,6 +410,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -421,6 +421,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
if (this.hivePos == null) {
return false;
} else {
@ -16,7 +16,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
BlockEntity tileentity = this.level().getBlockEntity(this.hivePos);
return tileentity instanceof BeehiveBlockEntity && ((BeehiveBlockEntity) tileentity).isFireNearby();
@@ -443,6 +444,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -454,6 +455,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
private boolean doesHiveHaveSpace(BlockPos pos) {
@ -24,7 +24,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
BlockEntity tileentity = this.level().getBlockEntity(pos);
return tileentity instanceof BeehiveBlockEntity ? !((BeehiveBlockEntity) tileentity).isFull() : false;
@@ -913,6 +915,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -924,6 +926,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Override
public boolean canBeeUse() {
if (Bee.this.hasHive() && Bee.this.wantsToEnterHive() && Bee.this.hivePos.closerToCenterThan(Bee.this.position(), 2.0D)) {
@ -32,7 +32,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
BlockEntity tileentity = Bee.this.level().getBlockEntity(Bee.this.hivePos);
if (tileentity instanceof BeehiveBlockEntity) {
@@ -936,6 +939,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -947,6 +950,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Override
public void start() {
@ -41,7 +41,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
if (tileentity instanceof BeehiveBlockEntity tileentitybeehive) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vex.java b/src/main/java/net/minecraft/world/entity/monster/Vex.java
index 970cd8e02464c69087756f9d1deee197c9c092af..fd3b37dde54623ba38186efb2a64d364c86b81d2 100644
index d6f73c719d58970c6d13340f78c3303916b46546..2985296a9a034e535157f55e322fc8c107827752 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Vex.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Vex.java
@@ -356,7 +356,10 @@ public class Vex extends Monster implements TraceableEntity {

Datei anzeigen

@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index f13f8119cf43711b96b4dc5834fceaa0282d632d..66936834a80ef6b645ab44f3439defcb90237bfa 100644
index 3784fbe3548727ab5ad8cfefef2d8d594a76123f..5732aded2e4dbeea84dbe6ebac71c2ad5ce4729a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1469,6 +1469,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1308,6 +1308,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
@ -25,10 +25,10 @@ index f13f8119cf43711b96b4dc5834fceaa0282d632d..66936834a80ef6b645ab44f3439defcb
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 1170a0031368ede2e45d24720506f6519cbd55da..df623f10def1ecf071971119f449a773063b3ce1 100644
index 33cb58e7298e7900dbcd37dbdb21de83bfca6a26..a87782c3cb0a751f532feda0b827d7c7eac163e1 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2181,7 +2181,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2149,7 +2149,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@ -37,7 +37,7 @@ index 1170a0031368ede2e45d24720506f6519cbd55da..df623f10def1ecf071971119f449a773
if (entity instanceof ServerPlayer entityplayer) {
ServerLevel.this.players.add(entityplayer);
ServerLevel.this.updateSleepingPlayerList();
@@ -2211,6 +2211,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2179,6 +2179,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit

Datei anzeigen

@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 10369280138e3baf563cd1099af5eb878cd2a39b..5d42a20c2b908858c3b61a8100addec5100b33a0 100644
index f47f95f44252a1be48efbbec284a8dbcd494c760..d2f5ff035d4d496c035b8ae0c04c67e3de78fd4b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -758,7 +758,7 @@ public class ServerPlayer extends Player {
@@ -767,7 +767,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public void doTick() {
try {

Datei anzeigen

@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
due to 1.15's new queue but processed while dead.
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 e60385c2b84ca0807ed5fc710017a1de09aa3c4e..37190eb2d7a8f81989908f58aa13de1ba964e43a 100644
index e8fb36582430332e511c2d7ac1e604763f4052e3..1d8aa3b3c3deba7d04dd115d1f0b70b078111f1e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1162,7 +1162,7 @@ public abstract class Player extends LivingEntity {
@@ -1172,7 +1172,7 @@ public abstract class Player extends LivingEntity {
@Override
protected boolean isImmobile() {

Datei anzeigen

@ -13,19 +13,19 @@ By skipping this, we avoid potential for a large spike on server start.
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 5d42a20c2b908858c3b61a8100addec5100b33a0..1856f0692f1894614a9366378b3209a87a1253ec 100644
index d2f5ff035d4d496c035b8ae0c04c67e3de78fd4b..142bdd74f930a1a2a004c8b6d9435318d1a07b71 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -353,7 +353,7 @@ public class ServerPlayer extends Player {
@@ -358,7 +358,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.server = server;
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
- this.fudgeSpawnLocation(world);
+ // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn
- this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
+ // this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
this.updateOptions(clientOptions);
this.object = null;
@@ -621,7 +621,7 @@ public class ServerPlayer extends Player {
@@ -630,7 +630,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
position = Vec3.atCenterOf(world.getSharedSpawnPos());
}
this.setLevel(world);
@ -35,14 +35,14 @@ index 5d42a20c2b908858c3b61a8100addec5100b33a0..1856f0692f1894614a9366378b3209a8
this.gameMode.setLevel((ServerLevel) world);
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 8ce2826b1ded161a8220273d1fc5260ed3b6772f..d2f94afe667627a14cff896b463c2b9b51bf6e29 100644
index 7fa13f1fe02a1bdfa93c76e9c2eefc81c9bded50..5cc92a5f55a9492928c4ba140d4e45dcf75b5431 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -226,6 +226,7 @@ public abstract class PlayerList {
// Paper start - Entity#getEntitySpawnReason
if (optional.isEmpty()) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
+ player.fudgeSpawnLocation(worldserver1); // Paper - Don't move existing players to world spawn
+ player.moveTo(player.adjustSpawnLocation(worldserver1, worldserver1.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
}
// Paper end - Entity#getEntitySpawnReason
player.setServerLevel(worldserver1);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 1856f0692f1894614a9366378b3209a87a1253ec..2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c 100644
index 142bdd74f930a1a2a004c8b6d9435318d1a07b71..9bb7eafb72d5264a5c53a2f53dc60d94ec976431 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -703,7 +703,7 @@ public class ServerPlayer extends Player {
@@ -712,7 +712,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
}
// Paper end - Configurable container update tick rate
@ -17,7 +17,7 @@ index 1856f0692f1894614a9366378b3209a87a1253ec..2720fee3f0e8d1c9a3e2a13c86bf2d60
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
this.containerMenu = this.inventoryMenu;
}
@@ -1602,7 +1602,7 @@ public class ServerPlayer extends Player {
@@ -1637,7 +1637,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
} else {
// CraftBukkit start
this.containerMenu = container;

Datei anzeigen

@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 639357aa6335b96da3723973a754db763ecbc0f8..2b38a9d88b459674b1b8d667c4e02b93ad7290b4 100644
index 191ec36c917f377246e3379c410c9aa2d930cebc..c5721045681bcd2db99eec42a1c1455515868af1 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3496,10 +3496,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3516,10 +3516,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.level().isClientSide()) {
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
} else {

Datei anzeigen

@ -87,19 +87,19 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c..f9b2bbda1cbd16f8635d6fff05bb5c0e26a5e6f1 100644
index 9bb7eafb72d5264a5c53a2f53dc60d94ec976431..df6fb7dd6015ce6e558a97598c822243dcc1c284 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -354,7 +354,7 @@ public class ServerPlayer extends Player {
@@ -359,7 +359,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
// this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn
// this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
- this.updateOptions(clientOptions);
+ this.updateOptionsNoEvents(clientOptions); // Paper - don't call options events on login
this.object = null;
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
@@ -2096,7 +2096,23 @@ public class ServerPlayer extends Player {
@@ -2149,7 +2149,23 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
}
}
@ -123,12 +123,12 @@ index 2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c..f9b2bbda1cbd16f8635d6fff05bb5c0e
// CraftBukkit start
if (this.getMainArm() != clientOptions.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
@@ -2108,6 +2124,11 @@ public class ServerPlayer extends Player {
@@ -2161,6 +2177,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper
}
// CraftBukkit end
+ // Paper start - don't call options events on login
+ updateOptionsNoEvents(clientOptions);
+ this.updateOptionsNoEvents(clientOptions);
+ }
+ public void updateOptionsNoEvents(ClientInformation clientOptions) {
+ // Paper end
@ -136,10 +136,10 @@ index 2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c..f9b2bbda1cbd16f8635d6fff05bb5c0e
this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // Paper
this.requestedViewDistance = clientOptions.viewDistance();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 332f916a5063aa3048675eb906bb3ff5050b37bb..61b9dabaa74ee9e2b357316382ecbdf6c822b916 100644
index b03813ebc9aa665f670767be9c37cbb84756838e..e837939d35ee168f5640b28fae07675817492cb9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -651,6 +651,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -653,6 +653,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
}
}

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from
I suspect it deals with teleporting as it uses players current x/y/z
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index e8640bcbc1d4e2965049974385585f5060cb6a44..c473cb1888e9ab0e91ba44f1439b81742758304e 100644
index 27065ffc5473c518acee3a3096b83fac61eb7860..cbabbfbb9967ddf9a56f3be24a88e0fcd4415aa2 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
@@ -284,8 +284,8 @@ public abstract class DistanceManager {
@@ -272,8 +272,8 @@ public abstract class DistanceManager {
ObjectSet<ServerPlayer> objectset = (ObjectSet) this.playersPerChunk.get(i);
if (objectset == null) return; // CraftBukkit - SPIGOT-6208

Datei anzeigen

@ -31,10 +31,10 @@ delays anymore.
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 66936834a80ef6b645ab44f3439defcb90237bfa..406c78dcb97d954f16f05d379d4dbf74c61c8fd1 100644
index 5732aded2e4dbeea84dbe6ebac71c2ad5ce4729a..d1247df5c51b0d377a27ea7cc5b5a2d1f1bf9b32 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1476,6 +1476,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1315,6 +1315,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return;
}
// Paper end - ignore and warn about illegal addEntity calls instead of crashing server
@ -43,10 +43,10 @@ index 66936834a80ef6b645ab44f3439defcb90237bfa..406c78dcb97d954f16f05d379d4dbf74
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index f9b2bbda1cbd16f8635d6fff05bb5c0e26a5e6f1..bf6c81300d29c445a1012d1159866547c202d135 100644
index df6fb7dd6015ce6e558a97598c822243dcc1c284..b808d9c710d6cd59ac34ea537f603fd4002073d0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -284,6 +284,7 @@ public class ServerPlayer extends Player {
@@ -288,6 +288,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public double maxHealthCache;
public boolean joining = true;
public boolean sentListPacket = false;
@ -55,7 +55,7 @@ index f9b2bbda1cbd16f8635d6fff05bb5c0e26a5e6f1..bf6c81300d29c445a1012d1159866547
// CraftBukkit end
public boolean isRealPlayer; // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index d2f94afe667627a14cff896b463c2b9b51bf6e29..a4db0bcefc92091ff26b146a2ce914c1d36a3c23 100644
index 5cc92a5f55a9492928c4ba140d4e45dcf75b5431..47392be43dffcb983c29683263227780a3ddee24 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -297,6 +297,12 @@ public abstract class PlayerList {
@ -80,11 +80,10 @@ index d2f94afe667627a14cff896b463c2b9b51bf6e29..a4db0bcefc92091ff26b146a2ce914c1
// CraftBukkit end
player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
@@ -356,7 +364,11 @@ public abstract class PlayerList {
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect, false));
}
-
@@ -350,6 +358,11 @@ public abstract class PlayerList {
worldserver1 = player.serverLevel(); // CraftBukkit - Update in case join event changed it
// CraftBukkit end
this.sendActivePlayerEffects(player);
+ // Paper start - Fire PlayerJoinEvent when Player is actually ready; move vehicle into method so it can be called above - short circuit around that code
+ this.onPlayerJoinFinish(player, worldserver1, s1);
+ }
@ -93,7 +92,7 @@ index d2f94afe667627a14cff896b463c2b9b51bf6e29..a4db0bcefc92091ff26b146a2ce914c1
if (optional.isPresent() && ((CompoundTag) optional.get()).contains("RootVehicle", 10)) {
CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle");
ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error
@@ -403,6 +415,10 @@ public abstract class PlayerList {
@@ -396,6 +409,10 @@ public abstract class PlayerList {
}
}

Datei anzeigen

@ -10,7 +10,7 @@ Co-authored-by: Wyatt Childers <wchilders@nearce.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index a4db0bcefc92091ff26b146a2ce914c1d36a3c23..935061ed5c22b48e43d27fe0840cc69fb60d5344 100644
index 47392be43dffcb983c29683263227780a3ddee24..fa35bc76575a3ffe6435ff24db0c7ad78b53e309 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -197,6 +197,7 @@ public abstract class PlayerList {
@ -80,14 +80,14 @@ index a4db0bcefc92091ff26b146a2ce914c1d36a3c23..935061ed5c22b48e43d27fe0840cc69f
+ }
+ if (optional.isEmpty() || invalidPlayerWorld[0]) {
+ // Paper end - reset to main world spawn if first spawn or invalid world
player.fudgeSpawnLocation(worldserver1); // Paper - Don't move existing players to world spawn
player.moveTo(player.adjustSpawnLocation(worldserver1, worldserver1.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
}
// Paper end - Entity#getEntitySpawnReason
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 102f32c0724b6042412c010cffa02e5b454ab757..33329cb73324ea3e005d59ee3f9ea1225ada7055 100644
index d890331b9bd8c7b29efb21454af34a0b246b1674..2ce2926f4e3a79a1a329cdd684852970f6f104f2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2316,27 +2316,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2387,27 +2387,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// CraftBukkit end

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 2b38a9d88b459674b1b8d667c4e02b93ad7290b4..accb574f961114f225596a633b36a91e3009ed87 100644
index c5721045681bcd2db99eec42a1c1455515868af1..1886cebc32ded9c4e0c7409a4db6f78fcdf847ea 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2248,7 +2248,16 @@ public abstract class LivingEntity extends Entity implements Attackable {

Datei anzeigen

@ -17,7 +17,7 @@ index 3207166061bf9c4d7bf3f38e5a9f7aff23ccd5c1..ee4495b67c46cf1282cdd6ad15b224b0
private EntitySelector() {}
// Paper start - Affects Spawning API
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
index 4292a0fbab588a8cd58db36bc279f2991231aeec..ac119e2efff7ba3c32425783ffcf4b3c44156f27 100644
index 3c3f70d05fb51b530b792adf84c324840bd03c14..4b3bec32921feb1dcf71abf5e8d34fcbbc59baf5 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -549,6 +549,7 @@ public class Phantom extends FlyingMob implements Enemy {

Datei anzeigen

@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 33329cb73324ea3e005d59ee3f9ea1225ada7055..fcdfe37d2135190e44527190976a718b2f9359c5 100644
index 2ce2926f4e3a79a1a329cdd684852970f6f104f2..b1d870b9a3b414ed49b4674afc2c6088d457ebc1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2446,11 +2446,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2517,11 +2517,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@ -34,58 +34,47 @@ index 33329cb73324ea3e005d59ee3f9ea1225ada7055..fcdfe37d2135190e44527190976a718b
entityitem.setDefaultPickUpDelay();
// CraftBukkit start
@@ -3243,6 +3244,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@Nullable
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
// CraftBukkit end
@@ -3337,6 +3338,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public Entity changeDimension(DimensionTransition teleportTarget) {
Level world = this.level();
+ // Paper start - Fix item duplication and teleport issues
+ if (!this.isAlive() || !this.valid) {
+ LOGGER.warn("Illegal Entity Teleport " + this + " to " + worldserver + ":" + location, new Throwable());
+ LOGGER.warn("Illegal Entity Teleport " + this + " to " + teleportTarget.newLevel() + ":" + teleportTarget.pos(), new Throwable());
+ return null;
+ }
+ // Paper end - Fix item duplication and teleport issues
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
this.level().getProfiler().push("changeDimension");
// CraftBukkit start
@@ -3269,6 +3276,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end
if (world instanceof ServerLevel worldserver) {
if (!this.isRemoved()) {
// CraftBukkit start
@@ -3379,6 +3386,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.level().getProfiler().popPush("reloading");
+ // Paper start - Fix item duplication and teleport issues
+ if (this instanceof Mob) {
+ ((Mob) this).dropLeash(true, true); // Paper drop lead
+ }
+ // Paper end - Fix item duplication and teleport issues
Entity entity = this.getType().create(worldserver);
if (entity != null) {
@@ -3286,10 +3298,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit start - Forward the CraftEntity to the new entity
this.getBukkitEntity().setHandle(entity);
entity.bukkitEntity = this.getBukkitEntity();
-
- if (this instanceof Mob) {
- ((Mob) this).dropLeash(true, false); // Unleash to prevent duping of leads.
- }
// CraftBukkit end
}
@@ -3410,7 +3418,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (entity2 != null) {
if (this != entity2) {
+ // Paper start - Fix item duplication and teleport issues
+ if (this instanceof Mob) {
+ ((Mob) this).dropLeash(true, true); // Paper drop lead
+ }
+ // Paper end - Fix item duplication and teleport issues
entity2.restoreFrom(this);
this.removeAfterChangingDimensions();
// CraftBukkit start - Forward the CraftEntity to the new entity
@@ -3454,7 +3466,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean canChangeDimensions() {
- return !this.isPassenger() && !this.isVehicle();
+ return !this.isPassenger() && !this.isVehicle() && isAlive() && valid; // Paper - Fix item duplication and teleport issues
public boolean canChangeDimensions(Level from, Level to) {
- return true;
+ return this.isAlive() && this.valid; // Paper - Fix item duplication and teleport issues
}
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index accb574f961114f225596a633b36a91e3009ed87..a4d5e0ffbdade4e1b15d30de6e60feddda697c24 100644
index 1886cebc32ded9c4e0c7409a4db6f78fcdf847ea..94c0de0a50e2a076e5aed86a673fe03d9698ba36 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1734,9 +1734,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1717,9 +1717,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(worldserver, damageSource);
if (deathEvent == null || !deathEvent.isCancelled()) {
- if (this.deathScore >= 0 && entityliving != null) {
- entityliving.awardKillScore(this, this.deathScore, damageSource);
@ -96,27 +85,27 @@ index accb574f961114f225596a633b36a91e3009ed87..a4d5e0ffbdade4e1b15d30de6e60fedd
// Paper start - clear equipment if event is not cancelled
if (this instanceof Mob) {
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
@@ -1837,8 +1837,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropCustomDeathLoot(source, i, flag);
@@ -1811,8 +1811,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropCustomDeathLoot(world, damageSource, flag);
this.clearEquipmentSlots = prev; // Paper
}
- // CraftBukkit start - Call death event
- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops); // Paper
- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops); // Paper
+ // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops, () -> {
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops, () -> {
+ final LivingEntity entityliving = this.getKillCredit();
+ if (this.deathScore >= 0 && entityliving != null) {
+ entityliving.awardKillScore(this, this.deathScore, source);
+ entityliving.awardKillScore(this, this.deathScore, damageSource);
+ }
+ }); // Paper end
this.postDeathDropItems(deathEvent); // Paper
this.drops = new ArrayList<>();
// CraftBukkit end
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 029d5756f424dba57b4a974b09453c2f0cf0e8e2..e1f6853c450a2e6a0d7607f1faec7bc5c82d9621 100644
index 92bb0c63330ad3a4cb13b2dc655020714e9b1ffd..cc1189c2d7dc57ba8f29aad4ba5d2a07362bcd5b 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -628,7 +628,7 @@ public class ArmorStand extends LivingEntity {
@@ -635,7 +635,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.handItems.size(); ++i) {
itemstack = (ItemStack) this.handItems.get(i);
if (!itemstack.isEmpty()) {
@ -125,7 +114,7 @@ index 029d5756f424dba57b4a974b09453c2f0cf0e8e2..e1f6853c450a2e6a0d7607f1faec7bc5
this.handItems.set(i, ItemStack.EMPTY);
}
}
@@ -636,7 +636,7 @@ public class ArmorStand extends LivingEntity {
@@ -643,7 +643,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.armorItems.size(); ++i) {
itemstack = (ItemStack) this.armorItems.get(i);
if (!itemstack.isEmpty()) {
@ -135,10 +124,10 @@ index 029d5756f424dba57b4a974b09453c2f0cf0e8e2..e1f6853c450a2e6a0d7607f1faec7bc5
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c0f0627d3c303e625be584c6eba5865f5622490f..18d1e2ff18cae10ec6f1b7adf480bd6bfe738584 100644
index a073dd7a0d8440aa00f0f02dc02187b4ff48bc7f..4552a77e84d3c957431a918ca78dcf2e06f2e74c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -894,6 +894,11 @@ public class CraftEventFactory {
@@ -895,6 +895,11 @@ public class CraftEventFactory {
}
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) {
@ -149,8 +138,8 @@ index c0f0627d3c303e625be584c6eba5865f5622490f..18d1e2ff18cae10ec6f1b7adf480bd6b
+ // Paper end
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward());
@@ -908,11 +913,13 @@ public class CraftEventFactory {
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
@@ -909,11 +914,13 @@ public class CraftEventFactory {
playDeathSound(victim, event);
// Paper end
victim.expToDrop = event.getDroppedExp();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e728b9f317d12c3c452db70ba7d1e930c84e345d..7277c9b82c127cd38db2daec3df4d33e8376b8dc 100644
index 528c902b5434875b111812ff3a8099f945404d3c..0e89021e44a5d9d3fd0169199839dbcc33e283d5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -892,7 +892,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -895,7 +895,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handlePickItem(ServerboundPickItemPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());

Datei anzeigen

@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
Set system properly at server startup if not set already to help protect from this.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 6048e80241246cabf0390e11d217cd8c291d31b6..8316e0703b6c1ad81d6745f29eb697017e84c65a 100644
index f3bce016e729d553aaa6185470bbf4317f94352b..02243b69cca7255588b43dab57e1c9ca4c3ca87f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -27,6 +27,7 @@ public class Main {

Datei anzeigen

@ -36,10 +36,10 @@ index 0000000000000000000000000000000000000000..479bb92d159f33c54c2d9c39d8a63aa9
+ }
+}
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index f15c388434a0a501f86868de35cc138756975027..5044a7dc120c8b040ee23365d2bf97e6180e3ee4 100644
index 2b5235aea933462ca711abb5b59b6715a9af5ecb..52818e877c797ed82f7eecc8e1e1716168422b29 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -342,7 +342,7 @@ public class Commands {
@@ -340,7 +340,7 @@ public class Commands {
} catch (Exception exception) {
MutableComponent ichatmutablecomponent = Component.literal(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
@ -49,10 +49,10 @@ index f15c388434a0a501f86868de35cc138756975027..5044a7dc120c8b040ee23365d2bf97e6
StackTraceElement[] astacktraceelement = exception.getStackTrace();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d020106d059dd 100644
index 2a2b5205692573c9886a2696f376958809b899ac..15938074ad20133f5ccdab0c8566556d7b807d8f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -909,6 +909,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -916,6 +916,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
@ -60,7 +60,7 @@ index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d0201
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
@@ -923,6 +924,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -930,6 +931,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return;
this.hasStopped = true;
}
@ -68,7 +68,7 @@ index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d0201
// CraftBukkit end
if (this.metricsRecorder.isRecording()) {
this.cancelRecordingMetrics();
@@ -1027,6 +1029,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1034,6 +1036,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
this.isRestarting = isRestarting;
@ -78,21 +78,21 @@ index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d0201
this.running = false;
if (waitForShutdown) {
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
index 970d1ddf0a014b47b0ac97440489706137324991..e4086bea596e5f5d71491e0b7ad650d76939b8f9 100644
index 5457358bc76889153036818fdfd70a043ec4e40f..f0701ff9be510e6bed7767f154832eb80797b565 100644
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
@@ -62,6 +62,10 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
@@ -70,6 +70,10 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
@Override
public void onDisconnect(Component reason) {
public void onDisconnect(DisconnectionDetails info) {
+ // Paper start - Debugging
+ if (net.minecraft.server.MinecraftServer.getServer().isDebugging()) {
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile, reason.getString(), currentTask != null ? currentTask.type().id() : "null");
+ } else // Paper end
ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}", this.gameProfile, reason.getString());
super.onDisconnect(reason);
ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}", this.gameProfile, info.reason().getString());
super.onDisconnect(info);
}
@@ -149,6 +153,11 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
@@ -169,6 +173,11 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
playerlist.placeNewPlayer(this.connection, entityplayer, this.createCookie(this.clientInformation));
} catch (Exception exception) {
ServerConfigurationPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
@ -105,10 +105,10 @@ index 970d1ddf0a014b47b0ac97440489706137324991..e4086bea596e5f5d71491e0b7ad650d7
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index af99292c4461819c4c7d304134f3f3ffb88c175d..9cc6f2ae2f0ae71d550f0da5f81412a434b0bdf7 100644
index cb6f6762b41ca78ff7c13a65690ce0be1bdac292..093c2159eb9d9603b5e3f0d420769d6b9d872be8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1036,6 +1036,7 @@ public final class CraftServer implements Server {
@@ -1039,6 +1039,7 @@ public final class CraftServer implements Server {
plugin.getDescription().getFullName(),
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
));

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 7277c9b82c127cd38db2daec3df4d33e8376b8dc..d0ce184da22352b591f4783918104a4c473cc873 100644
index 0e89021e44a5d9d3fd0169199839dbcc33e283d5..05033408070a08c7b982a675dc3acb79db392229 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1540,6 +1540,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1553,6 +1553,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API
diff --git a/build.gradle.kts b/build.gradle.kts
index 2caa4c8e250a7925e7d6f9ba00a95956b5328568..69b5d39f57a63130c0b83f6238898bdf68fa1e9a 100644
index 7b002d28932e21878dbab248abf85066a8a80a9c..2bcb4eacd06c76f2c950b424b2a2c4d53497c538 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -41,6 +41,7 @@ dependencies {
@ -781,10 +781,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7
LOOK,
JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9cc6f2ae2f0ae71d550f0da5f81412a434b0bdf7..13ef7ed49526b9f0d1ec376ec3242e14f66f0a23 100644
index 093c2159eb9d9603b5e3f0d420769d6b9d872be8..7eaf0f56cbf0695132a029b0a208f283f43e47b5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2923,5 +2923,11 @@ public final class CraftServer implements Server {
@@ -2931,5 +2931,11 @@ public final class CraftServer implements Server {
public boolean isStopping() {
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
}

Datei anzeigen

@ -21,10 +21,10 @@ Co-authored-by: Aikar <aikar@aikar.co>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index 8007d323023655052acd0cf1f3a753101e9ee74a..a933061d4f0c45a34b5678c2b317b670f20b8a45 100644
index 0916e24271d07ad5db51c5bc68791722b0f69c2b..a758b2456acac23095fe4619ae10300a034cb460 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -241,6 +241,7 @@ public class ExperienceOrb extends Entity {
@@ -244,6 +244,7 @@ public class ExperienceOrb extends Entity {
}
private static boolean tryMergeToExisting(ServerLevel world, Vec3 pos, int amount) {
@ -32,7 +32,7 @@ index 8007d323023655052acd0cf1f3a753101e9ee74a..a933061d4f0c45a34b5678c2b317b670
AABB axisalignedbb = AABB.ofSize(pos, 1.0D, 1.0D, 1.0D);
int j = world.getRandom().nextInt(40);
List<ExperienceOrb> list = world.getEntities(EntityTypeTest.forClass(ExperienceOrb.class), axisalignedbb, (entityexperienceorb) -> {
@@ -267,6 +268,11 @@ public class ExperienceOrb extends Entity {
@@ -270,6 +271,11 @@ public class ExperienceOrb extends Entity {
}
private void merge(ExperienceOrb other) {
@ -44,15 +44,15 @@ index 8007d323023655052acd0cf1f3a753101e9ee74a..a933061d4f0c45a34b5678c2b317b670
this.count += other.count;
this.age = Math.min(this.age, other.age);
other.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause
@@ -353,7 +359,7 @@ public class ExperienceOrb extends Entity {
@@ -360,7 +366,7 @@ public class ExperienceOrb extends Entity {
int l = amount - k * amount / j;
itemstack.setDamageValue(itemstack.getDamageValue() - j);
int k = amount - this.durabilityToXp(j);
- this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
+ // this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account
return k > 0 ? this.repairPlayerItems(player, k) : 0;
} else {
if (l > 0) {
- this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
+ // this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account
return this.repairPlayerItems(player, l);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c367084351f21 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@ -77,10 +77,10 @@ index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c3670
public java.util.UUID getTriggerEntityId() {
return getHandle().triggerEntityId;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 18d1e2ff18cae10ec6f1b7adf480bd6bfe738584..943c452e1d3d1273a2ef304aa2a52f328dfb5d37 100644
index 4552a77e84d3c957431a918ca78dcf2e06f2e74c..805aec84b57f0a426c1337445dfdd084cb0a0507 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -703,15 +703,29 @@ public class CraftEventFactory {
@@ -704,15 +704,29 @@ public class CraftEventFactory {
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
double radius = world.spigotConfig.expMerge;
if (radius > 0) {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 539280a0265a4746ebc9ede6667df3699dfb8125..a5026d470b8651ddf4b79fc29cbc598ac55217ff 100644
index ccb779066fb5f3ebf9e4bdabdffc9c18c1a75cbb..1544242abfbd0f9accf5fe515a95d9ac0db50d4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -483,7 +483,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -484,7 +484,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean addPotionEffect(PotionEffect effect, boolean force) {
@ -18,7 +18,7 @@ index 539280a0265a4746ebc9ede6667df3699dfb8125..a5026d470b8651ddf4b79fc29cbc598a
return true;
}
@@ -504,7 +504,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -505,7 +505,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public PotionEffect getPotionEffect(PotionEffectType type) {
MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type));
@ -27,7 +27,7 @@ index 539280a0265a4746ebc9ede6667df3699dfb8125..a5026d470b8651ddf4b79fc29cbc598a
}
@Override
@@ -516,7 +516,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -517,7 +517,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public Collection<PotionEffect> getActivePotionEffects() {
List<PotionEffect> effects = new ArrayList<PotionEffect>();
for (MobEffectInstance handle : this.getHandle().activeEffects.values()) {

Datei anzeigen

@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
if any are still running after that delay just as reload does.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 92cb9a0a479f3dc1c78eda42191d020106d059dd..2575129d1647eda4acb1ce4f19619f42257cb6f8 100644
index 15938074ad20133f5ccdab0c8566556d7b807d8f..095215a5cbf1abeb7836a6ccc87c195019a7f019 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -936,6 +936,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -943,6 +943,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@ -22,10 +22,10 @@ index 92cb9a0a479f3dc1c78eda42191d020106d059dd..2575129d1647eda4acb1ce4f19619f42
// CraftBukkit end
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.shutdown(); // Paper - Plugin remapping
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 13ef7ed49526b9f0d1ec376ec3242e14f66f0a23..91b8fefc2c97c1f487bde1559d4ccf76795ca954 100644
index 7eaf0f56cbf0695132a029b0a208f283f43e47b5..118708bd917518333359ce1407e1e26e4ec6a180 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1047,6 +1047,32 @@ public final class CraftServer implements Server {
@@ -1050,6 +1050,32 @@ public final class CraftServer implements Server {
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Ensure EntityRaider respects game and entity rules for
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
index f81d5abedec0f2fa7ae81421edda8b3dfcb7690b..9f54e46b870e78d1d360ea79604708db08276ae3 100644
index 6fb56c826f0eaf76ab7896f784084b4fb1b3d105..e5dff812dc979ecf71939a85b2213965d15e7954 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
@@ -334,6 +334,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -292,6 +292,7 @@ public abstract class Raider extends PatrollingMonster {
@Override
public boolean canUse() {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen