Jump to content

Tigidipops

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Tigidipops

  1. Thanks it worked. Yeah i'm decently new to Java Im quite young but ive been trying to learn it for 3 years but obviously im no pro but im still currently learning it i just dont have the time currently to focus on it Thanks Anyway. Also This is my first post so I will take into account the snippet thing in the future
  2. I am trying to update some code that adds reach distance to my mod and i have been stuck for hours trying to fix this issue. I have fixed it with other items in the mod by swapping the DamageSource to this.damageSources() but for some reason that will not work for this. It tells me it can not resolve the method. any help would be appreciated thanks. CODE: if (result == null || !(result.getEntity() instanceof LivingEntity target)) return false; double distanceToTargetSqr = entity.distanceToSqr(target); boolean hitResult = (result != null ? target : null) != null; if (hitResult) { if (entity instanceof Player) { if (reachSqr >= distanceToTargetSqr) { target.hurt(this.damageSources().playerAttack((Player) entity), getDamage()); } } } //PROBLEM IS AT damageSources().playerAttack. (Also i know theres a way to insert code onto here but idk how to).
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.