Skip to content

Commit

Permalink
Updated to Version 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
VintageStory CI committed Jan 18, 2025
1 parent 885e89c commit a8acc04
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
18 changes: 12 additions & 6 deletions BlockEntity/BEIngotMold.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,12 @@ public ItemStack GetStateAwareContentsLeft()
return GetShatteredStack(ContentsLeft, FillLevelLeft);
}

ItemStack outstack = ContentsLeft.Clone();
(outstack.Attributes["temperature"] as ITreeAttribute)?.RemoveAttribute("cooldownSpeed");
return outstack;
if (TemperatureLeft < 300)
{
ItemStack outstack = ContentsLeft.Clone();
(outstack.Attributes["temperature"] as ITreeAttribute)?.RemoveAttribute("cooldownSpeed");
return outstack;
}
}

return null;
Expand All @@ -212,9 +215,12 @@ public ItemStack GetStateAwareContentsRight()
return GetShatteredStack(ContentsRight, FillLevelRight);
}

ItemStack outstack = ContentsRight.Clone();
(outstack.Attributes["temperature"] as ITreeAttribute)?.RemoveAttribute("cooldownSpeed");
return outstack;
if (TemperatureRight < 300)
{
ItemStack outstack = ContentsRight.Clone();
(outstack.Attributes["temperature"] as ITreeAttribute)?.RemoveAttribute("cooldownSpeed");
return outstack;
}
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion Systems/LocatorMaps/ItemLocatorMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public override void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, Bl
}
catch (Exception e)
{
api.Logger.Error("ItemLocatorMap attr: " + attr.ToJsonToken());
api.Logger.Error("ItemLocatorMap attr: " + attr.ToJsonToken().Replace("{","{{").Replace("}","}}"));
api.Logger.Error(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Runtime.Intrinsics.Arm;
using Vintagestory.API.Common;
using Vintagestory.API.Datastructures;
using Vintagestory.API.MathTools;
Expand Down Expand Up @@ -243,7 +244,15 @@ public void genBlockColumn(IServerChunk[] chunks, int chunkX, int chunkZ, int lx

float allowedThickness = rockGroupMaxThickness[grp] * thicknessDistort - rockGroupCurrentThickness[grp];

strataThickness = Math.Min(allowedThickness, rockMap.GetIntLerpedCorrectly(rdx * step + step * (float)(lx + distx) / chunksize, rdz * step + step * (float)(lz + distz) / chunksize));
var nx = rdx * step + step * (float)(lx + distx) / chunksize;
var nz = rdz * step + step * (float)(lz + distz) / chunksize;

// 1.20 fix, only clamp the values, to prevent chunk borders
// In 1.21 we ought to simply use normalized noise * rockmapsize
nx = Math.Max(nx, -1.499f);
nz = Math.Max(nz, -1.499f);

strataThickness = Math.Min(allowedThickness, rockMap.GetIntLerpedCorrectly(nx, nz));

if (stratum.RockGroup == EnumRockGroup.Sedimentary) strataThickness -= Math.Max(0, yupper - TerraGenConfig.seaLevel) * 0.5f;

Expand Down

0 comments on commit a8acc04

Please sign in to comment.