From ad37c5d949f6051b86d34fa57dd26dc788e7b31a Mon Sep 17 00:00:00 2001 From: grimmauld Date: Thu, 20 May 2021 08:39:22 +0200 Subject: [PATCH] fix javadoc --- src/main/java/com/simibubi/create/compat/Mods.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/compat/Mods.java b/src/main/java/com/simibubi/create/compat/Mods.java index 0fb250033..cf9ec4e2a 100644 --- a/src/main/java/com/simibubi/create/compat/Mods.java +++ b/src/main/java/com/simibubi/create/compat/Mods.java @@ -12,19 +12,23 @@ public enum Mods { DYNAMICTREES; /** - * @return a boolean of whether the mod is loaded or not + * @return a boolean of whether the mod is loaded or not based on mod id */ public boolean isLoaded() { return ModList.get().isLoaded(asId()); } + /** + * @return the mod id + */ public String asId() { return name().toLowerCase(); } /** * Simple hook to run code if a mod is installed - * @param toRun will be run if the mod is loaded + * @param toRun will be run only if the mod is loaded + * @return Optional.empty() if the mod is not loaded, otherwise an Optional of the return value of the given supplier */ public Optional runIfInstalled(Supplier> toRun) { if (isLoaded())