Can somebody show me how to only give the potion effect when all four items are being worn? (ModItems.lapiz_helmet, ModItems.lapiz_chestplate, ModItems.lapiz_leggings, ModItems.lapiz_boots in this case).
Also, as an aside, does anyone know how to turn off the particle effect without setting the effect duration to "0"? This works fine for most effects, but makes potion.nightVision constantly flicker, as the effect thinks it is about to wear off.
Hi 'crafters!
I'm building a mod with custom armour sets, and want to add potion effects that only act when the full set is being worn.
I've already managed to get potion effects on my armour, by adding the following into my new armor class:
I've also managed to limit it so that only one piece of armour bears the effect:
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack armor)
{
if(armor.getItem() == ModItems.lapiz_helmet)
{
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 0, 1));
}
}
Can somebody show me how to only give the potion effect when all four items are being worn? (ModItems.lapiz_helmet, ModItems.lapiz_chestplate, ModItems.lapiz_leggings, ModItems.lapiz_boots in this case).
Also, as an aside, does anyone know how to turn off the particle effect without setting the effect duration to "0"? This works fine for most effects, but makes potion.nightVision constantly flicker, as the effect thinks it is about to wear off.
Many thanks,
-Cookiehook
Check out my Youtube channel, where I build a theme park in vanilla Minecraft!
https://www.youtube.com/playlist?list=PLeCiIIOoWhe-mq3nYd_nXXrKw9MkjnUU7
You beautiful person!
This is exactly what I needed, I've got my armours working perfectly
Thankyou very much indeed.
Check out my Youtube channel, where I build a theme park in vanilla Minecraft!
https://www.youtube.com/playlist?list=PLeCiIIOoWhe-mq3nYd_nXXrKw9MkjnUU7