mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
it builds \o/
This commit is contained in:
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user