From de86ddbeef3a9dca3f3079d76406949e2320796d Mon Sep 17 00:00:00 2001 From: OrekiWoof Date: Fri, 27 Mar 2026 23:43:25 +0100 Subject: [PATCH] remove MarkDirty in IsOpen setter --- .timetracker | 12 +++++++++++- .../BlockEntities/BlockEntityReusableBeehive.cs | 15 +-------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.timetracker b/.timetracker index ef2524d..c97fc9c 100644 --- a/.timetracker +++ b/.timetracker @@ -1,5 +1,5 @@ { - "total": 605357, + "total": 606745, "sessions": [ { "begin": "2026-01-09T17:26:02+01:00", @@ -1365,6 +1365,16 @@ "begin": "2026-03-22T03:01:07+01:00", "end": "2026-03-22T03:51:14+01:00", "duration": 3006 + }, + { + "begin": "2026-03-25T01:39:33+01:00", + "end": "2026-03-25T01:59:34+01:00", + "duration": 1201 + }, + { + "begin": "2026-03-27T22:58:21+01:00", + "end": "2026-03-27T23:01:28+01:00", + "duration": 187 } ] } \ No newline at end of file diff --git a/OrekiWoofsBeehives/BlockEntities/BlockEntityReusableBeehive.cs b/OrekiWoofsBeehives/BlockEntities/BlockEntityReusableBeehive.cs index 4136044..21c12e6 100644 --- a/OrekiWoofsBeehives/BlockEntities/BlockEntityReusableBeehive.cs +++ b/OrekiWoofsBeehives/BlockEntities/BlockEntityReusableBeehive.cs @@ -22,7 +22,6 @@ public class BlockEntityReusableBeehive : BlockEntityContainer private readonly StringBuilder infoStringBuilder = new(); private readonly InventoryGeneric inventory; - private bool isOpen; private double lastUpdateTotalHours = 0; private bool wasFullyScanned; private float? scanningProgress; @@ -56,19 +55,7 @@ public class BlockEntityReusableBeehive : BlockEntityContainer inventory = new InventoryGeneric(8, null, null); } - public bool IsOpen - { - get => isOpen; - set - { - if (isOpen == value) - return; - - isOpen = value; - if (Api?.World != null) - Api.World.BlockAccessor.MarkBlockDirty(Pos); - } - } + public bool IsOpen { get; set; } public override void Initialize(ICoreAPI api) {