top.hendrixshen.magiclib.MagicLibReference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magiclib-1_14_4 Show documentation
Show all versions of magiclib-1_14_4 Show documentation
To beat magic with magic :(
package top.hendrixshen.magiclib;
import lombok.Getter;
import net.fabricmc.loader.api.FabricLoader;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import top.hendrixshen.magiclib.util.StringUtil;
public class MagicLibReference {
@Getter
private static final String modIdentifier = "@MOD_IDENTIFIER@";
@Getter
private static final String modIdentifierCurrent = "@MOD_IDENTIFIER@-@MINECRAFT_VERSION_IDENTIFY@";
@Getter
private static final String modName = "@MOD_NAME@";
@Getter
private static final String modNameCurrent = FabricLoader.getInstance().getModContainer(modIdentifierCurrent).orElseThrow(RuntimeException::new).getMetadata().getName();
@Getter
private static final String modVersion = FabricLoader.getInstance().getModContainer(modIdentifierCurrent).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
@Getter
private static final String modVersionType = StringUtil.getVersionType(modVersion);
@Getter
private static final Logger logger = LogManager.getLogger(modIdentifier);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy