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/item/AxeItem.java
+++ b/net/minecraft/world/item/AxeItem.java
@@ -64,13 +_,15 @@
@@ -65,13 +_,15 @@
if (playerHasBlockingItemUseIntent(context)) {
return InteractionResult.PASS;
} else {
@@ -18,14 +18,14 @@
return InteractionResult.PASS;
}
// Paper end
@@ -78,8 +_,15 @@
@@ -79,8 +_,15 @@
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, clickedPos, itemInHand);
}
- level.setBlock(clickedPos, optional.get(), 11);
- level.setBlock(clickedPos, optional.get(), Block.UPDATE_ALL_IMMEDIATE);
- level.gameEvent(GameEvent.BLOCK_CHANGE, clickedPos, GameEvent.Context.of(player, optional.get()));
+ // Purpur start - Tool actionable options
+ level.setBlock(clickedPos, state, 11);
+ level.setBlock(clickedPos, state, Block.UPDATE_ALL_IMMEDIATE);
+ actionable.drops().forEach((drop, chance) -> {
+ if (level.random.nextDouble() < chance) {
+ Block.popResourceFromFace(level, clickedPos, context.getClickedFace(), new ItemStack(drop));
@@ -36,7 +36,7 @@
if (player != null) {
itemInHand.hurtAndBreak(1, player, context.getHand().asEquipmentSlot());
}
@@ -96,21 +_,23 @@
@@ -97,21 +_,23 @@
&& !player.isSecondaryUseActive();
}
@@ -52,8 +52,8 @@
- Optional<BlockState> previous = WeatheringCopper.getPrevious(state);
+ Optional<org.purpurmc.purpur.tool.Actionable> previous = Optional.ofNullable(level.purpurConfig.axeWeatherables.get(state.getBlock())); // Purpur - Tool actionable options
if (previous.isPresent()) {
- spawnSoundAndParticle(level, pos, player, state, SoundEvents.AXE_SCRAPE, 3005);
+ spawnSoundAndParticle(level, pos, WeatheringCopper.getPrevious(state).isPresent() ? player : null, state, SoundEvents.AXE_SCRAPE, 3005); // Purpur - Tool actionable options - force sound
- spawnSoundAndParticle(level, pos, player, state, SoundEvents.AXE_SCRAPE, LevelEvent.PARTICLES_SCRAPE);
+ spawnSoundAndParticle(level, pos, WeatheringCopper.getPrevious(state).isPresent() ? player : null, state, SoundEvents.AXE_SCRAPE, LevelEvent.PARTICLES_SCRAPE); // Purpur - Tool actionable options - force sound
return previous;
} else {
- Optional<BlockState> optional = Optional.ofNullable(HoneycombItem.WAX_OFF_BY_BLOCK.get().get(state.getBlock()))
@@ -63,8 +63,8 @@
+ // .map(block -> block.withPropertiesOf(state));
+ // Purpur end - Tool actionable options
if (optional.isPresent()) {
- spawnSoundAndParticle(level, pos, player, state, SoundEvents.AXE_WAX_OFF, 3004);
+ spawnSoundAndParticle(level, pos, HoneycombItem.WAX_OFF_BY_BLOCK.get().containsKey(state.getBlock()) ? player : null, state, SoundEvents.AXE_WAX_OFF, 3004); // Purpur - Tool actionable options - force sound
- spawnSoundAndParticle(level, pos, player, state, SoundEvents.AXE_WAX_OFF, LevelEvent.PARTICLES_WAX_OFF);
+ spawnSoundAndParticle(level, pos, HoneycombItem.WAX_OFF_BY_BLOCK.get().containsKey(state.getBlock()) ? player : null, state, SoundEvents.AXE_WAX_OFF, LevelEvent.PARTICLES_WAX_OFF); // Purpur - Tool actionable options - force sound
return optional;
} else {
return Optional.empty();

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/ShovelItem.java
+++ b/net/minecraft/world/item/ShovelItem.java
@@ -45,9 +_,12 @@
@@ -46,9 +_,12 @@
BlockState blockState1 = FLATTENABLES.get(blockState.getBlock());
BlockState blockState2 = null;
Runnable afterAction = null; // Paper

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/SpawnEggItem.java
+++ b/net/minecraft/world/item/SpawnEggItem.java
@@ -68,6 +_,23 @@
@@ -69,6 +_,23 @@
return InteractionResult.FAIL;
} else {
if (level.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) return InteractionResult.FAIL; // Paper - Allow disabling mob spawner spawn egg transformation
@@ -22,5 +22,5 @@
+ }
+ // Purpur end - PlayerSetSpawnerTypeWithEggEvent
spawner.setEntityId(type, level.getRandom());
level.sendBlockUpdated(clickedPos, blockState, blockState, 3);
level.sendBlockUpdated(clickedPos, blockState, blockState, Block.UPDATE_ALL);
level.gameEvent(context.getPlayer(), GameEvent.BLOCK_CHANGE, clickedPos);