Compare commits
4 Commits
5389901c82
...
v1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ad99a9d3b | |||
| 074b34dd24 | |||
| d7c541fcc5 | |||
| 16b901fab7 |
@@ -117,8 +117,20 @@ internal class CardRenderer(ICoreClientAPI api, Config config) : IDisposable
|
|||||||
if (heldBag == null)
|
if (heldBag == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
ItemStack[]? bagContents;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bagContents = heldBag.GetContents(bagStack, api.World);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bagContents == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
contents = [];
|
contents = [];
|
||||||
ItemStack[] bagContents = heldBag.GetContents(bagStack, api.World);
|
|
||||||
foreach (ItemStack contentStack in bagContents)
|
foreach (ItemStack contentStack in bagContents)
|
||||||
{
|
{
|
||||||
if (contentStack == null || contentStack.StackSize <= 0)
|
if (contentStack == null || contentStack.StackSize <= 0)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace ChestPreview.Rendering;
|
|||||||
internal class WorldBillboardPresenter(ICoreClientAPI api)
|
internal class WorldBillboardPresenter(ICoreClientAPI api)
|
||||||
{
|
{
|
||||||
private const int multiblock_scan_radius = 2;
|
private const int multiblock_scan_radius = 2;
|
||||||
private static readonly float front_face_offset = 0.01f;
|
private static readonly float front_face_offset = 0.05f;
|
||||||
|
|
||||||
private readonly ICoreClientAPI api = api;
|
private readonly ICoreClientAPI api = api;
|
||||||
private readonly List<BillboardTarget> frameBillboards = [];
|
private readonly List<BillboardTarget> frameBillboards = [];
|
||||||
@@ -260,16 +260,16 @@ internal class WorldBillboardPresenter(ICoreClientAPI api)
|
|||||||
switch (side.ToLowerInvariant())
|
switch (side.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
case "north":
|
case "north":
|
||||||
facing = new Vec3f(0f, 0f, -1f);
|
|
||||||
return true;
|
|
||||||
case "south":
|
|
||||||
facing = new Vec3f(0f, 0f, 1f);
|
facing = new Vec3f(0f, 0f, 1f);
|
||||||
return true;
|
return true;
|
||||||
|
case "south":
|
||||||
|
facing = new Vec3f(0f, 0f, -1f);
|
||||||
|
return true;
|
||||||
case "east":
|
case "east":
|
||||||
facing = new Vec3f(1f, 0f, 0f);
|
facing = new Vec3f(-1f, 0f, 0f);
|
||||||
return true;
|
return true;
|
||||||
case "west":
|
case "west":
|
||||||
facing = new Vec3f(-1f, 0f, 0f);
|
facing = new Vec3f(1f, 0f, 0f);
|
||||||
return true;
|
return true;
|
||||||
case "up":
|
case "up":
|
||||||
facing = new Vec3f(0f, 1f, 0f);
|
facing = new Vec3f(0f, 1f, 0f);
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||||
<Configurations>Debug;Release;Version22</Configurations>
|
<Configurations>Debug;Release;Version22</Configurations>
|
||||||
|
<VS_CONFIGLIB Condition="'$(VS_CONFIGLIB)' == ''">$([System.Environment]::GetEnvironmentVariable('VS_CONFIGLIB'))</VS_CONFIGLIB>
|
||||||
|
<ConfigLibAvailable Condition="'$(VS_CONFIGLIB)' != '' and Exists('$(VS_CONFIGLIB)')">true</ConfigLibAvailable>
|
||||||
|
<DefineConstants Condition="'$(ConfigLibAvailable)' == 'true'">$(DefineConstants);CONFIGLIB</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -17,4 +20,15 @@
|
|||||||
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="configlib" Condition="'$(ConfigLibAvailable)' == 'true'">
|
||||||
|
<HintPath>$(VS_CONFIGLIB)</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="WarnWithoutConfigLib" BeforeTargets="CoreCompile" Condition="'$(ConfigLibAvailable)' != 'true'">
|
||||||
|
<Warning Text="No VS_CONFIGLIB - will compile without supporting ConfigLib. Set VS_CONFIGLIB env var to a path that contains the configlib's dlls." />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
0
ChestPreview/build.sh
Normal file → Executable file
0
ChestPreview/build.sh
Normal file → Executable file
Reference in New Issue
Block a user