Package net.minecraft.block
Class PortalSize
- java.lang.Object
-
- net.minecraft.block.PortalSize
-
public class PortalSize extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Direction.Axis
axis
private BlockPos
bottomLeft
private static AbstractBlock.IPositionPredicate
FRAME
private int
height
private IWorld
level
private int
numPortalBlocks
private Direction
rightDir
private int
width
-
Constructor Summary
Constructors Constructor Description PortalSize(IWorld p_i48740_1_, BlockPos p_i48740_2_, Direction.Axis p_i48740_3_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private BlockPos
calculateBottomLeft(BlockPos p_242971_1_)
private int
calculateHeight()
private int
calculateWidth()
void
createPortalBlocks()
static PortalInfo
createPortalInfo(ServerWorld p_242963_0_, TeleportationRepositioner.Result p_242963_1_, Direction.Axis p_242963_2_, Vector3d p_242963_3_, EntitySize p_242963_4_, Vector3d p_242963_5_, float p_242963_6_, float p_242963_7_)
static java.util.Optional<PortalSize>
findEmptyPortalShape(IWorld p_242964_0_, BlockPos p_242964_1_, Direction.Axis p_242964_2_)
static java.util.Optional<PortalSize>
findPortalShape(IWorld p_242965_0_, BlockPos p_242965_1_, java.util.function.Predicate<PortalSize> p_242965_2_, Direction.Axis p_242965_3_)
private int
getDistanceUntilEdgeAboveFrame(BlockPos p_242972_1_, Direction p_242972_2_)
private int
getDistanceUntilTop(BlockPos.Mutable p_242969_1_)
static Vector3d
getRelativePosition(TeleportationRepositioner.Result p_242973_0_, Direction.Axis p_242973_1_, Vector3d p_242973_2_, EntitySize p_242973_3_)
private boolean
hasTopFrame(BlockPos.Mutable p_242970_1_, int p_242970_2_)
boolean
isComplete()
private static boolean
isEmpty(BlockState p_196900_0_)
boolean
isValid()
-
-
-
Field Detail
-
FRAME
private static final AbstractBlock.IPositionPredicate FRAME
-
level
private final IWorld level
-
axis
private final Direction.Axis axis
-
rightDir
private final Direction rightDir
-
numPortalBlocks
private int numPortalBlocks
-
bottomLeft
@Nullable private BlockPos bottomLeft
-
height
private int height
-
width
private int width
-
-
Constructor Detail
-
PortalSize
public PortalSize(IWorld p_i48740_1_, BlockPos p_i48740_2_, Direction.Axis p_i48740_3_)
-
-
Method Detail
-
findEmptyPortalShape
public static java.util.Optional<PortalSize> findEmptyPortalShape(IWorld p_242964_0_, BlockPos p_242964_1_, Direction.Axis p_242964_2_)
-
findPortalShape
public static java.util.Optional<PortalSize> findPortalShape(IWorld p_242965_0_, BlockPos p_242965_1_, java.util.function.Predicate<PortalSize> p_242965_2_, Direction.Axis p_242965_3_)
-
calculateWidth
private int calculateWidth()
-
getDistanceUntilEdgeAboveFrame
private int getDistanceUntilEdgeAboveFrame(BlockPos p_242972_1_, Direction p_242972_2_)
-
calculateHeight
private int calculateHeight()
-
hasTopFrame
private boolean hasTopFrame(BlockPos.Mutable p_242970_1_, int p_242970_2_)
-
getDistanceUntilTop
private int getDistanceUntilTop(BlockPos.Mutable p_242969_1_)
-
isEmpty
private static boolean isEmpty(BlockState p_196900_0_)
-
isValid
public boolean isValid()
-
createPortalBlocks
public void createPortalBlocks()
-
isComplete
public boolean isComplete()
-
getRelativePosition
public static Vector3d getRelativePosition(TeleportationRepositioner.Result p_242973_0_, Direction.Axis p_242973_1_, Vector3d p_242973_2_, EntitySize p_242973_3_)
-
createPortalInfo
public static PortalInfo createPortalInfo(ServerWorld p_242963_0_, TeleportationRepositioner.Result p_242963_1_, Direction.Axis p_242963_2_, Vector3d p_242963_3_, EntitySize p_242963_4_, Vector3d p_242963_5_, float p_242963_6_, float p_242963_7_)
-
-