From 90095cd7c47bea64fe060238bb06495a00c81659 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:03:59 -0700 Subject: [PATCH] 694 --- .../0684-Implement-regenerateChunk.patch} | 2 +- ...lled-powdered-snow-bucket-placement.patch} | 6 ++-- ...ate-calls-to-CraftServer-getSpawnLi.patch} | 4 +-- .../0687-Add-GameEvent-tags.patch} | 6 ++-- ...ks-fairly-for-worlds-while-waiting-.patch} | 6 ++-- .../0689-Furnace-RecipesUsed-API.patch} | 4 +-- ...gurable-sculk-sensor-listener-range.patch} | 30 +++++++++---------- ...d-missing-block-data-mins-and-maxes.patch} | 0 ...fault-CustomSpawners-in-custom-worl.patch} | 6 ++-- ...-worldlist-before-initing-the-world.patch} | 8 ++--- .../0694-Fix-Entity-Position-Desync.patch} | 2 +- 11 files changed, 37 insertions(+), 37 deletions(-) rename patches/{unapplied/server/0711-Implement-regenerateChunk.patch => server/0684-Implement-regenerateChunk.patch} (98%) rename patches/{unapplied/server/0712-Fix-cancelled-powdered-snow-bucket-placement.patch => server/0685-Fix-cancelled-powdered-snow-bucket-placement.patch} (87%) rename patches/{unapplied/server/0713-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch => server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch} (86%) rename patches/{unapplied/server/0714-Add-GameEvent-tags.patch => server/0687-Add-GameEvent-tags.patch} (95%) rename patches/{unapplied/server/0715-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch => server/0688-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch} (87%) rename patches/{unapplied/server/0716-Furnace-RecipesUsed-API.patch => server/0689-Furnace-RecipesUsed-API.patch} (94%) rename patches/{unapplied/server/0717-Configurable-sculk-sensor-listener-range.patch => server/0690-Configurable-sculk-sensor-listener-range.patch} (82%) rename patches/{unapplied/server/0718-Add-missing-block-data-mins-and-maxes.patch => server/0691-Add-missing-block-data-mins-and-maxes.patch} (100%) rename patches/{unapplied/server/0719-Option-to-have-default-CustomSpawners-in-custom-worl.patch => server/0692-Option-to-have-default-CustomSpawners-in-custom-worl.patch} (90%) rename patches/{unapplied/server/0720-Put-world-into-worldlist-before-initing-the-world.patch => server/0693-Put-world-into-worldlist-before-initing-the-world.patch} (86%) rename patches/{unapplied/server/0721-Fix-Entity-Position-Desync.patch => server/0694-Fix-Entity-Position-Desync.patch} (93%) diff --git a/patches/unapplied/server/0711-Implement-regenerateChunk.patch b/patches/server/0684-Implement-regenerateChunk.patch similarity index 98% rename from patches/unapplied/server/0711-Implement-regenerateChunk.patch rename to patches/server/0684-Implement-regenerateChunk.patch index c7c7470081..7efa7c56a4 100644 --- a/patches/unapplied/server/0711-Implement-regenerateChunk.patch +++ b/patches/server/0684-Implement-regenerateChunk.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement regenerateChunk Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5d5e5e811d065411e5def069533e8f9ab974ed55..558d95381bca2f950824748b05e59e4ced7347c3 100644 +index 5b404c9f923fd4f1822dbb2ff25b24157c0a8fe5..2c7b94719fb815025f73e8cf98cb0323b9375923 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -151,6 +151,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/patches/unapplied/server/0712-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0685-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 87% rename from patches/unapplied/server/0712-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0685-Fix-cancelled-powdered-snow-bucket-placement.patch index 80c4ffe9f2..04a42f5016 100644 --- a/patches/unapplied/server/0712-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0685-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -8,10 +8,10 @@ snow bucket didn't revert grass that became snowy because of the placement. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index d5ee83e6538fbd067388272fa9895e17859be642..a8f1953da3a5684079fb0cdb88cb3caf72d43646 100644 +index 29a463ebceabf2d7ae22c26178f969cf1c1e5a21..2616a8fedcf67b395f1a7c9ef26ab7a34e38bb41 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -380,7 +380,7 @@ public final class ItemStack { +@@ -393,7 +393,7 @@ public final class ItemStack implements DataComponentHolder { int oldCount = this.getCount(); ServerLevel world = (ServerLevel) context.getLevel(); @@ -20,7 +20,7 @@ index d5ee83e6538fbd067388272fa9895e17859be642..a8f1953da3a5684079fb0cdb88cb3caf world.captureBlockStates = true; // special case bonemeal if (item == Items.BONE_MEAL) { -@@ -440,7 +440,7 @@ public final class ItemStack { +@@ -453,7 +453,7 @@ public final class ItemStack implements DataComponentHolder { world.capturedBlockStates.clear(); if (blocks.size() > 1) { placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ()); diff --git a/patches/unapplied/server/0713-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 86% rename from patches/unapplied/server/0713-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 971d368008..3d8f51b269 100644 --- a/patches/unapplied/server/0713-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 76b9f6c0c754be69c1369aa3c13f7ca1f56e9e13..a64109dfa8f33812c243ad50c673a5ef043559c0 100644 +index ab031edcac3865b85637cc9d5b8a939acdc904e4..09f2b0351e4a43ad6bf5a0fa94e092f5343c5eb3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2294,6 +2294,8 @@ public final class CraftServer implements Server { +@@ -2306,6 +2306,8 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { // Paper start - Add mobcaps commands diff --git a/patches/unapplied/server/0714-Add-GameEvent-tags.patch b/patches/server/0687-Add-GameEvent-tags.patch similarity index 95% rename from patches/unapplied/server/0714-Add-GameEvent-tags.patch rename to patches/server/0687-Add-GameEvent-tags.patch index 0a4355d93a..4996ff074c 100644 --- a/patches/unapplied/server/0714-Add-GameEvent-tags.patch +++ b/patches/server/0687-Add-GameEvent-tags.patch @@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a64109dfa8f33812c243ad50c673a5ef043559c0..ddf3ce680bc8c69647a89ee46fd1547e566a61b8 100644 +index 09f2b0351e4a43ad6bf5a0fa94e092f5343c5eb3..aa386074cf4ea6cc47e591d4611bfb1fbf9644b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2715,6 +2715,15 @@ public final class CraftServer implements Server { +@@ -2732,6 +2732,15 @@ public final class CraftServer implements Server { return (org.bukkit.Tag) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey); } } @@ -65,7 +65,7 @@ index a64109dfa8f33812c243ad50c673a5ef043559c0..ddf3ce680bc8c69647a89ee46fd1547e default -> throw new IllegalArgumentException(); } -@@ -2747,6 +2756,13 @@ public final class CraftServer implements Server { +@@ -2764,6 +2773,13 @@ public final class CraftServer implements Server { net.minecraft.core.Registry> entityTags = BuiltInRegistries.ENTITY_TYPE; return entityTags.getTags().map(pair -> (org.bukkit.Tag) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList()); } diff --git a/patches/unapplied/server/0715-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0688-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 87% rename from patches/unapplied/server/0715-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0688-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index e2539627c2..bb5ef7ac41 100644 --- a/patches/unapplied/server/0715-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0688-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e367711dc3ef96280fe672f02e2ce99e43a5cd3c..f32bddb777082e7db307c4691b88e037926174b5 100644 +index 3832033003dbf5f5b43b9786b5fd4c965764cc9f..6036939ff03516a16aecf67ec9cf2260531ad83b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1296,6 +1296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop extends +@@ -104,5 +104,37 @@ public abstract class CraftFurnace extends snapshot.cookSpeedMultiplier = multiplier; snapshot.cookingTotalTime = AbstractFurnaceBlockEntity.getTotalCookTime(this.isPlaced() ? this.world.getHandle() : null, snapshot.recipeType, snapshot, snapshot.cookSpeedMultiplier); // Update the snapshot's current total cook time to scale with the newly set multiplier } diff --git a/patches/unapplied/server/0717-Configurable-sculk-sensor-listener-range.patch b/patches/server/0690-Configurable-sculk-sensor-listener-range.patch similarity index 82% rename from patches/unapplied/server/0717-Configurable-sculk-sensor-listener-range.patch rename to patches/server/0690-Configurable-sculk-sensor-listener-range.patch index bbf1cb0843..f2d79796cb 100644 --- a/patches/unapplied/server/0717-Configurable-sculk-sensor-listener-range.patch +++ b/patches/server/0690-Configurable-sculk-sensor-listener-range.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Configurable sculk sensor listener range public-f net.minecraft.world.level.gameevent.vibrations.VibrationListener listenerRange diff --git a/src/main/java/net/minecraft/world/level/block/entity/CalibratedSculkSensorBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CalibratedSculkSensorBlockEntity.java -index 4c9c35131e9bd37a48f6c4beb2bbcaf7988069c5..cf865dcfde2ae6c0ae72a8e7469be2dd3e1bc679 100644 +index 41ccbee5fc7767a7d5e1cdca0ec7d9a17ee80a90..1d28f117965da22694b12018923a5f1347905085 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/CalibratedSculkSensorBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CalibratedSculkSensorBlockEntity.java -@@ -19,6 +19,12 @@ public class CalibratedSculkSensorBlockEntity extends SculkSensorBlockEntity { +@@ -20,6 +20,12 @@ public class CalibratedSculkSensorBlockEntity extends SculkSensorBlockEntity { public VibrationSystem.User createVibrationUser() { return new CalibratedSculkSensorBlockEntity.VibrationUser(this.getBlockPos()); } @@ -22,8 +22,8 @@ index 4c9c35131e9bd37a48f6c4beb2bbcaf7988069c5..cf865dcfde2ae6c0ae72a8e7469be2dd + // Paper end - Configurable sculk sensor listener range protected class VibrationUser extends SculkSensorBlockEntity.VibrationUser { - public VibrationUser(BlockPos pos) { -@@ -27,6 +33,7 @@ public class CalibratedSculkSensorBlockEntity extends SculkSensorBlockEntity { + public VibrationUser(final BlockPos pos) { +@@ -28,6 +34,7 @@ public class CalibratedSculkSensorBlockEntity extends SculkSensorBlockEntity { @Override public int getListenerRadius() { @@ -32,10 +32,10 @@ index 4c9c35131e9bd37a48f6c4beb2bbcaf7988069c5..cf865dcfde2ae6c0ae72a8e7469be2dd } diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java -index fd791916336032e29aae83a2ff5d956bc18f2938..a08a59192cd01789b4aff9af6d0f1d4c27bb4fe1 100644 +index afef108d11b4ed9ad9ce6069dd0d549720f3cb27..0c25d8b107b95e36e25f48dd82321b0961e468ea 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java -@@ -23,6 +23,7 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList +@@ -25,6 +25,7 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList private final VibrationSystem.Listener vibrationListener; private final VibrationSystem.User vibrationUser = this.createVibrationUser(); public int lastVibrationFrequency; @@ -43,7 +43,7 @@ index fd791916336032e29aae83a2ff5d956bc18f2938..a08a59192cd01789b4aff9af6d0f1d4c protected SculkSensorBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { super(type, pos, state); -@@ -48,8 +49,16 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList +@@ -50,8 +51,16 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList .resultOrPartial(LOGGER::error) .ifPresent(listener -> this.vibrationData = listener); } @@ -58,9 +58,9 @@ index fd791916336032e29aae83a2ff5d956bc18f2938..a08a59192cd01789b4aff9af6d0f1d4c + protected static final String PAPER_LISTENER_RANGE_NBT_KEY = "Paper.ListenerRange"; // Paper - Configurable sculk sensor listener range @Override - protected void saveAdditional(CompoundTag nbt) { - super.saveAdditional(nbt); -@@ -58,7 +67,13 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList + protected void saveAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) { + super.saveAdditional(nbt, registryLookup); +@@ -60,7 +69,13 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList .encodeStart(NbtOps.INSTANCE, this.vibrationData) .resultOrPartial(LOGGER::error) .ifPresent(listenerNbt -> nbt.put("listener", listenerNbt)); @@ -74,7 +74,7 @@ index fd791916336032e29aae83a2ff5d956bc18f2938..a08a59192cd01789b4aff9af6d0f1d4c @Override public VibrationSystem.Data getVibrationData() { -@@ -95,6 +110,7 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList +@@ -97,6 +112,7 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList @Override public int getListenerRadius() { @@ -83,12 +83,12 @@ index fd791916336032e29aae83a2ff5d956bc18f2938..a08a59192cd01789b4aff9af6d0f1d4c } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java -index 0e5e316b6c76c3929cca037eddf52120767862ff..c796a1754385edabe115088ebb5aa2f44cfa657a 100644 +index 70d85dbfcaae7ee632a4f541334302b46615a254..6ba229afb0219ff229fd794c59d7585f010742ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java -@@ -30,4 +30,17 @@ public class CraftSculkSensor extends CraftBlo - public CraftSculkSensor copy() { - return new CraftSculkSensor<>(this); +@@ -36,4 +36,17 @@ public class CraftSculkSensor extends CraftBlo + public CraftSculkSensor copy(Location location) { + return new CraftSculkSensor<>(this, location); } + + // Paper start diff --git a/patches/unapplied/server/0718-Add-missing-block-data-mins-and-maxes.patch b/patches/server/0691-Add-missing-block-data-mins-and-maxes.patch similarity index 100% rename from patches/unapplied/server/0718-Add-missing-block-data-mins-and-maxes.patch rename to patches/server/0691-Add-missing-block-data-mins-and-maxes.patch diff --git a/patches/unapplied/server/0719-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0692-Option-to-have-default-CustomSpawners-in-custom-worl.patch similarity index 90% rename from patches/unapplied/server/0719-Option-to-have-default-CustomSpawners-in-custom-worl.patch rename to patches/server/0692-Option-to-have-default-CustomSpawners-in-custom-worl.patch index 13f9031599..2733e53219 100644 --- a/patches/unapplied/server/0719-Option-to-have-default-CustomSpawners-in-custom-worl.patch +++ b/patches/server/0692-Option-to-have-default-CustomSpawners-in-custom-worl.patch @@ -10,13 +10,13 @@ just looking at the LevelStem key, look at the DimensionType key which is one level below that. Defaults to off to keep vanilla behavior. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f32bddb777082e7db307c4691b88e037926174b5..3255929982ef8e494d654144753a54d3a76229d9 100644 +index 6036939ff03516a16aecf67ec9cf2260531ad83b..644f178438863295754c2b72339ce7f9066674b9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -617,7 +617,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop spawners; diff --git a/patches/unapplied/server/0720-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0693-Put-world-into-worldlist-before-initing-the-world.patch similarity index 86% rename from patches/unapplied/server/0720-Put-world-into-worldlist-before-initing-the-world.patch rename to patches/server/0693-Put-world-into-worldlist-before-initing-the-world.patch index 0b5d3fa617..0567c0eb16 100644 --- a/patches/unapplied/server/0720-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0693-Put-world-into-worldlist-before-initing-the-world.patch @@ -7,10 +7,10 @@ Some parts of legacy conversion will need the overworld to get the legacy structure data storage diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3255929982ef8e494d654144753a54d3a76229d9..041ba5fd85748b3183e12e7a8e10fca77eb35bf5 100644 +index 644f178438863295754c2b72339ce7f9066674b9..ea442883eda28e5673cef9470145d5c40ac66159 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -629,9 +629,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop