public class HollowCubeDetector extends CubeDetector
CubeDetector.BlockPosAction, CubeDetector.IDetectionListener, CubeDetector.IValidationAction| Constructor and Description |
|---|
HollowCubeDetector(AllowedBlock[] allowedBlocks,
java.util.List<? extends CubeDetector.IDetectionListener> listeners)
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
postValidate(net.minecraft.world.World world,
net.minecraft.util.math.Vec3i size,
int[][] dimensionEgdes,
boolean valid,
net.minecraft.util.math.BlockPos originCorner,
net.minecraft.util.math.BlockPos excludeLocation) |
protected boolean |
validateLocationInStructure(net.minecraft.world.World world,
int[][] dimensionEgdes,
net.minecraft.util.math.BlockPos location,
CubeDetector.IValidationAction action,
net.minecraft.util.math.BlockPos excludeLocation)
Check if a given location is valid, taking into account the edges of the structure, so that
we know which locations should be borders, and which ones should be air.
|
addAllowedBlocks, compareVec3i, coordinateRecursion, coordinateRecursion, detect, detect, getAllowedBlocks, getExactSize, getListeners, getMinimumSize, isAir, isEdge, isValidLocation, isValidLocation, navigateToBorder, navigateToBorder, navigateToCorner, notifyListeners, setExactSize, setMinimumSize, validateAllowedBlockConditions, validateDimensionEdgespublic HollowCubeDetector(AllowedBlock[] allowedBlocks, java.util.List<? extends CubeDetector.IDetectionListener> listeners)
allowedBlocks - The blocks that are allowed in this cube.listeners - Listeners for detections.protected void postValidate(net.minecraft.world.World world,
net.minecraft.util.math.Vec3i size,
int[][] dimensionEgdes,
boolean valid,
net.minecraft.util.math.BlockPos originCorner,
net.minecraft.util.math.BlockPos excludeLocation)
postValidate in class CubeDetectorprotected boolean validateLocationInStructure(net.minecraft.world.World world,
int[][] dimensionEgdes,
net.minecraft.util.math.BlockPos location,
CubeDetector.IValidationAction action,
net.minecraft.util.math.BlockPos excludeLocation)
CubeDetectorvalidateLocationInStructure in class CubeDetectorworld - The world.dimensionEgdes - The edges per dimension. [dimension][start=0 | stop=1]location - The location to check.action - The action to execute when a location has been validated.excludeLocation - The location of the block that is being removed, used for invalidating, null for validating.