Merge branch '1.21' into worldgen-placement-providers
This commit is contained in:
commit
03a1ab9197
@ -41,7 +41,7 @@ class ComputeAction(
|
|||||||
it.group(
|
it.group(
|
||||||
DecimalCodec.fieldOf("matter").forGetter(Constant::matter),
|
DecimalCodec.fieldOf("matter").forGetter(Constant::matter),
|
||||||
Codec.DOUBLE.fieldOf("complexity").forGetter(Constant::complexity),
|
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) }
|
).apply(it) { a, b, c -> Constant(a, b, c, c) }
|
||||||
} to Predicate { it.matterFunction == it.complexityFunction }
|
} to Predicate { it.matterFunction == it.complexityFunction }
|
||||||
}
|
}
|
||||||
@ -50,8 +50,8 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create<Constant> {
|
RecordCodecBuilder.create<Constant> {
|
||||||
it.group(
|
it.group(
|
||||||
DecimalCodec.fieldOf("value").forGetter(Constant::matter),
|
DecimalCodec.fieldOf("value").forGetter(Constant::matter),
|
||||||
IMatterFunction.registry.byNameCodec().fieldOf("matterFunction").forGetter(Constant::matterFunction),
|
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("matterFunction").forGetter(Constant::matterFunction),
|
||||||
IMatterFunction.registry.byNameCodec().fieldOf("complexityFunction").forGetter(Constant::complexityFunction),
|
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("complexityFunction").forGetter(Constant::complexityFunction),
|
||||||
).apply(it) { a, b, c -> Constant(a, a.toDouble(), b, c) }
|
).apply(it) { a, b, c -> Constant(a, a.toDouble(), b, c) }
|
||||||
} to Predicate { it.matter == Decimal(it.complexity.toString()) }
|
} to Predicate { it.matter == Decimal(it.complexity.toString()) }
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create<Constant> {
|
RecordCodecBuilder.create<Constant> {
|
||||||
it.group(
|
it.group(
|
||||||
DecimalCodec.fieldOf("value").forGetter(Constant::matter),
|
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) }
|
).apply(it) { a, b -> Constant(a, a.toDouble(), b, b) }
|
||||||
} to Predicate { it.matter == Decimal(it.complexity.toString()) && it.matterFunction == it.complexityFunction }
|
} to Predicate { it.matter == Decimal(it.complexity.toString()) && it.matterFunction == it.complexityFunction }
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create<Constant> {
|
RecordCodecBuilder.create<Constant> {
|
||||||
it.group(
|
it.group(
|
||||||
Codec.DOUBLE.fieldOf("complexity").forGetter(Constant::complexity),
|
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) }
|
).apply(it) { a, b -> Constant(Decimal.ZERO, a.toDouble(), IMatterFunction.NOOP, b) }
|
||||||
} to Predicate { it.matterFunction == IMatterFunction.NOOP }
|
} to Predicate { it.matterFunction == IMatterFunction.NOOP }
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create<Constant> {
|
RecordCodecBuilder.create<Constant> {
|
||||||
it.group(
|
it.group(
|
||||||
Codec.DOUBLE.fieldOf("complexity").forGetter(Constant::complexity),
|
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) }
|
).apply(it) { a, b -> Constant(Decimal.ZERO, a.toDouble(), IMatterFunction.NOOP, b) }
|
||||||
} to Predicate { it.matterFunction == IMatterFunction.NOOP }
|
} to Predicate { it.matterFunction == IMatterFunction.NOOP }
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create<Constant> {
|
RecordCodecBuilder.create<Constant> {
|
||||||
it.group(
|
it.group(
|
||||||
DecimalCodec.fieldOf("matter").forGetter(Constant::matter),
|
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) }
|
).apply(it) { a, b -> Constant(a, 0.0, b, IMatterFunction.NOOP) }
|
||||||
} to Predicate { it.complexityFunction == IMatterFunction.NOOP }
|
} to Predicate { it.complexityFunction == IMatterFunction.NOOP }
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create<Constant> {
|
RecordCodecBuilder.create<Constant> {
|
||||||
it.group(
|
it.group(
|
||||||
DecimalCodec.fieldOf("matter").forGetter(Constant::matter),
|
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) }
|
).apply(it) { a, b -> Constant(a, 0.0, b, IMatterFunction.NOOP) }
|
||||||
} to Predicate { it.complexityFunction == IMatterFunction.NOOP }
|
} to Predicate { it.complexityFunction == IMatterFunction.NOOP }
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create {
|
RecordCodecBuilder.create {
|
||||||
it.group(
|
it.group(
|
||||||
TargetCodec.fieldOf("id").forGetter(Value::id),
|
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)
|
).apply(it, ::Value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -192,8 +192,8 @@ class ComputeAction(
|
|||||||
RecordCodecBuilder.create {
|
RecordCodecBuilder.create {
|
||||||
it.group(
|
it.group(
|
||||||
TargetCodec.fieldOf("id").forGetter(Value::id),
|
TargetCodec.fieldOf("id").forGetter(Value::id),
|
||||||
IMatterFunction.registry.byNameCodec().fieldOf("matterFunction").forGetter(Value::matterFunction),
|
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("matterFunction").forGetter(Value::matterFunction),
|
||||||
IMatterFunction.registry.byNameCodec().fieldOf("complexityFunction").forGetter(Value::complexityFunction),
|
MBuiltInRegistries.MATTER_FUNCTION.byNameCodec().fieldOf("complexityFunction").forGetter(Value::complexityFunction),
|
||||||
).apply(it, ::Value)
|
).apply(it, ::Value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user