mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:28:35 +00:00
Re-implement richer mask and transform parsing (#1223)
Co-authored-by: dordsor21 <dordsor21@gmail.com> Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
This commit is contained in:
@ -403,12 +403,34 @@ public interface Extent extends InputExtent, OutputExtent {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the extent contains the given position
|
||||
*
|
||||
* @param pt position
|
||||
* @return if position is contained
|
||||
*/
|
||||
default boolean contains(BlockVector3 pt) {
|
||||
BlockVector3 min = getMinimumPoint();
|
||||
BlockVector3 max = getMaximumPoint();
|
||||
return pt.containedWithin(min, max);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the extent contains the given position
|
||||
*
|
||||
* @param x position x
|
||||
* @param y position y
|
||||
* @param z position z
|
||||
* @return if position is contained
|
||||
*/
|
||||
default boolean contains(int x, int y, int z) {
|
||||
BlockVector3 min = getMinimumPoint();
|
||||
BlockVector3 max = getMaximumPoint();
|
||||
return min.getX() <= x && max.getX() >= x
|
||||
&& min.getY() <= y && max.getY() >= y
|
||||
&& min.getZ() <= z && max.getZ() >= z;
|
||||
}
|
||||
|
||||
default void addOre(
|
||||
Region region,
|
||||
Mask mask,
|
||||
|
Reference in New Issue
Block a user