god damn it
This commit is contained in:
parent
1bb612b07c
commit
6226621b95
@ -41,7 +41,7 @@ class ComputeAction(
|
||||
it.group(
|
||||
DecimalCodec.fieldOf("matter").forGetter(Constant::matter),
|
||||
Codec.DOUBLE.fieldOf("complexity").forGetter(Constant::complexity),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("function").forGetter(Constant::matterFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("function").forGetter(Constant::matterFunction),
|
||||
).apply(it) { a, b, c -> Constant(a, b, c, c) }
|
||||
} to Predicate { it.matterFunction == it.complexityFunction }
|
||||
}
|
||||
@ -50,8 +50,8 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create<Constant> {
|
||||
it.group(
|
||||
DecimalCodec.fieldOf("value").forGetter(Constant::matter),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("matterFunction").forGetter(Constant::matterFunction),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("complexityFunction").forGetter(Constant::complexityFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("matterFunction").forGetter(Constant::matterFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("complexityFunction").forGetter(Constant::complexityFunction),
|
||||
).apply(it) { a, b, c -> Constant(a, a.toDouble(), b, c) }
|
||||
} to Predicate { it.matter == Decimal(it.complexity.toString()) }
|
||||
}
|
||||
@ -60,7 +60,7 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create<Constant> {
|
||||
it.group(
|
||||
DecimalCodec.fieldOf("value").forGetter(Constant::matter),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("function").forGetter(Constant::matterFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("function").forGetter(Constant::matterFunction),
|
||||
).apply(it) { a, b -> Constant(a, a.toDouble(), b, b) }
|
||||
} to Predicate { it.matter == Decimal(it.complexity.toString()) && it.matterFunction == it.complexityFunction }
|
||||
}
|
||||
@ -69,7 +69,7 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create<Constant> {
|
||||
it.group(
|
||||
Codec.DOUBLE.fieldOf("complexity").forGetter(Constant::complexity),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("function").forGetter(Constant::complexityFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("function").forGetter(Constant::complexityFunction),
|
||||
).apply(it) { a, b -> Constant(Decimal.ZERO, a.toDouble(), IMatterFunction.NOOP, b) }
|
||||
} to Predicate { it.matterFunction == IMatterFunction.NOOP }
|
||||
}
|
||||
@ -78,7 +78,7 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create<Constant> {
|
||||
it.group(
|
||||
Codec.DOUBLE.fieldOf("complexity").forGetter(Constant::complexity),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("complexityFunction").forGetter(Constant::complexityFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("complexityFunction").forGetter(Constant::complexityFunction),
|
||||
).apply(it) { a, b -> Constant(Decimal.ZERO, a.toDouble(), IMatterFunction.NOOP, b) }
|
||||
} to Predicate { it.matterFunction == IMatterFunction.NOOP }
|
||||
}
|
||||
@ -87,7 +87,7 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create<Constant> {
|
||||
it.group(
|
||||
DecimalCodec.fieldOf("matter").forGetter(Constant::matter),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("function").forGetter(Constant::matterFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("function").forGetter(Constant::matterFunction),
|
||||
).apply(it) { a, b -> Constant(a, 0.0, b, IMatterFunction.NOOP) }
|
||||
} to Predicate { it.complexityFunction == IMatterFunction.NOOP }
|
||||
}
|
||||
@ -96,7 +96,7 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create<Constant> {
|
||||
it.group(
|
||||
DecimalCodec.fieldOf("matter").forGetter(Constant::matter),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("matterFunction").forGetter(Constant::matterFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("matterFunction").forGetter(Constant::matterFunction),
|
||||
).apply(it) { a, b -> Constant(a, 0.0, b, IMatterFunction.NOOP) }
|
||||
} to Predicate { it.complexityFunction == IMatterFunction.NOOP }
|
||||
}
|
||||
@ -183,7 +183,7 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create {
|
||||
it.group(
|
||||
TargetCodec.fieldOf("id").forGetter(Value::id),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("function").forGetter(Value::matterFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("function").forGetter(Value::matterFunction),
|
||||
).apply(it, ::Value)
|
||||
}
|
||||
}
|
||||
@ -192,8 +192,8 @@ class ComputeAction(
|
||||
RecordCodecBuilder.create {
|
||||
it.group(
|
||||
TargetCodec.fieldOf("id").forGetter(Value::id),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("matterFunction").forGetter(Value::matterFunction),
|
||||
IMatterFunction.registry.byNameCodec().fieldOf("complexityFunction").forGetter(Value::complexityFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("matterFunction").forGetter(Value::matterFunction),
|
||||
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("complexityFunction").forGetter(Value::complexityFunction),
|
||||
).apply(it, ::Value)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user