therandomlabs / curseapi-minecraft Goto Github PK
View Code? Open in Web Editor NEWAn extension of CurseAPI for parsing CurseForge modpack manifests and for performing more Minecraft-specific operations.
License: MIT License
An extension of CurseAPI for parsing CurseForge modpack manifests and for performing more Minecraft-specific operations.
License: MIT License
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())
}
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
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();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.