Skip to content

Commit 385d413

Browse files
committed
Locations change with .add(Vector)
Cause I did not realize the internal x y z of the location changes on vector add... I got yelled at to not use clone() by Billy so... Subtract it is!
1 parent b30d674 commit 385d413

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/adhdmc/nerffarms/util/LocationMath.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ public class LocationMath {
2525
double d = Math.sqrt(Math.pow(x,2) + Math.pow(y,2) + Math.pow(z, 2));
2626
Vector v = new Vector(x/d, y/d, z/d);
2727
locations.add(start.add(v).toBlockLocation());
28+
start.subtract(v);
2829
v.rotateAroundY(-Math.PI/4);
2930
locations.add(start.add(v).toBlockLocation());
31+
start.subtract(v);
3032
v.rotateAroundY(Math.PI/2);
3133
locations.add(start.add(v).toBlockLocation());
3234
return locations;

0 commit comments

Comments
 (0)