Skip to content

Commit

Permalink
damageutils dont crash anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
OLEPOSSU committed Jan 10, 2025
1 parent 7871bbe commit 4c18af3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@
public class BODamageUtils {
public static RaycastContext raycastContext;

@PreInit
public static void init() {
MeteorClient.EVENT_BUS.subscribe(BODamageUtils.class);
}

@EventHandler
public static void onGameJoin(GameJoinedEvent event) {
raycastContext = new RaycastContext(Vec3d.ZERO, Vec3d.ZERO, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);
}

public static double crystalDamage(LivingEntity entity, Box box, Vec3d pos, boolean ignoreTerrain) {
return crystalDamage(entity, box, pos, null, ignoreTerrain);
}
Expand Down

0 comments on commit 4c18af3

Please sign in to comment.