Sapling drop fix
This commit is contained in:
parent
2571ab7ba8
commit
6520770129
1 changed files with 3 additions and 2 deletions
|
@ -36,7 +36,8 @@ public class EndLeavesBlock extends LeavesBlock implements BlockPatterned, IRend
|
||||||
.blockVision((state, world, pos) -> { return false; })
|
.blockVision((state, world, pos) -> { return false; })
|
||||||
.materialColor(color)
|
.materialColor(color)
|
||||||
.breakByTool(FabricToolTags.HOES)
|
.breakByTool(FabricToolTags.HOES)
|
||||||
.breakByTool(FabricToolTags.SHEARS));
|
.breakByTool(FabricToolTags.SHEARS)
|
||||||
|
.breakByHand(true));
|
||||||
this.sapling = sapling;
|
this.sapling = sapling;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ public class EndLeavesBlock extends LeavesBlock implements BlockPatterned, IRend
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||||
ItemStack tool = builder.get(LootContextParameters.TOOL);
|
ItemStack tool = builder.get(LootContextParameters.TOOL);
|
||||||
if (tool != null) {
|
if (tool != null) {
|
||||||
if (tool.getItem().isIn(FabricToolTags.SHEARS) || tool.isEffectiveOn(state) || EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
if (tool.getItem().isIn(FabricToolTags.SHEARS) || EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||||
return Collections.singletonList(new ItemStack(this));
|
return Collections.singletonList(new ItemStack(this));
|
||||||
}
|
}
|
||||||
int fortune = EnchantmentHelper.getLevel(Enchantments.FORTUNE, tool);
|
int fortune = EnchantmentHelper.getLevel(Enchantments.FORTUNE, tool);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue