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 name, MetricCategory category, ToDoubleFunction<T> sampler, T context) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
withBeforeTick
(Consumer<T> beforeTick) withThresholdAlert
(MetricSampler.ThresholdTest thresholdTest)
-
Field Details
-
name
-
category
-
sampler
-
context
-
beforeTick
-
thresholdTest
-
-
Constructor Details
-
MetricSamplerBuilder
public MetricSamplerBuilder(String name, MetricCategory category, ToDoubleFunction<T> sampler, T context)
-
-
Method Details
-
withBeforeTick
-
withThresholdAlert
public MetricSampler.MetricSamplerBuilder<T> withThresholdAlert(MetricSampler.ThresholdTest thresholdTest) -
build
-