Advertisement
jayhillx

LifeBindingEffect 01

May 3rd, 2021
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public void performEffect(LivingEntity entity, int amplifier) {
  2. if (closestPlayer(entity)) {
  3.  
  4. }
  5. }
  6.  
  7. @Override
  8. public boolean isReady(int duration, int amplifier) {
  9. if (this == LifeBindingPotion.LIFE_BINDING_EFFECT.get()) {
  10. int i = 40 >> amplifier;
  11. if (i > 0) {
  12. return duration % i == 0;
  13. } else {
  14. return true;
  15. }
  16. }
  17. return true;
  18. }
  19.  
  20. public boolean closestPlayer(LivingEntity entity) {
  21. entity.world.getClosestPlayer(entity, 3.0D);
  22. return true;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement