Skip to content

Commit 0927682

Browse files
committed
Fix villager restock time display only works for librarians (#133)
Signed-off-by: Hendrix-Shen <[email protected]>
1 parent a8f4798 commit 0927682

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/plusls/MasaGadget/impl/feature/entityInfo/VillagerNextRestockTimeInfo.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ public static Component getInfo(@NotNull Villager villager) {
1616
long nextRestockTime;
1717
long nextWorkTime;
1818
long timeOfDay = villager.getLevel().getDayTime() % 24000;
19+
VillagerProfession profession = villager.getVillagerData().getProfession();
1920

20-
if (villager.getVillagerData().getProfession() != VillagerProfession.LIBRARIAN) {
21+
if (profession == VillagerProfession.NONE || profession == VillagerProfession.NITWIT) {
2122
return null;
2223
}
2324

0 commit comments

Comments
 (0)