Package net.minecraft.gametest.framework
Class StructureUtils
java.lang.Object
net.minecraft.gametest.framework.StructureUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidclearBlock(int structureBlockY, BlockPos pos, ServerLevel level) static voidclearSpaceForStructure(BoundingBox boundingBox, ServerLevel level) static TestInstanceBlockEntitycreateNewEmptyTest(Identifier id, BlockPos pos, Vec3i size, Rotation rotation, ServerLevel level) private static booleandoesStructureContain(BlockPos structureBlockPos, BlockPos posToTest, ServerLevel level) findNearestTest(BlockPos relativeToPos, int radius, ServerLevel level) findTestBlocks(BlockPos pos, int radius, ServerLevel level) findTestContainingPos(BlockPos pos, int radius, ServerLevel level) static RotationgetRotationForRotationSteps(int rotationSteps) static intgetRotationStepsForRotation(Rotation rotation) static BoundingBoxgetStructureBoundingBox(BlockPos pos, Vec3i offset, Rotation rotation) static BlockPosgetTransformedFarCorner(BlockPos pos, Vec3i offset, Rotation rotation) lookedAtTestPos(BlockPos pos, Entity entity, ServerLevel level)
-
Field Details
-
DEFAULT_Y_SEARCH_RADIUS
public static final int DEFAULT_Y_SEARCH_RADIUS- See Also:
-
DEFAULT_TEST_STRUCTURES_DIR
- See Also:
-
testStructuresDir
-
-
Constructor Details
-
StructureUtils
public StructureUtils()
-
-
Method Details
-
getRotationForRotationSteps
-
getRotationStepsForRotation
-
createNewEmptyTest
public static TestInstanceBlockEntity createNewEmptyTest(Identifier id, BlockPos pos, Vec3i size, Rotation rotation, ServerLevel level) -
clearSpaceForStructure
-
getTransformedFarCorner
-
getStructureBoundingBox
-
findTestContainingPos
-
findNearestTest
public static Optional<BlockPos> findNearestTest(BlockPos relativeToPos, int radius, ServerLevel level) -
findTestBlocks
-
lookedAtTestPos
-
clearBlock
-
doesStructureContain
private static boolean doesStructureContain(BlockPos structureBlockPos, BlockPos posToTest, ServerLevel level)
-