Caelus API (Forge/NeoForge)

Caelus API (Forge/NeoForge)

73M Downloads

Please implement support for Trinkets

skylorbeck opened this issue ยท 1 comments

commented

Currently, Trinkets(https://github.com/emilyalexandra/trinkets) moves Elytra to the Cape slot while Caelus requires it to be in the Chest slot. I believe the fix is as easy as allowing the user to choose where to check. I believe that a simple change to the CaelusApiImpl class could do it.

    public boolean canFly(LivingEntity livingEntity) {
        if (!(livingEntity instanceof PlayerEntity)) {
            ItemStack stack = TrinketsApi.getTrinketComponent((PlayerEntity)livingEntity).getStack(SlotGroups.CHEST, Slots.CAPE);
            return stack.getItem() == Items.ELYTRA && ElytraItem.isUsable(stack);
        } else {
            EntityAttributeInstance attribute = livingEntity.getAttributeInstance(CaelusApi.ELYTRA_FLIGHT);
            return attribute != null && attribute.getValue() >= 1.0D;
        }
    }

This would be quite useful for creating custom trinkets that allow Elytra flight without losing the Elytra.

commented

Alright, the 0.0.10 version should now have proper support for the Trinkets elytra changes.