[Fix] Ensure that a null
drop does not cause crashes (quiqueck/BetterNether#148)
This commit is contained in:
parent
30e95aa644
commit
b435519823
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ public class BaseOreBlock extends DropExperienceBlock implements BlockModelProvi
|
|||
LootParams.Builder builder
|
||||
) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
if (tool != null && tool.isCorrectToolForDrops(state)) {
|
||||
if (tool != null && tool.isCorrectToolForDrops(state) && dropItem != null) {
|
||||
boolean canMine = miningLevel == 0;
|
||||
if (tool.getItem() instanceof TieredItem tired) {
|
||||
canMine = tired.getTier().getLevel() >= miningLevel;
|
||||
|
|
Loading…
Reference in a new issue