.xmap(o -> o.map(OptionalInt::of).orElse(OptionalInt.empty()), o -> o.isPresent() ? Optional.of(o.getAsInt()) : Optional.empty())
18
.forGetter(f -> f.minClippedHeight);
19
}
20
21
public FeatureSize(final OptionalInt minClippedHeight) {
22
this.minClippedHeight = minClippedHeight;
23
}
24
25
protected abstract FeatureSizeType<?> type();
26
27
public abstract int getSizeAtHeight(final int treeHeight, final int yo);
28
29
public OptionalInt minClippedHeight() {
30
return this.minClippedHeight;
31
}
32
}
33
Decompiled Minecraft 26.3 source of FeatureSize (net/minecraft/world/level/levelgen/feature/featuresize/FeatureSize.java) with Mojang official mappings, stored verbatim on the site.