Package com.msg.end_less.features
Class NewEndPlatform
java.lang.Object
com.msg.end_less.features.NewEndPlatform
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreatePlatform(net.minecraft.world.level.ServerLevelAccessor level, net.minecraft.core.BlockPos pos, boolean dropblock) static net.minecraft.core.BlockPosfindClosestPortalNear(net.minecraft.world.phys.Vec3 pos, List<net.minecraft.core.BlockPos> portals, double maxDistance) Finds the closest portal within a max distance.static voidplacePortal(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, boolean dropblock) Place the End Portal with an air box above it
-
Constructor Details
-
NewEndPlatform
public NewEndPlatform()
-
-
Method Details
-
createPlatform
public static void createPlatform(net.minecraft.world.level.ServerLevelAccessor level, net.minecraft.core.BlockPos pos, boolean dropblock) -
placePortal
public static void placePortal(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, boolean dropblock) Place the End Portal with an air box above it- Parameters:
level- The current world/dimension.pos- The block position.dropblock- If true, drop block when break block.
-
findClosestPortalNear
public static net.minecraft.core.BlockPos findClosestPortalNear(net.minecraft.world.phys.Vec3 pos, List<net.minecraft.core.BlockPos> portals, double maxDistance) Finds the closest portal within a max distance.- Parameters:
pos- The position where it is checking.portals- A list of portal positions.maxDistance- The max distance to consider.- Returns:
- The closest portal position, or null if none is close enough.
-