From a91e5803cd8ec9feec65e6fb2c3d3e4dcf393b74 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sat, 2 Oct 2021 20:42:30 -0500 Subject: [PATCH] Update paperweight to 1.1.12 (#6653) --- build-data/paper.at | 5 ----- build.gradle.kts | 6 +++--- .../Asynchronous-chunk-IO-and-loading.patch | 4 ++-- patches/server/Fix-Light-Command.patch | 2 +- .../Fix-World-isChunkGenerated-calls.patch | 5 +---- patches/server/Improve-death-events.patch | 10 +--------- .../No-Tick-view-distance-implementation.patch | 18 ------------------ ...timise-TickListServer-by-rewriting-it.patch | 9 --------- .../server/Optimise-random-block-ticking.patch | 2 +- patches/server/Turtle-API.patch | 9 --------- 10 files changed, 9 insertions(+), 61 deletions(-) diff --git a/build-data/paper.at b/build-data/paper.at index e924e5b0fd..700f8363bb 100644 --- a/build-data/paper.at +++ b/build-data/paper.at @@ -66,11 +66,6 @@ public net.minecraft.util.thread.BlockableEventLoop runAllTasks()V # Improve death events public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent; public net.minecraft.world.entity.LivingEntity getSoundVolume()F -public net.minecraft.world.entity.ambient.Bat getSoundVolume()F -public net.minecraft.world.entity.monster.Ghast getSoundVolume()F -public net.minecraft.world.entity.monster.Phantom getSoundVolume()F -public net.minecraft.world.entity.animal.Squid getSoundVolume()F -public net.minecraft.world.entity.animal.Wolf getSoundVolume()F # Add sun related api public net.minecraft.world.entity.Mob isSunBurnTick()Z diff --git a/build.gradle.kts b/build.gradle.kts index 85ff1968bc..f08a125667 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "7.0.0" apply false - id("io.papermc.paperweight.core") version "1.1.11" + id("io.papermc.paperweight.core") version "1.1.12" } allprojects { @@ -55,7 +55,7 @@ repositories { dependencies { paramMappings("org.quiltmc:yarn:1.17.1+build.1:mergedv2") - remapper("org.quiltmc:tiny-remapper:0.4.3:fat") + remapper("net.fabricmc:tiny-remapper:0.6.0:fat") decompiler("net.minecraftforge:forgeflower:1.5.498.12") paperclip("io.papermc:paperclip:2.0.1") } @@ -69,7 +69,7 @@ paperweight { spigotServerPatchDir.set(layout.projectDirectory.dir("patches/server")) paramMappingsRepo.set("https://maven.quiltmc.org/repository/release/") - remapRepo.set("https://maven.quiltmc.org/repository/release/") + remapRepo.set("https://maven.fabricmc.net/") decompileRepo.set("https://files.minecraftforge.net/maven/") mappingsPatch.set(layout.projectDirectory.file("build-data/mappings-patch.tiny")) diff --git a/patches/server/Asynchronous-chunk-IO-and-loading.patch b/patches/server/Asynchronous-chunk-IO-and-loading.patch index 30adb13fcd..79ad7432ce 100644 --- a/patches/server/Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/Asynchronous-chunk-IO-and-loading.patch @@ -2616,7 +2616,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end + @Nullable - private CompoundTag readChunk(ChunkPos pos) throws IOException { + public CompoundTag readChunk(ChunkPos pos) throws IOException { CompoundTag nbttagcompound = this.read(pos); @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -3419,7 +3419,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.sync = dsync; } -- private RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit +- public RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit + // Paper start + public synchronized RegionFile getRegionFileIfLoaded(ChunkPos chunkcoordintpair) { + return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ())); diff --git a/patches/server/Fix-Light-Command.patch b/patches/server/Fix-Light-Command.patch index ab5c6074fc..27189c1572 100644 --- a/patches/server/Fix-Light-Command.patch +++ b/patches/server/Fix-Light-Command.patch @@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final ChunkTaskPriorityQueueSorter queueSorter; private final ProcessorHandle> worldgenMailbox; - private final ProcessorHandle> mainThreadMailbox; + public final ProcessorHandle> mainThreadMailbox; + // Paper start + final ProcessorHandle> mailboxLight; + public void addLightTask(ChunkHolder playerchunk, Runnable run) { diff --git a/patches/server/Fix-World-isChunkGenerated-calls.patch b/patches/server/Fix-World-isChunkGenerated-calls.patch index 3dfe05ae09..e0d6709554 100644 --- a/patches/server/Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/Fix-World-isChunkGenerated-calls.patch @@ -44,11 +44,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.world.level.levelgen.structure.StructureStart; import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager; @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - // Paper end - @Nullable -- private CompoundTag readChunk(ChunkPos pos) throws IOException { -+ public CompoundTag readChunk(ChunkPos pos) throws IOException { // Paper - private -> public + public CompoundTag readChunk(ChunkPos pos) throws IOException { CompoundTag nbttagcompound = this.read(pos); + // Paper start - Cache chunk status on disk + if (nbttagcompound == null) { diff --git a/patches/server/Improve-death-events.patch b/patches/server/Improve-death-events.patch index 0511458459..2db3d825e1 100644 --- a/patches/server/Improve-death-events.patch +++ b/patches/server/Improve-death-events.patch @@ -196,14 +196,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start public int getExpReward() { -@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { - return SoundEvents.GENERIC_HURT; - } - -+ @Deprecated public SoundEvent getDeathSoundPublic() { return getDeathSound(); } // Paper - public OBFHELPER - @Nullable - protected SoundEvent getDeathSound() { - return SoundEvents.GENERIC_DEATH; diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java @@ -342,7 +334,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private static void populateFields(net.minecraft.world.entity.LivingEntity victim, EntityDeathEvent event) { + event.setReviveHealth(event.getEntity().getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue()); + event.setShouldPlayDeathSound(!victim.silentDeath && !victim.isSilent()); -+ net.minecraft.sounds.SoundEvent soundEffect = victim.getDeathSoundPublic(); ++ net.minecraft.sounds.SoundEvent soundEffect = victim.getDeathSound(); + event.setDeathSound(soundEffect != null ? org.bukkit.craftbukkit.CraftSound.getBukkit(soundEffect) : null); + event.setDeathSoundCategory(org.bukkit.SoundCategory.valueOf(victim.getSoundSource().name())); + event.setDeathSoundVolume(victim.getSoundVolume()); diff --git a/patches/server/No-Tick-view-distance-implementation.patch b/patches/server/No-Tick-view-distance-implementation.patch index a8b7fed532..32f058c1b5 100644 --- a/patches/server/No-Tick-view-distance-implementation.patch +++ b/patches/server/No-Tick-view-distance-implementation.patch @@ -148,15 +148,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/j index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - private boolean modified; - private final ChunkTaskPriorityQueueSorter queueSorter; - private final ProcessorHandle> worldgenMailbox; -- private final ProcessorHandle> mainThreadMailbox; -+ public final ProcessorHandle> mainThreadMailbox; // Paper - private -> public - // Paper start - final ProcessorHandle> mailboxLight; - public void addLightTask(ChunkHolder playerchunk, Runnable run) { @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper start - distance maps @@ -346,15 +337,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (chunk != null) { this.playerLoadedChunk(player, packets, chunk); -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - // Paper end - - @Nullable -- public CompoundTag readChunk(ChunkPos pos) throws IOException { // Paper - private -> public -+ public CompoundTag readChunk(ChunkPos pos) throws IOException { - CompoundTag nbttagcompound = this.read(pos); - // Paper start - Cache chunk status on disk - if (nbttagcompound == null) { @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.removePlayerFromDistanceMaps(player); // Paper - distance maps } diff --git a/patches/server/Optimise-TickListServer-by-rewriting-it.patch b/patches/server/Optimise-TickListServer-by-rewriting-it.patch index c563c4a954..8938c5efa3 100644 --- a/patches/server/Optimise-TickListServer-by-rewriting-it.patch +++ b/patches/server/Optimise-TickListServer-by-rewriting-it.patch @@ -1050,15 +1050,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void tick() { int i = this.tickNextTickList.size(); -@@ -0,0 +0,0 @@ public class ServerTickList implements TickList { - return ServerTickList.saveTickList(this.toId, list, this.level.getGameTime()); - } - -- private static ListTag saveTickList(Function identifierProvider, Iterable> scheduledTicks, long time) { -+ public static ListTag saveTickList(Function identifierProvider, Iterable> scheduledTicks, long time) { // Paper - private -> public - ListTag nbttaglist = new ListTag(); - Iterator iterator = scheduledTicks.iterator(); - diff --git a/src/main/java/net/minecraft/world/level/TickNextTickData.java b/src/main/java/net/minecraft/world/level/TickNextTickData.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/TickNextTickData.java diff --git a/patches/server/Optimise-random-block-ticking.patch b/patches/server/Optimise-random-block-ticking.patch index 5d0c45a970..7c91370ebf 100644 --- a/patches/server/Optimise-random-block-ticking.patch +++ b/patches/server/Optimise-random-block-ticking.patch @@ -259,7 +259,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.entityData.set(Turtle.HOME_POS, pos.immutable()); // Paper - called with mutablepos... } - public BlockPos getHomePos() { // Paper - public + public BlockPos getHomePos() { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/Level.java diff --git a/patches/server/Turtle-API.patch b/patches/server/Turtle-API.patch index 1f3622f2e5..cc8ced8531 100644 --- a/patches/server/Turtle-API.patch +++ b/patches/server/Turtle-API.patch @@ -29,15 +29,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; -@@ -0,0 +0,0 @@ public class Turtle extends Animal { - this.entityData.set(Turtle.HOME_POS, pos); - } - -- BlockPos getHomePos() { -+ public BlockPos getHomePos() { // Paper - public - return (BlockPos) this.entityData.get(Turtle.HOME_POS); - } - @@ -0,0 +0,0 @@ public class Turtle extends Animal { if (!this.turtle.isInWater() && this.isReachedTarget()) {