Vaerys_Dawn

Effect instance not doing things properly

Jan 21st, 2021 (edited)
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1.     private void addEffectsToBees(List<CustomBeeEntity> bees) {
  2.         if (!this.world.isRemote && doEffects()) {
  3.             for (BeeEntity mob : bees) {
  4.                 for (BeeconEffect effect : effects) {
  5.                     if (!effect.active) continue;
  6.                     System.out.println("adding effect");
  7.                     mob.addPotionEffect(new EffectInstance(effect.effect, 120, 0, true, true));
  8.                 }
  9.             }
  10.             for (PlayerEntity player : world.getEntitiesWithinAABB(PlayerEntity.class, getEffectBox())) {
  11.                 for (BeeconEffect effect : effects) {
  12.                     if (!effect.active) continue;
  13.                     player.addPotionEffect(new EffectInstance(effect.effect, 120, 0, true, true));
  14.                 }
  15.             }
  16.         }
  17.     }
Add Comment
Please, Sign In to add comment