类 PortalShape
java.lang.Object
net.minecraft.world.level.portal.PortalShape
-
字段概要
字段修饰符和类型字段说明private 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
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private BlockPos
calculateBottomLeft
(BlockPos pPos) private int
private int
void
static PortalInfo
createPortalInfo
(ServerLevel pLevel, BlockUtil.FoundRectangle pPortalPos, Direction.Axis pAxis, Vec3 pRelativePos, Entity pEntity, Vec3 pVelocity, float pYRot, float pXRot) private static Vec3
findCollisionFreePosition
(Vec3 pPos, ServerLevel pLevel, Entity pEntity, EntityDimensions pDimensions) static Optional<PortalShape>
findEmptyPortalShape
(LevelAccessor pLevel, BlockPos pBottomLeft, Direction.Axis pAxis) static Optional<PortalShape>
findPortalShape
(LevelAccessor pLevel, BlockPos pBottomLeft, Predicate<PortalShape> pPredicate, Direction.Axis pAxis) private int
getDistanceUntilEdgeAboveFrame
(BlockPos pPos, Direction pDirection) private int
static Vec3
getRelativePosition
(BlockUtil.FoundRectangle pFoundRectangle, Direction.Axis pAxis, Vec3 pPos, EntityDimensions pEntityDimensions) private boolean
hasTopFrame
(BlockPos.MutableBlockPos pPos, int pDistanceToTop) boolean
private static boolean
isEmpty
(BlockState pState) boolean
isValid()
-
字段详细资料
-
MIN_WIDTH
private static final int MIN_WIDTH- 另请参阅:
-
MAX_WIDTH
public static final int MAX_WIDTH- 另请参阅:
-
MIN_HEIGHT
private static final int MIN_HEIGHT- 另请参阅:
-
MAX_HEIGHT
public static final int MAX_HEIGHT- 另请参阅:
-
FRAME
-
SAFE_TRAVEL_MAX_ENTITY_XY
private static final float SAFE_TRAVEL_MAX_ENTITY_XY- 另请参阅:
-
SAFE_TRAVEL_MAX_VERTICAL_DELTA
private static final double SAFE_TRAVEL_MAX_VERTICAL_DELTA- 另请参阅:
-
level
-
axis
-
rightDir
-
numPortalBlocks
private int numPortalBlocks -
bottomLeft
-
height
private int height -
width
private final int width
-
-
构造器详细资料
-
PortalShape
-
-
方法详细资料
-
findEmptyPortalShape
public static Optional<PortalShape> findEmptyPortalShape(LevelAccessor pLevel, BlockPos pBottomLeft, Direction.Axis pAxis) -
findPortalShape
public static Optional<PortalShape> findPortalShape(LevelAccessor pLevel, BlockPos pBottomLeft, Predicate<PortalShape> pPredicate, Direction.Axis pAxis) -
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 pFoundRectangle, Direction.Axis pAxis, Vec3 pPos, EntityDimensions pEntityDimensions) -
createPortalInfo
public static PortalInfo createPortalInfo(ServerLevel pLevel, BlockUtil.FoundRectangle pPortalPos, Direction.Axis pAxis, Vec3 pRelativePos, Entity pEntity, Vec3 pVelocity, float pYRot, float pXRot) -
findCollisionFreePosition
private static Vec3 findCollisionFreePosition(Vec3 pPos, ServerLevel pLevel, Entity pEntity, EntityDimensions pDimensions)
-