mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-16 21:30:08 +00:00
implement BlockState with mixin on Fabric
This commit is contained in:
@@ -54,7 +54,7 @@ public class BlockFunction implements Function<Void> {
|
||||
@Override
|
||||
public Void apply(ImplementationArguments implementationArguments, Map<String, Variable<?>> variableMap) {
|
||||
TerraImplementationArguments arguments = (TerraImplementationArguments) implementationArguments;
|
||||
BlockState rot = getBlockState(implementationArguments, variableMap).clone();
|
||||
BlockState rot = getBlockState(implementationArguments, variableMap);
|
||||
setBlock(implementationArguments, variableMap, arguments, rot);
|
||||
return null;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class BlockFunction implements Function<Void> {
|
||||
z.apply(implementationArguments, variableMap).doubleValue()), arguments.getRotation());
|
||||
|
||||
|
||||
RotationUtil.rotateBlockData(rot, arguments.getRotation().inverse());
|
||||
rot = RotationUtil.rotateBlockData(rot, arguments.getRotation().inverse());
|
||||
try {
|
||||
Vector3.Mutable set = Vector3.of(FastMath.roundToInt(xz.getX()),
|
||||
y.apply(implementationArguments, variableMap).doubleValue(),
|
||||
|
||||
@@ -48,8 +48,7 @@ public class PullFunction implements Function<Void> {
|
||||
Vector2 xz = RotationUtil.rotateVector(Vector2.of(x.apply(implementationArguments, variableMap).doubleValue(),
|
||||
z.apply(implementationArguments, variableMap).doubleValue()), arguments.getRotation());
|
||||
|
||||
BlockState rot = data.clone();
|
||||
RotationUtil.rotateBlockData(rot, arguments.getRotation().inverse());
|
||||
BlockState rot = RotationUtil.rotateBlockData(data, arguments.getRotation().inverse());
|
||||
|
||||
Vector3.Mutable mutable = Vector3.of(FastMath.roundToInt(xz.getX()), y.apply(implementationArguments, variableMap).intValue(),
|
||||
FastMath.roundToInt(xz.getZ())).mutable().add(arguments.getOrigin());
|
||||
|
||||
Reference in New Issue
Block a user