mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix #704
This commit is contained in:
@@ -37,7 +37,7 @@ index be47543240bd573cd2cc08f84b7eab1c693438ec..6b0131cccf1a38bc449dd79df8e79a43
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..ce2feeefbff41fca32f25786f1cab668d0790d25 100644
|
||||
index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..caff1d4ae9f7c2fe7faf1305b1e60528cc00aeb0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -18,6 +18,9 @@ import net.minecraft.core.Direction;
|
||||
@@ -67,6 +67,15 @@ index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..ce2feeefbff41fca32f25786f1cab668
|
||||
});
|
||||
state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY);
|
||||
}
|
||||
@@ -339,7 +343,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
io.papermc.paper.event.block.BlockBreakBlockEvent event = new io.papermc.paper.event.block.BlockBreakBlockEvent(org.bukkit.craftbukkit.block.CraftBlock.at(world, pos), org.bukkit.craftbukkit.block.CraftBlock.at(world, source), items);
|
||||
event.callEvent();
|
||||
for (var drop : event.getDrops()) {
|
||||
- popResource(world.getMinecraftWorld(), pos, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(drop));
|
||||
+ popResource(world.getMinecraftWorld(), pos, applyDisplayNameAndLoreFromTile(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(drop), blockEntity)); // Purpur
|
||||
}
|
||||
state.spawnAfterBreak(world.getMinecraftWorld(), pos, ItemStack.EMPTY);
|
||||
}
|
||||
@@ -350,13 +354,53 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
public static void dropResources(BlockState state, Level world, BlockPos pos, @Nullable BlockEntity blockEntity, Entity entity, ItemStack stack) {
|
||||
if (world instanceof ServerLevel) {
|
||||
|
||||
Reference in New Issue
Block a user