Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9a294519 SPIGOT-7533, 943: Add missing Poses for 1.20.3
be2884c4 Add unique ID to PlayerResourcePackStatusEvent
d9c1eb83 Add additional @MinecraftExperimental annotations
68f5bb6a SPIGOT-7526: Add missing PlayerResourcePackStatusEvent statuses

CraftBukkit Changes:
368c48be1 Fix formatting issue in previous commit
da8f91f31 SPIGOT-7534: Error when chunk with decorated pot trying to save
d20c9291a SPIGOT-7532: Entity#isValid() returns false after server restart
ec1fa2ead PR-1309: Add tests for Bukkit Pose
5a7080b58 Add unique ID to PlayerResourcePackStatusEvent
0fd734950 SPIGOT-7528: Fix certain custom shaped recipes
This commit is contained in:
Nassim Jahnke 2023-12-06 22:59:39 +01:00
parent b1f94a84e8
commit 6bafacfb14
18 changed files with 45 additions and 100 deletions

View file

@ -144,39 +144,41 @@ index fdde0f82531fba370327ff71f59c2c4722d42df2..339b3a4ebae8a522ec3932f901729f88
// Spigot start // Spigot start
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
index b98195650d49d78ec35970ca0376b6289b861e4b..4c2102a11c3d682d98f0db4ccafa35231e66bcdd 100644 index e2c4f9a0456cef345772d57b4d9c6e7d9598dd53..d80191e0848e04bbfb740113b9b1646dae087ec0 100644
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
@@ -11,13 +11,32 @@ import org.jetbrains.annotations.NotNull; @@ -13,14 +13,34 @@ public class PlayerResourcePackStatusEvent extends PlayerEvent {
public class PlayerResourcePackStatusEvent extends PlayerEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
private final UUID id;
+ @Deprecated + @Deprecated
+ private final String hash; // Paper + private final String hash; // Paper
private final Status status; private final Status status;
public PlayerResourcePackStatusEvent(@NotNull final Player who, @NotNull Status resourcePackStatus) { public PlayerResourcePackStatusEvent(@NotNull final Player who, @NotNull UUID id, @NotNull Status resourcePackStatus) {
super(who); super(who);
this.id = id;
+ this.hash = null; // Paper + this.hash = null; // Paper
this.status = resourcePackStatus; this.status = resourcePackStatus;
} }
+ @Deprecated // Paper + @Deprecated // Paper
+ public PlayerResourcePackStatusEvent(final Player who, Status resourcePackStatus, String hash) { + public PlayerResourcePackStatusEvent(@NotNull final Player who, @NotNull UUID id, Status resourcePackStatus, String hash) {
+ super(who); + super(who);
+ this.id = id;
+ this.hash = hash; // Paper + this.hash = hash; // Paper
+ this.status = resourcePackStatus; + this.status = resourcePackStatus;
+ } + }
+ +
+ @Deprecated
+ /** + /**
+ * @deprecated Hash does not seem to ever be set + * @deprecated Hash does not seem to ever be set
+ */ + */
+ @Deprecated
+ public String getHash() { + public String getHash() {
+ return this.hash; + return this.hash;
+ } + }
+ // Paper end + // Paper end
+ +
/** /**
* Gets the status of this pack. * Gets the unique ID of this pack.
* *

View file

@ -837,10 +837,10 @@ index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
index 4c2102a11c3d682d98f0db4ccafa35231e66bcdd..ca238af544764273b9cd4cf3587e8632031c9ede 100644 index d80191e0848e04bbfb740113b9b1646dae087ec0..25ac728dac8c15c18851dde4cbcc10028552ae77 100644
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
@@ -5,8 +5,9 @@ import org.bukkit.event.HandlerList; @@ -6,8 +6,9 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**

View file

@ -500,10 +500,10 @@ index 0000000000000000000000000000000000000000..f45b8cfd1611345e8d81ecb8297a586f
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index e3c94a56237ccd24a73857eb06404a39fff9c582..5ec5f5d3f8a8995a1ca90f251f856c7f24a940c4 100644 index ca6d0eaa9d9a37c07f3e1630b83a79bf98211edb..26d02aa5da444112f8fa84c07e3080bb669983a1 100644
--- a/src/main/java/org/bukkit/Particle.java --- a/src/main/java/org/bukkit/Particle.java
+++ b/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java
@@ -200,6 +200,18 @@ public enum Particle implements Keyed { @@ -204,6 +204,18 @@ public enum Particle implements Keyed {
return key; return key;
} }

View file

@ -438,7 +438,7 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
return note; return note;
} }
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index 5ec5f5d3f8a8995a1ca90f251f856c7f24a940c4..06c497bf342d82bcd8e481febf348811d19e629a 100644 index 26d02aa5da444112f8fa84c07e3080bb669983a1..0cb15350704955f4a1aeff184a8b60d9a9871ded 100644
--- a/src/main/java/org/bukkit/Particle.java --- a/src/main/java/org/bukkit/Particle.java
+++ b/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java
@@ -54,7 +54,9 @@ public enum Particle implements Keyed { @@ -54,7 +54,9 @@ public enum Particle implements Keyed {
@ -451,7 +451,7 @@ index 5ec5f5d3f8a8995a1ca90f251f856c7f24a940c4..06c497bf342d82bcd8e481febf348811
BLOCK_DUST("block", BlockData.class, false), BLOCK_DUST("block", BlockData.class, false),
WATER_DROP("rain"), WATER_DROP("rain"),
MOB_APPEARANCE("elder_guardian"), MOB_APPEARANCE("elder_guardian"),
@@ -144,15 +146,21 @@ public enum Particle implements Keyed { @@ -148,15 +150,21 @@ public enum Particle implements Keyed {
// ----- Legacy Separator ----- // ----- Legacy Separator -----
/** /**
* Uses {@link MaterialData} as DataType * Uses {@link MaterialData} as DataType

View file

@ -5,12 +5,12 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 51f0705499003ea71274e1d5c8a77306fa868485..0c8042a515daeeb95b14147214e0a3151ef6f5a1 100644 index 9969b66e39fb6ce8a9ba24ccbd7ef5d3e363197f..363f94a2fb54b7a55f392cc65a6e4d68f313fb07 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2390,6 +2390,15 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2389,6 +2389,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit
+ // Paper start - Set origin location when the entity is being added to the world + // Paper start - Set origin location when the entity is being added to the world
+ if (entity.getOriginVector() == null) { + if (entity.getOriginVector() == null) {

View file

@ -5,18 +5,18 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 0a6feccc657e62d7bad5e1461d5538a4c3a16b76..53833e155cf0d2328f2c2b36702970925045be3d 100644 index 56f6f65ceb1271e9273b1ee6658773eb3445beed..a26db4bd859ef52dadf03f1b62155bcc54b7a740 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -156,7 +156,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -156,7 +156,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id()); ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id());
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect")); this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
} }
- this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit - this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit
+ // Paper start + // Paper start
+ PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()]; + PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()];
+ player.getBukkitEntity().setResourcePackStatus(packStatus); + player.getBukkitEntity().setResourcePackStatus(packStatus);
+ this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packStatus)); // CraftBukkit + this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), packStatus)); // CraftBukkit
+ // Paper end + // Paper end
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0718f8745fed4cd0cbb29372159ff39bdce7d0fd..3d826b82034dc12daa521414142dfe3cdd41365b 100644 index f9e9348a897d8f8bd5eb5bd951c6e2416e73562d..16abfc81d054cdc983500d3e498533ea8e8cc0be 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2402,6 +2402,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2401,6 +2401,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
} }
// Paper end // Paper end
@ -16,7 +16,7 @@ index 0718f8745fed4cd0cbb29372159ff39bdce7d0fd..3d826b82034dc12daa521414142dfe3c
} }
public void onTrackingEnd(Entity entity) { public void onTrackingEnd(Entity entity) {
@@ -2477,6 +2478,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2476,6 +2477,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
} }
// CraftBukkit end // CraftBukkit end

View file

@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed. Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index af16cabd57a5fb28c2e70856730dd0df6c8abf9c..98ea55455d365b8d25ecb998daacbcbb1b45e5a7 100644 index 6baf4caafbb4f7a09fe3a806bbff17c9f6105fbd..97554ab72743cf2b8e87c7f3c35579f669c2308a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2423,6 +2423,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2422,6 +2422,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
{ {
if ( iter.next().player == entity ) if ( iter.next().player == entity )
{ {

View file

@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID public net.minecraft.world.entity.projectile.Projectile ownerUUID
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 5f6bd432566c4e437d7580e465b52b49bdfc057d..6c03c96adfa68b1817423d012affa5b3952ade04 100644 index 97554ab72743cf2b8e87c7f3c35579f669c2308a..6d75010bf837a791f5fe04aacb973246410bbd66 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2356,6 +2356,12 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2354,6 +2354,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTickingEnd(Entity entity) { public void onTickingEnd(Entity entity) {
ServerLevel.this.entityTickList.remove(entity); ServerLevel.this.entityTickList.remove(entity);

View file

@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not. to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e024c296f471737764af260ca4cd7e9005e044ac..ac43aba1ae9420a2a02fd3d3e3d4426c04e76139 100644 index 0705a1bb63f056a228308d348bc5db87b0bee5a1..cc499b31cf186412e575373a5fb7cad54946b0a7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1470,7 +1470,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1470,7 +1470,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -19,7 +19,7 @@ index e024c296f471737764af260ca4cd7e9005e044ac..ac43aba1ae9420a2a02fd3d3e3d4426c
} }
} }
} }
@@ -2446,7 +2446,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2445,7 +2445,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start // Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {

View file

@ -25,10 +25,10 @@ index bd15131b7506e965bcf64be20330731256a1e1f0..0e3c89b9d75160d0e8947d042a1568da
EntityType<?> entitytypes = entity.getType(); EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16; 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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index cfb28fbb860ac3d09589776d1b722cbb72d12de8..3ba431c4841a03018660f5137894b10298b417b9 100644 index 321f90a0ad7cdd3b0e8b136682947a467f2388b9..86015c6b289ce6fb6b9d1b0ca3f637e53192eea3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2502,7 +2502,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2500,7 +2500,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTrackingStart(Entity entity) { public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@ -37,9 +37,9 @@ index cfb28fbb860ac3d09589776d1b722cbb72d12de8..3ba431c4841a03018660f5137894b102
if (entity instanceof ServerPlayer) { if (entity instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entity; ServerPlayer entityplayer = (ServerPlayer) entity;
@@ -2536,6 +2536,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2535,6 +2535,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit
+ ServerLevel.this.getChunkSource().addEntity(entity); + ServerLevel.this.getChunkSource().addEntity(entity);
// Paper start - Set origin location when the entity is being added to the world // Paper start - Set origin location when the entity is being added to the world

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 5ff0275067f11bcd723cf8884788f76e966832e4..cfc53b3c270e02131ef1b3daf3476e3cce21e6e1 100644 index a3ef919ff07655e835a1b423b3d4f71939a47db8..fa4a6f519a4611fe896210a97aeb334e1fae039d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2683,6 +2683,11 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2682,6 +2682,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot end // Spigot end
// Spigot Start // Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message

View file

@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147
} }
}); });
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index cfc53b3c270e02131ef1b3daf3476e3cce21e6e1..3ac7c157cddfaa9262e727705eb88b55a637f618 100644 index fa4a6f519a4611fe896210a97aeb334e1fae039d..91fdab7fc3afacfa58e91d5714f6bf7c3359278a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2593,6 +2593,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2591,6 +2591,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
public void onTickingStart(Entity entity) { public void onTickingStart(Entity entity) {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 222e85b22c5d1f5a135e7620df0786c709dff2e4..9ea6786730d6a8e9fddd49a0b28eeefd2d5a8ef4 100644 index ac9f42e8d88ca8cdb2882bd8d7676a793024599c..ab8c8643c48f6ac49f4b73eed6462cd62482b269 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2629,7 +2629,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2627,7 +2627,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) { if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity; Mob entityinsentient = (Mob) entity;
@ -17,7 +17,7 @@ index 222e85b22c5d1f5a135e7620df0786c709dff2e4..9ea6786730d6a8e9fddd49a0b28eeefd
String s = "onTrackingStart called during navigation iteration"; String s = "onTrackingStart called during navigation iteration";
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration")); Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
@@ -2714,7 +2714,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2713,7 +2713,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) { if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity; Mob entityinsentient = (Mob) entity;

View file

@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
instead of just checking players in their world. instead of just checking players in their world.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9ea6786730d6a8e9fddd49a0b28eeefd2d5a8ef4..ded19a243173c9d5c3d56d61a719ce169eeb0dfa 100644 index ab8c8643c48f6ac49f4b73eed6462cd62482b269..b3ffc58db60cbe0591086c3768ae6009ca7017c7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2751,4 +2751,12 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2750,4 +2750,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::move); entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
} }
} }

View file

@ -1,57 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Wed, 6 Dec 2023 22:00:10 +0100
Subject: [PATCH] Fix decorated pots crashing the server
diff --git a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
index a65cc426193df558569bec4373a9bd940cbc9b04..15da1af40759e3669d087d7380a0b85ac20bdf9d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
@@ -33,6 +33,46 @@ public class DecoratedPotBlockEntity extends BlockEntity implements Randomizable
@Nullable
protected ResourceLocation lootTable;
protected long lootTableSeed;
+ // Paper start - fix cb dumb
+ public java.util.List<org.bukkit.entity.HumanEntity> transaction = new java.util.ArrayList<>();
+ private int maxStack = MAX_STACK;
+
+ @Override
+ public int getMaxStackSize() {
+ return this.maxStack;
+ }
+
+ @Override
+ public java.util.List<ItemStack> getContents() {
+ return java.util.Arrays.asList(this.item);
+ }
+
+ @Override
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.add(who);
+ }
+
+ @Override
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.remove(who);
+ }
+
+ @Override
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+
+ @Override
+ public void setMaxStackSize(int size) {
+ this.maxStack = size;
+ }
+
+ @Override
+ public org.bukkit.Location getLocation() {
+ if (this.level == null) return null;
+ return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
+ }
+ // Paper end - fix cb dumb
public DecoratedPotBlockEntity(BlockPos pos, BlockState state) {
super(BlockEntityType.DECORATED_POT, pos, state);

@ -1 +1 @@
Subproject commit adcf6347c520b143677b2380edfb228661facf0e Subproject commit 9a294519b082385a41711eed78797c6b7f3c2476

@ -1 +1 @@
Subproject commit 8232a74cf8d32bce37c33ff6d0cd9b688a1ef8e9 Subproject commit 368c48be1b32ddc3c062f46b96e4450ea66be935