74 viewport2.MaxDepth *= 0.1f;
75 Display.Viewport = viewport2;
95 if (componentCreatureModel !=
null) {
96 float num3 = componentCreatureModel.MovementAnimationPhase * (float)Math.PI * 2f + 0.5f;
98 position.Y = 0.02f * MathF.Sin(num3);
99 position.Z = 0.02f * MathF.Sin(num3);
104 float num4 = m_componentPlayer.ComponentCreatureModel.MovementAnimationPhase * (float)Math.PI * 2f;
106 position2.X = 0.03f * MathF.Sin(num4 * 1f);
107 position2.Y = 0.02f * MathF.Sin(num4 * 2f);
108 position2.Z = 0.02f * MathF.Sin(num4 * 1f);
123 if (chunkAtCell !=
null
138 bool skipVanilla =
false;
140 "OnFirstPersonModelDrawing",
142 loader.OnFirstPersonModelDrawing(
this, camera,
m_value, ref identity, out
bool skip);
159 m_drawBlockEnvironmentData.DrawBlockMode =
DrawBlockMode.FirstPerson;
161 m_drawBlockEnvironmentData.InWorldMatrix = matrix;
163 m_drawBlockEnvironmentData.Humidity =
m_subsystemTerrain.Terrain.GetSeasonalHumidity(x, z);
164 m_drawBlockEnvironmentData.Temperature =
m_subsystemTerrain.Terrain.GetSeasonalTemperature(x, z)
166 m_drawBlockEnvironmentData.EnvironmentTemperature =
m_componentPlayer.ComponentVitalStats.EnvironmentTemperature;
167 m_drawBlockEnvironmentData.Owner =
m_entity;
179 Vector3 position4 =
new(0.25f, -0.3f, -0.05f);
217 Display.Viewport = viewport;
233 && activeBlockValue !=
m_value) {
244 if (swapAnimationTime < 0.5f
static readonly DepthStencilState Default
static void DrawIndexed(PrimitiveType primitiveType, Shader shader, VertexBuffer vertexBuffer, IndexBuffer indexBuffer, int startIndex, int indicesCount)
Vector3 DiffuseLightColor1
Vector3 DiffuseLightColor2
Vector3 AmbientLightColor
SamplerState SamplerState
ReadOnlyList< ModelMeshPart > MeshParts
VertexBuffer VertexBuffer
static readonly RasterizerState CullCounterClockwiseScissor
static SamplerState PointClamp
static float NormalizeAngle(float angle)
static float Saturate(float x)
static float DegToRad(float degrees)
static double FrameStartTime
virtual float GetFirstPersonScale(int value)
virtual Vector3 GetFirstPersonOffset(int value)
void DrawBlock(PrimitivesRenderer3D primitivesRenderer, int value, Color color, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
绘制方块_用于绘制方块物品形态
virtual bool IsSwapAnimationNeeded(int oldValue, int newValue)
virtual Vector3 GetFirstPersonRotation(int value)
SubsystemTerrain m_subsystemTerrain
bool ForceDrawHandOnly
强制只绘制手部模型(即使有物品也不绘制)
static int[] m_drawOrders
virtual void Draw(Camera camera, int drawOrder)
ComponentRider m_componentRider
override void Load(ValuesDictionary valuesDictionary, IdToEntityMap idToEntityMap)
static LitShader LitShader
double m_nextHandLightTime
virtual void Update(float dt)
Vector3 ItemRotationOrder
ComponentPlayer m_componentPlayer
ComponentMiner m_componentMiner
PrimitivesRenderer3D m_primitivesRenderer
float m_pokeAnimationTime
float m_swapAnimationTime
DrawBlockEnvironmentData m_drawBlockEnvironmentData
static object Get(Type type, string name)
static readonly Vector3 DirectionToLight2
static readonly float LightAmbient
static ? float CalculateSmoothLight(SubsystemTerrain subsystemTerrain, Vector3 p)
static readonly Vector3 DirectionToLight1
static string GetFast(string fname)
static Func< int, int > GetTemperatureAdjustmentAtHeight
static int ExtractContents(int value)
static int ToCell(float x)
ValuesDictionary ValuesDictionary
static void HookAction(string HookName, Func< ModLoader, bool > action)
执行Hook
static Matrix CreateRotationX(float radians)
static Matrix CreateFromQuaternion(Quaternion quaternion)
static Matrix CreateTranslation(float x, float y, float z)
static Matrix CreateRotationZ(float radians)
static readonly Matrix Identity
static Matrix CreateFromYawPitchRoll(float yaw, float pitch, float roll)
static Matrix CreateRotationY(float radians)
static Matrix CreateScale(float scale)
static Vector3 Lerp(Vector3 v1, Vector3 v2, float f)
static Vector3 TransformNormal(Vector3 v, Matrix m)
static readonly Vector3 Zero
static readonly Vector4 One