Started by
muggles
on
Topic category: Help with MCreator software
Put on armor for flying abilities but to unload the armor is still can continue to fly
if (((entity instanceof LivingEntity) ? ((LivingEntity) entity).getItemStackFromSlot(EquipmentSlotType.CHEST) : ItemStack.EMPTY)
.getItem() == ChuangShiItem.body) {
if (entity instanceof PlayerEntity) {
((PlayerEntity) entity).abilities.allowFlying = (true);
((PlayerEntity) entity).sendPlayerAbilities();
}
} else if (((entity instanceof LivingEntity) ? ((LivingEntity) entity).getItemStackFromSlot(EquipmentSlotType.CHEST) : ItemStack.EMPTY)
.getItem() == ChuangShiItem.body) {
if (entity instanceof PlayerEntity) {
((PlayerEntity) entity).abilities.allowFlying = (false);
((PlayerEntity) entity).sendPlayerAbilities();
}
}
}