-
Notifications
You must be signed in to change notification settings - Fork 40
Add team list providers #334
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # src/main/java/xyz/nucleoid/plasmid/api/chat/PlasmidMessageTypes.java # src/main/java/xyz/nucleoid/plasmid/api/game/GameType.java # src/main/java/xyz/nucleoid/plasmid/api/registry/PlasmidRegistries.java # src/main/java/xyz/nucleoid/plasmid/api/registry/PlasmidRegistryKeys.java # src/main/java/xyz/nucleoid/plasmid/impl/portal/GamePortalConfig.java # src/main/java/xyz/nucleoid/plasmid/impl/portal/menu/MenuEntryConfig.java
Patbox
reviewed
Aug 18, 2025
src/main/java/xyz/nucleoid/plasmid/api/game/common/team/provider/TeamListProvider.java
Outdated
Show resolved
Hide resolved
Patbox
reviewed
Aug 18, 2025
src/main/java/xyz/nucleoid/plasmid/api/game/common/team/provider/TeamListProviderType.java
Outdated
Show resolved
Hide resolved
Member
|
Aside it not compiling now, LGTM |
Member
Author
|
Oops, here we go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds all classes needed for team list providers, a way to randomly generate a
GameTeamList.A team list provider only requires a
Randomto provide aGameTeamList.It also has builtin compatibility for files that are configurated using a fixed list of game teams such as
GameTeamList#CODEC/GameTeam#CODEC#asList()and integer values describing team amounts such asIntProvider#CODEC/Codec#INT.Types
The registry for types is
plasmid:team_list_provider_type(found inPlasmidRegistries#TEAM_LIST_PROVIDER_TYPE). Obviously, any mod can add to it.Here are the different team provider types:
plasmid:constant- a fixed list ofGameTeam.plasmid:trim- trims another provider to a certain sizeplasmid:random- picks from a list of other providers.plasmid:sized_alternatives- picks for a certain size, and then picks from a map of sizes to providers.DefaultTeamLists) This default map provides handpicked basic teams with constrated and vivid colors. The lesser teams they are, the more effective it is at constrasting everything.Codec
The base Codec (
TeamListProvider#CODEC) supports many formats:plasmid:constant, you can directly pass the fixed list. This means existing configurations that useGameTeamList#CODECcan be replaced with the base codec and generated configurations will have the same functionality.plasmid:sized_alternativeswith the default map.If you are using data generation, please check around the
TeamListProviderclasses for helper functions, noticeably some that use the default team map.Other details
You can try out team providers in the dev environment by launching the test mod.
If we are discontent with the teams provided by default, we will always be able to change them in the future and still maintain perfect compatiblity with previous datapack resources.