Skip to content

Commit

Permalink
build: Suppress deprecation warnings on barrier block as it's intended.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchen5209 committed Jan 7, 2024
1 parent cf17e70 commit 58bf28f
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 58bf28f

Please sign in to comment.