Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-456 Improve Fabric #456

Merged
merged 11 commits into from
Oct 21, 2024
Merged

GH-456 Improve Fabric #456

merged 11 commits into from
Oct 21, 2024

Conversation

huanmeng-qwq
Copy link
Contributor

@huanmeng-qwq huanmeng-qwq commented Oct 21, 2024

Fix cannot be executed when only literal
Implemented support for the client side
Support v1 version commands API

@huanmeng-qwq
Copy link
Contributor Author

Ok.

@Rollczi
Copy link
Owner

Rollczi commented Oct 21, 2024

Hi @huanmeng-qwq,
Thanks for your contribution! I added code style adjustments and fixed for example. Can you check if everything works with your expectations after my changes?

@Rollczi Rollczi added enhancement New feature or request feature labels Oct 21, 2024
…annotation from the server environment, Remove BanCommand because Vanilla already has a ban command
@huanmeng-qwq
Copy link
Contributor Author

I have completed the modifications, and the following is my explanation of the changes:

  • The entrypoints.entrypoints in fabric.mod. json point to an incorrect class
  • I noticed that you added the Environment annotation to the server environment class, which is unnecessary because there are only environments with Server or Client+Server, and there is no environment with only Client
    • In other words, the content of the server environment can still be used in the entry ModInitializer. It is a universal entry point. The loading order of fabric is: main->client, main->server. The normal launcher starts the game client in the first order. One (client.jar contains the content of the server, so it can be loaded in main), and when starting the server, only the content of the server environment exists, so we need to use the Environment annotation to remove the content of the client environment (at this time, the main entry point will Unable to use the content of the client). To sum up, if we write the client command and the server command in the main at the same time, they can all be loaded in the local world (SSP).
  • Since Vanilla already has a ban command, I modified the BanCommand

@Rollczi
Copy link
Owner

Rollczi commented Oct 21, 2024

Thanks for your the correction and PR ❤️

@Rollczi Rollczi changed the title Improve Fabric GH-456 Improve Fabric Oct 21, 2024
@Rollczi Rollczi merged commit 9f55021 into Rollczi:master Oct 21, 2024
7 checks passed
@huanmeng-qwq huanmeng-qwq deleted the improve-fabric branch October 22, 2024 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants