I am coding my own Mod with an Elytra Item
and in My ElytraJumpC2SPacket.java i want to check if the player is wearing my custom Elytra
with this line of code
if(player.getInventory().armor.get(1) != ModItems.BAT_ELYTRA.get().getDefaultInstance() || player.getInventory().armor.get(1) != ModItems.ARMORED_BAT_ELYTRA.get().getDefaultInstance()) return;
Full Code on GitHub
In the game it doesn´t works
I am using Forge 1.19.2 - 43.1.52(the latest)