package com.infinityraider.agricraft.compat.computer.methods;
import com.infinityraider.agricraft.api.stat.IAgriStat;
import com.infinityraider.agricraft.tiles.TileEntityCrop;
import com.infinityraider.agricraft.compat.computer.tiles.TileEntityPeripheral;
import java.util.ArrayList;
public class MethodIsAnalyzed extends MethodBase {
public MethodIsAnalyzed() {
super("isAnalyzed", false, true, true);
}
@Override
protected Object[] onMethodCalled(TileEntityCrop crop) throws MethodException {
return new Object[] {crop.getStat().filter(IAgriStat::isAnalyzed).isPresent()};
}
@Override
protected Object[] onMethodCalled(TileEntityPeripheral peripheral) throws MethodException {
return new Object[] {peripheral.isSpecimenAnalyzed()};
}
@Override
protected ArrayList<MethodParameter> getParameters() {
return null;
}
}