diff --git a/patches/unapplied/server/API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/API-for-creating-command-sender-which-forwards-feedb.patch similarity index 100% rename from patches/unapplied/server/API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/API-for-creating-command-sender-which-forwards-feedb.patch diff --git a/patches/unapplied/server/Add-configurable-height-for-slime-spawn.patch b/patches/server/Add-configurable-height-for-slime-spawn.patch similarity index 100% rename from patches/unapplied/server/Add-configurable-height-for-slime-spawn.patch rename to patches/server/Add-configurable-height-for-slime-spawn.patch diff --git a/patches/unapplied/server/Add-missing-structure-set-seed-configs.patch b/patches/server/Add-missing-structure-set-seed-configs.patch similarity index 95% rename from patches/unapplied/server/Add-missing-structure-set-seed-configs.patch rename to patches/server/Add-missing-structure-set-seed-configs.patch index 5351a00ab9..d72a021667 100644 --- a/patches/unapplied/server/Add-missing-structure-set-seed-configs.patch +++ b/patches/server/Add-missing-structure-set-seed-configs.patch @@ -135,7 +135,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end - Add missing structure set seed configs randomsource.setSeed(this.concentricRingsSeed); + } // Paper - Add missing structure set seed configs - double d0 = randomsource.nextDouble() * 3.141592653589793D * 2.0D; + double d0 = randomsource.nextDouble() * Math.PI * 2.0D; int l = 0; int i1 = 0; @@ -0,0 +0,0 @@ public class ChunkGeneratorStructureState { @@ -171,11 +171,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - Add missing structure set seed configs return this.isPlacementChunk(calculator, chunkX, chunkZ) -- && (!(this.frequency < 1.0F) || this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency)) -+ && (!(this.frequency < 1.0F) || this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency, saltOverride)) // Paper - Add missing structure set seed configs - && (!this.exclusionZone.isPresent() || !this.exclusionZone.get().isPlacementForbidden(calculator, chunkX, chunkZ)); +- && this.applyAdditionalChunkRestrictions(chunkX, chunkZ, calculator.getLevelSeed()) ++ && this.applyAdditionalChunkRestrictions(chunkX, chunkZ, calculator.getLevelSeed(), saltOverride) // Paper - Add missing structure set seed configs + && this.applyInteractionsWithOtherStructures(calculator, chunkX, chunkZ); } +- public boolean applyAdditionalChunkRestrictions(int chunkX, int chunkZ, long seed) { +- return !(this.frequency < 1.0F) || this.frequencyReductionMethod.shouldGenerate(seed, this.salt, chunkX, chunkZ, this.frequency); ++ // Paper start - Add missing structure set seed configs ++ public boolean applyAdditionalChunkRestrictions(int chunkX, int chunkZ, long seed, @org.jetbrains.annotations.Nullable Integer saltOverride) { ++ return !(this.frequency < 1.0F) || this.frequencyReductionMethod.shouldGenerate(seed, this.salt, chunkX, chunkZ, this.frequency, saltOverride); ++ // Paper end - Add missing structure set seed configs + } + + public boolean applyInteractionsWithOtherStructures(ChunkGeneratorStructureState calculator, int centerChunkX, int centerChunkZ) { @@ -0,0 +0,0 @@ public abstract class StructurePlacement { public abstract StructurePlacementType type(); diff --git a/patches/unapplied/server/Fix-NotePlayEvent.patch b/patches/server/Fix-NotePlayEvent.patch similarity index 95% rename from patches/unapplied/server/Fix-NotePlayEvent.patch rename to patches/server/Fix-NotePlayEvent.patch index 18913bec8f..f3d4b9bd85 100644 --- a/patches/unapplied/server/Fix-NotePlayEvent.patch +++ b/patches/server/Fix-NotePlayEvent.patch @@ -25,11 +25,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end + // Paper - move NotePlayEvent call to fix instrument/note changes; TODO any way to cancel the game event? world.blockEvent(pos, this, 0, 0); - world.gameEvent(entity, GameEvent.NOTE_BLOCK_PLAY, pos); + world.gameEvent(entity, (Holder) GameEvent.NOTE_BLOCK_PLAY, pos); } @@ -0,0 +0,0 @@ public class NoteBlock extends Block { @Override - public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { + protected boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { NoteBlockInstrument blockpropertyinstrument = (NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT); + // Paper start - move NotePlayEvent call to fix instrument/note changes + org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, blockpropertyinstrument, state.getValue(NOTE)); diff --git a/patches/unapplied/server/Fix-xp-reward-for-baby-zombies.patch b/patches/server/Fix-xp-reward-for-baby-zombies.patch similarity index 100% rename from patches/unapplied/server/Fix-xp-reward-for-baby-zombies.patch rename to patches/server/Fix-xp-reward-for-baby-zombies.patch diff --git a/patches/unapplied/server/Freeze-Tick-Lock-API.patch b/patches/server/Freeze-Tick-Lock-API.patch similarity index 90% rename from patches/unapplied/server/Freeze-Tick-Lock-API.patch rename to patches/server/Freeze-Tick-Lock-API.patch index 44248d2904..0f07fc1114 100644 --- a/patches/unapplied/server/Freeze-Tick-Lock-API.patch +++ b/patches/server/Freeze-Tick-Lock-API.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess private org.bukkit.util.Vector origin; @javax.annotation.Nullable private UUID originWorld; @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setRemainingFireTicks(this.remainingFireTicks - 1); } @@ -25,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.setTicksFrozen(0); this.level().levelEvent((Player) null, 1009, this.blockPosition, 1); } -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (fromNetherPortal) { nbttagcompound.putBoolean("Paper.FromNetherPortal", true); } @@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (spawnReason == null) { spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; } diff --git a/patches/unapplied/server/More-PotionEffectType-API.patch b/patches/server/More-PotionEffectType-API.patch similarity index 100% rename from patches/unapplied/server/More-PotionEffectType-API.patch rename to patches/server/More-PotionEffectType-API.patch diff --git a/patches/unapplied/server/Multi-Block-Change-API-Implementation.patch b/patches/server/Multi-Block-Change-API-Implementation.patch similarity index 97% rename from patches/unapplied/server/Multi-Block-Change-API-Implementation.patch rename to patches/server/Multi-Block-Change-API-Implementation.patch index 3fde6cd728..da7d34f211 100644 --- a/patches/unapplied/server/Multi-Block-Change-API-Implementation.patch +++ b/patches/server/Multi-Block-Change-API-Implementation.patch @@ -20,9 +20,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - Multi Block Change API + - @Override - public void write(FriendlyByteBuf buf) { + private void write(FriendlyByteBuf buf) { buf.writeLong(this.sectionPos.asLong()); + buf.writeVarInt(this.positions.length); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/patches/unapplied/server/Reset-placed-block-on-exception.patch b/patches/server/Reset-placed-block-on-exception.patch similarity index 96% rename from patches/unapplied/server/Reset-placed-block-on-exception.patch rename to patches/server/Reset-placed-block-on-exception.patch index 71e2946d2e..3b8ff2a757 100644 --- a/patches/unapplied/server/Reset-placed-block-on-exception.patch +++ b/patches/server/Reset-placed-block-on-exception.patch @@ -23,6 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - Reset placed block on exception + try { this.updateCustomBlockEntityTag(blockposition, world, entityhuman, itemstack, iblockdata1); + BlockItem.updateBlockEntityComponents(world, blockposition, itemstack); + } catch (Exception e) { + oldBlockstate.update(true, false); + if (entityhuman instanceof ServerPlayer player) { diff --git a/patches/unapplied/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 100% rename from patches/unapplied/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch