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) {

View file

@ -355,8 +355,8 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
}
@Override
public BlockEntity newBlockEntity(BlockGetter world) {
return new PedestalBlockEntity();
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
return new PedestalBlockEntity(blockPos, blockState);
}
public boolean hasUniqueEntity() {
@ -440,7 +440,7 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
@Nullable
protected static <E extends BlockEntity, A extends BlockEntity> BlockEntityTicker<A> createTickerHelper(BlockEntityType<A> blockEntityType, BlockEntityType<E> blockEntityType2, BlockEntityTicker<? super E> blockEntityTicker) {
return blockEntityType2 == blockEntityType ? blockEntityTicker : null;
return blockEntityType2 == blockEntityType ? (BlockEntityTicker<A>) blockEntityTicker : null;
}
static {