show "minecraft:villager" if no profession
This commit is contained in:
parent
f91b26057e
commit
70067b97bc
1 changed files with 3 additions and 3 deletions
|
@ -17,6 +17,7 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
// you ever step back and realize the thoughts that have coursed through your mind for so long
|
||||
|
@ -85,9 +86,8 @@ public record VillagerIngredient(
|
|||
tooltip.add(new TextComponent(biome.toString()).withStyle(ChatFormatting.DARK_GRAY));
|
||||
}
|
||||
|
||||
if (profession != null) {
|
||||
tooltip.add(new TextComponent(profession.toString()).withStyle(ChatFormatting.DARK_GRAY));
|
||||
}
|
||||
ResourceLocation displayId = Objects.requireNonNullElseGet(profession, () -> Registry.ENTITY_TYPE.getKey(EntityType.VILLAGER));
|
||||
tooltip.add(new TextComponent(displayId.toString()).withStyle(ChatFormatting.DARK_GRAY));
|
||||
}
|
||||
|
||||
tooltip.add(getModNameComponent());
|
||||
|
|
Loading…
Reference in a new issue