Elytra Slot (Fabric 1.16.1 - 1.19.2)

Elytra Slot (Fabric 1.16.1 - 1.19.2)

9M Downloads

[Feature]: APIs for developers to make integration with this mod.

IAFEnvoy opened this issue ยท 1 comments

commented

What is the new feature or improvement?

As i have seen the code, all rendering compat are made by this mod, which means that if another mod add elytras you need to make integrations by yourself. This is complex and add your work. I suggest to add some apis for developers to use.

public interface ElytraSlotRenderEntryPoint {
    void register(BiConsumer<Item, RendererProvider<?>> registrar);

    interface RendererProvider<T extends Entity> {
        public abstract void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, T entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch);
    }
}

Then prepare a annotation for (neo)forge and an entrypoint for fabric. Then other develops can use them.

Example: https://github.com/CodeOfArdonia/TooltipsReforged/blob/master/common/src/main/java/com/iafenvoy/tooltipsreforged/EntryPointLoader.java (Include forge&fabric)

commented

Extra reason for adding this: some mod may use their own elytra render. So a direct call renderer is better.