diff --git a/patches/server/0328-Implement-CraftBlockSoundGroup.patch b/patches/server/0328-Implement-CraftBlockSoundGroup.patch index af7bd8930d..76559b8fc1 100644 --- a/patches/server/0328-Implement-CraftBlockSoundGroup.patch +++ b/patches/server/0328-Implement-CraftBlockSoundGroup.patch @@ -48,23 +48,6 @@ index 0000000000000000000000000000000000000000..9a516520d975f52169e346adc4ec6d9d + return CraftSound.getBukkit(soundEffectType.getFallSound()); + } +} -diff --git a/src/main/java/net/minecraft/world/level/block/SoundType.java b/src/main/java/net/minecraft/world/level/block/SoundType.java -index 46042087ef1e01cb9ca1f00137c436c6afa15599..74149f372b50e50fd735801324247787ad55d8b8 100644 ---- a/src/main/java/net/minecraft/world/level/block/SoundType.java -+++ b/src/main/java/net/minecraft/world/level/block/SoundType.java -@@ -82,10 +82,10 @@ public class SoundType { - public static final SoundType POLISHED_DEEPSLATE = new SoundType(1.0F, 1.0F, SoundEvents.POLISHED_DEEPSLATE_BREAK, SoundEvents.POLISHED_DEEPSLATE_STEP, SoundEvents.POLISHED_DEEPSLATE_PLACE, SoundEvents.POLISHED_DEEPSLATE_HIT, SoundEvents.POLISHED_DEEPSLATE_FALL); - public final float volume; - public final float pitch; -- public final SoundEvent breakSound; -+ public final SoundEvent breakSound; public final SoundEvent getBreakSound() { return this.breakSound; } // Paper - OBFHELPER // PAIL private -> public, rename breakSound - private final SoundEvent stepSound; - private final SoundEvent placeSound; -- public final SoundEvent hitSound; -+ public final SoundEvent hitSound; public final SoundEvent getHitSound() { return this.hitSound; } // Paper - OBFHELPER // PAIL private -> public, rename hitSound - private final SoundEvent fallSound; - - public SoundType(float volume, float pitch, SoundEvent breakSound, SoundEvent stepSound, SoundEvent placeSound, SoundEvent hitSound, SoundEvent fallSound) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index ca03ed4b1581df2b7db272d6f330174a9d277153..0a9ed9992a2fc97472a06591a5d129a767ce21af 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/patches/server/0329-Chunk-debug-command.patch b/patches/server/0329-Chunk-debug-command.patch index 23269b110d..5e3097224e 100644 --- a/patches/server/0329-Chunk-debug-command.patch +++ b/patches/server/0329-Chunk-debug-command.patch @@ -212,7 +212,7 @@ index 1fa190e098079522e0fe3593fa261c1b7ad4e24b..71ffa66973d8994e2a480435ac1ada3f * Ported from MinecraftForge - author: LexManos - License: LGPLv2.1 */ diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 0df3961919f04f27eb265ab316aa5a0f15a70854..e31dbb1346ba6755bc367a3eab6f87574b4eb3c4 100644 +index 0df3961919f04f27eb265ab316aa5a0f15a70854..bb0a07a280c7d4885165e9d6488e7741aaa7b47c 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -8,13 +8,27 @@ import net.minecraft.core.BlockPos; @@ -341,10 +341,10 @@ index 0df3961919f04f27eb265ab316aa5a0f15a70854..e31dbb1346ba6755bc367a3eab6f8757 + + // sorting by coordinate makes the log easier to read + allChunks.sort((ChunkHolder v1, ChunkHolder v2) -> { -+ if (v1.location.x != v2.location.x) { -+ return Integer.compare(v1.location.x, v2.location.x); ++ if (v1.pos.x != v2.pos.x) { ++ return Integer.compare(v1.pos.x, v2.pos.x); + } -+ return Integer.compare(v1.location.z, v2.location.z); ++ return Integer.compare(v1.pos.z, v2.pos.z); + }); + + worldData.addProperty("name", world.getWorld().getName()); @@ -376,14 +376,14 @@ index 0df3961919f04f27eb265ab316aa5a0f15a70854..e31dbb1346ba6755bc367a3eab6f8757 + for (ChunkHolder playerChunk : allChunks) { + JsonObject chunkData = new JsonObject(); + -+ Set> tickets = chunkMapDistance.tickets.get(playerChunk.pos.pair()); ++ Set> tickets = chunkMapDistance.tickets.get(playerChunk.pos.longKey); + ChunkStatus status = getChunkStatus(playerChunk); + -+ chunkData.addProperty("x", playerChunk.location.x); -+ chunkData.addProperty("z", playerChunk.location.z); ++ chunkData.addProperty("x", playerChunk.pos.x); ++ chunkData.addProperty("z", playerChunk.pos.z); + chunkData.addProperty("ticket-level", playerChunk.getTicketLevel()); + chunkData.addProperty("state", ChunkHolder.getFullChunkStatus(playerChunk.getTicketLevel()).toString()); -+ chunkData.addProperty("queued-for-unload", chunkMap.toDrop.contains(playerChunk.pos.pair())); ++ chunkData.addProperty("queued-for-unload", chunkMap.toDrop.contains(playerChunk.pos.longKey)); + chunkData.addProperty("status", status == null ? "unloaded" : status.toString()); + + JsonArray ticketsData = new JsonArray(); @@ -428,6 +428,19 @@ index 0df3961919f04f27eb265ab316aa5a0f15a70854..e31dbb1346ba6755bc367a3eab6f8757 public static int getTicketLevelFor(net.minecraft.world.level.chunk.ChunkStatus status) { return net.minecraft.server.level.ChunkMap.MAX_VIEW_DISTANCE + net.minecraft.world.level.chunk.ChunkStatus.getDistance(status); } +diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java +index 84831fc611589c19320b5e3af107080596b1fbdc..fa6d91886d433c0b7d77c1d059a23ee194ae14a4 100644 +--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java ++++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java +@@ -61,7 +61,7 @@ public class ChunkHolder { + public int oldTicketLevel; + private int ticketLevel; + private int queueLevel; +- final ChunkPos pos; ++ public final ChunkPos pos; // Paper - package->public + private boolean hasChangedSections; + private final ShortSet[] changedBlocksPerSection; + private final BitSet blockChangedLightSectionFilter; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java index 95ac30f56a9268f14d2518974c5a52e08f40ea18..25826b41812f2d9ac29806ad7a9242e5674376fc 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -454,8 +467,21 @@ index 71ac5cf0fdedcfe422bf6f5e6ffb15ce4138aa04..77bb2fb280293da4a38f9acc6503e849 private final DistanceManager distanceManager; public final ChunkGenerator generator; final ServerLevel level; +diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java +index 74a5dcde184c20129cb5fdcfb34ef1c3aecb1842..736521c0925339dc74c2648641932104a947708e 100644 +--- a/src/main/java/net/minecraft/server/level/ServerLevel.java ++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +@@ -174,7 +174,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl + public static final BlockPos END_SPAWN_POINT = new BlockPos(100, 50, 0); + private static final Logger LOGGER = LogManager.getLogger(); + private static final int EMPTY_TIME_NO_TICK = 300; +- final List players; ++ public final List players; // Paper - package->public + public final ServerChunkCache chunkSource; // Paper - public + private final MinecraftServer server; + public final PrimaryLevelData serverLevelData; // CraftBukkit - type diff --git a/src/main/java/net/minecraft/server/level/Ticket.java b/src/main/java/net/minecraft/server/level/Ticket.java -index b346fa94b23d81da7da073f71dd12e672e0f079c..95f5050518109c4ae0b6846be65204cc29afc723 100644 +index b346fa94b23d81da7da073f71dd12e672e0f079c..8b0c6e1a649400908dbb674dfb4cdd1aa0ce1d38 100644 --- a/src/main/java/net/minecraft/server/level/Ticket.java +++ b/src/main/java/net/minecraft/server/level/Ticket.java @@ -5,8 +5,8 @@ import java.util.Objects; @@ -469,11 +495,3 @@ index b346fa94b23d81da7da073f71dd12e672e0f079c..95f5050518109c4ae0b6846be65204cc protected Ticket(TicketType type, int level, T argument) { this.type = type; -@@ -51,6 +51,7 @@ public final class Ticket implements Comparable> { - return this.type; - } - -+ public final int getTicketLevel() { return this.getTicketLevel(); } // Paper - OBFHELPER - public int getTicketLevel() { - return this.ticketLevel; - }