forked from anegostudios/vsessentialsmod
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInerhitableRotatableCube.cs
More file actions
36 lines (29 loc) · 993 Bytes
/
Copy pathInerhitableRotatableCube.cs
File metadata and controls
36 lines (29 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using Vintagestory.API.MathTools;
#nullable disable
namespace Vintagestory.ServerMods.NoObf
{
public class InerhitableRotatableCube
{
public float? X1;
public float? Y1;
public float? Z1;
public float? X2;
public float? Y2;
public float? Z2;
public float RotateX = 0;
public float RotateY = 0;
public float RotateZ = 0;
public Cuboidf InheritedCopy(Cuboidf parent)
{
Cuboidf finalCube = new Cuboidf(
X1 == null ? parent.X1 : (float)X1,
Y1 == null ? parent.Y1 : (float)Y1,
Z1 == null ? parent.Z1 : (float)Z1,
X2 == null ? parent.X2 : (float)X2,
Y2 == null ? parent.Y2 : (float)Y2,
Z2 == null ? parent.Z2 : (float)Z2
);
return finalCube.RotatedCopy(RotateX, RotateY, RotateZ, new Vec3d(0.5, 0.5, 0.5));
}
}
}