Package net.minecraft.gametest.framework
Class StructureUtils
java.lang.Object
net.minecraft.gametest.framework.StructureUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCommandBlockAndButtonToStartTest
(BlockPos p_127876_, BlockPos p_127877_, Rotation p_127878_, ServerLevel p_127879_) private static void
clearBlock
(int p_127842_, BlockPos p_127843_, ServerLevel p_127844_) static void
clearSpaceForStructure
(BoundingBox p_127850_, ServerLevel p_127852_) static void
createNewEmptyStructureBlock
(String p_177765_, BlockPos p_177766_, Vec3i p_177767_, Rotation p_177768_, ServerLevel p_177769_) private static StructureBlockEntity
createStructureBlock
(GameTestInfo p_312256_, BlockPos p_127892_, Rotation p_127893_, ServerLevel p_127894_) private static boolean
doesStructureContain
(BlockPos p_127868_, BlockPos p_127869_, ServerLevel p_127870_) static void
encaseStructure
(AABB p_326863_, ServerLevel p_326882_, boolean p_326950_) findNearestStructureBlock
(BlockPos p_127907_, int p_127908_, ServerLevel p_127909_) findStructureBlockContainingPos
(BlockPos p_127854_, int p_127855_, ServerLevel p_127856_) findStructureBlocks
(BlockPos p_127911_, int p_127912_, ServerLevel p_127913_) findStructureByTestFunction
(BlockPos p_340830_, int p_340828_, ServerLevel p_340893_, String p_341292_) private static void
forceLoadChunks
(BoundingBox p_308909_, ServerLevel p_127859_) private static BoundingBox
getBoundingBoxAtGround
(BlockPos p_341291_, int p_341122_, ServerLevel p_341148_) static Rotation
getRotationForRotationSteps
(int p_127836_) static int
getRotationStepsForRotation
(Rotation p_177752_) static BoundingBox
getStructureBoundingBox
(BlockPos p_177761_, Vec3i p_177762_, Rotation p_177763_) static BoundingBox
getStructureBoundingBox
(StructureBlockEntity p_127905_) static AABB
getStructureBounds
(StructureBlockEntity p_127848_) static BlockPos
getStructureOrigin
(StructureBlockEntity p_308940_) static BlockPos
getTransformedFarCorner
(BlockPos p_308915_, Vec3i p_309132_, Rotation p_308895_) lookedAtStructureBlockPos
(BlockPos p_320206_, Entity p_320494_, ServerLevel p_320139_) static StructureBlockEntity
prepareTestStructure
(GameTestInfo p_312267_, BlockPos p_309600_, Rotation p_309541_, ServerLevel p_309609_) static void
removeBarriers
(AABB p_326925_, ServerLevel p_326815_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
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
-
getStructureBounds
-
getStructureBoundingBox
-
getStructureOrigin
-
addCommandBlockAndButtonToStartTest
public static void addCommandBlockAndButtonToStartTest(BlockPos p_127876_, BlockPos p_127877_, Rotation p_127878_, ServerLevel p_127879_) -
createNewEmptyStructureBlock
public static void createNewEmptyStructureBlock(String p_177765_, BlockPos p_177766_, Vec3i p_177767_, Rotation p_177768_, ServerLevel p_177769_) -
prepareTestStructure
public static StructureBlockEntity prepareTestStructure(GameTestInfo p_312267_, BlockPos p_309600_, Rotation p_309541_, ServerLevel p_309609_) -
encaseStructure
-
removeBarriers
-
forceLoadChunks
-
clearSpaceForStructure
-
getTransformedFarCorner
-
getStructureBoundingBox
public static BoundingBox getStructureBoundingBox(BlockPos p_177761_, Vec3i p_177762_, Rotation p_177763_) -
findStructureBlockContainingPos
public static Optional<BlockPos> findStructureBlockContainingPos(BlockPos p_127854_, int p_127855_, ServerLevel p_127856_) -
findNearestStructureBlock
public static Optional<BlockPos> findNearestStructureBlock(BlockPos p_127907_, int p_127908_, ServerLevel p_127909_) -
findStructureByTestFunction
public static Stream<BlockPos> findStructureByTestFunction(BlockPos p_340830_, int p_340828_, ServerLevel p_340893_, String p_341292_) -
findStructureBlocks
public static Stream<BlockPos> findStructureBlocks(BlockPos p_127911_, int p_127912_, ServerLevel p_127913_) -
createStructureBlock
private static StructureBlockEntity createStructureBlock(GameTestInfo p_312256_, BlockPos p_127892_, Rotation p_127893_, ServerLevel p_127894_) -
getBoundingBoxAtGround
private static BoundingBox getBoundingBoxAtGround(BlockPos p_341291_, int p_341122_, ServerLevel p_341148_) -
lookedAtStructureBlockPos
public static Stream<BlockPos> lookedAtStructureBlockPos(BlockPos p_320206_, Entity p_320494_, ServerLevel p_320139_) -
clearBlock
-
doesStructureContain
private static boolean doesStructureContain(BlockPos p_127868_, BlockPos p_127869_, ServerLevel p_127870_)
-