*punches gradle in the gut*

This commit is contained in:
Sollace 2023-12-03 21:19:36 +00:00
parent ad7a7d84c0
commit f769568031
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -10,7 +10,7 @@ import net.minecraft.util.dynamic.Codecs;
record Range(int min, int max) {
public static final Codec<Range> CODEC = Codecs.xor(
Codec.INT.xmap(value -> Range.of(value, -1), range -> range.min()),
RecordCodecBuilder.create(instance -> instance.group(
RecordCodecBuilder.<Range>create(instance -> instance.group(
Codec.INT.fieldOf("min").forGetter(Range::min),
Codec.INT.fieldOf("max").forGetter(Range::max)
).apply(instance, Range::of))