mojira.dev
MC-242733

Pointed dripstone drops an item when broken without a tool

Pointed Dripstone can be broken without a pickaxe in 1.18 Pre 8 and 1.17.1, and will still drop as an item. I have not checked if this occurs in any other versions, though.

Linked issues

Attachments

Comments 5

Can confirm in 1.17.1

Not sure if this is intentional though

I can confirm this behavior in 1.18 Release Candidate 1.

Here's a code analysis of this issue. The following is based on a decompiled version of Minecraft 1.17.1 using MCP-Reborn.

Code Analysis:

net.minecraft.world.level.block.Blocks.java

public class Blocks {
   ...
   public static final Block POINTED_DRIPSTONE = register("pointed_dripstone", new PointedDripstoneBlock(BlockBehaviour.Properties.of(Material.STONE, MaterialColor.TERRACOTTA_BROWN).noOcclusion().sound(SoundType.POINTED_DRIPSTONE).randomTicks().strength(1.5F, 3.0F).dynamicShape()));
   ...

If we look at the above class, we can see that pointed dripstone does not contain the method requiresCorrectToolForDrops() which is used for determining whether a block should drop as an item or not upon being destroyed without the use of the appropriate required tool.

Potential Fix:

Simply adding the requiresCorrectToolForDrops() method within this line of code should resolve this problem. The correct line of code within its class should look something like the following:

net.minecraft.world.level.block.Blocks.java

public class Blocks {
   ...
   public static final Block POINTED_DRIPSTONE = register("pointed_dripstone", new PointedDripstoneBlock(BlockBehaviour.Properties.of(Material.STONE, MaterialColor.TERRACOTTA_BROWN).noOcclusion().sound(SoundType.POINTED_DRIPSTONE).randomTicks().requiresCorrectToolForDrops().strength(1.5F, 3.0F).dynamicShape()));
   ...

Probably WAI as pointed dripstone didn't require a pickaxe all the way back to 20w48a, which is when it was added

Can confirm in 1.18.1.

Can confirm in 1.19.1.

googl0

(Unassigned)

Confirmed

Block states

1.17.1, 1.18 Pre-release 8, 1.18 Release Candidate 1, 1.18 Release Candidate 4, 1.18, 1.18.1, 1.19.1, 1.19.2, 23w14a

Retrieved