Package alexiil.mc.lib.net.impl
Class CoreMinecraftNetUtil
java.lang.Object
alexiil.mc.lib.net.impl.CoreMinecraftNetUtil
public class CoreMinecraftNetUtil
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description CoreMinecraftNetUtil()
-
Method Summary
Modifier and Type Method Description static ActiveClientConnection
getClientConnection()
static ActiveMinecraftConnection
getConnection(net.minecraft.entity.player.PlayerEntity player)
static ActiveClientConnection
getCurrentClientConnection()
static java.util.List<ActiveMinecraftConnection>
getNearbyActiveConnections(net.minecraft.block.entity.BlockEntity be, int distance)
static java.util.List<ActiveMinecraftConnection>
getPlayersWatching(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
static void
load()
static void
loadClient()
-
Constructor Details
-
CoreMinecraftNetUtil
public CoreMinecraftNetUtil()
-
-
Method Details
-
getNearbyActiveConnections
public static java.util.List<ActiveMinecraftConnection> getNearbyActiveConnections(net.minecraft.block.entity.BlockEntity be, int distance) -
getPlayersWatching
public static java.util.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.
-