Class PortalPlacer

java.lang.Object
tech.anonymoushacker1279.openportals.portal.teleport.PortalPlacer

public class PortalPlacer extends Object
Handles searching for suitable locations and physically building portal structures.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 in
      targetPos - the target position to search around
      frameBlock - the block state to use for the portal frame
      axis - the axis orientation of the portal
      link - the portal configuration
      Returns:
      the bounds of the created portal, or null if creation failed