Package alexiil.mc.lib.net.impl
Class CoreMinecraftNetUtil
java.lang.Object
alexiil.mc.lib.net.impl.CoreMinecraftNetUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActiveClientConnection
static ActiveMinecraftConnection
getConnection(net.minecraft.entity.player.PlayerEntity player)
static ActiveClientConnection
static List<ActiveMinecraftConnection>
getNearbyActiveConnections(net.minecraft.block.entity.BlockEntity be, int distance)
static List<ActiveMinecraftConnection>
getPlayersWatching(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
static void
load()
static void
-
Constructor Details
-
CoreMinecraftNetUtil
public CoreMinecraftNetUtil()
-
-
Method Details
-
getNearbyActiveConnections
public static List<ActiveMinecraftConnection> getNearbyActiveConnections(net.minecraft.block.entity.BlockEntity be, int distance) -
getPlayersWatching
public static List<ActiveMinecraftConnection> getPlayersWatching(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos) -
getConnection
public static ActiveMinecraftConnection getConnection(net.minecraft.entity.player.PlayerEntity player) -
load
public static void load() -
loadClient
public static void loadClient() -
getClientConnection
- Returns:
- The current client connection. Throws an exception if this is not available right now (likely because the client hasn't joined a world).
-
getCurrentClientConnection
- Returns:
- The current
ActiveClientConnection
, or null if one has not been created yet.
-