3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

Update paperweight to 1.1.12 (#6653)

Dieser Commit ist enthalten in:
Jason 2021-10-02 20:42:30 -05:00 committet von GitHub
Ursprung bde7b98762
Commit e39159134f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
23 geänderte Dateien mit 64 neuen und 116 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -2348,7 +2348,7 @@ index bbf2dee8cdd2d8239d9230b1a7fff4f07c2edaf8..ffa3dc07ec566464ce10abe793de61ef
ChunkHolder.FullChunkStatus playerchunk_state1 = ChunkHolder.getFullChunkStatus(this.ticketLevel);
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 75719f5ba225db613f1669785da15b70159b7ab6..c70d12b6af98562faaddef8a6d77d1f2f45c8d44 100644
index a85f96c5cb661082962cd768eaf41affb8e2fe15..6d7f1fcd1709967acadd67b610c15f61d95a211b 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -447,6 +447,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -2616,7 +2616,7 @@ index 75719f5ba225db613f1669785da15b70159b7ab6..c70d12b6af98562faaddef8a6d77d1f2
+ // Paper end
+
@Nullable
private CompoundTag readChunk(ChunkPos pos) throws IOException {
public CompoundTag readChunk(ChunkPos pos) throws IOException {
CompoundTag nbttagcompound = this.read(pos);
@@ -1360,6 +1483,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -3412,14 +3412,14 @@ index 84327c8fe1dc62c7b99950261a344042b4456616..298b5abbc792dd33be38acbd1c572c97
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index f973792c8ee4523eb4efdf31d0a97cb3358e1b3b..ebb1a050beab9530942c4498335f084c89faef06 100644
index 3d07235ad34d219c7c5fccd216a3a6935ced645c..ebb1a050beab9530942c4498335f084c89faef06 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -28,11 +28,32 @@ public class RegionFileStorage implements AutoCloseable {
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()));
@ -3661,7 +3661,7 @@ index 74825cd20ae25bbaa1f69ecb208a1c01c1213083..e43135fc10cb2d024295cbe89daf7127
// Spigot start
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 95bc2136eaa118f28c7ec2d8b557ed0773f5f9ad..2ef8ffdf8c957aa91caa3b628cfeb0276989bc75 100644
index 473dc5e5ee3458e605ecf5e2b2dadb3573fd685b..0a0ece8361a0368629696e06c00165741b14e308 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -15,6 +15,7 @@ import net.minecraft.network.chat.Component;

Datei anzeigen

@ -70,7 +70,7 @@ index b34f9c039a3ac198ae450794b5486d5197d2cfea..4cfbb920abad262d42553270455f0cd0
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index fd92591e563529c5ef8099df934c413218c1a611..44b9eb9fefae81201f51f24937c09d6993370eb9 100644
index a44a8856d9f6a71a789a7335501abebfd23635be..1c35ba0d74aa02b0a94400308c20485ccaad7a13 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity {
@ -196,16 +196,8 @@ index fd92591e563529c5ef8099df934c413218c1a611..44b9eb9fefae81201f51f24937c09d69
// CraftBukkit start
public int getExpReward() {
@@ -1767,6 +1796,7 @@ 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 3d15587a8c36d833283cfea0546c589287e7ed48..21274d2c8c78d8454dbfc19076a52e54876bd78d 100644
index 7de3d73232d985ab18d7266371d301c490b79b9f..bfb042f4828e1cd47124939ca3b9caadc7fe1b39 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -691,15 +691,25 @@ public class Fox extends Animal {
@ -263,7 +255,7 @@ index 224eca7d20cf4b890a6bc1b314d566e02e716762..7281eb294ddd178ba742088d3c61bf3d
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index d545349f659b2a164a28d06e9ff0f9fff8fa8ecf..bbde9b758643c087733064a126d90689d71830cf 100644
index f9375dbbeda6fdc92406fe5d93df0467e6e70672..b41e6fb0b7e02b50e5ad05555ed911d09055d694 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -755,7 +755,8 @@ public class ArmorStand extends LivingEntity {
@ -297,7 +289,7 @@ index aac0938fab644218fa642faa4f26ca65a0d24941..1ca818e242221d426aa1736c5d24d966
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e094b1b00d5fb73da73abcadb02ffd98b91fb869..ce67bbe8d29abe61d6e7db7b0a5c8f695ed2a1a1 100644
index fb17ab47d45b1cb2aa48ba28c452a683ce8a1568..da7648b816b5f6df54b23829443bb2100921e9b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -807,9 +807,16 @@ public class CraftEventFactory {
@ -342,7 +334,7 @@ index e094b1b00d5fb73da73abcadb02ffd98b91fb869..ce67bbe8d29abe61d6e7db7b0a5c8f69
+ 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());

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 44b9eb9fefae81201f51f24937c09d6993370eb9..182351530dfbbbeb39338425886bd3fd04aa0364 100644
index 1c35ba0d74aa02b0a94400308c20485ccaad7a13..a7aa62e52105b7adb7725f7abeae376df8f7bb3e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@ -16,7 +16,7 @@ index 44b9eb9fefae81201f51f24937c09d6993370eb9..182351530dfbbbeb39338425886bd3fd
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam;
@@ -3737,6 +3738,38 @@ public abstract class LivingEntity extends Entity {
@@ -3736,6 +3737,38 @@ public abstract class LivingEntity extends Entity {
return level.clip(raytrace);
}

Datei anzeigen

@ -18,7 +18,7 @@ index 70a51ba19fb34f652858b18f24554261787d97e2..27ea9c10b7f66c2133b0829c0b1c3714
private final int searchRange;
private final int verticalSearchRange;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index fa551b1338a21b7b0864bdb9f31cb365c918facf..925f16d5eb092518ef774f69a8d99689feb0f5d7 100644
index 3ba8fafcd5de584209dd30cadb8e76a46dac4bc8..00dbe5046c3b93e402218a6903ea2f087410388b 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -11,6 +11,7 @@ import net.minecraft.nbt.CompoundTag;
@ -29,15 +29,6 @@ index fa551b1338a21b7b0864bdb9f31cb365c918facf..925f16d5eb092518ef774f69a8d99689
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvent;
@@ -93,7 +94,7 @@ 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);
}
@@ -487,14 +488,17 @@ public class Turtle extends Animal {
if (!this.turtle.isInWater() && this.isReachedTarget()) {

Datei anzeigen

@ -93,10 +93,10 @@ index b4f2b969ad30be38c0a9e3f8efd2a57c3e0f7df0..3c7e75b8fc1bfbe08e232fcba412c83f
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 182351530dfbbbeb39338425886bd3fd04aa0364..aecb662a8e9e803b619a88d1d1637386fb39c679 100644
index a7aa62e52105b7adb7725f7abeae376df8f7bb3e..472b8db386dfb580734999900562d358e5ea146a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3336,11 +3336,13 @@ public abstract class LivingEntity extends Entity {
@@ -3335,11 +3335,13 @@ public abstract class LivingEntity extends Entity {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 4) != 0;
}
@ -114,7 +114,7 @@ index 182351530dfbbbeb39338425886bd3fd04aa0364..aecb662a8e9e803b619a88d1d1637386
this.dismountVehicle(entity);
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 744d8c049e753c0e07cf064597a086ccf6d3f3ea..22ca888f0ec650616c098c8ffedfde5ea32ea4cb 100644
index f5bc151aae4f8335994507c89a094177347dfce1..19b5538e54f1c6073c3478393c1388ffca33291e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1094,9 +1094,11 @@ public abstract class Player extends LivingEntity {

Datei anzeigen

@ -32,7 +32,7 @@ index d226247b93a2f1f7e039b0963d2e27b5dd11c15e..1ea32090783ac5b885b95ae2009dd61d
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getFutureIfPresentUnchecked(ChunkStatus leastStatus) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index c70d12b6af98562faaddef8a6d77d1f2f45c8d44..0bb5071f78644607eaed2a4d4a74262e99f3ed72 100644
index 6d7f1fcd1709967acadd67b610c15f61d95a211b..6a676995b157702b4bd423ff8590b6c682102b61 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -84,6 +84,7 @@ import net.minecraft.world.level.chunk.ProtoChunk;
@ -43,12 +43,9 @@ index c70d12b6af98562faaddef8a6d77d1f2f45c8d44..0bb5071f78644607eaed2a4d4a74262e
import net.minecraft.world.level.entity.ChunkStatusUpdateListener;
import net.minecraft.world.level.levelgen.structure.StructureStart;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager;
@@ -1131,12 +1132,61 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end
@@ -1133,10 +1134,59 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@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) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index aecb662a8e9e803b619a88d1d1637386fb39c679..bb0b7da2e6bfd35bf3f937af928d515ef59401fb 100644
index 472b8db386dfb580734999900562d358e5ea146a..55ac5e8cad4c7eee3d8b165698200e9afcd44594 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3555,15 +3555,18 @@ public abstract class LivingEntity extends Entity {
@@ -3554,15 +3554,18 @@ public abstract class LivingEntity extends Entity {
this.entityData.set(LivingEntity.DATA_LIVING_ENTITY_FLAGS, (byte) j);
}
@ -31,7 +31,7 @@ index aecb662a8e9e803b619a88d1d1637386fb39c679..bb0b7da2e6bfd35bf3f937af928d515e
}
}
@@ -3636,6 +3639,7 @@ public abstract class LivingEntity extends Entity {
@@ -3635,6 +3638,7 @@ public abstract class LivingEntity extends Entity {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@ -39,7 +39,7 @@ index aecb662a8e9e803b619a88d1d1637386fb39c679..bb0b7da2e6bfd35bf3f937af928d515e
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -3670,8 +3674,8 @@ public abstract class LivingEntity extends Entity {
@@ -3669,8 +3673,8 @@ public abstract class LivingEntity extends Entity {
}
this.stopUsingItem();

Datei anzeigen

@ -7,10 +7,10 @@ When the server is lagging, players will wait longer when eating.
Change to also use a time check instead if it passes.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index bb0b7da2e6bfd35bf3f937af928d515ef59401fb..833c1b02e382f01ecfd1fabf26a520a80642f92d 100644
index 55ac5e8cad4c7eee3d8b165698200e9afcd44594..50d180daff7258795d476b9cd43412fba2fba50f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3499,6 +3499,11 @@ public abstract class LivingEntity extends Entity {
@@ -3498,6 +3498,11 @@ public abstract class LivingEntity extends Entity {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
}
@ -22,7 +22,7 @@ index bb0b7da2e6bfd35bf3f937af928d515ef59401fb..833c1b02e382f01ecfd1fabf26a520a8
private void updatingUsingItem() {
if (this.isUsingItem()) {
if (ItemStack.isSameIgnoreDurability(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
@@ -3516,8 +3521,12 @@ public abstract class LivingEntity extends Entity {
@@ -3515,8 +3520,12 @@ public abstract class LivingEntity extends Entity {
if (this.shouldTriggerItemUseEffects()) {
this.triggerItemUseEffects(stack, 5);
}
@ -37,7 +37,7 @@ index bb0b7da2e6bfd35bf3f937af928d515ef59401fb..833c1b02e382f01ecfd1fabf26a520a8
this.completeUsingItem();
}
@@ -3563,7 +3572,10 @@ public abstract class LivingEntity extends Entity {
@@ -3562,7 +3571,10 @@ public abstract class LivingEntity extends Entity {
if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag
this.useItem = itemstack;
@ -49,7 +49,7 @@ index bb0b7da2e6bfd35bf3f937af928d515ef59401fb..833c1b02e382f01ecfd1fabf26a520a8
if (!this.level.isClientSide) {
this.setLivingEntityFlag(1, true);
this.setLivingEntityFlag(2, enumhand == InteractionHand.OFF_HAND);
@@ -3587,7 +3599,10 @@ public abstract class LivingEntity extends Entity {
@@ -3586,7 +3598,10 @@ public abstract class LivingEntity extends Entity {
}
} else if (!this.isUsingItem() && !this.useItem.isEmpty()) {
this.useItem = ItemStack.EMPTY;
@ -61,7 +61,7 @@ index bb0b7da2e6bfd35bf3f937af928d515ef59401fb..833c1b02e382f01ecfd1fabf26a520a8
}
}
@@ -3713,7 +3728,10 @@ public abstract class LivingEntity extends Entity {
@@ -3712,7 +3727,10 @@ public abstract class LivingEntity extends Entity {
}
this.useItem = ItemStack.EMPTY;

Datei anzeigen

@ -134,13 +134,13 @@ index 005361c38b02713fb823d0be40954400d59f0c4d..3091c100eaf5a86ba270ef0d96de1852
+ }
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 68997cc0b534c46c33c0f137738fbaca5569445b..63d52f6f0c0097654ddab05fea4bd809dc612a9b 100644
index 20a9d213b977cf8d8ada3815931bb0603d5571c9..2e17c387ca132c5ec7312a4f008d93d2bc8f2138 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -128,6 +128,12 @@ 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) {

Datei anzeigen

@ -145,18 +145,9 @@ index 1ea32090783ac5b885b95ae2009dd61de3063ae0..8d3cdd288eacc91f7c9a624f601284e5
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 2bbba8239cdce5952817b992879f00f35abdee67..1caa33f1bdae0df640ac28036679bef28e15867f 100644
index 85a3ccce473604561b5550b2b2b1f4aa02a04415..72471db48a9c67ced8b1ef1ebb3381be4f773e06 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -127,7 +127,7 @@ 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) {
@@ -169,21 +169,68 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper start - distance maps
@ -346,15 +337,6 @@ index 2bbba8239cdce5952817b992879f00f35abdee67..1caa33f1bdae0df640ac28036679bef2
if (chunk != null) {
this.playerLoadedChunk(player, packets, chunk);
@@ -1182,7 +1271,7 @@ 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) {
@@ -1293,13 +1382,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.removePlayerFromDistanceMaps(player); // Paper - distance maps
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 833c1b02e382f01ecfd1fabf26a520a80642f92d..2a81568c59545689a392f461abd23675341c911e 100644
index 50d180daff7258795d476b9cd43412fba2fba50f..64403a0a1bddeb1f126b8e315187ea79a859582a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3166,8 +3166,10 @@ public abstract class LivingEntity extends Entity {
@@ -3165,8 +3165,10 @@ public abstract class LivingEntity extends Entity {
} else if (this.isInLava() && (!this.onGround || d7 > d8)) {
this.jumpInLiquid((Tag) FluidTags.LAVA);
} else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) {
@ -20,7 +20,7 @@ index 833c1b02e382f01ecfd1fabf26a520a80642f92d..2a81568c59545689a392f461abd23675
} else {
this.noJumpDelay = 0;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
index 2d59eab846db2c0a624cf6d06a570b2313aa6b13..851ee58e52c6003d6ae7b58c9b6b9a9a9795fa85 100644
index ddc32ee8112e318f913546fcaa1fd6b26d59a672..dadc202da2d5568dce051b9cb4aadf20cfdd2c4f 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
@@ -514,7 +514,9 @@ public class Panda extends Animal {

Datei anzeigen

@ -925,7 +925,7 @@ index 8d3cdd288eacc91f7c9a624f601284e5cd2a36cc..a3ba56f437fe9e4dac59370463052341
});
// Paper end
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 472146bea17f323397df1d3ed1aa31fc91a8741c..c7ecb8fb1cbc1433986fbd03c68b4dbe5a2835c7 100644
index c6213a7dfcf9aeccdb546eaf74fa8eb119a6a32c..ec0d8e58a518a20634b902769251d6d04750433e 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -218,6 +218,18 @@ public class ServerChunkCache extends ChunkSource {
@ -1037,7 +1037,7 @@ index 1a05edf041cf4aeee7c165fec564ce45adbdd5c7..febc837d324cbe2cd83aea6c1e0d298c
}
diff --git a/src/main/java/net/minecraft/world/level/ServerTickList.java b/src/main/java/net/minecraft/world/level/ServerTickList.java
index bcce5f1f8940e6fb8f398afd540bcbe2286ed0c2..048c399585d75252f5154cb7e46c394c7184e11c 100644
index dfd41db804acde50339de9b18566b845401d7cbe..0f61dd3a3115f68ccd2c7cb4c9309f5ace96a406 100644
--- a/src/main/java/net/minecraft/world/level/ServerTickList.java
+++ b/src/main/java/net/minecraft/world/level/ServerTickList.java
@@ -51,6 +51,9 @@ public class ServerTickList<T> implements TickList<T> {
@ -1050,15 +1050,6 @@ index bcce5f1f8940e6fb8f398afd540bcbe2286ed0c2..048c399585d75252f5154cb7e46c394c
public void tick() {
int i = this.tickNextTickList.size();
@@ -192,7 +195,7 @@ 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 3b8c04f6ffd7e6c197465aa1caf633ba92529472..1007bfc9c19641f42afd5526cfe7bdb61906d1a0 100644
--- a/src/main/java/net/minecraft/world/level/TickNextTickData.java

Datei anzeigen

@ -7,10 +7,10 @@ Will not run if max entity craming is disabled and
the max collisions per entity is less than or equal to 0
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 2a81568c59545689a392f461abd23675341c911e..90c018758e0817566390cdd0f3946b21cf5e3017 100644
index 64403a0a1bddeb1f126b8e315187ea79a859582a..478204aa91d33232f33708816fcc7ea2fe1b55d4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3263,10 +3263,16 @@ public abstract class LivingEntity extends Entity {
@@ -3262,10 +3262,16 @@ public abstract class LivingEntity extends Entity {
protected void serverAiStep() {}
protected void pushEntities() {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 90c018758e0817566390cdd0f3946b21cf5e3017..9bc6df403ce49dd13bfec25483b89ea75dd57672 100644
index 478204aa91d33232f33708816fcc7ea2fe1b55d4..fab8098ce72feb9b08960e55ab1a4aebaae22276 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2041,7 +2041,16 @@ public abstract class LivingEntity extends Entity {
@@ -2040,7 +2040,16 @@ public abstract class LivingEntity extends Entity {
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9bc6df403ce49dd13bfec25483b89ea75dd57672..aa94f0053f2f3151170be420a8d7d92dea5c97fa 100644
index fab8098ce72feb9b08960e55ab1a4aebaae22276..2e7d7bd60ac340568b1bc0f3052affcf445090f7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3360,7 +3360,7 @@ public abstract class LivingEntity extends Entity {
@@ -3359,7 +3359,7 @@ public abstract class LivingEntity extends Entity {
Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - suppress

Datei anzeigen

@ -61,10 +61,10 @@ index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422
} else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
return false;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index aa94f0053f2f3151170be420a8d7d92dea5c97fa..8b06b2c22ca6d22468340207f178906c744f6d75 100644
index 2e7d7bd60ac340568b1bc0f3052affcf445090f7..e3d8557733e20a51bb71d9c968f4f12cc3192624 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3278,7 +3278,7 @@ public abstract class LivingEntity extends Entity {
@@ -3277,7 +3277,7 @@ public abstract class LivingEntity extends Entity {
return;
}
// Paper end - don't run getEntities if we're not going to use its result
@ -73,7 +73,7 @@ index aa94f0053f2f3151170be420a8d7d92dea5c97fa..8b06b2c22ca6d22468340207f178906c
if (!list.isEmpty()) {
// Paper - move up
@@ -3445,9 +3445,16 @@ public abstract class LivingEntity extends Entity {
@@ -3444,9 +3444,16 @@ public abstract class LivingEntity extends Entity {
return !this.isRemoved() && this.collides; // CraftBukkit
}
@ -92,7 +92,7 @@ index aa94f0053f2f3151170be420a8d7d92dea5c97fa..8b06b2c22ca6d22468340207f178906c
// CraftBukkit start - collidable API
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
index 9cd91a73ae1a6ad550b9482db1fb7d72d7247c6e..153194d937d210e2e4fd8864e4a3c000f85d7e2e 100644
index ee55623cddc6d9e0dde5f384d66a750b92cc4f0e..9ed2f8f2843c634fd14dda4459f85b7140dd447a 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
@@ -83,7 +83,7 @@ public class Bat extends AmbientCreature {
@ -105,7 +105,7 @@ index 9cd91a73ae1a6ad550b9482db1fb7d72d7247c6e..153194d937d210e2e4fd8864e4a3c000
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
index 23f87848b42d180c94b5659b184a768a756deed8..345fe87d5d6c3883c28d2c1b34d1020e18864d97 100644
index 57378e42d6ef1be70a0abcca846cab9108c76783..ae21d260b2d4673eb4aa56a82e1043d20507adb2 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
@@ -380,8 +380,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
@ -120,7 +120,7 @@ index 23f87848b42d180c94b5659b184a768a756deed8..345fe87d5d6c3883c28d2c1b34d1020e
@Override
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
index e9cfe18bc6be3bc6f2d18c25b6b69e67d62ee946..5c104bf219e5e4acb8acfb160bd92f0a0621d864 100644
index c613a5e4d3ae360ce3eed312c5eecc553fae0066..630b6491ee186e1e3f17489311a91681e52b7ff5 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
@@ -239,7 +239,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
@ -133,7 +133,7 @@ index e9cfe18bc6be3bc6f2d18c25b6b69e67d62ee946..5c104bf219e5e4acb8acfb160bd92f0a
}
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 069cdfce085909991a69ebec3004d407526d469d..5fc66d7096afcfe63eba774e1dc330ac3263e4b0 100644
index c5e9273055ff7302941b7475d8175be53eaece1f..02bce120fc93caa9e1e92b61e74c28209a1b2385 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -345,7 +345,7 @@ public class ArmorStand extends LivingEntity {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] EntityMoveEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3150128a9bdabe902b18ebb7aadbc8a50f686a5b..f15cb87d96b3f5028ab6ceba1e9026525cdecbee 100644
index 70fbb12857644e3d915583a358ec772eb22d91ea..71fe8191a47079731e830d0a4bf6221e720596cf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1526,6 +1526,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -29,10 +29,10 @@ index aedb1d7a0b60fba72a952fa140569b72795660e4..d5c7180376562cd576d832d44ab11c9c
return new Throwable(entity + " Added to world at " + new java.util.Date());
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8b06b2c22ca6d22468340207f178906c744f6d75..6c6c4922e922f5475086752382350a6a2ad9ab6f 100644
index e3d8557733e20a51bb71d9c968f4f12cc3192624..8ce983822ab44ade6306b52cad352ad95f6d6bad 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3224,6 +3224,20 @@ public abstract class LivingEntity extends Entity {
@@ -3223,6 +3223,20 @@ public abstract class LivingEntity extends Entity {
this.pushEntities();
this.level.getProfiler().pop();

Datei anzeigen

@ -9,10 +9,10 @@ till their item is switched.
This patch clears the active item when the event is cancelled
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6c6c4922e922f5475086752382350a6a2ad9ab6f..702b166e032f1aedc8e1faa1e04738e768b40aa9 100644
index 8ce983822ab44ade6306b52cad352ad95f6d6bad..b84e20cd955fd75582a2c52f0c571d54ead555b2 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3703,6 +3703,7 @@ public abstract class LivingEntity extends Entity {
@@ -3702,6 +3702,7 @@ public abstract class LivingEntity extends Entity {
level.getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Line Of Sight Changes
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 702b166e032f1aedc8e1faa1e04738e768b40aa9..928fe7bb4ef959b7c8ab1f7d421612b98b1db038 100644
index b84e20cd955fd75582a2c52f0c571d54ead555b2..a60d289f3cf3826ac5368f3de77584fb63bf5e64 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3431,7 +3431,8 @@ public abstract class LivingEntity extends Entity {
@@ -3430,7 +3430,8 @@ public abstract class LivingEntity extends Entity {
Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ());
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());

Datei anzeigen

@ -17,7 +17,7 @@ index 81f4f26a6b83079d36acd1fd86dede0eb1116c01..59437f04911662f06596ef61b91017ca
public static <K, V> Collector<Entry<? extends K, ? extends V>, ?, Map<K, V>> toMap() {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 57a6c61a979f72f1270041bcf72e83bd8f0c2504..1149a15486016ac101c5976b45b7d1c1109244ce 100644
index 38e8d8c7d37fc824323dac372c56550480360515..1018f4640bab5876c5e0afb5b88f71437fb79662 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1321,7 +1321,7 @@ public abstract class LivingEntity extends Entity {
@ -44,7 +44,7 @@ index 57a6c61a979f72f1270041bcf72e83bd8f0c2504..1149a15486016ac101c5976b45b7d1c1
d0 = (Math.random() - Math.random()) * 0.01D;
}
@@ -2087,7 +2088,7 @@ public abstract class LivingEntity extends Entity {
@@ -2086,7 +2087,7 @@ public abstract class LivingEntity extends Entity {
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
Entity entity = damagesource.getDirectEntity();

Datei anzeigen

@ -248,7 +248,7 @@ index 07e1374ac3430662edd9f585e59b785e329f0820..9f9c0b56f0891e9c423d79f8ae4c3643
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index 925f16d5eb092518ef774f69a8d99689feb0f5d7..01d8af06f19427354cac95d691e65d31253fef94 100644
index 00dbe5046c3b93e402218a6903ea2f087410388b..7d001f42c448fd328b6384d133dcc4b72aab756c 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -91,7 +91,7 @@ public class Turtle extends Animal {
@ -259,7 +259,7 @@ index 925f16d5eb092518ef774f69a8d99689feb0f5d7..01d8af06f19427354cac95d691e65d31
+ 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 921aba3463b9f86a9e3c7d59aaa48b9760693eab..5efafcadda2bfc5cab8ce5d3ede83a0467fe696f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java