Updated Upstream (Paper & Pufferfish)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@5e73c55 [ci skip] Add more identifying patch comments
PaperMC/Paper@3e20d3a [ci skip] Add more identifying patch comments
PaperMC/Paper@f61ebdc Fix issue with kick event causes being passed improperly
PaperMC/Paper@106c67a [ci skip] Add more identifying patch comments
PaperMC/Paper@cc693ce [ci skip] Add more identifying patch comments, merge related patches
PaperMC/Paper@eeb6afc [ci skip] Add more identifying patch comments, merge related patches
PaperMC/Paper@1c956ab [ci skip] Add more identifying patch comments, merge related patches
PaperMC/Paper@42e88a8 [ci skip] Add more identifying patch comments
PaperMC/Paper@8e41ef4 Add visual blockdata api for primed tnt (#10146)
PaperMC/Paper@68c3297 [ci skip] Add more identifying patch comments
PaperMC/Paper@4a98986 Add back Reduce allocation of Vec3D by entity tracker patch (#10179)
PaperMC/Paper@b48d737 Async world data IO saving (#10171)
PaperMC/Paper@8d94596 [ci skip] Add more identifying patch comments
PaperMC/Paper@f7dd304 [ci skip] Add more identifying patch comments
PaperMC/Paper@98e6d20 [ci skip] Add more identifying patch comments
PaperMC/Paper@e9e0bc1 [ci skip] Add more identifying patch comments
PaperMC/Paper@d9df6bc [ci skip] Add more patch identifying comments, cleanup
PaperMC/Paper@27cabc1 [ci skip] Add more patch identifying comments

Pufferfish Changes:
pufferfish-gg/Pufferfish@8e208d3 Fix Async World Saving attribution
This commit is contained in:
granny
2024-01-21 20:41:53 -08:00
parent 3d52f066c1
commit 236b06a2a3
84 changed files with 740 additions and 851 deletions

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight
Co-authored by: Encode42 <me@encode42.dev>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6fd094b30b0d8eee70674283ff6523133ee322ba..cc7c2463ef24b44f44575f245a27c5439c0b9be8 100644
index 1bb50f182fa6274cb0c631e0d4e79288443b3a53..ac0fc8b7184ba1b6d40261cc15d81a7936f728d4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -503,6 +503,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -502,6 +502,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return true;
}
@@ -32,7 +32,7 @@ index 6fd094b30b0d8eee70674283ff6523133ee322ba..cc7c2463ef24b44f44575f245a27c543
return this.hardCollides;
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4154eb08be0d6492cfba931761671a6384390d1b..338e9bef962f9090070a9c76e565c6aeab66975e 100644
index d72838fe8a0a9540750bfc3a26202e93493c98f3..6eb7a1398d1ce63ec6c11d9865f4c16b51c361de 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -92,7 +92,7 @@ index 4154eb08be0d6492cfba931761671a6384390d1b..338e9bef962f9090070a9c76e565c6ae
public boolean isSensitiveToWater() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 7203384094de96ceea810b3e2da21c145c12a31d..9caee3db19fa76e8e311ead8f892d0f8bebfe6b2 100644
index 4383b2555cb416fce7b62b046211dbc3e8c75601..c029752141efbc48005dae0e3c1a071ba039b3a7 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1758,17 +1758,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
@@ -115,7 +115,7 @@ index 7203384094de96ceea810b3e2da21c145c12a31d..9caee3db19fa76e8e311ead8f892d0f8
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
index d205578dbed88776c6704fec9500299ce1606152..30fae50f81ec09707b0cb3ed469ae11695fbb540 100644
index 9d259d7e2aa3e44e350eb5927314cfceaffaf3f3..3f9e81c0bdd85bec24a1209ad3fd3dc43d988a4f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -66,6 +66,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@@ -129,16 +129,16 @@ index d205578dbed88776c6704fec9500299ce1606152..30fae50f81ec09707b0cb3ed469ae116
@@ -101,35 +102,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
}
// Paper start
// Paper start - shouldBurnInDay API
- private boolean shouldBurnInDay = true;
+ // private boolean shouldBurnInDay = true; // Purpur - moved to LivingEntity - keep methods for ABI compatibility
public boolean shouldBurnInDay() { return shouldBurnInDay; }
public void setShouldBurnInDay(boolean shouldBurnInDay) { this.shouldBurnInDay = shouldBurnInDay; }
// Paper end
// Paper end - shouldBurnInDay API
@Override
public void aiStep() {
- boolean flag = shouldBurnInDay && this.isSunBurnTick(); // Paper - Configurable Burning
- boolean flag = shouldBurnInDay && this.isSunBurnTick(); // Paper - shouldBurnInDay API
-
- if (flag) {
- ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
@@ -174,12 +174,12 @@ index d205578dbed88776c6704fec9500299ce1606152..30fae50f81ec09707b0cb3ed469ae116
@@ -238,7 +217,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
this.reassessWeaponGoal();
// Paper start
// Paper start - shouldBurnInDay API
if (nbt.contains("Paper.ShouldBurnInDay")) {
- this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay");
+ // this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay"); // Purpur - implemented in LivingEntity
}
// Paper end
// Paper end - shouldBurnInDay API
}
@@ -247,7 +226,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@Override
@@ -188,7 +188,7 @@ index d205578dbed88776c6704fec9500299ce1606152..30fae50f81ec09707b0cb3ed469ae116
- nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay);
+ // nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Purpur - implemented in LivingEntity
}
// Paper end
// Paper end - shouldBurnInDay API
diff --git a/src/main/java/net/minecraft/world/entity/monster/Husk.java b/src/main/java/net/minecraft/world/entity/monster/Husk.java
index f6d6df27c2ca7a33ed3ca8e299725b6a5c4aafc3..5ac87650e357f3ac48e37713b9b0b18ad4d6feb6 100644
@@ -212,7 +212,7 @@ index f6d6df27c2ca7a33ed3ca8e299725b6a5c4aafc3..5ac87650e357f3ac48e37713b9b0b18a
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
index 030b81dd8c52ddb300e73d792f9c4cea4e8a8d46..1d4a292a37069408420ca90b1c2784229781f93f 100644
index 637b229817f9f2c3ad224f300b56a6bee4c8a341..bcb1912ea218fbb4b849ab84a7025202100b82c3 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -61,6 +61,7 @@ public class Phantom extends FlyingMob implements Enemy {
@@ -230,9 +230,9 @@ index 030b81dd8c52ddb300e73d792f9c4cea4e8a8d46..1d4a292a37069408420ca90b1c278422
- // Purpur start
- boolean burnFromDaylight = this.shouldBurnInDay && this.level().purpurConfig.phantomBurnInDaylight;
- boolean burnFromLightSource = this.level().purpurConfig.phantomBurnInLight > 0 && this.level().getMaxLocalRawBrightness(blockPosition()) >= this.level().purpurConfig.phantomBurnInLight;
- if (this.isAlive() && (burnFromDaylight || burnFromLightSource)) { // Paper - Configurable Burning
- if (this.isAlive() && (burnFromDaylight || burnFromLightSource)) { // Paper - shouldBurnInDay API
- if (getRider() == null || !this.isControllable())
- // Purpur end
- // Purpur end
- if (getRider() == null || !this.isControllable()) // Purpur
- this.setSecondsOnFire(8);
- }
@@ -259,12 +259,13 @@ index 030b81dd8c52ddb300e73d792f9c4cea4e8a8d46..1d4a292a37069408420ca90b1c278422
// Paper end
}
@@ -378,8 +370,14 @@ public class Phantom extends FlyingMob implements Enemy {
@@ -377,8 +369,15 @@ public class Phantom extends FlyingMob implements Enemy {
return spawningEntity;
}
public void setSpawningEntity(java.util.UUID entity) { this.spawningEntity = entity; }
- private boolean shouldBurnInDay = true;
- public boolean shouldBurnInDay() { return shouldBurnInDay; }
+
+ // private boolean shouldBurnInDay = true; // Purpur - moved to LivingEntity - keep methods for ABI compatibility
+ // Purpur start
+ public boolean shouldBurnInDay() {
@@ -277,19 +278,19 @@ index 030b81dd8c52ddb300e73d792f9c4cea4e8a8d46..1d4a292a37069408420ca90b1c278422
// Paper end
private static enum AttackPhase {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 52a576a16bfeb7dc6ec97280f9a5e0f408d71e46..9b1ae2fa1681f1212b6a09d5b10b16634ce65470 100644
index edc47e077fe44d1b817b791ddde86e052a5bf831..2dad874c0a425cf2d0a385b6061ab79d81b82c86 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -96,11 +96,12 @@ public class Zombie extends Monster {
private int inWaterTime;
public int conversionTime;
private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
- private boolean shouldBurnInDay = true; // Paper
+ // private boolean shouldBurnInDay = true; // Paper // Purpur - implemented in LivingEntity
- private boolean shouldBurnInDay = true; // Paper - Add more Zombie API
+ // private boolean shouldBurnInDay = true; // Paper - Add more Zombie API // Purpur - implemented in LivingEntity
public Zombie(EntityType<? extends Zombie> type, Level world) {
super(type, world);
this.breakDoorGoal = new BreakDoorGoal(this, com.google.common.base.Predicates.in(world.paperConfig().entities.behavior.doorBreakingDifficulty.getOrDefault(type, world.paperConfig().entities.behavior.doorBreakingDifficulty.get(EntityType.ZOMBIE)))); // Paper
this.breakDoorGoal = new BreakDoorGoal(this, com.google.common.base.Predicates.in(world.paperConfig().entities.behavior.doorBreakingDifficulty.getOrDefault(type, world.paperConfig().entities.behavior.doorBreakingDifficulty.get(EntityType.ZOMBIE)))); // Paper - Configurable door breaking difficulty
+ this.setShouldBurnInDay(true); // Purpur
}
@@ -332,28 +333,28 @@ index 52a576a16bfeb7dc6ec97280f9a5e0f408d71e46..9b1ae2fa1681f1212b6a09d5b10b1663
+ public boolean shouldBurnInDay() { return isSunSensitive(); } // Purpur - for ABI compatibility
public boolean isSunSensitive() {
return this.shouldBurnInDay; // Paper - use api value instead
return this.shouldBurnInDay; // Paper - Add more Zombie API
}
@@ -486,7 +465,7 @@ public class Zombie extends Monster {
nbt.putBoolean("CanBreakDoors", this.canBreakDoors());
nbt.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1);
nbt.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1);
- nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper
+ // nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper // Purpur - implemented in LivingEntity
- nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API
+ // nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API // Purpur - implemented in LivingEntity
}
@Override
@@ -500,7 +479,7 @@ public class Zombie extends Monster {
}
// Paper start
// Paper start - Add more Zombie API
if (nbt.contains("Paper.ShouldBurnInDay")) {
- this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay");
+ // this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay"); // Purpur - implemented in LivingEntity
}
// Paper end
// Paper end - Add more Zombie API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 001b9d5aef4c2d9fb272dd187d0d0bd001de5693..ea5ac1f53309fdd30aad40fd4a092f297d76fd61 100644
index c3880875f5148d869d7e067fe78cbd1b9492b501..2ef6dc2390ed622eda284e3b4c85ec64e057c981 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -83,6 +83,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -369,7 +370,7 @@ index 001b9d5aef4c2d9fb272dd187d0d0bd001de5693..ea5ac1f53309fdd30aad40fd4a092f29
Preconditions.checkArgument(entity != null, "Unknown entity");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 12c7505c2ce562b3188c079952e57ae1fab5268b..10ca0fdb5b92cc4f1d346540c9129d5c55732985 100644
index 9bad55be51db41252f60fd976b2c1e54945a5b01..aa45eea710cdb4bd7aa0e12eacc879826b2e98c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1135,5 +1135,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {