Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Suppress deprecation warnings on barrier block as it's intended. #431

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* OKTW Galaxy Project
* Copyright (C) 2018-2022
* Copyright (C) 2018-2024
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
Expand Down Expand Up @@ -47,11 +47,13 @@ public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
return CustomBlock.Companion.getDUMMY().createBlockEntity(pos);
}

@SuppressWarnings("deprecation")
@Override
public boolean hasComparatorOutput(BlockState state) {
return true;
}

@SuppressWarnings("deprecation")
@Override
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
return ScreenHandler.calculateComparatorOutput(world.getBlockEntity(pos));
Expand All @@ -63,6 +65,7 @@ public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, Block
return new CustomBlockEntityTicker<>();
}

@SuppressWarnings("deprecation")
@Override
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
if (!state.isOf(newState.getBlock())) {
Expand Down