it builds \o/

This commit is contained in:
granny
2023-12-07 16:50:01 -08:00
parent 18ee893c60
commit 2f003a6658
11 changed files with 47 additions and 66 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..72fe95069f449544ff8a17643e4bd654b698822e 100644
index e8b1c44da90f60cde20cda65aba2aa1e30f89d25..c2e03881fff78aff203b5838180894bb70f419b9 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 {
@@ -29,12 +29,12 @@ index e8b1c44da90f60cde20cda65aba2aa1e30f89d25..72fe95069f449544ff8a17643e4bd654
+ @Override
+ public void playerDestroy(Level level, net.minecraft.world.entity.player.Player player, BlockPos pos, BlockState state, BlockEntity blockEntity, ItemStack stack, boolean includeDrops) {
+ if (level.purpurConfig.silkTouchEnabled && player.getBukkitEntity().hasPermission("purpur.drop.spawners") && isSilkTouch(level, stack)) {
+ Optional<net.minecraft.world.entity.EntityType<?>> type = net.minecraft.world.entity.EntityType.by(((SpawnerBlockEntity) blockEntity).getSpawner().nextSpawnData.getEntityToSpawn());
+ java.util.Optional<net.minecraft.world.entity.EntityType<?>> type = net.minecraft.world.entity.EntityType.by(((SpawnerBlockEntity) blockEntity).getSpawner().nextSpawnData.getEntityToSpawn());
+
+ net.minecraft.world.entity.EntityType<?> entityType = type.orElse(null);
+ final net.kyori.adventure.text.Component mobName = io.papermc.paper.adventure.PaperAdventure.asAdventure(entityType == null ? Component.empty() : entityType.getDescription());
+ CompoundTag display = new CompoundTag();
+ CompoundTag tag = new CompoundTag();
+ net.minecraft.nbt.CompoundTag display = new net.minecraft.nbt.CompoundTag();
+ net.minecraft.nbt.CompoundTag tag = new net.minecraft.nbt.CompoundTag();
+
+ String name = level.purpurConfig.silkTouchSpawnerName;
+ if (name != null && !name.isEmpty() && !name.equals("Monster Spawner")) {