Rollczi / LiteCommands

☄️ LiteCommands - Command framework for Velocity, Bukkit, Paper, BungeeCord, Minestom, Sponge, Fabric, JDA and future implementations.
https://docs.rollczi.dev/
Apache License 2.0
147 stars 21 forks source link

GH-307 Implement Fabric platform support #376

Closed huanmeng-qwq closed 9 months ago

huanmeng-qwq commented 9 months ago

Closes #307

huanmeng-qwq commented 9 months ago

Temporary draft status, but I am not sure if there is still a need to add or modify content

Rollczi commented 9 months ago

Hey @huanmeng-qwq nice to see another PR grom you. I am afraid that translations of brigadier will not work properly in some cases e.g. when I will use a multilevel argument etc.

Rollczi commented 9 months ago

Also I have problem with this issue: https://github.com/Rollczi/LiteCommands/issues/349

I think we can resolve this as in the minestom platform (one full string argument represents all arguments)

huanmeng-qwq commented 9 months ago

Also I have problem with this issue: #349

I think we can resolve this as in the minestom platform (one full string argument represents all arguments)

It does look good, let me give it a try.

Also, it seems that Fabric does not support directly introducing sub projects as mod dependencies, which has led to the failure of CI

Rollczi commented 9 months ago

Also, it seems that Fabric does not support directly introducing sub projects as mod dependencies, which has led to the failure of CI

I think it is an issue with JDK version. I have tried to index your project with JDK 17 and it also failed.

image

On JDK 8 it works fine. (CI)

image
huanmeng-qwq commented 9 months ago

I think it is an issue with JDK version. I have tried to index your project with JDK 17 and it also failed.

The reason why the problem only occurs on jdk17 is because the project requires 17 to run, so it was ignored in jdk8

Rollczi commented 9 months ago

I think it is an issue with JDK version. I have tried to index your project with JDK 17 and it also failed.

The reason why the problem only occurs on jdk17 is because the project requires 17 to run, so it was ignored in jdk8

Ah okay, you are right

huanmeng-qwq commented 9 months ago

It seems that my writing style is incorrect. I obtained the correct way through reporting issues

huanmeng-qwq commented 9 months ago

It should be possible now

Rollczi commented 9 months ago

It seems that my writing style is incorrect.

Don't worry, I will review your code :P

huanmeng-qwq commented 9 months ago

require assets/litecommands/icon.png @Rollczi

Rollczi commented 9 months ago

require assets/litecommands/icon.png @Rollczi

How can I test the icon?

huanmeng-qwq commented 9 months ago

require assets/litecommands/icon.png @Rollczi

How can I test the icon?

exampes/fabric/run/mods: ModMenu mod examples:fabric:runClient

Rollczi commented 9 months ago

require assets/litecommands/icon.png @Rollczi

How can I test the icon?

exampes/fabric/run/mods: ModMenu mod examples:fabric:runClient

I mean how to check icon

Rollczi commented 9 months ago

image modImplementation("dev.rollczi:litecommands-fabric:3.3.4+1.20.4") also work when I publish the litecommands to maven local.

huanmeng-qwq commented 9 months ago

require assets/litecommands/icon.png @Rollczi

How can I test the icon?

exampes/fabric/run/mods: ModMenu mod examples:fabric:runClient

I mean how to check icon

ModMenu supports you to view the icons of installed mods in the game

huanmeng-qwq commented 9 months ago

also work when I publish the litecommands to maven local.

implementation(project(path = ":litecommands-fabric", configuration = "namedElements")) It directly references local sub projects, supports debugging hot modifications, and can ensure that the project code is the latest

Rollczi commented 9 months ago

also work when I publish the litecommands to maven local.

implementation(project(path = ":litecommands-fabric", configuration = "namedElements")) It directly references local sub projects, supports debugging hot modifications, and can ensure that the project code is the latest

Yes you arę right.

But I compared modImplementation("dev.rollczi:litecommands-fabric:3.3.4+1.20.4") with modImplementation(include("dev.rollczi:litecommands-fabric:3.3.4+1.20.4")!!)

huanmeng-qwq commented 9 months ago

But I compared modImplementation("dev.rollczi:litecommands-fabric:3.3.4+1.20.4") with modImplementation(include("dev.rollczi:litecommands-fabric:3.3.4+1.20.4")!!)

include means that the dependency will be packaged into the META-INF/jars directory of the jar

Rollczi commented 9 months ago

Okay, I think all is done. But last issue. LiteCommands should be displayed in the mod menu?. (Currently it is only displayed example mod)

image
huanmeng-qwq commented 9 months ago

Okay, I think all is done. But last issue. LiteCommands should be displayed in the mod menu?. (Currently it is only displayed example mod)

Because of this paragraph, it will not be displayed by default

    "custom": {
        "modmenu": {
            "badges": [
                "library"
            ]
        }
    }

open: image image

Rollczi commented 9 months ago

Okay, I think all is done. But last issue. LiteCommands should be displayed in the mod menu?. (Currently it is only displayed example mod)

Because of this paragraph, it will not be displayed by default

thanks <3

Rollczi commented 9 months ago

@huanmeng-qwq I added a few changes. Please check if they suit you and everything is okay.

huanmeng-qwq commented 9 months ago

Okay, it can be merged

Rollczi commented 9 months ago

Thank you again ❤️

creatorfromhell commented 9 months ago

Looks awesome, can't wait to test.

Rollczi commented 9 months ago

Looks awesome, can't wait to test.

@creatorfromhell You can checkout new snapshot 3.4.0-SNAPSHOT in the repository with snapshots ;P

maven("https://repo.eternalcode.pl/snapshots")
creatorfromhell commented 9 months ago

Looks awesome, can't wait to test.

@creatorfromhell You can checkout new snapshot 3.4.0-SNAPSHOT in the repository with snapshots ;P

maven("https://repo.eternalcode.pl/snapshots")

Cheers. The project I need it for I still have to port over from the previous lib I used xD