diff --git a/common/src/main/java/de/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java b/common/src/main/java/de/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java index 80878fa..7123a4c 100644 --- a/common/src/main/java/de/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java +++ b/common/src/main/java/de/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java @@ -163,8 +163,10 @@ private static void cookTickProxy(Level level, BlockPos pos, BlockState state, C return; //fixes destroying while raining } //update "runs out" flag - if (!state.getValue(ICampfireBlockMixin.RUNS_OUT) && mixinEntity.unlitCampfire$litTime >= (mixinEntity.unlitCampfire$getMaxLitTime() - mixinEntity.unlitCampfire$getRunsOutIndicator())) { - level.setBlockAndUpdate(pos, state.setValue(ICampfireBlockMixin.RUNS_OUT, true)); + boolean runOutIndicatorReached = mixinEntity.unlitCampfire$litTime >= (mixinEntity.unlitCampfire$getMaxLitTime() - mixinEntity.unlitCampfire$getRunsOutIndicator()); + boolean isRunOutActive = state.getValue(ICampfireBlockMixin.RUNS_OUT); + if ((runOutIndicatorReached && !isRunOutActive) || (!runOutIndicatorReached && isRunOutActive)) { + level.setBlockAndUpdate(pos, state.setValue(ICampfireBlockMixin.RUNS_OUT, !isRunOutActive)); } //refresh client side once per second if burnables can be added to campfire if (mixinEntity.unlitCampfire$litTime % 20 == 1 && Services.CONFIG.canAddBurnables(mixinEntity.unlitCampfire$isSoulCampfire())) { diff --git a/gradle.properties b/gradle.properties index 5ccfd68..11d87dd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # Project group=de.cech12.unlitcampfire -mod_version=2.5.0.2 +mod_version=2.5.1.0 mod_id=unlitcampfire mod_name=Unlit Campfire mod_author=Cech12