more work

all server patches done (almost)
This commit is contained in:
Lulu13022002 2023-09-22 18:59:52 +02:00
parent 8baf510f92
commit a91e19f1df
No known key found for this signature in database
GPG key ID: 491C8F0B8ACDEB01
53 changed files with 153 additions and 153 deletions

View file

@ -67,10 +67,10 @@ index 1481c8ca684eddca3eb5db3aceac4877043b9fcd..076e06908a0cf97f86a64a15ca0231c5
continue; continue;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index deed77a3d44bc55681483d7f47f148b5220135f2..47c8148e6413c51ffdd30082bfb37a7fb8a73a71 100644 index fe7a8e48a620630a6365edd22466f348de0dc508..cd7aa61a419c4610b841b74b74cfe5a636f292fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -71,11 +71,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { @@ -72,11 +72,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
CraftMetaSkull(CompoundTag tag) { CraftMetaSkull(CompoundTag tag) {
super(tag); super(tag);
@ -78,7 +78,7 @@ index deed77a3d44bc55681483d7f47f148b5220135f2..47c8148e6413c51ffdd30082bfb37a7f
if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) { if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
this.setProfile(NbtUtils.readGameProfile(tag.getCompound(SKULL_OWNER.NBT))); this.setProfile(NbtUtils.readGameProfile(tag.getCompound(SKULL_OWNER.NBT)));
} else if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_STRING) && !tag.getString(SKULL_OWNER.NBT).isEmpty()) { } else if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_STRING) && !tag.getString(SKULL_OWNER.NBT).isEmpty()) {
this.setProfile(new GameProfile(null, tag.getString(SKULL_OWNER.NBT))); this.setProfile(new CraftGameProfile(null, tag.getString(SKULL_OWNER.NBT)));
} }
+ } catch (Exception ignored) {} // Paper + } catch (Exception ignored) {} // Paper

View file

