Skip to content

Fix Registrar generics #137

Description

@MincraftEinstein

The Registrar#register() method should return the same generics that were passed into the parameters, rather than the registry generics. For example, doing PARTICLE_TYPES.register(name, () -> new SimpleParticleType(false)); returns a RegistrySupplier<ParticleType<?>>, which is fine in a lot of cases, but sometimes RegistrySupplier<SimpleParticleType> is needed, such as when using a @ModifyExpressionValue mixin to replace a vanilla particle field call. Because the mixin handler must return the same type as the field being replaced, e.g., SimpleParticleType.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed indevIssue that is fixed in dev but I don't want to close yet until release

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions