public record Minimum(HolderSet<ContextIntProvider> inputs) implements ContextIntProvider, AggregateProvider<ContextIntProvider> {
10
public static final MapCodec<Minimum> MAP_CODEC = AggregateProvider.mapCodec(ContextIntProviders.LIST_CODEC, Minimum::new);
11
12
@Override
13
public MapCodec<Minimum> codec() {
14
return MAP_CODEC;
15
}
16
17
@Override
18
public int getIntUnsafe(final LootContext context) {
19
int value = Integer.MAX_VALUE;
20
21
for (Holder<ContextIntProvider> input : this.inputs()) {
22
value = Math.min(value, input.value().getIntUnsafe(context));
23
}
24
25
return value;
26
}
27
}
28
Decompiled Minecraft 26.3 source of Minimum (net/minecraft/world/level/storage/loot/providers/number/ints/Minimum.java) with Mojang official mappings, stored verbatim on the site.