@ -208,10 +208,10 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57
return null; return null;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5be4d15ac3df989339c586bbeb8148b1b41d47d4..21b112f69b747e44b6cc9136ac11089258b55537 100644 index 0eddcd61a7253fe840b84f69ba4a4ada6cb716ff..a041fcf0702d2f8510365eac5d7d52dcaf1091d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1633,23 +1633,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1593,23 +1593,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
@Override @Override
@ -240,7 +240,7 @@ index 5be4d15ac3df989339c586bbeb8148b1b41d47d4..21b112f69b747e44b6cc9136ac110892
if (kickPlayer) { if (kickPlayer) {
this.kickPlayer(reason); this.kickPlayer(reason);
} }
@@ -1657,12 +1657,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1617,12 +1617,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
@Override @Override
@ -256,10 +256,10 @@ index 5be4d15ac3df989339c586bbeb8148b1b41d47d4..21b112f69b747e44b6cc9136ac110892
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
index d1aab4742b605e8807b0e4ca148abe0ed95039f4..58ea78d3917d2f264515c41f4df2f9ff6f8e4667 100644 index 8d2997efaacbe37d9007861ac871fd2719c2d663..b9af7d0591fee7dc1ce98b20387ffeb31096f6a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java --- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java +++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
@@ -27,7 +27,7 @@ import org.bukkit.profile.PlayerProfile; @@ -31,7 +31,7 @@ import org.bukkit.profile.PlayerProfile;
import org.bukkit.profile.PlayerTextures; import org.bukkit.profile.PlayerTextures;
@SerializableAs("PlayerProfile") @SerializableAs("PlayerProfile")
@ -268,7 +268,7 @@ index d1aab4742b605e8807b0e4ca148abe0ed95039f4..58ea78d3917d2f264515c41f4df2f9ff
@Nonnull @Nonnull
public static GameProfile validateSkullProfile(@Nonnull GameProfile gameProfile) { public static GameProfile validateSkullProfile(@Nonnull GameProfile gameProfile) {
@@ -122,7 +122,7 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky @@ -126,7 +126,7 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky
} }
@Override @Override
@ -277,7 +277,7 @@ index d1aab4742b605e8807b0e4ca148abe0ed95039f4..58ea78d3917d2f264515c41f4df2f9ff
return CompletableFuture.supplyAsync(this::getUpdatedProfile, Util.PROFILE_EXECUTOR); // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor return CompletableFuture.supplyAsync(this::getUpdatedProfile, Util.PROFILE_EXECUTOR); // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor
} }
@@ -276,4 +276,71 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky @@ -285,4 +285,71 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky
// Paper - diff on change // Paper - diff on change
return profile; return profile;
} }

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
index 2e7de2378e01aed514e237029d6d64e78871c9b4..0002f3a2f2e096d4b2015baf707707f6cc1a9582 100644 index 1cef116b692ebdf3ade01cde533d1e5182a05a91..3c2941d799c9acb3dd9e2b67b7092f4bba5ede17 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
@@ -63,7 +63,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill @@ -67,7 +67,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
public WanderingTrader(EntityType<? extends WanderingTrader> type, Level world) { public WanderingTrader(EntityType<? extends WanderingTrader> type, Level world) {
super(type, world); super(type, world);

View file

@ -5,10 +5,10 @@ Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c514795dee0c54ae4fc1592dab5b69c39631c9ad..26e1a9002d675245d4cf91e6682605314b078fb2 100644 index 921e69bddd5b09a90d83a85e530f5f6f45f3ef5f..956d0c2a893fb0152718832686e998466f7d0230 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -718,7 +718,10 @@ public class CraftEventFactory { @@ -720,7 +720,10 @@ public class CraftEventFactory {
} else if (entity instanceof net.minecraft.world.entity.ExperienceOrb) { } else if (entity instanceof net.minecraft.world.entity.ExperienceOrb) {
net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity; net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity;
double radius = world.spigotConfig.expMerge; double radius = world.spigotConfig.expMerge;

View file

@ -21,10 +21,10 @@ index 6c9d163b9f857806461dc72e54713f1a4f3a5c31..0bd8ea3143b2e9755d492af4596622d1
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java
index b01cdfe3c62c609e953aa5007e6557cfec0d5a5f..1122090792e9ee98bf8498e8907c5abbbcbcd6d6 100644 index 0c1c6fbcf625da4a28514e0d040deb6c98ba9507..614777d15bcf4141a89d0a0f7bd880526c668ffd 100644
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java --- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java
@@ -203,6 +203,6 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo @@ -207,6 +207,6 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
@Nullable @Nullable
@Override @Override
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) { public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c80aaaea583f87143dab2a4d314b8b3f83d8bbf6..2eb497b87ac02a97242073cfdaad08019d68a47e 100644 index 8310735de62b738b5c6d9d48df0cfe3c5bd51295..78c1f4e964bd4906d6c9f186101869709e054af2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1406,8 +1406,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1284,8 +1284,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER
double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1;
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
@ -19,7 +19,7 @@ index c80aaaea583f87143dab2a4d314b8b3f83d8bbf6..2eb497b87ac02a97242073cfdaad0801
if (this.player.isPassenger()) { if (this.player.isPassenger()) {
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1); this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
@@ -1473,8 +1473,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1351,8 +1351,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
// Paper start - Prevent moving into unloaded chunks // Paper start - Prevent moving into unloaded chunks
if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) { if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) {
@ -34,7 +34,7 @@ index c80aaaea583f87143dab2a4d314b8b3f83d8bbf6..2eb497b87ac02a97242073cfdaad0801
} }
// Paper end // Paper end
@@ -1483,9 +1489,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1361,9 +1367,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// CraftBukkit end // CraftBukkit end
@ -51,7 +51,7 @@ index c80aaaea583f87143dab2a4d314b8b3f83d8bbf6..2eb497b87ac02a97242073cfdaad0801
} }
} }
@@ -1550,8 +1563,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1428,8 +1441,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean flag2 = false; boolean flag2 = false;
if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
@ -67,7 +67,7 @@ index c80aaaea583f87143dab2a4d314b8b3f83d8bbf6..2eb497b87ac02a97242073cfdaad0801
} }
// Paper start - optimise out extra getCubes // Paper start - optimise out extra getCubes
@@ -1564,6 +1584,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1442,6 +1462,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (didCollide || !axisalignedbb.equals(newBox)) { if (didCollide || !axisalignedbb.equals(newBox)) {
// note: only call after setLocation, or else getBoundingBox is wrong // note: only call after setLocation, or else getBoundingBox is wrong
teleportBack = this.hasNewCollision(worldserver, this.player, axisalignedbb, newBox); teleportBack = this.hasNewCollision(worldserver, this.player, axisalignedbb, newBox);
@ -83,7 +83,7 @@ index c80aaaea583f87143dab2a4d314b8b3f83d8bbf6..2eb497b87ac02a97242073cfdaad0801
} // else: no collision at all detected, why do we care? } // else: no collision at all detected, why do we care?
} }
if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes
@@ -1652,6 +1681,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1530,6 +1559,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] API for updating recipes on clients
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index fff7ad7a45f310783ac96b44575ad3db13d537fa..640e9bd618dc8286933318744c2064ede1fd9b5f 100644 index 620c136d970c836c036ea5c22b5642ae6f5dc567..a467c9551876de3b3b63f52b317d1181e1ca9825 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1524,6 +1524,13 @@ public abstract class PlayerList { @@ -1517,6 +1517,13 @@ public abstract class PlayerList {
} }
public void reloadResources() { public void reloadResources() {
@ -22,7 +22,7 @@ index fff7ad7a45f310783ac96b44575ad3db13d537fa..640e9bd618dc8286933318744c2064ed
// CraftBukkit start // CraftBukkit start
/*Iterator iterator = this.advancements.values().iterator(); /*Iterator iterator = this.advancements.values().iterator();
@@ -1539,7 +1546,15 @@ public abstract class PlayerList { @@ -1532,7 +1539,15 @@ public abstract class PlayerList {
} }
// CraftBukkit end // CraftBukkit end
@ -39,10 +39,10 @@ index fff7ad7a45f310783ac96b44575ad3db13d537fa..640e9bd618dc8286933318744c2064ed
Iterator iterator1 = this.players.iterator(); Iterator iterator1 = this.players.iterator();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 47e36ad27761dd6b2e2ef1b86664fa3b3c84865d..0c773cd155bb4dcec17426c2f5860bf44cdb8e0e 100644 index 6438891e243d0c25f1b3fbe0303ef1c133637cbb..0f0052aa556a40eef6525a21a68919cd5a42fe43 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1129,6 +1129,18 @@ public final class CraftServer implements Server { @@ -1062,6 +1062,18 @@ public final class CraftServer implements Server {
ReloadCommand.reload(console); ReloadCommand.reload(console);
} }
@ -61,7 +61,7 @@ index 47e36ad27761dd6b2e2ef1b86664fa3b3c84865d..0c773cd155bb4dcec17426c2f5860bf4
private void loadIcon() { private void loadIcon() {
this.icon = new CraftIconCache(null); this.icon = new CraftIconCache(null);
try { try {
@@ -1471,6 +1483,13 @@ public final class CraftServer implements Server { @@ -1404,6 +1416,13 @@ public final class CraftServer implements Server {
@Override @Override
public boolean addRecipe(Recipe recipe) { public boolean addRecipe(Recipe recipe) {
@ -75,7 +75,7 @@ index 47e36ad27761dd6b2e2ef1b86664fa3b3c84865d..0c773cd155bb4dcec17426c2f5860bf4
CraftRecipe toAdd; CraftRecipe toAdd;
if (recipe instanceof CraftRecipe) { if (recipe instanceof CraftRecipe) {
toAdd = (CraftRecipe) recipe; toAdd = (CraftRecipe) recipe;
@@ -1500,6 +1519,11 @@ public final class CraftServer implements Server { @@ -1433,6 +1452,11 @@ public final class CraftServer implements Server {
} }
} }
toAdd.addToCraftingManager(); toAdd.addToCraftingManager();
@ -87,7 +87,7 @@ index 47e36ad27761dd6b2e2ef1b86664fa3b3c84865d..0c773cd155bb4dcec17426c2f5860bf4
return true; return true;
} }
@@ -1619,10 +1643,23 @@ public final class CraftServer implements Server { @@ -1552,10 +1576,23 @@ public final class CraftServer implements Server {
@Override @Override
public boolean removeRecipe(NamespacedKey recipeKey) { public boolean removeRecipe(NamespacedKey recipeKey) {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Only capture actual tree growth
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index 70aade6a8d36f8376cc567800258ea6fabb0607f..8c2750de3be202122ccf9923a9fa32fcb8bdb743 100644 index e9b748a81ec223a701b56d2dc890c9eb223d8474..a0c7c6208314d981e8577ad69ef1c5193290a085 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -861,6 +861,7 @@ public interface DispenseItemBehavior { @@ -862,6 +862,7 @@ public interface DispenseItemBehavior {
if (!fertilizeEvent.isCancelled()) { if (!fertilizeEvent.isCancelled()) {
for (org.bukkit.block.BlockState blockstate : blocks) { for (org.bukkit.block.BlockState blockstate : blocks) {
blockstate.update(true); blockstate.update(true);
@ -17,10 +17,10 @@ index 70aade6a8d36f8376cc567800258ea6fabb0607f..8c2750de3be202122ccf9923a9fa32fc
} }
} }
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 879cc823d56625867eb73bb621db6a13f40ad81c..d138660e459b2d09ba9dd7ae2bf3da499d9ae25c 100644 index 7bb47643e748f57a51c613d0a2ee8d05e1fe1798..16f087adbf94b8fd6726ffd300b103dd709ad406 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -396,6 +396,7 @@ public final class ItemStack { @@ -401,6 +401,7 @@ public final class ItemStack {
} }
for (CraftBlockState blockstate : blocks) { for (CraftBlockState blockstate : blocks) {
world.setBlock(blockstate.getPosition(),blockstate.getHandle(), blockstate.getFlag()); // SPIGOT-7248 - manual update to avoid physics where appropriate world.setBlock(blockstate.getPosition(),blockstate.getHandle(), blockstate.getFlag()); // SPIGOT-7248 - manual update to avoid physics where appropriate
@ -29,10 +29,10 @@ index 879cc823d56625867eb73bb621db6a13f40ad81c..d138660e459b2d09ba9dd7ae2bf3da49
} }
entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 773bfdd3ed457a352b5329f280c0d10297d579ba..b6b6d5af1784963d95843e326abffa3add55ec4f 100644 index 019a86e964f3f0d89aea9e1db18ad551914b07ef..70e6071e455cc21f38a3ccca6bff3cd86a8622be 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1554,4 +1554,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1466,4 +1466,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return null; return null;
} }
// Paper end // Paper end
@ -46,7 +46,7 @@ index 773bfdd3ed457a352b5329f280c0d10297d579ba..b6b6d5af1784963d95843e326abffa3a
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java
index d5ec1e5909c03a58add7f4597b140f787600c09a..8a0cb287bec1c607278f7a333140afbecd45dea5 100644 index f43e6fe77e943239c1f1d6fa3e31235949f79546..53ac4e618fec3fe384d8a106c521f3eace0b5b35 100644
--- a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java --- a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java
@@ -73,6 +73,7 @@ public class SaplingBlock extends BushBlock implements BonemealableBlock { @@ -73,6 +73,7 @@ public class SaplingBlock extends BushBlock implements BonemealableBlock {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Use correct source for mushroom block spread event
diff --git a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java
index f6f8e155223cba10c4073ddca602d1aa3aa872d7..5238b23cd3bca21e2b14c9be15699b95ad267e24 100644 index c9593c8c3b5e0502b33691ab6c5e14d389e7d0fe..302c5a6401facf192677b89cc0e9190bb35b1229 100644
--- a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java --- a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java +++ b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java
@@ -56,6 +56,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock { @@ -56,6 +56,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Use correct seed on api world load
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0c773cd155bb4dcec17426c2f5860bf44cdb8e0e..346f22e7e71a8bac6a780437c53893a3de583be0 100644 index 0f0052aa556a40eef6525a21a68919cd5a42fe43..843507ce8ad907509cb0ca5347ef6834ce7fcc35 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1310,7 +1310,7 @@ public final class CraftServer implements Server { @@ -1243,7 +1243,7 @@ public final class CraftServer implements Server {
// Paper - move down // Paper - move down

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Cache map ids on item frames
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index d934d07ad761319f338d4386536f68fde211c041..196280f54e397c69d32bd4d1f6ae666efdd93773 100644 index e2795f6ee05141374736dd5821e23431b26c6162..b6639c363653a8ac802d800d7228d85c078ff163 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java --- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -115,7 +115,7 @@ public class ServerEntity { @@ -118,7 +118,7 @@ public class ServerEntity {
ItemStack itemstack = entityitemframe.getItem(); ItemStack itemstack = entityitemframe.getItem();
if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 83cef5ec27c31f133a23cd27349f722799c786ea..719e7103f7dfdc30f1cefd24a3fa572fa0ac8b1e 100644 index 58f2eaf81f24f1548bdc9f46528cb4b94b18de69..868d502a9bc49bf5e1295c28a76fc09ed37f8591 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -622,6 +622,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -623,6 +623,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeBase = cra.getHandle().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.BIOME).getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey))); net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeBase = cra.getHandle().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.BIOME).getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey)));
cra.setBiome(x, y, z, biomeBase); cra.setBiome(x, y, z, biomeBase);
} }

View file

@ -45,10 +45,10 @@ index 5a5a8945c786e16ff0df62494ddd1ac85c42b53f..63f9735d356dafd579cee4423d3037eb
case COMPOSTER_FILL_ATTEMPT: case COMPOSTER_FILL_ATTEMPT:
datavalue = ((Boolean) data) ? 1 : 0; datavalue = ((Boolean) data) ? 1 : 0;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 550dcb7d595221b221e4710890d8a3cad789fc07..f857f490ffba2f25f7c06c5fb1a1905f0b51fbe2 100644 index c7e6e73507ab198224de1b549f7c71887341c6a6..d6b789764abc50856dcc1c8da5e9e481f54d61ca 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1374,7 +1374,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1379,7 +1379,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public <T> void playEffect(Location loc, Effect effect, T data, int radius) { public <T> void playEffect(Location loc, Effect effect, T data, int radius) {
if (data != null) { if (data != null) {
Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect); Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect);
@ -58,10 +58,10 @@ index 550dcb7d595221b221e4710890d8a3cad789fc07..f857f490ffba2f25f7c06c5fb1a1905f
// Special case: the axis is optional for ELECTRIC_SPARK // Special case: the axis is optional for ELECTRIC_SPARK
Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect); Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 21b112f69b747e44b6cc9136ac11089258b55537..0aab08552b4810b4ae699601662f7b2b6f5a0220 100644 index a041fcf0702d2f8510365eac5d7d52dcaf1091d5..6c217dd817c6af0e49e33334b2aef79299372b66 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -860,7 +860,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -820,7 +820,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(effect != null, "Effect cannot be null"); Preconditions.checkArgument(effect != null, "Effect cannot be null");
if (data != null) { if (data != null) {
Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect); Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect);

View file

@ -7,10 +7,10 @@ Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with. methods depending on the implementation of Entity you were working with.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 71ccd54245c2cfe5e75a53e5d6b2962961eccb6f..7e132298252d196a97c99b45e58a3ac9a1de7216 100644 index fd89da8b92492c3b507b68d1040d293977528441..14d962c48727110e854f58860d2e8483d619acba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1486,4 +1486,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1471,4 +1471,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return !this.getHandle().level().noCollision(this.getHandle(), aabb); return !this.getHandle().level().noCollision(this.getHandle(), aabb);
} }
// Paper End - Collision API // Paper End - Collision API

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Improve cancelling PreCreatureSpawnEvent with per player mob
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 3b9fcc33fdd91b02f7f9681329b2f3d523a5cd5a..14f6c163c4f3cb5b096db1b9111041b4573bfef6 100644 index 0f543ccb5363037647f471d21171ab0ed3d0d993..027e2ee23cd4466046707f92da6c047c15b4d8b1 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -479,8 +479,27 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -339,8 +339,27 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} }
} }
@ -39,10 +39,10 @@ index 3b9fcc33fdd91b02f7f9681329b2f3d523a5cd5a..14f6c163c4f3cb5b096db1b9111041b4
// Paper end // Paper end
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 488a253e218409b5f0b4a872cee0928578fa7582..acbcdc8cb1523044b1657e03a141fae6389a3686 100644 index 70a7abf4738cc5da94d7465884d9a5a1dd7c828c..da0719ca2634913b2ee04426c850f6304480c8ce 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -564,7 +564,17 @@ public class ServerChunkCache extends ChunkSource { @@ -686,7 +686,17 @@ public class ServerChunkCache extends ChunkSource {
if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled
// re-set mob counts // re-set mob counts
for (ServerPlayer player : this.level.players) { for (ServerPlayer player : this.level.players) {
@ -62,10 +62,10 @@ index 488a253e218409b5f0b4a872cee0928578fa7582..acbcdc8cb1523044b1657e03a141fae6
spawnercreature_d = NaturalSpawner.createState(l, this.level.getAllEntities(), this::getFullChunk, null, true); spawnercreature_d = NaturalSpawner.createState(l, this.level.getAllEntities(), this::getFullChunk, null, true);
} else { } else {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index dc5fda83a66afbfeb7897fc20b4742899d8aca08..161c40692e8d469fad4169908b9353be0f85d0d8 100644 index 299c960b7601ca695d95ef96e31bf652a2bb7dac..4ea7930f5d93e917dacaeff972a49886ff90847c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -254,6 +254,7 @@ public class ServerPlayer extends Player { @@ -252,6 +252,7 @@ public class ServerPlayer extends Player {
// Paper start - mob spawning rework // Paper start - mob spawning rework
public static final int MOBCATEGORY_TOTAL_ENUMS = net.minecraft.world.entity.MobCategory.values().length; public static final int MOBCATEGORY_TOTAL_ENUMS = net.minecraft.world.entity.MobCategory.values().length;
public final int[] mobCounts = new int[MOBCATEGORY_TOTAL_ENUMS]; // Paper public final int[] mobCounts = new int[MOBCATEGORY_TOTAL_ENUMS]; // Paper
@ -74,7 +74,7 @@ index dc5fda83a66afbfeb7897fc20b4742899d8aca08..161c40692e8d469fad4169908b9353be
// Paper end // Paper end
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 9ae2bd64514a83dbd8c22cc35a9ca4c39add5142..e85ddf92b4f6f044e2b5834a172f37d78e702ef3 100644 index e1c4cf4b60b810837526c888ec82acbfc8fe540c..64656c384863a6430e933e506d965ee628f08669 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -279,6 +279,11 @@ public final class NaturalSpawner { @@ -279,6 +279,11 @@ public final class NaturalSpawner {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 346f22e7e71a8bac6a780437c53893a3de583be0..74d06790de674cbd230a0b14ac9a6b614c9f84ef 100644 index 843507ce8ad907509cb0ca5347ef6834ce7fcc35..87cecad5190a2b23e3955ffb7244015f62533f82 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1852,6 +1852,11 @@ public final class CraftServer implements Server { @@ -1785,6 +1785,11 @@ public final class CraftServer implements Server {
ServerLevel worldServer = ((CraftWorld) world).getHandle(); ServerLevel worldServer = ((CraftWorld) world).getHandle();
Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored); Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
@ -20,7 +20,7 @@ index 346f22e7e71a8bac6a780437c53893a3de583be0..74d06790de674cbd230a0b14ac9a6b61
BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation); BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
// Create map with trackPlayer = true, unlimitedTracking = true // Create map with trackPlayer = true, unlimitedTracking = true
@@ -1862,6 +1867,31 @@ public final class CraftServer implements Server { @@ -1795,6 +1800,31 @@ public final class CraftServer implements Server {
return CraftItemStack.asBukkitCopy(stack); return CraftItemStack.asBukkitCopy(stack);
} }

View file

@ -11,10 +11,10 @@ This patch prevents server from sending namespaced commands when player
requests tab-complete only commands. requests tab-complete only commands.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2eb497b87ac02a97242073cfdaad08019d68a47e..4871b8fd48cdae2bf65323e3bd716a8124b2ff6f 100644 index 78c1f4e964bd4906d6c9f186101869709e054af2..2aea0da0f99d4707c1b6703831e5986b27de719a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -920,6 +920,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -798,6 +798,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {

View file

@ -9,10 +9,10 @@ food consumption, turtle egg count decreases, ice to water
conversions and beehive releases conversions and beehive releases
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index baf3e79489e310f443788bc917c553ae7ea86c89..9a17193c9fe26c9c0390906b4c1f9d619ccba249 100644 index 034960c1d321e159b3881a900f823ba546cff7ff..0435c8262480bf5d83fd4306205f32b979911811 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -438,8 +438,8 @@ public class ServerPlayerGameMode { @@ -436,8 +436,8 @@ public class ServerPlayerGameMode {
isCorrectTool = flag1; // Paper isCorrectTool = flag1; // Paper
itemstack.mineBlock(this.level, iblockdata, pos, this.player); itemstack.mineBlock(this.level, iblockdata, pos, this.player);
@ -24,7 +24,7 @@ index baf3e79489e310f443788bc917c553ae7ea86c89..9a17193c9fe26c9c0390906b4c1f9d61
// return true; // CraftBukkit // return true; // CraftBukkit
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
index 8b715a750a0406d1d7b25c2f023dc2fb4d8b70fa..2abb05c5d4de9ebd0764c4aab444adc914173cdc 100644 index 5cf7b0d0331a8f10aea6dd607193795054a299dd..4b4a6b081ffedc7f637fa1e1726391d8e0fee0a1 100644
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
@@ -77,8 +77,8 @@ public class BeehiveBlock extends BaseEntityBlock { @@ -77,8 +77,8 @@ public class BeehiveBlock extends BaseEntityBlock {
@ -92,10 +92,10 @@ index 5fbdc96f29e29dfc092b9e84a988032db0fa36ab..04089e6f7d6e3d532b00585870283922
this.afterDestroy(world, pos, tool); this.afterDestroy(world, pos, tool);
} }
diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
index 6c1a0e6f961e46a1a89850746a71e97b32514adf..181e99e3f29c70568b6f28f8a5d3bb692f7abad8 100644 index 845fa7e13e4a3416b504d0a4c5d5e0454d96b8ed..07157822659288e76b2fba34db8d5d566506f33b 100644
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
@@ -164,8 +164,8 @@ public class TurtleEggBlock extends Block { @@ -166,8 +166,8 @@ public class TurtleEggBlock extends Block {
} }
@Override @Override

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Fire entity death event for ender dragon
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 92666c48620078623a451fbf68f673cb9f81c4b5..a24ae93efcdb2da5782d342c7697a1bb253400c7 100644 index ccc68b1a1b1b087c52d91591ba4c63b075bfdc66..f8cdc76561852fd32d9c079ceb3567e6d49c892e 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -651,6 +651,15 @@ public class EnderDragon extends Mob implements Enemy { @@ -642,6 +642,15 @@ public class EnderDragon extends Mob implements Enemy {
@Override @Override
public void kill() { public void kill() {

View file

@ -6,13 +6,13 @@ Subject: [PATCH] Configurable entity tracking range by Y coordinate
Options to configure entity tracking by Y coordinate, also for each entity category. Options to configure entity tracking by Y coordinate, also for each entity category.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 14f6c163c4f3cb5b096db1b9111041b4573bfef6..fb6cbcc4839aef7dc4bd4a49613f892b07aab353 100644 index 027e2ee23cd4466046707f92da6c047c15b4d8b1..923b81e593f6f58a963c4d644ecf44d4224f21a6 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1557,6 +1557,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1858,6 +1858,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
double d1 = vec3d_dx * vec3d_dx + vec3d_dz * vec3d_dz; // Paper double d1 = vec3d.x * vec3d.x + vec3d.z * vec3d.z;
double d2 = d0 * d0; double d2 = d0 * d0;
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player); boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
+ // Paper start - check Y + // Paper start - check Y
+ if (flag && level.paperConfig().entities.trackingRangeY.enabled) { + if (flag && level.paperConfig().entities.trackingRangeY.enabled) {
+ double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1); + double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add Listing API for Player
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
index 4aa8b483841028fbcc43f9ed47730881263e5065..0a233051c75dddeb7a5f4de8de39fe1afce75e4a 100644 index 32e3f347e2e025e2675e9410116386e472bd6a79..929483116d05a803d317ece7a44861af8bd36665 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
@@ -28,12 +28,46 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke @@ -29,12 +29,46 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke
this.actions = EnumSet.of(action); this.actions = EnumSet.of(action);
this.entries = List.of(new ClientboundPlayerInfoUpdatePacket.Entry(player)); this.entries = List.of(new ClientboundPlayerInfoUpdatePacket.Entry(player));
} }
@ -55,16 +55,16 @@ index 4aa8b483841028fbcc43f9ed47730881263e5065..0a233051c75dddeb7a5f4de8de39fe1a
public ClientboundPlayerInfoUpdatePacket(FriendlyByteBuf buf) { public ClientboundPlayerInfoUpdatePacket(FriendlyByteBuf buf) {
this.actions = buf.readEnumSet(ClientboundPlayerInfoUpdatePacket.Action.class); this.actions = buf.readEnumSet(ClientboundPlayerInfoUpdatePacket.Action.class);
this.entries = buf.readList((buf2) -> { this.entries = buf.readList((buf2) -> {
@@ -142,8 +176,18 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke @@ -144,8 +178,18 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke
public static record Entry(UUID profileId, GameProfile profile, boolean listed, int latency, GameType gameMode, @Nullable Component displayName, @Nullable RemoteChatSession.Data chatSession) { public static record Entry(UUID profileId, @Nullable GameProfile profile, boolean listed, int latency, GameType gameMode, @Nullable Component displayName, @Nullable RemoteChatSession.Data chatSession) {
Entry(ServerPlayer player) { Entry(ServerPlayer player) {
- this(player.getUUID(), player.getGameProfile(), true, player.latency, player.gameMode.getGameModeForPlayer(), player.getTabListDisplayName(), Optionull.map(player.getChatSession(), RemoteChatSession::asData)); - this(player.getUUID(), player.getGameProfile(), true, player.connection.latency(), player.gameMode.getGameModeForPlayer(), player.getTabListDisplayName(), Optionull.map(player.getChatSession(), RemoteChatSession::asData));
+ // Paper start - add listed + // Paper start - add listed
+ this(player, true); + this(player, true);
+ } + }
+ Entry(ServerPlayer player, boolean listed) { + Entry(ServerPlayer player, boolean listed) {
+ this(player.getUUID(), player.getGameProfile(), listed, player.latency, player.gameMode.getGameModeForPlayer(), player.getTabListDisplayName(), Optionull.map(player.getChatSession(), RemoteChatSession::asData)); + this(player.getUUID(), player.getGameProfile(), listed, player.connection.latency(), player.gameMode.getGameModeForPlayer(), player.getTabListDisplayName(), Optionull.map(player.getChatSession(), RemoteChatSession::asData));
+ // Paper end - add listed + // Paper end - add listed
+ } + }
+ // Paper start + // Paper start
@ -76,10 +76,10 @@ index 4aa8b483841028fbcc43f9ed47730881263e5065..0a233051c75dddeb7a5f4de8de39fe1a
static class EntryBuilder { static class EntryBuilder {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 640e9bd618dc8286933318744c2064ede1fd9b5f..f097ec5b4e3ad6b1a7c464a8cff4f8b2568fcf4f 100644 index a467c9551876de3b3b63f52b317d1181e1ca9825..3127b338c2a5ae11b2f6dfdc872f92f6e7e53b34 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -351,14 +351,22 @@ public abstract class PlayerList { @@ -337,14 +337,22 @@ public abstract class PlayerList {
// CraftBukkit end // CraftBukkit end
// CraftBukkit start - sendAll above replaced with this loop // CraftBukkit start - sendAll above replaced with this loop
@ -103,7 +103,7 @@ index 640e9bd618dc8286933318744c2064ede1fd9b5f..f097ec5b4e3ad6b1a7c464a8cff4f8b2
} }
if (entityplayer1 == player || !bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) { // Paper - don't include joining player if (entityplayer1 == player || !bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) { // Paper - don't include joining player
@@ -369,7 +377,7 @@ public abstract class PlayerList { @@ -355,7 +363,7 @@ public abstract class PlayerList {
} }
// Paper start - use single player info update packet // Paper start - use single player info update packet
if (!onlinePlayers.isEmpty()) { if (!onlinePlayers.isEmpty()) {
@ -113,10 +113,10 @@ index 640e9bd618dc8286933318744c2064ede1fd9b5f..f097ec5b4e3ad6b1a7c464a8cff4f8b2
// Paper end // Paper end
player.sentListPacket = true; player.sentListPacket = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0aab08552b4810b4ae699601662f7b2b6f5a0220..d1c019ea4fc500b0f33affa44bad6718296bcee0 100644 index 6c217dd817c6af0e49e33334b2aef79299372b66..65bed768299b3827e27eae9b0c8852ba69bdcf8b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -182,6 +182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -184,6 +184,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private final ConversationTracker conversationTracker = new ConversationTracker(); private final ConversationTracker conversationTracker = new ConversationTracker();
private final Set<String> channels = new HashSet<String>(); private final Set<String> channels = new HashSet<String>();
private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>(); private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>();
@ -124,7 +124,7 @@ index 0aab08552b4810b4ae699601662f7b2b6f5a0220..d1c019ea4fc500b0f33affa44bad6718
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>(); private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0; private int hash = 0;
private double health = 20; private double health = 20;
@@ -1973,7 +1974,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1933,7 +1934,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
otherPlayer.setUUID(uuidOverride); otherPlayer.setUUID(uuidOverride);
} }
// Paper end // Paper end
@ -133,7 +133,7 @@ index 0aab08552b4810b4ae699601662f7b2b6f5a0220..d1c019ea4fc500b0f33affa44bad6718
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
} }
@@ -2082,6 +2083,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2042,6 +2043,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it
} }

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Expose clicked BlockFace during BlockDamageEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 9a17193c9fe26c9c0390906b4c1f9d619ccba249..618ab9a2903f6d4139acd4aaa2e6db0a26e88ba9 100644 index 0435c8262480bf5d83fd4306205f32b979911811..1b0302df0ed420fd7f9d6803d796abf7d3192ceb 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -258,7 +258,7 @@ public class ServerPlayerGameMode { @@ -258,7 +258,7 @@ public class ServerPlayerGameMode {
@ -18,10 +18,10 @@ index 9a17193c9fe26c9c0390906b4c1f9d619ccba249..618ab9a2903f6d4139acd4aaa2e6db0a
if (blockEvent.isCancelled()) { if (blockEvent.isCancelled()) {
// Let the client know the block still exists // Let the client know the block still exists
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 26e1a9002d675245d4cf91e6682605314b078fb2..676c44f688c41df66e304db30a05d6cc967bcf99 100644 index 956d0c2a893fb0152718832686e998466f7d0230..6de54246ead72ae8eaa23463752e676a227fc5a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -648,13 +648,13 @@ public class CraftEventFactory { @@ -650,13 +650,13 @@ public class CraftEventFactory {
/** /**
* BlockDamageEvent * BlockDamageEvent
*/ */

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Expand Pose API
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0ed297f189e5d21c497ac78294db6ca664c0f2c4..e8485fb900b25e911a858678a833852731cb2ace 100644 index 4f2fa0a5b809f6ec55d00a466dced9a5b0713c38..f90bcd757d86f85f72f88ff052b8c33aac34ff66 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -417,6 +417,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -404,6 +404,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
private UUID originWorld; private UUID originWorld;
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
public boolean collidingWithWorldBorder; // Paper public boolean collidingWithWorldBorder; // Paper
@ -16,7 +16,7 @@ index 0ed297f189e5d21c497ac78294db6ca664c0f2c4..e8485fb900b25e911a858678a8338527
public void setOrigin(@javax.annotation.Nonnull Location location) { public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector(); this.origin = location.toVector();
@@ -701,6 +702,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -605,6 +606,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void onClientRemoval() {} public void onClientRemoval() {}
public void setPose(net.minecraft.world.entity.Pose pose) { public void setPose(net.minecraft.world.entity.Pose pose) {
@ -25,10 +25,10 @@ index 0ed297f189e5d21c497ac78294db6ca664c0f2c4..e8485fb900b25e911a858678a8338527
if (pose == this.getPose()) { if (pose == this.getPose()) {
return; return;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 7e132298252d196a97c99b45e58a3ac9a1de7216..2dbe8b870fd39b4d22e9725912f443757ae70761 100644 index 14d962c48727110e854f58860d2e8483d619acba..44ca46542a92f387717ad1fc630abffa08cf72c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1227,6 +1227,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1212,6 +1212,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isSneaking() { public boolean isSneaking() {
return this.getHandle().isShiftKeyDown(); return this.getHandle().isShiftKeyDown();
} }

View file

@ -10,7 +10,7 @@ public net.minecraft.world.level.dimension.end.EndDragonFight respawnCrystals
public net.minecraft.world.level.dimension.end.EndDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V public net.minecraft.world.level.dimension.end.EndDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index c63f05a3d29146bfb8d5c93df5706145e3eaf716..630971d7a87c12798672af9635535eaf80a3ec9c 100644 index 390542c42fe957e8e2d21c879c1c8908c8970b44..b2a57cb75916d2724f18779c922005ef9bcc0b0e 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -439,6 +439,24 @@ public class EndDragonFight { @@ -439,6 +439,24 @@ public class EndDragonFight {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerPickItemEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4871b8fd48cdae2bf65323e3bd716a8124b2ff6f..ab58827001b3b42e44d7f701c390480fed1fa1f1 100644 index 2aea0da0f99d4707c1b6703831e5986b27de719a..4bb38ccb2e9fb3718c6a4686966bb0990926fea5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1057,7 +1057,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -935,7 +935,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.disconnect("Invalid hotbar selection (Hacking?)", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause this.disconnect("Invalid hotbar selection (Hacking?)", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause
return; return;
} }

View file

@ -20,21 +20,21 @@ After this patch, the full iteration over all recipes checking for a match shoul
initial recipe match. Then that recipe will be checked first for all future recipe match checks. initial recipe match. Then that recipe will be checked first for all future recipe match checks.
diff --git a/src/main/java/net/minecraft/world/inventory/CraftingMenu.java b/src/main/java/net/minecraft/world/inventory/CraftingMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/CraftingMenu.java b/src/main/java/net/minecraft/world/inventory/CraftingMenu.java
index 389b8cf74066f9cec90b54d86f5ff7661964b585..948afb5b10d3b515f21810524bd72da2d963f808 100644 index a7aa2a4845cbf5a0843dcb93f7bdc5501f62a145..4c8ce073094e55ea0df67fe02c0d1cc8aef76562 100644
--- a/src/main/java/net/minecraft/world/inventory/CraftingMenu.java --- a/src/main/java/net/minecraft/world/inventory/CraftingMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/CraftingMenu.java +++ b/src/main/java/net/minecraft/world/inventory/CraftingMenu.java
@@ -75,7 +75,8 @@ public class CraftingMenu extends RecipeBookMenu<CraftingContainer> { @@ -76,7 +76,8 @@ public class CraftingMenu extends RecipeBookMenu<CraftingContainer> {
if (!world.isClientSide) { if (!world.isClientSide) {
ServerPlayer entityplayer = (ServerPlayer) player; ServerPlayer entityplayer = (ServerPlayer) player;
ItemStack itemstack = ItemStack.EMPTY; ItemStack itemstack = ItemStack.EMPTY;
- Optional<CraftingRecipe> optional = world.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingInventory, world); - Optional<RecipeHolder<CraftingRecipe>> optional = world.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingInventory, world);
+ final Recipe<?> currentRecipe = craftingInventory.getCurrentRecipe(); // Paper - check last recipe used first + final RecipeHolder<?> currentRecipe = craftingInventory.getCurrentRecipe(); // Paper - check last recipe used first
+ Optional<CraftingRecipe> optional = currentRecipe == null ? world.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingInventory, world) : world.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingInventory, world, currentRecipe.getId()).map(com.mojang.datafixers.util.Pair::getSecond); // Paper - check last recipe used first + Optional<RecipeHolder<CraftingRecipe>> optional = currentRecipe == null ? world.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingInventory, world) : world.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingInventory, world, currentRecipe.id()).map(com.mojang.datafixers.util.Pair::getSecond); // Paper - check last recipe used first
if (optional.isPresent()) { if (optional.isPresent()) {
CraftingRecipe recipecrafting = (CraftingRecipe) optional.get(); RecipeHolder<CraftingRecipe> recipeholder = (RecipeHolder) optional.get();
diff --git a/src/main/java/net/minecraft/world/inventory/ResultSlot.java b/src/main/java/net/minecraft/world/inventory/ResultSlot.java diff --git a/src/main/java/net/minecraft/world/inventory/ResultSlot.java b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
index ddf87ef1979c4ae4f14cd6aa220f9146d5e20909..46d1f768e4dcc2942ee7af81ee2713df10251731 100644 index 525ba0bdc4c6782480930bea94f73a72efe6fc4c..2554f7b1d687f83f42d69bf8ab54336ba793e301 100644
--- a/src/main/java/net/minecraft/world/inventory/ResultSlot.java --- a/src/main/java/net/minecraft/world/inventory/ResultSlot.java
+++ b/src/main/java/net/minecraft/world/inventory/ResultSlot.java +++ b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
@@ -59,7 +59,7 @@ public class ResultSlot extends Slot { @@ -59,7 +59,7 @@ public class ResultSlot extends Slot {
@ -42,42 +42,42 @@ index ddf87ef1979c4ae4f14cd6aa220f9146d5e20909..46d1f768e4dcc2942ee7af81ee2713df
public void onTake(Player player, ItemStack stack) { public void onTake(Player player, ItemStack stack) {
this.checkTakeAchievements(stack); this.checkTakeAchievements(stack);
- NonNullList<ItemStack> nonNullList = player.level().getRecipeManager().getRemainingItemsFor(RecipeType.CRAFTING, this.craftSlots, player.level()); - NonNullList<ItemStack> nonNullList = player.level().getRecipeManager().getRemainingItemsFor(RecipeType.CRAFTING, this.craftSlots, player.level());
+ NonNullList<ItemStack> nonNullList = player.level().getRecipeManager().getRemainingItemsFor(RecipeType.CRAFTING, this.craftSlots, player.level(), this.craftSlots.getCurrentRecipe() != null ? this.craftSlots.getCurrentRecipe().getId() : null); // Paper - check last recipe used first + NonNullList<ItemStack> nonNullList = player.level().getRecipeManager().getRemainingItemsFor(RecipeType.CRAFTING, this.craftSlots, player.level(), this.craftSlots.getCurrentRecipe() != null ? this.craftSlots.getCurrentRecipe().id() : null); // Paper - check last recipe used first
for(int i = 0; i < nonNullList.size(); ++i) { for(int i = 0; i < nonNullList.size(); ++i) {
ItemStack itemStack = this.craftSlots.getItem(i); ItemStack itemStack = this.craftSlots.getItem(i);
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index ab6dc3449a1d3b7acf1d7bf5ac1c24224cc252c7..9ffb6999171f602f0b113dac40e0130410cad870 100644 index bf16c44e2d61dccb662eceeef89a143a25ba40b0..666fc85bc2079cb367b340f2605f29fe002f4d22 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java --- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java +++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -119,13 +119,16 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { @@ -122,13 +122,16 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
T t0 = map.get(id); // CraftBukkit - decompile error RecipeHolder<T> recipeholder = (RecipeHolder) map.get(id);
if (t0 != null && t0.matches(inventory, world)) { if (recipeholder != null && recipeholder.value().matches(inventory, world)) {
+ inventory.setCurrentRecipe(t0); // Paper + inventory.setCurrentRecipe(recipeholder); // Paper
return Optional.of(Pair.of(id, t0)); return Optional.of(Pair.of(id, recipeholder));
} }
} }
+ inventory.setCurrentRecipe(null); // Paper - clear before it might be set again + inventory.setCurrentRecipe(null); // Paper - clear before it might be set again
return map.entrySet().stream().filter((entry) -> { return map.entrySet().stream().filter((entry) -> {
return ((Recipe) entry.getValue()).matches(inventory, world); return ((RecipeHolder) entry.getValue()).value().matches(inventory, world);
}).findFirst().map((entry) -> { }).findFirst().map((entry) -> {
+ inventory.setCurrentRecipe(entry.getValue()); // Paper + inventory.setCurrentRecipe(entry.getValue()); // Paper
return Pair.of((ResourceLocation) entry.getKey(), entry.getValue()); // CraftBukkit - decompile error return Pair.of((ResourceLocation) entry.getKey(), (RecipeHolder) entry.getValue());
}); });
} }
@@ -147,7 +150,12 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { @@ -150,7 +153,12 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
} }
public <C extends Container, T extends Recipe<C>> NonNullList<ItemStack> getRemainingItemsFor(RecipeType<T> type, C inventory, Level world) { public <C extends Container, T extends Recipe<C>> NonNullList<ItemStack> getRemainingItemsFor(RecipeType<T> type, C inventory, Level world) {
- Optional<T> optional = this.getRecipeFor(type, inventory, world); - Optional<RecipeHolder<T>> optional = this.getRecipeFor(type, inventory, world);
+ // Paper start - check last recipe used first + // Paper start - check last recipe used first
+ return this.getRemainingItemsFor(type, inventory, world, null); + return this.getRemainingItemsFor(type, inventory, world, null);
+ } + }
+ public <C extends Container, T extends Recipe<C>> NonNullList<ItemStack> getRemainingItemsFor(RecipeType<T> type, C inventory, Level world, @Nullable ResourceLocation firstToCheck) { + public <C extends Container, T extends Recipe<C>> NonNullList<ItemStack> getRemainingItemsFor(RecipeType<T> type, C inventory, Level world, @Nullable ResourceLocation firstToCheck) {
+ Optional<T> optional = firstToCheck == null ? this.getRecipeFor(type, inventory, world) : this.getRecipeFor(type, inventory, world, firstToCheck).map(Pair::getSecond); + Optional<RecipeHolder<T>> optional = firstToCheck == null ? this.getRecipeFor(type, inventory, world) : this.getRecipeFor(type, inventory, world, firstToCheck).map(Pair::getSecond);
+ // Paper end + // Paper end
if (optional.isPresent()) { if (optional.isPresent()) {
return ((Recipe) optional.get()).getRemainingItems(inventory); return ((RecipeHolder) optional.get()).value().getRemainingItems(inventory);

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Allow trident custom damage
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index 7226be19248a1ffb8ff2c89b55882529d33a6c0c..fa885337085348308604e50049ecc5bb52023884 100644 index b5f5e251661fc17c7614d3e23a9a5192b4a5184a..8affdd74769aed9aa92a76ba539cd9d27208827c 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -65,7 +65,7 @@ public abstract class AbstractArrow extends Projectile { @@ -65,7 +65,7 @@ public abstract class AbstractArrow extends Projectile {

View file

@ -14,7 +14,7 @@ ensure that the returned found structure (which may for example be a buried
treasure that will be marked on a treasure map) is the same as in vanilla. treasure that will be marked on a treasure map) is the same as in vanilla.
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index 8bab3fcfc6aa6c0b37621474a69f15e94bda2113..d5c2a608e1b4c8099c96b33d9d758e968350a46d 100644 index 9cdfc9e7614708934cc05146f1464c187d736aed..c32351d357552698836a865f8155462c461779ed 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -260,12 +260,15 @@ public abstract class ChunkGenerator { @@ -260,12 +260,15 @@ public abstract class ChunkGenerator {

View file

@ -23,10 +23,10 @@ index c6129dc565b8f874b73e2fefcabd4be1c221fd73..c1b874cd6e0498fce3cd53fdbaca30d2
public String getName() { public String getName() {
Player player = this.getPlayer(); Player player = this.getPlayer();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d1c019ea4fc500b0f33affa44bad6718296bcee0..3d5876cbadb5c8c02de751c3e15fc7f251ea7d35 100644 index 65bed768299b3827e27eae9b0c8852ba69bdcf8b..5b82093715c35b1c6d1e3c639f5a056cb9b3180b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -272,6 +272,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -232,6 +232,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return server.getPlayer(getUniqueId()) != null; return server.getPlayer(getUniqueId()) != null;
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add titleOverride to InventoryOpenEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 161c40692e8d469fad4169908b9353be0f85d0d8..b382da838acc04a1c5d89064b4fa43bcdd38ae71 100644 index 4ea7930f5d93e917dacaeff972a49886ff90847c..74b7b364d85b9343981822f3bf4f3d6ca442cd0c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1559,12 +1559,17 @@ public class ServerPlayer extends Player { @@ -1517,12 +1517,17 @@ public class ServerPlayer extends Player {
this.nextContainerCounter(); this.nextContainerCounter();
AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this); AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this);
@ -27,7 +27,7 @@ index 161c40692e8d469fad4169908b9353be0f85d0d8..b382da838acc04a1c5d89064b4fa43bc
if (container == null && !cancelled) { // Let pre-cancelled events fall through if (container == null && !cancelled) { // Let pre-cancelled events fall through
// SPIGOT-5263 - close chest if cancelled // SPIGOT-5263 - close chest if cancelled
if (factory instanceof Container) { if (factory instanceof Container) {
@@ -1586,7 +1591,7 @@ public class ServerPlayer extends Player { @@ -1544,7 +1549,7 @@ public class ServerPlayer extends Player {
} else { } else {
// CraftBukkit start // CraftBukkit start
this.containerMenu = container; this.containerMenu = container;
@ -37,7 +37,7 @@ index 161c40692e8d469fad4169908b9353be0f85d0d8..b382da838acc04a1c5d89064b4fa43bc
this.initMenu(container); this.initMenu(container);
return OptionalInt.of(this.containerCounter); return OptionalInt.of(this.containerCounter);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 5fe9a0985432ac6cdd28a2a138854a24f10e42ba..7db63d9ef93902872937b69f431137336e4abc3a 100644 index 5b01ffcdbfff7dbd05143cb08479c90e9b29dfba..017e97c1618b8ee4640b36a0ec1b07026047bfc3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -357,12 +357,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -357,12 +357,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@ -79,10 +79,10 @@ index 5fe9a0985432ac6cdd28a2a138854a24f10e42ba..7db63d9ef93902872937b69f43113733
if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper
player.containerMenu = container; player.containerMenu = container;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 676c44f688c41df66e304db30a05d6cc967bcf99..090b1ee57ddef58ca71469ad860960f66da7d5a2 100644 index 6de54246ead72ae8eaa23463752e676a227fc5a5..4d01f555cdbfc1c5a2fd4179e1c90163328df910 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1413,10 +1413,21 @@ public class CraftEventFactory { @@ -1415,10 +1415,21 @@ public class CraftEventFactory {
} }
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) { public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) {
@ -105,7 +105,7 @@ index 676c44f688c41df66e304db30a05d6cc967bcf99..090b1ee57ddef58ca71469ad860960f6
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper
} }
@@ -1431,10 +1442,10 @@ public class CraftEventFactory { @@ -1433,10 +1444,10 @@ public class CraftEventFactory {
if (event.isCancelled()) { if (event.isCancelled()) {
container.transferTo(player.containerMenu, craftPlayer); container.transferTo(player.containerMenu, craftPlayer);

View file

@ -34,10 +34,10 @@ index ca1edc083847b47bb450b291723aca778a5912dc..5a19875cbc603acea95193d969d2e1dc
} }
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index 630971d7a87c12798672af9635535eaf80a3ec9c..5b333bef255d7ef61c99510837536920c6fb6e8c 100644 index b2a57cb75916d2724f18779c922005ef9bcc0b0e..c1ff2e15bc5da1a642872ac0fdcdc457e8abb063 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -553,6 +553,12 @@ public class EndDragonFight { @@ -558,6 +558,12 @@ public class EndDragonFight {
} }
public boolean tryRespawn() { // CraftBukkit - return boolean public boolean tryRespawn() { // CraftBukkit - return boolean
@ -50,7 +50,7 @@ index 630971d7a87c12798672af9635535eaf80a3ec9c..5b333bef255d7ef61c99510837536920
if (this.dragonKilled && this.respawnStage == null) { if (this.dragonKilled && this.respawnStage == null) {
BlockPos blockposition = this.portalLocation; BlockPos blockposition = this.portalLocation;
@@ -570,6 +576,22 @@ public class EndDragonFight { @@ -575,6 +581,22 @@ public class EndDragonFight {
blockposition = this.portalLocation; blockposition = this.portalLocation;
} }

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add slot sanity checks in container clicks
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 706b354ac9a1a6a4a1e61b2a109180d1dd22bbbd..71b7a091e56dd68da280d13318a393170967b042 100644 index 3ef712299fe248602b0b117c0a8e285cdf4e05c2..2047224f26bf6c6aa125c15a14fe91d81e5b76ba 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -423,6 +423,7 @@ public abstract class AbstractContainerMenu { @@ -423,6 +423,7 @@ public abstract class AbstractContainerMenu {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Fix silent equipment change for mobs
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 3d5c967dbccb2a288092a3bf950ab4bfda7a3bb4..a99d737f71277ea3082816c7a7fc47ab3a201d30 100644 index bb29725ea06128fb2386c50d088316fea01c312c..d28c477171c1b6888a45175075017d960464b5cd 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1057,13 +1057,20 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -1060,13 +1060,20 @@ public abstract class Mob extends LivingEntity implements Targeting {
@Override @Override
public void setItemSlot(EquipmentSlot slot, ItemStack stack) { public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
@ -32,7 +32,7 @@ index 3d5c967dbccb2a288092a3bf950ab4bfda7a3bb4..a99d737f71277ea3082816c7a7fc47ab
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
index 9ca1e9d95e62929c0015d5ca2c2f9c70e421842e..26c7b2f18f21b04529f989b345c385693d98c903 100644 index 8e9469fec42f7b6a132cf173f6f5a95777a29b3b..b319021b22c5dceba6199ed27814b2dcf47b8d50 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -250,8 +250,8 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @@ -250,8 +250,8 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@ -47,10 +47,10 @@ index 9ca1e9d95e62929c0015d5ca2c2f9c70e421842e..26c7b2f18f21b04529f989b345c38569
this.reassessWeaponGoal(); this.reassessWeaponGoal();
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b6b6d5af1784963d95843e326abffa3add55ec4f..7d54c79f46f99f5500e9cb1f486037cafb27ee3a 100644 index 70e6071e455cc21f38a3ccca6bff3cd86a8622be..1d35e0bba35c0b3f41412f78ec86dd3f099c6668 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1557,7 +1557,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1469,7 +1469,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start // Paper start
public void checkCapturedTreeStateForObserverNotify(final BlockPos pos, final CraftBlockState craftBlockState) { public void checkCapturedTreeStateForObserverNotify(final BlockPos pos, final CraftBlockState craftBlockState) {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add missing InventoryHolders to inventories
diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java
index 04b1531572e8fff1e46fe1c94e7fc863841e0f66..aee02acd4b2f2fdcb574c37c077fb57013ccb596 100644 index da5ff65fade5cdf14fad3705c08b48896bc4c36d..d6cbe98e67fdbf8db46338a88ab1356dd63b50a3 100644
--- a/src/main/java/net/minecraft/world/Container.java --- a/src/main/java/net/minecraft/world/Container.java
+++ b/src/main/java/net/minecraft/world/Container.java +++ b/src/main/java/net/minecraft/world/Container.java
@@ -99,7 +99,7 @@ public interface Container extends Clearable { @@ -100,7 +100,7 @@ public interface Container extends Clearable {
java.util.List<org.bukkit.entity.HumanEntity> getViewers(); java.util.List<org.bukkit.entity.HumanEntity> getViewers();
@ -57,10 +57,10 @@ index 9d1ee40456a8d7001eee654a62e62cab2626305a..ecd6cb02ef326c8e1d7fba8138d806f3
public SimpleContainer(int i, org.bukkit.inventory.InventoryHolder owner) { public SimpleContainer(int i, org.bukkit.inventory.InventoryHolder owner) {
this.bukkitOwner = owner; this.bukkitOwner = owner;
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 71b7a091e56dd68da280d13318a393170967b042..7bba845462813615224f48322c51c7b480adcaa7 100644 index 2047224f26bf6c6aa125c15a14fe91d81e5b76ba..ffd349c1b80df0f1e8c02bda23700184825170fd 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -1027,4 +1027,15 @@ public abstract class AbstractContainerMenu { @@ -1025,4 +1025,15 @@ public abstract class AbstractContainerMenu {
this.stateId = this.stateId + 1 & 32767; this.stateId = this.stateId + 1 & 32767;
return this.stateId; return this.stateId;
} }
@ -77,10 +77,10 @@ index 71b7a091e56dd68da280d13318a393170967b042..7bba845462813615224f48322c51c7b4
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
index 46fd2f45923366c38b77270a45c80b31250ae37e..be507c00b9143c98820a7644f48b2944f787a9ee 100644 index a6e712606ece631502ae4c7513403092df77524f..25af92ec0d086160020cade97b0ddf7f6546e159 100644
--- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
@@ -39,7 +39,7 @@ public class BeaconMenu extends AbstractContainerMenu { @@ -41,7 +41,7 @@ public class BeaconMenu extends AbstractContainerMenu {
public BeaconMenu(int syncId, Container inventory, ContainerData propertyDelegate, ContainerLevelAccess context) { public BeaconMenu(int syncId, Container inventory, ContainerData propertyDelegate, ContainerLevelAccess context) {
super(MenuType.BEACON, syncId); super(MenuType.BEACON, syncId);
this.player = (Inventory) inventory; // CraftBukkit - TODO: check this this.player = (Inventory) inventory; // CraftBukkit - TODO: check this
@ -148,10 +148,10 @@ index f00a957a0f55e69f93e6d7dc80193304447c3dcb..d2f19b44ce4ab663a68ee330de4d4582
@Override @Override
public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) { public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) {
diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
index 93e8316f9d64625dcc4df0644a2187bcc884ef65..496c3fcf49043bba4d249e1c05aac7d7b4897ea8 100644 index c2d6265933dc4ceed80e2bd517970d02164a63df..c5c509fbb915c60dfa95aac8510684d0b9f8b0ff 100644
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
@@ -58,7 +58,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { @@ -61,7 +61,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
public EnchantmentMenu(int syncId, Inventory playerInventory, ContainerLevelAccess context) { public EnchantmentMenu(int syncId, Inventory playerInventory, ContainerLevelAccess context) {
super(MenuType.ENCHANTMENT, syncId); super(MenuType.ENCHANTMENT, syncId);
@ -206,7 +206,7 @@ index ff770b9ce68a62418de0c7ed389650626fa1dcb2..c2cf5a8e788637c6264cf43d712a5be2
public void setChanged() { public void setChanged() {
super.setChanged(); super.setChanged();
diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
index 0a87996a6ab5b4d67c2aa10daadf6174bc647a44..95598335c29574b4a5798174f7fc56cfc27c886d 100644 index e28c1cdf4763e9db3e29b3c0f08d65f978017931..146006af2af0881de199a0607a1b8f33de4c3f4f 100644
--- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java --- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
@@ -73,7 +73,7 @@ public class LoomMenu extends AbstractContainerMenu { @@ -73,7 +73,7 @@ public class LoomMenu extends AbstractContainerMenu {
@ -228,10 +228,10 @@ index 0a87996a6ab5b4d67c2aa10daadf6174bc647a44..95598335c29574b4a5798174f7fc56cf
public void setChanged() { public void setChanged() {
super.setChanged(); super.setChanged();
diff --git a/src/main/java/net/minecraft/world/inventory/ResultContainer.java b/src/main/java/net/minecraft/world/inventory/ResultContainer.java diff --git a/src/main/java/net/minecraft/world/inventory/ResultContainer.java b/src/main/java/net/minecraft/world/inventory/ResultContainer.java
index 8bed6dde4bdaae2f2cb8aa018f2d9a093191bbb3..28d1409117dd8e71195223f580db46ac02ab736c 100644 index d4592218d761eb38402e3d95c642e80a708cb333..3e268c4d93241fad72a366c8c8f477e650d5a3db 100644
--- a/src/main/java/net/minecraft/world/inventory/ResultContainer.java --- a/src/main/java/net/minecraft/world/inventory/ResultContainer.java
+++ b/src/main/java/net/minecraft/world/inventory/ResultContainer.java +++ b/src/main/java/net/minecraft/world/inventory/ResultContainer.java
@@ -28,7 +28,12 @@ public class ResultContainer implements Container, RecipeHolder { @@ -29,7 +29,12 @@ public class ResultContainer implements Container, RecipeCraftingHolder {
} }
public org.bukkit.inventory.InventoryHolder getOwner() { public org.bukkit.inventory.InventoryHolder getOwner() {
@ -245,7 +245,7 @@ index 8bed6dde4bdaae2f2cb8aa018f2d9a093191bbb3..28d1409117dd8e71195223f580db46ac
} }
// Don't need a transaction; the InventoryCrafting keeps track of it for us // Don't need a transaction; the InventoryCrafting keeps track of it for us
@@ -52,6 +57,14 @@ public class ResultContainer implements Container, RecipeHolder { @@ -53,6 +58,14 @@ public class ResultContainer implements Container, RecipeCraftingHolder {
return null; return null;
} }
// CraftBukkit end // CraftBukkit end
@ -261,10 +261,10 @@ index 8bed6dde4bdaae2f2cb8aa018f2d9a093191bbb3..28d1409117dd8e71195223f580db46ac
public ResultContainer() { public ResultContainer() {
this.itemStacks = NonNullList.withSize(1, ItemStack.EMPTY); this.itemStacks = NonNullList.withSize(1, ItemStack.EMPTY);
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
index 1b1f814770d1a906ed880df578845be2e9a14f46..9699f97efcfecdc446ca25a6bab42cc484314cbb 100644 index b430e8cfc3999b7e15183850b0312b8388dca903..1aef70f939792a58bd6ecb232dddf17f54ca66ae 100644
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
@@ -67,7 +67,7 @@ public class StonecutterMenu extends AbstractContainerMenu { @@ -68,7 +68,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
this.input = ItemStack.EMPTY; this.input = ItemStack.EMPTY;
this.slotUpdateListener = () -> { this.slotUpdateListener = () -> {
}; };
@ -273,7 +273,7 @@ index 1b1f814770d1a906ed880df578845be2e9a14f46..9699f97efcfecdc446ca25a6bab42cc4
@Override @Override
public void setChanged() { public void setChanged() {
super.setChanged(); super.setChanged();
@@ -82,7 +82,7 @@ public class StonecutterMenu extends AbstractContainerMenu { @@ -83,7 +83,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
} }
// CraftBukkit end // CraftBukkit end
}; };