Package net.minecraft.world.level.portal
Class PortalShape
java.lang.Object
net.minecraft.world.level.portal.PortalShape
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionPortalShape(LevelAccessor p_77695_, BlockPos p_77696_, Direction.Axis p_77697_) 
- 
Method SummaryModifier 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_WIDTHprivate static final int MIN_WIDTH- See Also:
 
- 
MAX_WIDTHpublic static final int MAX_WIDTH- See Also:
 
- 
MIN_HEIGHTprivate static final int MIN_HEIGHT- See Also:
 
- 
MAX_HEIGHTpublic static final int MAX_HEIGHT- See Also:
 
- 
FRAME
- 
SAFE_TRAVEL_MAX_ENTITY_XYprivate static final float SAFE_TRAVEL_MAX_ENTITY_XY- See Also:
 
- 
SAFE_TRAVEL_MAX_VERTICAL_DELTAprivate static final double SAFE_TRAVEL_MAX_VERTICAL_DELTA- See Also:
 
- 
level
- 
axis
- 
rightDir
- 
numPortalBlocksprivate int numPortalBlocks
- 
bottomLeft
- 
heightprivate int height
- 
widthprivate final int width
 
- 
- 
Constructor Details- 
PortalShape
 
- 
- 
Method Details- 
findEmptyPortalShapepublic static Optional<PortalShape> findEmptyPortalShape(LevelAccessor p_77709_, BlockPos p_77710_, Direction.Axis p_77711_) 
- 
findPortalShapepublic static Optional<PortalShape> findPortalShape(LevelAccessor p_77713_, BlockPos p_77714_, Predicate<PortalShape> p_77715_, Direction.Axis p_77716_) 
- 
calculateBottomLeft
- 
calculateWidthprivate int calculateWidth()
- 
getDistanceUntilEdgeAboveFrame
- 
calculateHeightprivate int calculateHeight()
- 
hasTopFrame
- 
getDistanceUntilTop
- 
isEmpty
- 
isValidpublic boolean isValid()
- 
createPortalBlockspublic void createPortalBlocks()
- 
isCompletepublic boolean isComplete()
- 
getRelativePositionpublic static Vec3 getRelativePosition(BlockUtil.FoundRectangle p_77739_, Direction.Axis p_77740_, Vec3 p_77741_, EntityDimensions p_77742_) 
- 
createPortalInfopublic 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_) 
- 
findCollisionFreePositionprivate static Vec3 findCollisionFreePosition(Vec3 p_260315_, ServerLevel p_259704_, Entity p_259626_, EntityDimensions p_259816_) 
 
-