Please implement support for Trinkets
skylorbeck opened this issue ยท 1 comments
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.