NimajnebEC / auto-elytra

A client side mod that automatically switches your elytra and chestplate when you go to fly.
MIT License
5 stars 3 forks source link

fix: use `instanceof` elytra item check for compatability with modded elytras #12

Closed RubixDev closed 4 months ago

RubixDev commented 4 months ago

Using .getItem() instanceof ElytraItem instead of .is(Items.ELYTRA) allows the swapping to function with modded elytra items that extend the vanilla ElytraItem class.

I also changed the Minecraft version dependency for the Fabric side to 1.20.x so that the mod can still be used with earlier 1.20 versions. I only tested that it's working on 1.20.2 and I didn't test Forge at all.

NimajnebEC commented 4 months ago

Thank you so much for the pull request!

I will update the forge mods.toml to reflect the change to the Minecraft dependency. This possibly also fixes #9.

RubixDev commented 4 months ago

This possibly also fixes https://github.com/NimajnebEC/auto-elytra/issues/9.

I guess it sort of does. I mean it works with all the modded elytra items that i've tested it with without configuration now, but who knows, maybe some other mod adds a fully custom elytra item which would have to manually be checked for :shrug: