Class CoreMinecraftNetUtil

java.lang.Object
alexiil.mc.lib.net.impl.CoreMinecraftNetUtil

public class CoreMinecraftNetUtil extends Object
  • 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

      public static ActiveClientConnection 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

      @Nullable public static ActiveClientConnection getCurrentClientConnection()
      Returns:
      The current ActiveClientConnection, or null if one has not been created yet.