Package net.minecraft.world.level.portal
Class PortalShape
java.lang.Object
net.minecraft.world.level.portal.PortalShape
-
Field Summary
Modifier and TypeFieldDescriptionprivate Direction.Axis
private BlockPos
private static BlockBehaviour.StatePredicate
private int
private LevelAccessor
static int
static int
private static int
private static int
private int
private Direction
private 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_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 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:
- 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_)
-