LeviLamina
Loading...
Searching...
No Matches
RailMovementUtility.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class Block;
8class BlockPos;
10class Vec3;
11// clang-format on
12
14public:
15 // RailMovementUtility inner types declare
16 // clang-format off
17 struct Exit;
18 struct RailExits;
19 // clang-format on
20
21 // RailMovementUtility inner types define
22 struct Exit {
23 public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<4, 4, int> x;
27 ::ll::TypedStorage<4, 4, int> y;
28 ::ll::TypedStorage<4, 4, int> z;
29 // NOLINTEND
30 };
31
32 struct RailExits {
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<4, 12, ::RailMovementUtility::Exit> mExitA;
37 ::ll::TypedStorage<4, 12, ::RailMovementUtility::Exit> mExitB;
38 // NOLINTEND
39 };
40
41public:
42 // static functions
43 // NOLINTBEGIN
44 MCAPI static ::Vec3 calculateGoldenRailSpeedIncrease(
45 ::IConstBlockSource const& region,
46 ::BlockPos const& pos,
47 int direction,
48 ::Vec3 posDelta
49 );
50
51 MCAPI static ::Vec3 calculateMoveVelocity(
52 ::Block const& block,
53 int railDirection,
54 float maxSpeed,
55 bool hasPassenger,
56 ::Vec3& posDelta,
57 bool& haltTrack,
58 bool& powerTrack,
59 ::std::function<bool(::Vec3&)> const& calculateAllPassengersInputFunc
60 );
61
62 MCAPI static bool calculatePassengerRailMovementInput(::Vec3& posDelta, float forward, float passengerRotationY);
63
64 MCAPI static ::Vec3 calculatePostRailMovementMinecartPosition(
65 ::IConstBlockSource const& region,
66 ::Vec3 const& originalEntityPosition,
67 ::Vec3 entityPos,
68 ::BlockPos const& pos,
69 int railDirection,
70 ::Vec3& posDelta
71 );
72
73 MCAPI static ::Vec3 calculatePreRailMovementMinecartPosition(
74 ::Vec3 entityPos,
75 ::BlockPos const& pos,
76 int railDirection,
77 float heightOffset
78 );
79
80 MCAPI static bool getPos(::IConstBlockSource const& region, ::Vec3& valueVec, ::Vec3 pos);
81
82#ifdef LL_PLAT_C
83 MCAPI static bool getPosOffs(::IConstBlockSource const& region, ::Vec3& valueVec, ::Vec3 pos, float offs);
84#endif
85 // NOLINTEND
86
87public:
88 // static variables
89 // NOLINTBEGIN
90 MCAPI static ::std::array<::RailMovementUtility::RailExits, 10> const& RAIL_EXITS();
91 // NOLINTEND
92};
Definition BlockPos.h:21
Definition Block.h:69
Definition IConstBlockSource.h:24
Definition RailMovementUtility.h:13
Definition Vec3.h:10
Definition RailMovementUtility.h:22
Definition RailMovementUtility.h:32