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

[1.19.x] Particle Description Data Provider #9510

Conversation

ChampionAsh5357
Copy link
Contributor

This PR adds a data provider to generate ParticleDescriptions.

The provider contains two types of methods towards generating a description: #sprite for when the description only has one particle texture, and #spriteSet for multiple particle textures. Each method takes in a ParticleType the textures are provided for. The #sprite method takes in a single ResourceLocation representing the texture within the textures/particle directory.

The #spriteSet method has three overloads. The base method takes in an Iterable of ResourceLocations. The iterable acts as an easy way to collect textures either from a collection or a stream. The next method takes in varargs, with at least one ResourceLocation that needs to be provided. The final method acts as a simple generator to apply a numbered suffix to a particle texture. This is in correspondence with most of Minecraft's particle texture naming scheme. All textures are validated, and the type must have been registered.

A validation case was added to DataGeneratorTest, generating four vanilla particles and validating them against what vanilla provides. To test this, you will need to comment out the SoundDefinitionsProvider as it currently throws an error. The fix is outside the scope of this PR, as there are additional changes that need to be applied to the provider in general.

@autoforge autoforge bot added Triage This request requires the active attention of the Triage Team. Requires labelling or reviews. 1.19 labels May 21, 2023
@autoforge autoforge bot requested a review from a team May 21, 2023 22:42
@ChampionAsh5357 ChampionAsh5357 added the Feature This request implements a new feature. label May 21, 2023
@marchermans marchermans added Queued Indicates that this PR is queued for merge in the next merge train. Depending on however triggers it and removed Queued Indicates that this PR is queued for merge in the next merge train. Depending on however triggers it labels Jun 27, 2023
@autoforge autoforge bot added the Assigned This request has been assigned to a core developer. Will not go stale. label Jun 27, 2023
@marchermans marchermans added the LTS This issue/PR is related to the current LTS version. label Jun 27, 2023
@autoforge autoforge bot removed the Triage This request requires the active attention of the Triage Team. Requires labelling or reviews. label Jun 27, 2023
@LexManos LexManos merged commit 2b58520 into MinecraftForge:1.19.x Jul 14, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.19 Assigned This request has been assigned to a core developer. Will not go stale. Feature This request implements a new feature. LTS This issue/PR is related to the current LTS version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants