1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-07-03 10:32:52 +00:00
SquidDev 2032e7a83a Reformat everything
It's been a long time comin'
But tonight is the end of the war, my friend
Tomorrow only one style will remain.
2018-12-23 17:46:58 +00:00

21 lines
594 B
Java

package dan200.computercraft.shared.util;
import dan200.computercraft.ComputerCraft;
import dan200.computercraft.api.peripheral.IPeripheral;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class PeripheralUtil
{
public static IPeripheral getPeripheral( World world, BlockPos pos, EnumFacing side )
{
int y = pos.getY();
if( y >= 0 && y < world.getHeight() && !world.isRemote )
{
return ComputerCraft.getPeripheralAt( world, pos, side );
}
return null;
}
}