Skip to content

Commit

Permalink
fix: crash due to missing instanceof check
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jan 13, 2024
1 parent 4b63af0 commit 8d8f890
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,6 @@ public void openEntry(ResourceLocation bookId, @Nullable ResourceLocation catego
}

public boolean isEntryAlreadyDisplayed(BookEntry entry) {
return this.currentContentScreen != null && this.currentContentScreen.getEntry().equals(entry);
return Minecraft.getInstance().screen instanceof BookContentScreen bookContentScreen && bookContentScreen.getEntry().equals(entry);
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ group=com.klikli_dev
mod_id=modonomicon
mod_name=Modonomicon
mod_license=MIT AND CC-BY-4.0
mod_version=1.52.0
mod_version=1.54.2
mod_authors=Kli Kli
mod_description=Data-driven minecraft in-game documentation with progress visualization.

Expand Down

0 comments on commit 8d8f890

Please sign in to comment.