1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-03 23:22:59 +00:00

Change ComponentLookup to use ServerLevel

Makes this more consistent with the rest of the peripheral code, and our
changes in 1.20.4.
This commit is contained in:
Jonathan Coates
2024-01-15 08:28:59 +00:00
parent 30dc4cb38c
commit 1d6e3f4fc0
4 changed files with 12 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ import dan200.computercraft.shared.peripheral.generic.ComponentLookup;
import dan200.computercraft.shared.peripheral.generic.GenericPeripheralProvider;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.block.entity.BlockEntity;
import javax.annotation.Nullable;
@@ -29,7 +29,7 @@ public final class Peripherals {
genericProvider.registerLookup(lookup);
}
public static @Nullable IPeripheral getGenericPeripheral(Level level, BlockPos pos, Direction side, @Nullable BlockEntity blockEntity, Runnable invalidate) {
public static @Nullable IPeripheral getGenericPeripheral(ServerLevel level, BlockPos pos, Direction side, @Nullable BlockEntity blockEntity, Runnable invalidate) {
return genericProvider.getPeripheral(level, pos, side, blockEntity, invalidate);
}
}