Skip to content

Commit

Permalink
Apply blocked icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ustc-zzzz committed Apr 2, 2023
1 parent 8b15ab1 commit 5e2042e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/teacon/slides/renderer/SlideState.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public static Slide getSlide(UUID id) {
return sCache.getAcquire().computeIfAbsent(sIdWithImage.get(id), SlideState::new).getWithUpdate();
}
if (sIdWithoutImageWithBlockStatus.containsKey(id)) {
return sIdWithoutImageWithBlockStatus.getBoolean(id) ? Slide.failed() : Slide.empty();
return sIdWithoutImageWithBlockStatus.getBoolean(id) ? Slide.blocked() : Slide.empty();
}
return Slide.loading();
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/teacon/slides/slide/IconSlide.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
public enum IconSlide implements Slide {
DEFAULT_EMPTY(new ResourceLocation(SlideShow.ID, "textures/gui/slide_icon_empty.png")),
DEFAULT_FAILED(new ResourceLocation(SlideShow.ID, "textures/gui/slide_icon_failed.png")),
DEFAULT_BLOCKED(new ResourceLocation(SlideShow.ID, "textures/gui/slide_icon_blocked.png")),
DEFAULT_LOADING(new ResourceLocation(SlideShow.ID, "textures/gui/slide_icon_loading.png"));

private static final RenderType BACKGROUND_RENDER_TYPE;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/teacon/slides/slide/Slide.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ static Slide failed() {
return IconSlide.DEFAULT_FAILED;
}

static Slide blocked() {
return IconSlide.DEFAULT_BLOCKED;
}

static Slide loading() {
return IconSlide.DEFAULT_LOADING;
}
Expand Down

0 comments on commit 5e2042e

Please sign in to comment.