mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
*punches gradle in the gut*
This commit is contained in:
parent
ad7a7d84c0
commit
f769568031
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ import net.minecraft.util.dynamic.Codecs;
|
||||||
record Range(int min, int max) {
|
record Range(int min, int max) {
|
||||||
public static final Codec<Range> CODEC = Codecs.xor(
|
public static final Codec<Range> CODEC = Codecs.xor(
|
||||||
Codec.INT.xmap(value -> Range.of(value, -1), range -> range.min()),
|
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("min").forGetter(Range::min),
|
||||||
Codec.INT.fieldOf("max").forGetter(Range::max)
|
Codec.INT.fieldOf("max").forGetter(Range::max)
|
||||||
).apply(instance, Range::of))
|
).apply(instance, Range::of))
|
||||||
|
|
Loading…
Reference in a new issue