Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@c7714bbf Update PlayerPostRespawnEvent to include full location data (#13237)
PaperMC/Paper@9d427a5e [ci/skip] Enable unpick (#13241)
PaperMC/Paper@13e9c107 [ci/skip] Update mache for new unpick definitions
PaperMC/Paper@9934c173 Set chunk loading radius to 0 in PlayerSpawnFinder
This commit is contained in:
granny
2025-10-30 21:48:23 -07:00
parent ffe2f809fe
commit 3d61a21422
65 changed files with 714 additions and 706 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/BaseSpawner.java
+++ b/net/minecraft/world/level/BaseSpawner.java
@@ -61,6 +_,7 @@
@@ -62,6 +_,7 @@
}
public boolean isNearPlayer(Level level, BlockPos pos) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -165,11 +_,55 @@
@@ -166,11 +_,55 @@
}
// Paper end - add paper world config
@@ -56,7 +56,7 @@
public CraftWorld getWorld() {
return this.world;
}
@@ -845,6 +_,8 @@
@@ -846,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
@@ -65,7 +65,7 @@
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);
@@ -2112,4 +_,14 @@
@@ -2113,4 +_,14 @@
return this.id;
}
}

View File

@@ -2,7 +2,7 @@
+++ b/net/minecraft/world/level/block/CaveVinesBlock.java
@@ -92,4 +_,11 @@
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {
level.setBlock(pos, state.setValue(BERRIES, true), 2);
level.setBlock(pos, state.setValue(BERRIES, true), Block.UPDATE_CLIENTS);
}
+
+ // Purpur start - cave vines configurable max growth age

View File

@@ -11,7 +11,7 @@
- return InteractionResult.PASS;
- }
- // Paper end
- level.levelEvent(1500, pos, state != blockState ? 1 : 0);
- level.levelEvent(LevelEvent.COMPOSTER_FILL, pos, state != blockState ? 1 : 0);
- player.awardStat(Stats.ITEM_USED.get(stack.getItem()));
- stack.consume(1, player);
- }
@@ -46,17 +46,17 @@
+ // Purpur start - sneak to bulk process composter
+ private static @Nullable BlockState process(int levelValue, Player player, BlockState state, Level level, BlockPos pos, ItemStack stack) {
+ if (levelValue < 7 && !level.isClientSide()) {
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, level, pos, stack);
+ BlockState blockState = ComposterBlock.addItem(player, state, level, pos, stack);
+ // Paper start - handle cancelled events
+ if (iblockdata1 == null) {
+ if (blockState == null) {
+ return null;
+ }
+ // Paper end
+
+ level.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
+ level.levelEvent(LevelEvent.COMPOSTER_FILL, pos, state != blockState ? 1 : 0);
+ player.awardStat(Stats.ITEM_USED.get(stack.getItem()));
+ stack.consume(1, player);
+ return iblockdata1;
+ return blockState;
+ }
+ return state;
+ }

View File

@@ -7,7 +7,7 @@
+ } else if (requiresRedstone(level, state, pos)) { return InteractionResult.CONSUME; // Purpur - Option to make doors require redstone
} else {
state = state.cycle(OPEN);
level.setBlock(pos, state, 10);
level.setBlock(pos, state, Block.UPDATE_CLIENTS | Block.UPDATE_IMMEDIATE);
@@ -287,4 +_,18 @@
public static boolean isWoodenDoor(BlockState state) {
return state.getBlock() instanceof DoorBlock doorBlock && doorBlock.type().canOpenByHand();
@@ -19,8 +19,8 @@
+ // force update client
+ BlockPos otherPos = pos.relative(state.getValue(DoorBlock.HALF) == DoubleBlockHalf.LOWER ? Direction.UP : Direction.DOWN);
+ BlockState otherState = level.getBlockState(otherPos);
+ level.sendBlockUpdated(pos, state, state, 3);
+ level.sendBlockUpdated(otherPos, otherState, otherState, 3);
+ level.sendBlockUpdated(pos, state, state, Block.UPDATE_ALL);
+ level.sendBlockUpdated(otherPos, otherState, otherState, Block.UPDATE_ALL);
+ return true;
+ }
+ return false;

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -186,6 +_,21 @@
@@ -187,6 +_,21 @@
}
ItemStack itemStack = furnace.items.get(1);
@@ -22,7 +22,7 @@
ItemStack itemStack1 = furnace.items.get(0);
boolean flag1 = !itemStack1.isEmpty();
boolean flag2 = !itemStack.isEmpty();
@@ -269,6 +_,8 @@
@@ -270,6 +_,8 @@
if (flag) {
setChanged(level, pos, state);
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -148,16 +_,32 @@
@@ -149,16 +_,32 @@
return this.setText(updater.apply(text), isFrontText);
}
@@ -35,7 +35,7 @@
);
}
}
@@ -306,6 +_,27 @@
@@ -307,6 +_,27 @@
// CraftBukkit - this
return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, level, 2, string, component, level.getServer(), player); // Paper - Fix commands from signs not firing command events
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/material/LavaFluid.java
+++ b/net/minecraft/world/level/material/LavaFluid.java
@@ -190,7 +_,7 @@
@@ -192,7 +_,7 @@
@Override
public int getTickDelay(LevelReader level) {
@@ -9,9 +9,9 @@
}
@Override
@@ -211,6 +_,13 @@
@@ -213,6 +_,13 @@
private void fizz(LevelAccessor level, BlockPos pos) {
level.levelEvent(1501, pos, 0);
level.levelEvent(LevelEvent.LAVA_FIZZ, pos, 0);
}
+
+ // Purpur start - Implement infinite liquids

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/portal/PortalShape.java
+++ b/net/minecraft/world/level/portal/PortalShape.java
@@ -28,7 +_,7 @@
@@ -29,7 +_,7 @@
public static final int MAX_WIDTH = 21;
private static final int MIN_HEIGHT = 3;
public static final int MAX_HEIGHT = 21;