Hi, I am trying to spawn a splash potion with a specified potion effect (e.g. Slowness) with PotionEntity. I also already have an Potion Object but how do I get the PotionEntity to "have" my Potion or EffectInstance?
Thanks in advance
PotionEntity potion = new PotionEntity(world, player);
potion.setPos(playerPos.getX(), playerPos.getY() + 20, playerPos.getZ());
ItemStack splashPotion = new ItemStack(Items.SPLASH_POTION, 1);
EffectInstance potionEffect = new EffectInstance(Effects.BLINDNESS, 500, 100);
Potion potionToSet = new Potion(potionEffect);
PotionUtils.setPotion(splashPotion, potionToSet);
potion.setItem(splashPotion);
This is the code I am trying to use, but it only spawns a splash potion without any effects.