GithubHelp home page GithubHelp logo

therandomlabs / curseapi-minecraft Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 523 KB

An extension of CurseAPI for parsing CurseForge modpack manifests and for performing more Minecraft-specific operations.

License: MIT License

Java 100.00%
minecraft-modpack curseapi minecraft curseforge curse java java-library

curseapi-minecraft's Introduction

Yo, I make mods for Minecraft. Mostly.

TheRandomLabs' GitHub stats TheRandomLabs' top languages

curseapi-minecraft's People

Contributors

dependabot-preview[bot] avatar therandomlabs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

democat3457

curseapi-minecraft's Issues

Parsed CurseModpack JSON files list empty

Hello, I am trying to parse a CurseModpack JSON (minecraftinstance.json from Twitch App), and while the rest of the data loads, the files list remains empty. There are no errors in the log. I tried with some of the major modpacks out there, including a simple, one-mod test file attached below. Here is my code (Kotlin, the syntax is almost identical to Java):

fun main() {
    BasicConfigurator.configure()
    CurseAPIMinecraft.initialize()
    val modpack = CurseModpack.fromJSON(Paths.get("minecraftinstance.json"))
    print(modpack.files())
}

minecraftinstance.zip

API cannot fetch Latest forge build.

Using the Changelog Generator by you guys, and it spits this error

com.therandomlabs.curseapi.minecraft.forge.InvalidForgeVersionException: Invalid Forge version: 1.12.2-14.23.4.2766

Im assumbing the bot stoped working because its not picking up a thing

Modloader MCVersion instances return empty results.

Using game versions like "Forge", "Fabric" or "Rift" returns empty results, even though are valid MCVersion instances.
On curseforge website it is possible to search by these mod loaders as minecraft versions.
The following sample code exemplifies the emptiness of the searchResults object.

CurseGame game = CurseAPI.game(CurseAPIMinecraft.MINECRAFT_ID)
    .orElseThrow();
CurseCategorySection modCategorySection = game.categorySections()
    .stream()
    .filter(it -> it.name().equals("Mods"))
    .findFirst()
    .orElseThrow();
Optional<NavigableSet<MCVersion>> optionalVersions = CurseAPI.gameVersions(CurseAPIMinecraft.MINECRAFT_ID);
MCVersion version = optionalVersions.orElseThrow().stream()
    .filter(it -> it.versionString().equals("Fabric"))
    .findFirst()
    .orElseThrow();

CurseSearchQuery searchQuery = new CurseSearchQuery()
    .game(game)
    .categorySection(modCategorySection)
    .gameVersion(version);

List<CurseProject> searchResults = CurseAPI.searchProjects(search)
    .orElseThrow();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.