From e64b71cbf08ff53f23e1e2cfee9d726c229f977a Mon Sep 17 00:00:00 2001 From: cech12 Date: Tue, 30 Jan 2024 09:32:25 +0100 Subject: [PATCH] fixed: Naturally generated campfires could crash the game #31 --- .github/workflows/cicd-workflow.yml | 2 ++ CHANGELOG.md | 4 ++++ gradle.properties | 2 +- .../cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java | 4 +++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd-workflow.yml b/.github/workflows/cicd-workflow.yml index f6b6561..a051b04 100644 --- a/.github/workflows/cicd-workflow.yml +++ b/.github/workflows/cicd-workflow.yml @@ -48,6 +48,7 @@ jobs: loaders: | neoforge forge + title-prefix: 'forge-' version-prefix: 'forge-' secrets: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -66,6 +67,7 @@ jobs: loaders: | neoforge forge + title-prefix: 'forge-' version-prefix: 'forge-' secrets: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 43e08fb..012319c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/). +## [1.20.1-1.9.0.2] - 2024-01-30 +### Fixed +- Naturally generated campfires could crash the game #31 (thanks to hanweiyyds for the report) + ## [1.20.1-1.9.0.1] - 2023-08-22 ### Fixed - wooden shovel was used as burnable instead of extinguishing the campfire (thanks to brass_mccrafty for the report) #27 diff --git a/gradle.properties b/gradle.properties index 0f336e3..9efcc34 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ mixin_version=0.8.5 ## Mod Properties mod_id=unlitcampfire -mod_version=1.9.0.1 +mod_version=1.9.0.2 mod_group_id=cech12.unlitcampfire mod_name=Unlit Campfire mod_authors=Cech12 diff --git a/src/main/java/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java b/src/main/java/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java index dc3a724..224e46c 100644 --- a/src/main/java/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java +++ b/src/main/java/cech12/unlitcampfire/mixin/CampfireBlockEntityMixin.java @@ -230,7 +230,9 @@ protected void dowseProxy(CallbackInfo info) { //is called by multiple sources such as shovel, water potion, water bucket extinguishing this.litTime = 0; this.rainTime = 0; - this.markUpdated(); + if (this.level != null) { + this.markUpdated(); + } } }