Skip to content

Commit 5694a47

Browse files
committed
Update files to 1.16.0-rc.6
1 parent f4a9ebc commit 5694a47

File tree

131 files changed

+1153
-3700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1153
-3700
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
/**/bin/
99
/**/obj/
1010
_site
11-
log.txt

Client/API/IClientNetworkAPI.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Vintagestory.API.Client;
22
using Vintagestory.API.Common;
3+
using Vintagestory.API.MathTools;
34

45
namespace Vintagestory.API.Common
56
{
@@ -83,6 +84,14 @@ public interface IClientNetworkAPI : INetworkAPI
8384
/// <param name="data"></param>
8485
void SendBlockEntityPacket(int x, int y, int z, int packetId, byte[] data = null);
8586

87+
/// <summary>
88+
/// Sends a blockentity interaction packet to the server. For quick an easy blockentity network communication without setting up a channel first.
89+
/// </summary>
90+
/// <param name="pos"></param>
91+
/// <param name="packetId"></param>
92+
/// <param name="data"></param>
93+
void SendBlockEntityPacket(BlockPos pos, int packetId, byte[] data = null);
94+
8695
/// <summary>
8796
/// Sends a entity interaction packet to the server. For quick an easy entity network communication without setting up a channel first.
8897
/// </summary>
@@ -143,5 +152,17 @@ public interface IClientNetworkAPI : INetworkAPI
143152
/// If any mod denies the client event IsPlayerReady, then it has to call this method once to indicate that the player is now ready to play (which switches the server side client state from Connected to Playing)
144153
/// </summary>
145154
void SendPlayerNowReady();
155+
156+
157+
158+
/// <summary>
159+
/// Sends a blockentity interaction packet to the server. For quick an easy blockentity network communication without setting up a channel first. Uses Protobuf.net to serialize your data
160+
/// </summary>
161+
/// <typeparam name="T"></typeparam>
162+
/// <param name="pos"></param>
163+
/// <param name="packetId"></param>
164+
/// <param name="data"></param>
165+
void SendBlockEntityPacket<T>(BlockPos pos, int packetId, T data = default(T));
166+
146167
}
147168
}

Client/API/IRenderer.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
using Vintagestory.API.Common;
1+
using System;
2+
using Vintagestory.API.Common;
23

34
namespace Vintagestory.API.Client
45
{
56

67
/// <summary>
78
/// Interface to render something on to the clients screens. Used for block entitites.
89
/// </summary>
9-
public interface IRenderer
10+
public interface IRenderer : IDisposable
1011
{
1112
/// <summary>
1213
/// 0 = drawn first, 1 = drawn last<br/>

Client/API/MeshRef.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
using Vintagestory.API.Client;
22
using Vintagestory.API.MathTools;
33
using Vintagestory.API.Common;
4+
using System;
45

56
namespace Vintagestory.API.Client
67
{
78
/// <summary>
89
/// A reference to a mesh that's been uploaded onto the graphics card (i.e. that has been placed in an OpenGL <see href="https://www.khronos.org/opengl/wiki/Vertex_Specification#Vertex_Array_Object">VAO</see>). This reference can be used for rendering it.
910
/// </summary>
10-
public class MeshRef
11+
public abstract class MeshRef : IDisposable
1112
{
13+
public abstract bool Initialized { get; }
14+
1215
/// <summary>
1316
/// Am I disposed?
1417
/// </summary>

Client/Audio/ILoadedSound.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Vintagestory.API.Client
77
/// <summary>
88
/// Represents a loaded game sound
99
/// </summary>
10-
public interface ILoadedSound
10+
public interface ILoadedSound : IDisposable
1111
{
1212
/// <summary>
1313
/// Length of the sound in seconds

Client/Audio/SoundParams.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public float Volume
6767
float volume = 1f;
6868

6969
/// <summary>
70-
/// The sounds initial range
70+
/// The sounds initial range (default is 32)
7171
/// </summary>
7272
public float Range = 32;
7373

Client/ParticlePhysics.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public Vec3f CollisionStrength(Vec3f velocitybefore, Vec3f velocitynow, float gr
6565

6666
public CachedCuboidList CollisionBoxList = new CachedCuboidList();
6767

68-
public void HandleBoyancy(Vec3d pos, Vec3d velocity, bool boyant, float gravityStrength, float deltatime, float height)
68+
public void HandleBoyancy(Vec3d pos, Vec3f velocity, bool boyant, float gravityStrength, float deltatime, float height)
6969
{
7070
int xPrev = (int)pos.X;
7171
int yPrev = (int)pos.Y;
@@ -142,7 +142,7 @@ public void HandleBoyancy(Vec3d pos, Vec3d velocity, bool boyant, float gravityS
142142
/// <param name="motion"></param>
143143
/// <param name="size"></param>
144144
/// <returns></returns>
145-
public EnumCollideFlags UpdateMotion(Vec3d pos, Vec3d motion, float size)
145+
public EnumCollideFlags UpdateMotion(Vec3d pos, Vec3f motion, float size)
146146
{
147147
particleCollBox.Set(
148148
pos.X - size / 2, pos.Y - 0/2, pos.Z - size / 2,
@@ -188,7 +188,7 @@ public EnumCollideFlags UpdateMotion(Vec3d pos, Vec3d motion, float size)
188188
{
189189
blockCollBox = CollisionBoxList.cuboids[i];
190190

191-
motion.Y = blockCollBox.pushOutY(particleCollBox, motion.Y, ref pushDirection);
191+
motion.Y = (float)blockCollBox.pushOutY(particleCollBox, motion.Y, ref pushDirection);
192192

193193
if (pushDirection != EnumPushDirection.None)
194194
{

Client/Render/DefaultShaderUniforms.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public class DefaultShaderUniforms
4444

4545
public Vec3f PlayerViewVector;
4646
public float DamageVignetting;
47+
/// <summary>
48+
/// 0..1 (0 for left, 0.5 for left&right, 1 for right)
49+
/// </summary>
50+
public float DamageVignettingSide;
4751
public float FrostVignetting;
4852
public float ExtraSepia;
4953
public float ExtraBloom;

Client/Render/EnumItemRenderTarget.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ public enum EnumItemRenderTarget
2424
/// </summary>
2525
HandTp,
2626
/// <summary>
27+
/// Rendered in the players off hand, third person mode
28+
/// </summary>
29+
HandTpOff,
30+
/// <summary>
2731
/// Rendered when dropped on the ground
2832
/// </summary>
2933
Ground

Client/Render/IShaderProgram.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface IShader
3434
string Code { get; set; }
3535
}
3636

37-
public interface IShaderProgram
37+
public interface IShaderProgram : IDisposable
3838
{
3939
/// <summary>
4040
/// A uniqe shader pass number assigned to each shader program

0 commit comments

Comments
 (0)