Package net.minecraft.world.level.portal
Class PortalShape
java.lang.Object
net.minecraft.world.level.portal.PortalShape
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Direction.Axis
private BlockPos
private static final BlockBehaviour.StatePredicate
private int
private final LevelAccessor
static final int
static final int
private static final int
private static final int
private int
private final Direction
private static final float
private static final double
private final int
-
Constructor Summary
ConstructorDescriptionPortalShape
(LevelAccessor p_77695_, BlockPos p_77696_, Direction.Axis p_77697_) -
Method Summary
Modifier and TypeMethodDescriptionprivate BlockPos
calculateBottomLeft
(BlockPos p_77734_) private int
private int
void
static PortalInfo
createPortalInfo
(ServerLevel p_259301_, BlockUtil.FoundRectangle p_259931_, Direction.Axis p_259901_, Vec3 p_259630_, Entity p_259166_, Vec3 p_260043_, float p_259853_, float p_259667_) private static Vec3
findCollisionFreePosition
(Vec3 p_260315_, ServerLevel p_259704_, Entity p_259626_, EntityDimensions p_259816_) static Optional
<PortalShape> findEmptyPortalShape
(LevelAccessor p_77709_, BlockPos p_77710_, Direction.Axis p_77711_) static Optional
<PortalShape> findPortalShape
(LevelAccessor p_77713_, BlockPos p_77714_, Predicate<PortalShape> p_77715_, Direction.Axis p_77716_) private int
getDistanceUntilEdgeAboveFrame
(BlockPos p_77736_, Direction p_77737_) private int
getDistanceUntilTop
(BlockPos.MutableBlockPos p_77729_) static Vec3
getRelativePosition
(BlockUtil.FoundRectangle p_77739_, Direction.Axis p_77740_, Vec3 p_77741_, EntityDimensions p_77742_) private boolean
hasTopFrame
(BlockPos.MutableBlockPos p_77731_, int p_77732_) boolean
private static boolean
isEmpty
(BlockState p_77718_) boolean
isValid()
-
Field Details
-
MIN_WIDTH
private static final int MIN_WIDTH- See Also:
-
MAX_WIDTH
public static final int MAX_WIDTH- See Also:
-
MIN_HEIGHT
private static final int MIN_HEIGHT- See Also:
-
MAX_HEIGHT
public static final int MAX_HEIGHT- See Also:
-
FRAME
-
SAFE_TRAVEL_MAX_ENTITY_XY
private static final float SAFE_TRAVEL_MAX_ENTITY_XY- See Also:
-
SAFE_TRAVEL_MAX_VERTICAL_DELTA
private static final double SAFE_TRAVEL_MAX_VERTICAL_DELTA- See Also:
-
level
-
axis
-
rightDir
-
numPortalBlocks
private int numPortalBlocks -
bottomLeft
-
height
private int height -
width
private final int width
-
-
Constructor Details
-
PortalShape
-
-
Method Details
-
findEmptyPortalShape
public static Optional<PortalShape> findEmptyPortalShape(LevelAccessor p_77709_, BlockPos p_77710_, Direction.Axis p_77711_) -
findPortalShape
public static Optional<PortalShape> findPortalShape(LevelAccessor p_77713_, BlockPos p_77714_, Predicate<PortalShape> p_77715_, Direction.Axis p_77716_) -
calculateBottomLeft
-
calculateWidth
private int calculateWidth() -
getDistanceUntilEdgeAboveFrame
-
calculateHeight
private int calculateHeight() -
hasTopFrame
-
getDistanceUntilTop
-
isEmpty
-
isValid
public boolean isValid() -
createPortalBlocks
public void createPortalBlocks() -
isComplete
public boolean isComplete() -
getRelativePosition
public static Vec3 getRelativePosition(BlockUtil.FoundRectangle p_77739_, Direction.Axis p_77740_, Vec3 p_77741_, EntityDimensions p_77742_) -
createPortalInfo
public static PortalInfo createPortalInfo(ServerLevel p_259301_, BlockUtil.FoundRectangle p_259931_, Direction.Axis p_259901_, Vec3 p_259630_, Entity p_259166_, Vec3 p_260043_, float p_259853_, float p_259667_) -
findCollisionFreePosition
private static Vec3 findCollisionFreePosition(Vec3 p_260315_, ServerLevel p_259704_, Entity p_259626_, EntityDimensions p_259816_)
-