Class BlockBox
java.lang.Object
me.hsgamer.hscore.minecraft.block.box.BlockBox
A custom box to bound blocks
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanWhether it should include the maximum coordinatefinal intThe maximum x coordinatefinal intThe maximum y coordinatefinal intThe maximum z coordinatefinal intThe minimum x coordinatefinal intThe minimum y coordinatefinal intThe minimum z coordinate -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
minX
public final int minXThe minimum x coordinate -
minY
public final int minYThe minimum y coordinate -
minZ
public final int minZThe minimum z coordinate -
maxX
public final int maxXThe maximum x coordinate -
maxY
public final int maxYThe maximum y coordinate -
maxZ
public final int maxZThe maximum z coordinate -
maxInclusive
public final boolean maxInclusiveWhether it should include the maximum coordinate
-
-
Constructor Details
-
BlockBox
public BlockBox(int x1, int y1, int z1, int x2, int y2, int z2, boolean maxInclusive) Create a new block box- Parameters:
x1- the first xy1- the first yz1- the first zx2- the second xy2- the second yz2- the second zmaxInclusive- true if it should include the maximum location
-
BlockBox
Create a new block box- Parameters:
pos1- the first vectorpos2- the second vectormaxInclusive- true if it should include the maximum location
-
-
Method Details
-
contains
public boolean contains(double x, double y, double z) Check if the location is in the box- Parameters:
x- the xy- the yz- the z- Returns:
- true if it is in the box
-
contains
Check if the location is in the box- Parameters:
pos- the position- Returns:
- true if it is in the box
-