Class MetricSampler.MetricSamplerBuilder<T>
java.lang.Object
net.minecraft.util.profiling.metrics.MetricSampler.MetricSamplerBuilder<T>
- Enclosing class:
MetricSampler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Runnable
private final MetricCategory
private final T
private final String
private final DoubleSupplier
private MetricSampler.ThresholdTest
-
Constructor Summary
ConstructorsConstructorDescriptionMetricSamplerBuilder
(String pName, MetricCategory pCategory, ToDoubleFunction<T> pSampler, T pContext) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
withBeforeTick
(Consumer<T> pBeforeTick) withThresholdAlert
(MetricSampler.ThresholdTest pThresholdTest)
-
Field Details
-
name
-
category
-
sampler
-
context
-
beforeTick
-
thresholdTest
-
-
Constructor Details
-
MetricSamplerBuilder
public MetricSamplerBuilder(String pName, MetricCategory pCategory, ToDoubleFunction<T> pSampler, T pContext)
-
-
Method Details
-
withBeforeTick
-
withThresholdAlert
public MetricSampler.MetricSamplerBuilder<T> withThresholdAlert(MetricSampler.ThresholdTest pThresholdTest) -
build
-