Skip to content

Commit

Permalink
bugfix: the lower light level of the (soul) campfire was not removed …
Browse files Browse the repository at this point in the history
…when burnables were added
  • Loading branch information
cech12 committed Sep 14, 2024
1 parent b598d85 commit e0decd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0decd0

Please sign in to comment.