Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@31699ae Updated Upstream (Bukkit/CraftBukkit) (#10242)
This commit is contained in:
granny
2024-02-11 21:56:58 -08:00
parent 425889dc45
commit 70a76c42bf
77 changed files with 356 additions and 375 deletions

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Conduit behavior configuration
diff --git a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
index 58f2619fab37a1e2d2093ca89f66f3a8bb47d192..bcf8a30786a1da86223244cb054cd01d81a61c61 100644
index 37e0b762b86e74f607a4541ecb7b24ad7a591d0e..7e3edd41f3a39ef14382e18b20af21e63ce0677b 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
@@ -171,7 +171,7 @@ public class ConduitBlockEntity extends BlockEntity {
@@ -167,7 +167,7 @@ public class ConduitBlockEntity extends BlockEntity {
if ((l > 1 || i1 > 1 || j1 > 1) && (i == 0 && (i1 == 2 || j1 == 2) || j == 0 && (l == 2 || j1 == 2) || k == 0 && (l == 2 || i1 == 2))) {
BlockPos blockposition2 = pos.offset(i, j, k);
BlockState iblockdata = world.getBlockState(blockposition2);
@@ -17,7 +17,7 @@ index 58f2619fab37a1e2d2093ca89f66f3a8bb47d192..bcf8a30786a1da86223244cb054cd01d
int k1 = ablock.length;
for (int l1 = 0; l1 < k1; ++l1) {
@@ -191,7 +191,7 @@ public class ConduitBlockEntity extends BlockEntity {
@@ -187,7 +187,7 @@ public class ConduitBlockEntity extends BlockEntity {
private static void applyEffects(Level world, BlockPos pos, List<BlockPos> activatingBlocks) {
int i = activatingBlocks.size();
@@ -26,7 +26,7 @@ index 58f2619fab37a1e2d2093ca89f66f3a8bb47d192..bcf8a30786a1da86223244cb054cd01d
int k = pos.getX();
int l = pos.getY();
int i1 = pos.getZ();
@@ -222,21 +222,21 @@ public class ConduitBlockEntity extends BlockEntity {
@@ -218,20 +218,20 @@ public class ConduitBlockEntity extends BlockEntity {
blockEntity.destroyTarget = ConduitBlockEntity.findDestroyTarget(world, pos, blockEntity.destroyTargetUUID);
blockEntity.destroyTargetUUID = null;
} else if (blockEntity.destroyTarget == null) {
@@ -45,13 +45,12 @@ index 58f2619fab37a1e2d2093ca89f66f3a8bb47d192..bcf8a30786a1da86223244cb054cd01d
if (blockEntity.destroyTarget != null) {
// CraftBukkit start
CraftEventFactory.blockDamage = CraftBlock.at(world, pos);
- if (blockEntity.destroyTarget.hurt(world.damageSources().magic(), 4.0F)) {
+ if (blockEntity.destroyTarget.hurt(world.damageSources().magic(), world.purpurConfig.conduitDamageAmount)) { // Purpur
world.playSound((Player) null, blockEntity.destroyTarget.getX(), blockEntity.destroyTarget.getY(), blockEntity.destroyTarget.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F);
- if (blockEntity.destroyTarget.hurt(world.damageSources().magic().directBlock(world, pos), 4.0F)) { // CraftBukkit
+ if (blockEntity.destroyTarget.hurt(world.damageSources().magic().directBlock(world, pos), world.purpurConfig.conduitDamageAmount)) { // CraftBukkit // Purpur
world.playSound(null, blockEntity.destroyTarget.getX(), blockEntity.destroyTarget.getY(), blockEntity.destroyTarget.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F);
}
CraftEventFactory.blockDamage = null;
@@ -262,16 +262,22 @@ public class ConduitBlockEntity extends BlockEntity {
// CraftBukkit end
@@ -256,16 +256,22 @@ public class ConduitBlockEntity extends BlockEntity {
}
private static AABB getDestroyRangeAABB(BlockPos pos) {
@@ -90,7 +89,7 @@ index f0b0348e105fb27c829ec29e638433c57bfd5f64..57ce4b7c5fcfe7a88928cd4124f29af3
@Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 52363f3ee615bbb86ea54a72d5c0274c7699c9dd..3302b7f88ba82620e09ec900b7409267ea55c7b4 100644
index e13c22d0d6e4b2f1a7db27c32a856cb0e78a5036..2d3339d3f5c8fe12cf61aaed5d19b0d72ba35f5c 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2903,4 +2903,27 @@ public class PurpurWorldConfig {