Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@ae001ae Fix untrack event not being called for all 'untracks' (#10110)
PaperMC/Paper@259bc76 Pass system properties to maven repo session (#10117)
PaperMC/Paper@b2a6d57 Validate ResourceLocation in NBT reading
PaperMC/Paper@7eaff48 [ci skip] Replace some magic values with constant references
PaperMC/Paper@19a6202 Fix experience & improvements to block events (#8067)
PaperMC/Paper@8379027 Fix cmd permission levels for command blocks (#7404)
PaperMC/Paper@a93acc4 Fix EntityChangePoseEvent being called during worldgen (#10120)
PaperMC/Paper@25a99b1 Fix BlockDestroyEvents effectBlock not being set (#10131)
This commit is contained in:
granny
2024-01-04 21:57:42 -08:00
parent 6488438861
commit 66a61fbd2b
28 changed files with 127 additions and 127 deletions

View File

@@ -18,7 +18,7 @@ index f692149d91b525bda6dc79d489d7496ea24037e8..7fbd4bf29bcc0795aa4b0e6d5d4bc374
public static final Item CRAFTING_TABLE = registerBlock(Blocks.CRAFTING_TABLE);
public static final Item FARMLAND = registerBlock(Blocks.FARMLAND);
diff --git a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
index e8b1c44da90f60cde20cda65aba2aa1e30f89d25..c2e03881fff78aff203b5838180894bb70f419b9 100644
index e8b1c44da90f60cde20cda65aba2aa1e30f89d25..c55576424993236da46ed1c2ccd03b72d7ee97f9 100644
--- a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
@@ -42,6 +42,58 @@ public class SpawnerBlock extends BaseEntityBlock {
@@ -27,7 +27,7 @@ index e8b1c44da90f60cde20cda65aba2aa1e30f89d25..c2e03881fff78aff203b5838180894bb
+ // Purpur start
+ @Override
+ public void playerDestroy(Level level, net.minecraft.world.entity.player.Player player, BlockPos pos, BlockState state, BlockEntity blockEntity, ItemStack stack, boolean includeDrops) {
+ public void playerDestroy(Level level, net.minecraft.world.entity.player.Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack, boolean includeDrops, boolean dropExp) {
+ if (level.purpurConfig.silkTouchEnabled && player.getBukkitEntity().hasPermission("purpur.drop.spawners") && isSilkTouch(level, stack)) {
+ java.util.Optional<net.minecraft.world.entity.EntityType<?>> type = net.minecraft.world.entity.EntityType.by(((SpawnerBlockEntity) blockEntity).getSpawner().nextSpawnData.getEntityToSpawn());
+
@@ -63,13 +63,13 @@ index e8b1c44da90f60cde20cda65aba2aa1e30f89d25..c2e03881fff78aff203b5838180894bb
+ ItemStack item = new ItemStack(Blocks.SPAWNER.asItem());
+ if (entityType != null) {
+ tag.putString("Purpur.mob_type", entityType.getName());
+ tag.putDouble("HideFlags", 32); // hides the "Interact with Spawn Egg" tooltip
+ tag.putDouble("HideFlags", ItemStack.TooltipPart.ADDITIONAL.getMask()); // hides the "Interact with Spawn Egg" tooltip
+ item.setTag(tag);
+ }
+
+ popResource(level, pos, item);
+ }
+ super.playerDestroy(level, player, pos, state, blockEntity, stack, includeDrops);
+ super.playerDestroy(level, player, pos, state, blockEntity, stack, includeDrops, dropExp);
+ }
+
+ private boolean isSilkTouch(Level level, ItemStack stack) {