Private
Public Access
1
0

steadygreenhouses compat

This commit is contained in:
2026-03-21 01:43:43 +01:00
parent 5bda43e879
commit f718b091ff
3 changed files with 16 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
{ {
"total": 591213, "total": 592730,
"sessions": [ "sessions": [
{ {
"begin": "2026-01-09T17:26:02+01:00", "begin": "2026-01-09T17:26:02+01:00",
@@ -1350,6 +1350,11 @@
"begin": "2026-03-09T03:21:11+01:00", "begin": "2026-03-09T03:21:11+01:00",
"end": "2026-03-09T03:57:24+01:00", "end": "2026-03-09T03:57:24+01:00",
"duration": 2173 "duration": 2173
},
{
"begin": "2026-03-21T01:18:07+01:00",
"end": "2026-03-21T01:43:24+01:00",
"duration": 1517
} }
] ]
} }

View File

@@ -99,6 +99,10 @@ public readonly record struct BeehiveStats
float currentTemperature = climate?.Temperature ?? 20f; float currentTemperature = climate?.Temperature ?? 20f;
if (isGreenhouse) if (isGreenhouse)
currentTemperature += 5; currentTemperature += 5;
if (OrekiWoofsBeehivesModSystem.IsSteadyGreenhousesLoaded)
return Math.Max(currentTemperature, Config.Instance.MaxTemperatureGrowth);
return currentTemperature; return currentTemperature;
} }

View File

@@ -15,6 +15,9 @@ public partial class OrekiWoofsBeehivesModSystem : ModSystem
private Harmony? _harmony; private Harmony? _harmony;
private ICoreServerAPI? serverApi; private ICoreServerAPI? serverApi;
private ICoreAPI? api; private ICoreAPI? api;
public static bool IsSteadyGreenhousesLoaded { get; private set; }
private MetaConfig metaConfig = new(); private MetaConfig metaConfig = new();
public BeehiveRegistry BeehiveRegistry { get; } = new(); public BeehiveRegistry BeehiveRegistry { get; } = new();
@@ -25,6 +28,9 @@ public partial class OrekiWoofsBeehivesModSystem : ModSystem
public override void Start(ICoreAPI api) public override void Start(ICoreAPI api)
{ {
this.api = api; this.api = api;
IsSteadyGreenhousesLoaded = api.ModLoader.IsModEnabled("steadygreenhouses");
api.RegisterBlockBehaviorClass(nameof(BlockBehaviorBeehiveAffected), typeof(BlockBehaviorBeehiveAffected)); api.RegisterBlockBehaviorClass(nameof(BlockBehaviorBeehiveAffected), typeof(BlockBehaviorBeehiveAffected));
api.RegisterBlockEntityBehaviorClass(nameof(BlockEntityBehaviorBeehiveYieldMultiplier), typeof(BlockEntityBehaviorBeehiveYieldMultiplier)); api.RegisterBlockEntityBehaviorClass(nameof(BlockEntityBehaviorBeehiveYieldMultiplier), typeof(BlockEntityBehaviorBeehiveYieldMultiplier));
api.RegisterBlockEntityBehaviorClass(nameof(BlockEntityBehaviorVanillaSkepSwarmTarget), typeof(BlockEntityBehaviorVanillaSkepSwarmTarget)); api.RegisterBlockEntityBehaviorClass(nameof(BlockEntityBehaviorVanillaSkepSwarmTarget), typeof(BlockEntityBehaviorVanillaSkepSwarmTarget));