Package net.minecraft.network

Examples of net.minecraft.network.NetworkManager


        return CCCEventHandler.renderTime + getRenderFrame();
    }

    public static String getServerIP() {
        try {
            NetworkManager networkManager = mc().getNetHandler().getNetworkManager();
            String s = networkManager.getSocketAddress().toString();
            s = s.substring(s.indexOf("/") + 1);
            return s;
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here


        return this.client.getNetHandler()!=null ? this.client.getNetHandler().getNetworkManager() : null;
    }

    public void handleClientWorldClosing(WorldClient world)
    {
        NetworkManager client = getClientToServerNetworkManager();
        // ONLY revert a non-local connection
        if (client != null && !client.isLocalChannel())
        {
            GameData.revertToFrozen();
        }
    }
View Full Code Here

public class ChannelRegistrationHandler extends SimpleChannelInboundHandler<FMLProxyPacket> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, FMLProxyPacket msg) throws Exception
    {
        Side side = msg.getTarget();
        NetworkManager manager = msg.getOrigin();
        if (msg.channel().equals("REGISTER") || msg.channel().equals("UNREGISTER"))
        {
            byte[] data = new byte[msg.payload().readableBytes()];
            msg.payload().readBytes(data);
            String channels = new String(data,Charsets.UTF_8);
View Full Code Here

        initializeFakePlayer(world, player.getGameProfile().getId().toString(), player.getCommandSenderName());
    }

    private void initializeFakePlayer(World world, String uuid, String name){
        fakePlayer = new DroneFakePlayer((WorldServer)world, new GameProfile(uuid != null ? UUID.fromString(uuid) : null, name), new FakePlayerItemInWorldManager(world, fakePlayer, this));
        fakePlayer.playerNetServerHandler = new NetHandlerPlayServer(MinecraftServer.getServer(), new NetworkManager(false), fakePlayer);
        fakePlayer.inventory = new InventoryFakePlayer(fakePlayer);
        playerName = name;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.network.NetworkManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.