More compiler fixes

This commit is contained in:
Frank Bauer 2021-06-23 21:59:24 +02:00
parent cfa765437c
commit 4f053c161a
20 changed files with 84 additions and 67 deletions

View file

@ -62,7 +62,7 @@ public class FurBlock extends BaseAttachedBlock implements IRenderTyped {
@Override
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
if (tool != null && tool.getItem().is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
if (tool != null && tool.is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
return Lists.newArrayList(new ItemStack(this));
}
else if (dropChance < 1 || MHelper.RANDOM.nextInt(dropChance) == 0) {