Skip to content

Commit

Permalink
Updated CrT
Browse files Browse the repository at this point in the history
  • Loading branch information
kindlich committed May 15, 2020
1 parent f1c6360 commit 6565fd4
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,55 @@ public AxisAlignedBB getInternal() {
}

@ZenCodeType.Method
public double getXSize() {
return internal.getXSize();
public MCAxisAlignedBB offset(double x, double y, double z) {
return new MCAxisAlignedBB(internal.offset(x, y, z));
}


@ZenCodeType.Method
public int hashCode() {
return internal.hashCode();
public boolean intersects(MCAxisAlignedBB other) {
return internal.intersects((other).getInternal());
}


@ZenCodeType.Method
public MCAxisAlignedBB offset(double x, double y, double z) {
return new MCAxisAlignedBB(internal.offset(x, y, z));
public MCAxisAlignedBB offset(MCVec3d vec) {
return new MCAxisAlignedBB(internal.offset((vec).getInternal()));
}


@ZenCodeType.Method
public MCAxisAlignedBB intersect(MCAxisAlignedBB other) {
return new MCAxisAlignedBB(internal.intersect((other).getInternal()));
public MCAxisAlignedBB expand(double x, double y, double z) {
return new MCAxisAlignedBB(internal.expand(x, y, z));
}


@ZenCodeType.Method
public MCAxisAlignedBB grow(double value) {
return new MCAxisAlignedBB(internal.grow(value));
public int hashCode() {
return internal.hashCode();
}


@ZenCodeType.Method
public MCAxisAlignedBB offset(MCBlockPos pos) {
return new MCAxisAlignedBB(internal.offset((pos).getInternal()));
}


/**
* Creates a new {@link AxisAlignedBB} that is expanded by the given value in all directions. Equivalent to {@link
* #grow(double)} with value set to the negative of the value provided here. Passing a negative value to this method
* values will grow the AABB.
* <br/>
* Side lengths will be decreased by 2 times the value of the parameter, since both min and max are changed.
* <br/>
* If contracting and the amount to contract by is larger than the length of a side, then the side will wrap (still
* creating a valid AABB - see samples on {@link #grow(double, double, double)}).
* @return A modified AABB.
*/
@ZenCodeType.Method
public MCAxisAlignedBB shrink(double value) {
return new MCAxisAlignedBB(internal.shrink(value));
}


Expand All @@ -65,32 +88,32 @@ public MCAxisAlignedBB expand(MCVec3d p_216361_1_) {


@ZenCodeType.Method
public String toString() {
return (internal.toString());
public boolean contains(MCVec3d vec) {
return internal.contains((vec).getInternal());
}


@ZenCodeType.Method
public double getMax(MCDirectionAxis axis) {
return internal.getMax((axis).getInternal());
public String toString() {
return (internal.toString());
}


@ZenCodeType.Method
public boolean hasNaN() {
return internal.hasNaN();
public double getZSize() {
return internal.getZSize();
}


@ZenCodeType.Method
public boolean contains(double x, double y, double z) {
return internal.contains(x, y, z);
public double getMax(MCDirectionAxis axis) {
return internal.getMax((axis).getInternal());
}


@ZenCodeType.Method
public MCAxisAlignedBB offset(MCVec3d vec) {
return new MCAxisAlignedBB(internal.offset((vec).getInternal()));
public boolean hasNaN() {
return internal.hasNaN();
}


Expand All @@ -100,30 +123,27 @@ public boolean intersects(double x1, double y1, double z1, double x2, double y2,
}


/**
* Returns the average length of the edges of the bounding box.
*/
@ZenCodeType.Method
public double getAverageEdgeLength() {
return internal.getAverageEdgeLength();
public MCAxisAlignedBB union(MCAxisAlignedBB other) {
return new MCAxisAlignedBB(internal.union((other).getInternal()));
}


@ZenCodeType.Method
public boolean contains(MCVec3d vec) {
return internal.contains((vec).getInternal());
public boolean equals(Object p_equals_1_) {
return internal.equals((p_equals_1_));
}


@ZenCodeType.Method
public MCAxisAlignedBB union(MCAxisAlignedBB other) {
return new MCAxisAlignedBB(internal.union((other).getInternal()));
public MCAxisAlignedBB intersect(MCAxisAlignedBB other) {
return new MCAxisAlignedBB(internal.intersect((other).getInternal()));
}


@ZenCodeType.Method
public double getYSize() {
return internal.getYSize();
public MCAxisAlignedBB grow(double value) {
return new MCAxisAlignedBB(internal.grow(value));
}


Expand Down Expand Up @@ -160,8 +180,8 @@ public MCAxisAlignedBB contract(double x, double y, double z) {


@ZenCodeType.Method
public boolean equals(Object p_equals_1_) {
return internal.equals((p_equals_1_));
public MCVec3d getCenter() {
return new MCVec3d(internal.getCenter());
}


Expand All @@ -172,20 +192,14 @@ public double getMin(MCDirectionAxis axis) {


@ZenCodeType.Method
public MCVec3d getCenter() {
return new MCVec3d(internal.getCenter());
}


@ZenCodeType.Method
public boolean intersects(MCAxisAlignedBB other) {
return internal.intersects((other).getInternal());
public double getXSize() {
return internal.getXSize();
}


@ZenCodeType.Method
public MCAxisAlignedBB expand(double x, double y, double z) {
return new MCAxisAlignedBB(internal.expand(x, y, z));
public boolean intersects(MCVec3d min, MCVec3d max) {
return internal.intersects((min).getInternal(), (max).getInternal());
}


Expand All @@ -195,38 +209,24 @@ public MCAxisAlignedBB grow(double x, double y, double z) {
}


/**
* Creates a new {@link AxisAlignedBB} that is expanded by the given value in all directions. Equivalent to {@link
* #grow(double)} with value set to the negative of the value provided here. Passing a negative value to this method
* values will grow the AABB.
* <br/>
* Side lengths will be decreased by 2 times the value of the parameter, since both min and max are changed.
* <br/>
* If contracting and the amount to contract by is larger than the length of a side, then the side will wrap (still
* creating a valid AABB - see samples on {@link #grow(double, double, double)}).
* @return A modified AABB.
*/
@ZenCodeType.Method
public MCAxisAlignedBB shrink(double value) {
return new MCAxisAlignedBB(internal.shrink(value));
}


@ZenCodeType.Method
public double getZSize() {
return internal.getZSize();
public double getYSize() {
return internal.getYSize();
}


@ZenCodeType.Method
public MCAxisAlignedBB offset(MCBlockPos pos) {
return new MCAxisAlignedBB(internal.offset((pos).getInternal()));
public boolean contains(double x, double y, double z) {
return internal.contains(x, y, z);
}


/**
* Returns the average length of the edges of the bounding box.
*/
@ZenCodeType.Method
public boolean intersects(MCVec3d min, MCVec3d max) {
return internal.intersects((min).getInternal(), (max).getInternal());
public double getAverageEdgeLength() {
return internal.getAverageEdgeLength();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ public RayTraceResult getInternal() {
return this.internal;
}

@ZenCodeType.Method
public MCRayTraceResultType getType() {
return new MCRayTraceResultType(internal.getType());
}


/**
* Returns the hit position of the raycast, in absolute world coordinates
*/
Expand All @@ -40,4 +34,10 @@ public MCVec3d getHitVec() {
}


@ZenCodeType.Method
public MCRayTraceResultType getType() {
return new MCRayTraceResultType(internal.getType());
}


}

0 comments on commit 6565fd4

Please sign in to comment.