Class HollowCubeDetector

java.lang.Object
org.cyclops.cyclopscore.block.multi.CubeDetector
org.cyclops.cyclopscore.block.multi.HollowCubeDetector

public class HollowCubeDetector extends CubeDetector
Detector of hollow cubes in a world.
  • Constructor Details

    • HollowCubeDetector

      public HollowCubeDetector(AllowedBlock[] allowedBlocks, List<? extends CubeDetector.IDetectionListener> listeners)
      Make a new instance.
      Parameters:
      allowedBlocks - The blocks that are allowed in this cube.
      listeners - Listeners for detections.
  • Method Details

    • postValidate

      protected void postValidate(net.minecraft.world.level.LevelReader world, net.minecraft.core.Vec3i size, int[][] dimensionEgdes, boolean valid, net.minecraft.core.BlockPos originCorner, net.minecraft.core.BlockPos excludeLocation)
      Overrides:
      postValidate in class CubeDetector
    • validateLocationInStructure

      protected net.minecraft.network.chat.Component validateLocationInStructure(net.minecraft.world.level.LevelReader world, int[][] dimensionEgdes, net.minecraft.core.BlockPos location, CubeDetector.IValidationAction action, net.minecraft.core.BlockPos excludeLocation)
      Description copied from class: CubeDetector
      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.
      Overrides:
      validateLocationInStructure in class CubeDetector
      Parameters:
      world - 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.
      Returns:
      If the location was valid.