Update paperweight to 1.1.12 (#6653)

This commit is contained in:
Jason Penilla 2021-10-02 20:42:30 -05:00
parent 61252d4a4b
commit a91e5803cd
10 changed files with 9 additions and 61 deletions

View file

@ -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

View file

@ -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"))

View file

@ -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()));

View file

@ -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<ChunkTaskPriorityQueueSorter.Message<Runnable>> worldgenMailbox;
private final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> mainThreadMailbox;
public final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> mainThreadMailbox;
+ // Paper start
+ final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> mailboxLight;
+ public void addLightTask(ChunkHolder playerchunk, Runnable run) {

View file

@ -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) {

View file

@ -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());

View file

@ -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<ChunkTaskPriorityQueueSorter.Message<Runnable>> worldgenMailbox;
- private final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> mainThreadMailbox;
+ public final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> mainThreadMailbox; // Paper - private -> public
// Paper start
final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> 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
}

View file

@ -1050,15 +1050,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void tick() {
int i = this.tickNextTickList.size();
@@ -0,0 +0,0 @@ public class ServerTickList<T> implements TickList<T> {
return ServerTickList.saveTickList(this.toId, list, this.level.getGameTime());
}
- private static <T> ListTag saveTickList(Function<T, ResourceLocation> identifierProvider, Iterable<TickNextTickData<T>> scheduledTicks, long time) {
+ public static <T> ListTag saveTickList(Function<T, ResourceLocation> identifierProvider, Iterable<TickNextTickData<T>> 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

View file

@ -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

View file

@ -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()) {