1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-02-02 20:29:13 +00:00

Remove getBundledRedstoneConnectivity

Wow, this is old. It looks like it's a legacy of when this method was on
TileGeneric (and so returned false by default). As all implementations
now return true (turtle tools no longer block redstone), we don't really
need this any more.
This commit is contained in:
Jonathan Coates 2023-08-27 23:54:27 +01:00
parent 5b58271b92
commit 13ed422bd5
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
3 changed files with 1 additions and 13 deletions

View File

@ -18,11 +18,6 @@ public class DefaultBundledRedstoneProvider implements BundledRedstoneProvider {
public static int getDefaultBundledRedstoneOutput(Level world, BlockPos pos, Direction side) { public static int getDefaultBundledRedstoneOutput(Level world, BlockPos pos, Direction side) {
var block = world.getBlockState(pos).getBlock(); var block = world.getBlockState(pos).getBlock();
if (block instanceof IBundledRedstoneBlock generic) { return block instanceof IBundledRedstoneBlock bundledBlock ? bundledBlock.getBundledRedstoneOutput(world, pos, side) : -1;
if (generic.getBundledRedstoneConnectivity(world, pos, side)) {
return generic.getBundledRedstoneOutput(world, pos, side);
}
}
return -1;
} }
} }

View File

@ -9,7 +9,5 @@ import net.minecraft.core.Direction;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
public interface IBundledRedstoneBlock { public interface IBundledRedstoneBlock {
boolean getBundledRedstoneConnectivity(Level world, BlockPos pos, Direction side);
int getBundledRedstoneOutput(Level world, BlockPos pos, Direction side); int getBundledRedstoneOutput(Level world, BlockPos pos, Direction side);
} }

View File

@ -92,11 +92,6 @@ public abstract class AbstractComputerBlock<T extends AbstractComputerBlockEntit
return getDirectSignal(state, world, pos, incomingSide); return getDirectSignal(state, world, pos, incomingSide);
} }
@Override
public boolean getBundledRedstoneConnectivity(Level world, BlockPos pos, Direction side) {
return true;
}
@Override @Override
public int getBundledRedstoneOutput(Level world, BlockPos pos, Direction side) { public int getBundledRedstoneOutput(Level world, BlockPos pos, Direction side) {
var entity = world.getBlockEntity(pos); var entity = world.getBlockEntity(pos);