Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@20e9fe8e Fix javadocs in DriedGhast
PaperMC/Paper@1366eaa5 Readd dropped hunk
PaperMC/Paper@4b6fae10 1.21.6-pre2
PaperMC/Paper@5cfd6383 Fix compile issues
PaperMC/Paper@18924de7 run generator
PaperMC/Paper@fbc139e0 some fixes
PaperMC/Paper@0c3879ac track block for lava/conduit damage
PaperMC/Paper@767e99c9 Moonrise attempt
PaperMC/Paper@b15c51ce Rest of feature patches
PaperMC/Paper@c136222e Moonrise compile fixes and changes
PaperMC/Paper@52880cec Fix LayeredCauldronBlock event call
PaperMC/Paper@4fa21c21 Update Moonrise to 1.21.6-pre2
PaperMC/Paper@cb705c41 Add DataConverter patch
PaperMC/Paper@87b3d8ba Replace deprecated Thread#getId usage with Thread#threadId
PaperMC/Paper@5b362692 Add MCUtil#toLocation from Folia
PaperMC/Paper@b2f3c2c9 Move over to non discarding reporter
PaperMC/Paper@4c4ddfcc Update ItemType
This commit is contained in:
granny
2025-06-03 22:14:04 -07:00
parent 1505068927
commit 2a46cfc530
31 changed files with 154 additions and 153 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/EntityGetter.java
+++ b/net/minecraft/world/level/EntityGetter.java
@@ -144,7 +_,7 @@
@@ -185,7 +_,7 @@
default boolean hasNearbyAlivePlayer(double x, double y, double z, double distance) {
for (Player player : this.players()) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -159,11 +_,55 @@
@@ -160,11 +_,55 @@
}
// Paper end - add paper world config
@@ -56,8 +56,8 @@
public CraftWorld getWorld() {
return this.world;
}
@@ -207,6 +_,8 @@
) {
@@ -840,6 +_,8 @@
// Paper end - getblock optimisations - cache world height/sections
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName(), environment); // Purpur - Purpur config files
@@ -65,7 +65,7 @@
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);
@@ -1417,4 +_,14 @@
@@ -2131,4 +_,14 @@
return this.id;
}
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/NaturalSpawner.java
+++ b/net/minecraft/world/level/NaturalSpawner.java
@@ -206,7 +_,7 @@
@@ -261,7 +_,7 @@
mutableBlockPos.set(x, y, z);
double d = x + 0.5;
double d1 = z + 0.5;

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/ServerExplosion.java
+++ b/net/minecraft/world/level/ServerExplosion.java
@@ -73,7 +_,7 @@
@@ -316,7 +_,7 @@
) {
this.level = level;
this.source = source;
@@ -9,7 +9,7 @@
this.center = center;
this.fire = fire;
this.blockInteraction = blockInteraction;
@@ -356,10 +_,27 @@
@@ -638,7 +_,7 @@
public void explode() {
// CraftBukkit start
@@ -18,6 +18,10 @@
return;
}
// CraftBukkit end
@@ -650,6 +_,23 @@
this.directMappedBlockCache = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache[BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH];
this.mutablePos = new BlockPos.MutableBlockPos();
// Paper end - collision optimisations
+ // Purpur start - add PreExplodeEvents
+ if (this.source != null) {
+ Location location = new Location(this.level.getWorld(), this.center.x, this.center.y, this.center.z);

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -104,6 +_,10 @@
@@ -105,6 +_,10 @@
input.read("PublicBukkitValues", CompoundTag.CODEC)
.ifPresent(this.persistentDataContainer::putAll);
// Paper end - read persistent data container
@@ -11,7 +11,7 @@
}
public final void loadWithComponents(ValueInput input) {
@@ -116,6 +_,11 @@
@@ -117,6 +_,11 @@
}
protected void saveAdditional(ValueOutput output) {
@@ -23,7 +23,7 @@
}
public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) {
@@ -400,4 +_,17 @@
@@ -402,4 +_,17 @@
return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos();
}
}

View File

@@ -30,8 +30,8 @@
EntityReference<LivingEntity> entityReference = updateDestroyTarget(blockEntity.destroyTarget, level, pos, canDestroy);
LivingEntity livingEntity = EntityReference.get(entityReference, level, LivingEntity.class);
if (damageTarget && livingEntity != null) { // CraftBukkit
- if (livingEntity.hurtServer(level, level.damageSources().magic(), 4.0F)) // CraftBukkit - move up
+ if (livingEntity.hurtServer(level, level.damageSources().magic(), level.purpurConfig.conduitDamageAmount)) // CraftBukkit - move up // Purpur - Conduit behavior configuration
- if (livingEntity.hurtServer(level, level.damageSources().magic().eventBlockDamager(level, pos), 4.0F)) // CraftBukkit - move up
+ if (livingEntity.hurtServer(level, level.damageSources().magic().eventBlockDamager(level, pos), level.purpurConfig.conduitDamageAmount)) // CraftBukkit - move up // Purpur - Conduit behavior configuration
level.playSound(
null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F
);

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/level/chunk/storage/EntityStorage.java
+++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java
@@ -97,6 +_,7 @@
ListTag listTag = new ListTag();
entities.getEntities().forEach(entity -> {
@@ -108,6 +_,7 @@
}
// Paper end - Entity load/save limit per chunk
TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector.forChild(entity.problemPath()), entity.registryAccess());
+ if (!entity.canSaveToDisk()) return; // Purpur - Add canSaveToDisk to Entity
if (entity.save(tagValueOutput)) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -49,7 +_,7 @@
@@ -308,7 +_,7 @@
// Paper start
private static void printOversizedLog(String msg, Path file, int x, int z) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/material/FlowingFluid.java
+++ b/net/minecraft/world/level/material/FlowingFluid.java
@@ -190,7 +_,7 @@
@@ -232,7 +_,7 @@
}
}
@@ -9,7 +9,7 @@
BlockState blockState1 = level.getBlockState(mutableBlockPos.setWithOffset(pos, Direction.DOWN));
FluidState fluidState1 = blockState1.getFluidState();
if (blockState1.isSolid() || this.isSourceBlockOfThisType(fluidState1)) {
@@ -267,6 +_,12 @@
@@ -319,6 +_,12 @@
}
protected abstract boolean canConvertToSource(ServerLevel level);