Class PortalPlacer
java.lang.Object
tech.anonymoushacker1279.openportals.portal.teleport.PortalPlacer
Handles searching for suitable locations and physically building portal structures.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.util.BlockUtil.FoundRectanglefindAndBuildPortal(net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.core.BlockPos targetPos, net.minecraft.world.level.block.state.BlockState frameBlock, net.minecraft.core.Direction.Axis axis, PortalLink link) Find a suitable location and build a destination portal.
-
Constructor Details
-
PortalPlacer
public PortalPlacer()
-
-
Method Details
-
findAndBuildPortal
@Nullable public static net.minecraft.util.BlockUtil.FoundRectangle findAndBuildPortal(net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.core.BlockPos targetPos, net.minecraft.world.level.block.state.BlockState frameBlock, net.minecraft.core.Direction.Axis axis, PortalLink link) Find a suitable location and build a destination portal. Searches in a spiral pattern around the target position, checking for solid ground.- Parameters:
serverLevel- the level to build the portal intargetPos- the target position to search aroundframeBlock- the block state to use for the portal frameaxis- the axis orientation of the portallink- the portal configuration- Returns:
- the bounds of the created portal, or null if creation failed
-