Class StructureUtils
java.lang.Object
net.minecraft.gametest.framework.StructureUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidclearBlock(int airIfAboveThisY, BlockPos pos, ServerLevel level) static voidclearSpaceForStructure(BoundingBox structureBoundingBox, ServerLevel level) static TestInstanceBlockEntitycreateNewEmptyTest(Identifier id, BlockPos structurePos, Vec3i size, Rotation rotation, ServerLevel level) private static booleandoesStructureContain(BlockPos testInstanceBlockPos, BlockPos pos, ServerLevel level) findNearestTest(BlockPos relativeToPos, int searchRadius, ServerLevel level) findTestBlocks(BlockPos centerPos, int searchRadius, ServerLevel level) findTestContainingPos(BlockPos pos, int searchRadius, ServerLevel level) static RotationgetRotationForRotationSteps(int rotationSteps) static intgetRotationStepsForRotation(Rotation rotation) static BoundingBoxgetStructureBoundingBox(BlockPos northWestCorner, Vec3i size, Rotation rotation) static BlockPosgetTransformedFarCorner(BlockPos structurePosition, Vec3i size, Rotation rotation) lookedAtTestPos(BlockPos pos, Entity camera, ServerLevel level)
-
Field Details
-
DEFAULT_Y_SEARCH_RADIUS
public static final int DEFAULT_Y_SEARCH_RADIUS- See Also:
-
testStructuresTargetDir
-
testStructuresSourceDir
-
-
Constructor Details
-
StructureUtils
public StructureUtils()
-
-
Method Details
-
getRotationForRotationSteps
-
getRotationStepsForRotation
-
createNewEmptyTest
public static TestInstanceBlockEntity createNewEmptyTest(Identifier id, BlockPos structurePos, Vec3i size, Rotation rotation, ServerLevel level) -
clearSpaceForStructure
-
getTransformedFarCorner
-
getStructureBoundingBox
public static BoundingBox getStructureBoundingBox(BlockPos northWestCorner, Vec3i size, Rotation rotation) -
findTestContainingPos
public static Optional<BlockPos> findTestContainingPos(BlockPos pos, int searchRadius, ServerLevel level) -
findNearestTest
public static Optional<BlockPos> findNearestTest(BlockPos relativeToPos, int searchRadius, ServerLevel level) -
findTestBlocks
public static Stream<BlockPos> findTestBlocks(BlockPos centerPos, int searchRadius, ServerLevel level) -
lookedAtTestPos
-
clearBlock
-
doesStructureContain
private static boolean doesStructureContain(BlockPos testInstanceBlockPos, BlockPos pos, ServerLevel level)
-