Package net.minecraft.world.level.portal
Class PortalShape
java.lang.Object
net.minecraft.world.level.portal.PortalShape
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Direction.Axisprivate BlockPosprivate static final BlockBehaviour.StatePredicateprivate intprivate final LevelAccessorstatic final intstatic final intprivate static final intprivate static final intprivate intprivate final Directionprivate static final floatprivate static final doubleprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionPortalShape(LevelAccessor p_77695_, BlockPos p_77696_, Direction.Axis p_77697_) -
Method Summary
Modifier and TypeMethodDescriptionprivate BlockPoscalculateBottomLeft(BlockPos p_77734_) private intprivate intvoidstatic PortalInfocreatePortalInfo(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 Vec3findCollisionFreePosition(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 intgetDistanceUntilEdgeAboveFrame(BlockPos p_77736_, Direction p_77737_) private intgetDistanceUntilTop(BlockPos.MutableBlockPos p_77729_) static Vec3getRelativePosition(BlockUtil.FoundRectangle p_77739_, Direction.Axis p_77740_, Vec3 p_77741_, EntityDimensions p_77742_) private booleanhasTopFrame(BlockPos.MutableBlockPos p_77731_, int p_77732_) booleanprivate static booleanisEmpty(BlockState p_77718_) booleanisValid()
-
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_)
-