Package net.minecraft.world.level.portal
Class PortalShape
java.lang.Object
net.minecraft.world.level.portal.PortalShape
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Direction.Axisprivate BlockPosprivate static BlockBehaviour.StatePredicateprivate intprivate LevelAccessorstatic intstatic intprivate static intprivate static intprivate intprivate Directionprivate 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_77700_, BlockUtil.FoundRectangle p_77701_, Direction.Axis p_77702_, Vec3 p_77703_, EntityDimensions p_77704_, Vec3 p_77705_, float p_77706_, float p_77707_)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:
- Constant Field Values
-
MAX_WIDTH
public static final int MAX_WIDTH- See Also:
- Constant Field Values
-
MIN_HEIGHT
private static final int MIN_HEIGHT- See Also:
- Constant Field Values
-
MAX_HEIGHT
public static final int MAX_HEIGHT- See Also:
- Constant Field Values
-
FRAME
-
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_77700_, BlockUtil.FoundRectangle p_77701_, Direction.Axis p_77702_, Vec3 p_77703_, EntityDimensions p_77704_, Vec3 p_77705_, float p_77706_, float p_77707_)
-