Java 类net.minecraft.network.play.server.S01PacketJoinGame 实例源码

项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
/**
 * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
public void handleJoinGame(S01PacketJoinGame packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.playerController = new PlayerControllerMP(this.gameController, this);
    this.clientWorldController = new WorldClient(this, new WorldSettings(0L, packetIn.getGameType(), false, packetIn.isHardcoreMode(), packetIn.getWorldType()), packetIn.getDimension(), packetIn.getDifficulty(), this.gameController.mcProfiler);
    this.gameController.gameSettings.difficulty = packetIn.getDifficulty();
    this.gameController.loadWorld(this.clientWorldController);
    this.gameController.thePlayer.dimension = packetIn.getDimension();
    this.gameController.displayGuiScreen(new GuiDownloadTerrain(this));
    this.gameController.thePlayer.setEntityId(packetIn.getEntityId());
    this.currentServerMaxPlayers = packetIn.getMaxPlayers();
    this.gameController.thePlayer.setReducedDebug(packetIn.isReducedDebugInfo());
    this.gameController.playerController.setGameType(packetIn.getGameType());
    this.gameController.gameSettings.sendSettingsToServer();
    this.netManager.sendPacket(new C17PacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).writeString(ClientBrandRetriever.getClientModName())));
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
public void handleJoinGame(S01PacketJoinGame packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.playerController = new PlayerControllerMP(this.gameController, this);
    this.clientWorldController = new WorldClient(this, new WorldSettings(0L, packetIn.getGameType(), false, packetIn.isHardcoreMode(), packetIn.getWorldType()), packetIn.getDimension(), packetIn.getDifficulty(), this.gameController.mcProfiler);
    this.gameController.gameSettings.difficulty = packetIn.getDifficulty();
    this.gameController.loadWorld(this.clientWorldController);
    this.gameController.thePlayer.dimension = packetIn.getDimension();
    this.gameController.displayGuiScreen(new GuiDownloadTerrain(this));
    this.gameController.thePlayer.setEntityId(packetIn.getEntityId());
    this.currentServerMaxPlayers = packetIn.getMaxPlayers();
    this.gameController.thePlayer.setReducedDebug(packetIn.isReducedDebugInfo());
    this.gameController.playerController.setGameType(packetIn.getGameType());
    this.gameController.gameSettings.sendSettingsToServer();
    this.netManager.sendPacket(new C17PacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).writeString(ClientBrandRetriever.getClientModName())));
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * Registers some server properties
 * (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
public void handleJoinGame(S01PacketJoinGame packetIn) {
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.playerController = new PlayerControllerMP(this.gameController, this);
    this.clientWorldController = new WorldClient(this,
            new WorldSettings(0L, packetIn.getGameType(), false, packetIn.isHardcoreMode(),
                    packetIn.getWorldType()),
            packetIn.getDimension(), packetIn.getDifficulty(), this.gameController.mcProfiler);
    this.gameController.gameSettings.difficulty = packetIn.getDifficulty();
    this.gameController.loadWorld(this.clientWorldController);
    this.gameController.thePlayer.dimension = packetIn.getDimension();
    this.gameController.displayGuiScreen(new GuiDownloadTerrain(this));
    this.gameController.thePlayer.setEntityId(packetIn.getEntityId());
    this.currentServerMaxPlayers = packetIn.getMaxPlayers();
    this.gameController.thePlayer.setReducedDebug(packetIn.isReducedDebugInfo());
    this.gameController.playerController.setGameType(packetIn.getGameType());
    this.gameController.gameSettings.sendSettingsToServer();
    this.netManager.sendPacket(new C17PacketCustomPayload("MC|Brand",
            (new PacketBuffer(Unpooled.buffer())).writeString(ClientBrandRetriever.getClientModName())));
}
项目:TRHS_Club_Mod_2016    文件:NetworkDispatcher.java   
private boolean handleVanilla(Packet msg)
{
    if (state == ConnectionState.AWAITING_HANDSHAKE && msg instanceof S01PacketJoinGame)
    {
        handshakeChannel.pipeline().fireUserEventTriggered(msg);
    }
    else
    {
        FMLLog.info("Unexpected packet during modded negotiation - assuming vanilla or keepalives : %s", msg.getClass().getName());
    }
    return false;
}
项目:CauldronGit    文件:NetworkDispatcher.java   
private boolean handleVanilla(Packet msg)
{
    if (state == ConnectionState.AWAITING_HANDSHAKE && msg instanceof S01PacketJoinGame)
    {
        handshakeChannel.pipeline().fireUserEventTriggered(msg);
    }
    else
    {
        FMLLog.info("Unexpected packet during modded negotiation - assuming vanilla or keepalives : %s", msg.getClass().getName());
    }
    return false;
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
public void handleJoinGame(S01PacketJoinGame p_147282_1_)
{
    this.gameController.playerController = new HookPlayerControllerMP(this.gameController, this);
    this.clientWorldController = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), p_147282_1_.func_149194_f(), p_147282_1_.func_149192_g(), this.gameController.mcProfiler);
    this.clientWorldController.isClient = true;
    this.gameController.loadWorld(this.clientWorldController);
    this.gameController.thePlayer.dimension = p_147282_1_.func_149194_f();
    this.gameController.displayGuiScreen(new GuiDownloadTerrain(this));
    this.gameController.thePlayer.setEntityId(p_147282_1_.func_149197_c());
    this.currentServerMaxPlayers = p_147282_1_.func_149193_h();
    this.gameController.playerController.setGameType(p_147282_1_.func_149198_e());
    this.gameController.gameSettings.sendSettingsToServer();
    this.netManager.scheduleOutboundPacket(new C17PacketCustomPayload("MC|Brand", ClientBrandRetriever.getClientModName().getBytes(Charsets.UTF_8)), new GenericFutureListener[0]);
}
项目:Cauldron    文件:NetworkDispatcher.java   
private boolean handleVanilla(Packet msg)
{
    if (state == ConnectionState.AWAITING_HANDSHAKE && msg instanceof S01PacketJoinGame)
    {
        handshakeChannel.pipeline().fireUserEventTriggered(msg);
    }
    else
    {
        FMLLog.info("Unexpected packet during modded negotiation - assuming vanilla or keepalives : %s", msg.getClass().getName());
    }
    return false;
}
项目:Cauldron    文件:NetworkDispatcher.java   
private boolean handleVanilla(Packet msg)
{
    if (state == ConnectionState.AWAITING_HANDSHAKE && msg instanceof S01PacketJoinGame)
    {
        handshakeChannel.pipeline().fireUserEventTriggered(msg);
    }
    else
    {
        //FMLLog.info("Unexpected packet during modded negotiation - assuming vanilla or keepalives : %s", msg.getClass().getName()); // Cauldron - unneeded spam
    }
    return false;
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleJoinGame(S01PacketJoinGame p_147282_1_)
{
    this.gameController.playerController = new PlayerControllerMP(this.gameController, this);
    this.clientWorldController = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), p_147282_1_.func_149194_f(), p_147282_1_.func_149192_g(), this.gameController.mcProfiler);
    this.clientWorldController.isRemote = true;
    this.gameController.loadWorld(this.clientWorldController);
    this.gameController.thePlayer.dimension = p_147282_1_.func_149194_f();
    this.gameController.displayGuiScreen(new GuiDownloadTerrain(this));
    this.gameController.thePlayer.setEntityId(p_147282_1_.func_149197_c());
    this.currentServerMaxPlayers = p_147282_1_.func_149193_h();
    this.gameController.playerController.setGameType(p_147282_1_.func_149198_e());
    this.gameController.gameSettings.sendSettingsToServer();
    this.netManager.scheduleOutboundPacket(new C17PacketCustomPayload("MC|Brand", ClientBrandRetriever.getClientModName().getBytes(Charsets.UTF_8)), new GenericFutureListener[0]);
}
项目:Cauldron    文件:NetworkDispatcher.java   
private boolean handleVanilla(Packet msg)
{
    if (state == ConnectionState.AWAITING_HANDSHAKE && msg instanceof S01PacketJoinGame)
    {
        handshakeChannel.pipeline().fireUserEventTriggered(msg);
    }
    else
    {
        FMLLog.info("Unexpected packet during modded negotiation - assuming vanilla or keepalives : %s", msg.getClass().getName());
    }
    return false;
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleJoinGame(S01PacketJoinGame p_147282_1_)
{
    this.gameController.playerController = new PlayerControllerMP(this.gameController, this);
    this.clientWorldController = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), p_147282_1_.func_149194_f(), p_147282_1_.func_149192_g(), this.gameController.mcProfiler);
    this.clientWorldController.isRemote = true;
    this.gameController.loadWorld(this.clientWorldController);
    this.gameController.thePlayer.dimension = p_147282_1_.func_149194_f();
    this.gameController.displayGuiScreen(new GuiDownloadTerrain(this));
    this.gameController.thePlayer.setEntityId(p_147282_1_.func_149197_c());
    this.currentServerMaxPlayers = p_147282_1_.func_149193_h();
    this.gameController.playerController.setGameType(p_147282_1_.func_149198_e());
    this.gameController.gameSettings.sendSettingsToServer();
    this.netManager.scheduleOutboundPacket(new C17PacketCustomPayload("MC|Brand", ClientBrandRetriever.getClientModName().getBytes(Charsets.UTF_8)), new GenericFutureListener[0]);
}
项目:TRHS_Club_Mod_2016    文件:NetworkDispatcher.java   
public int getOverrideDimension(S01PacketJoinGame p_147282_1_) {
    FMLLog.fine("Overriding dimension: using %d", this.overrideLoginDim);
    return this.overrideLoginDim != 0 ? this.overrideLoginDim : p_147282_1_.func_149194_f();
}
项目:HeroMod    文件:LiteModHeroMod.java   
@Override
public boolean onPreJoinGame(INetHandler netHandler,
        S01PacketJoinGame joinGamePacket) {
    confirmHC = false;
    return true;
}
项目:Resilience-Client-Source    文件:ServerConfigurationManager.java   
public void initializeConnectionToPlayer(NetworkManager par1INetworkManager, EntityPlayerMP par2EntityPlayerMP)
{
    NBTTagCompound var3 = this.readPlayerDataFromFile(par2EntityPlayerMP);
    par2EntityPlayerMP.setWorld(this.mcServer.worldServerForDimension(par2EntityPlayerMP.dimension));
    par2EntityPlayerMP.theItemInWorldManager.setWorld((WorldServer)par2EntityPlayerMP.worldObj);
    String var4 = "local";

    if (par1INetworkManager.getSocketAddress() != null)
    {
        var4 = par1INetworkManager.getSocketAddress().toString();
    }

    logger.info(par2EntityPlayerMP.getCommandSenderName() + "[" + var4 + "] logged in with entity id " + par2EntityPlayerMP.getEntityId() + " at (" + par2EntityPlayerMP.posX + ", " + par2EntityPlayerMP.posY + ", " + par2EntityPlayerMP.posZ + ")");
    WorldServer var5 = this.mcServer.worldServerForDimension(par2EntityPlayerMP.dimension);
    ChunkCoordinates var6 = var5.getSpawnPoint();
    this.func_72381_a(par2EntityPlayerMP, (EntityPlayerMP)null, var5);
    NetHandlerPlayServer var7 = new NetHandlerPlayServer(this.mcServer, par1INetworkManager, par2EntityPlayerMP);
    var7.sendPacket(new S01PacketJoinGame(par2EntityPlayerMP.getEntityId(), par2EntityPlayerMP.theItemInWorldManager.getGameType(), var5.getWorldInfo().isHardcoreModeEnabled(), var5.provider.dimensionId, var5.difficultySetting, this.getMaxPlayers(), var5.getWorldInfo().getTerrainType()));
    var7.sendPacket(new S3FPacketCustomPayload("MC|Brand", this.getServerInstance().getServerModName().getBytes(Charsets.UTF_8)));
    var7.sendPacket(new S05PacketSpawnPosition(var6.posX, var6.posY, var6.posZ));
    var7.sendPacket(new S39PacketPlayerAbilities(par2EntityPlayerMP.capabilities));
    var7.sendPacket(new S09PacketHeldItemChange(par2EntityPlayerMP.inventory.currentItem));
    par2EntityPlayerMP.func_147099_x().func_150877_d();
    par2EntityPlayerMP.func_147099_x().func_150884_b(par2EntityPlayerMP);
    this.func_96456_a((ServerScoreboard)var5.getScoreboard(), par2EntityPlayerMP);
    this.mcServer.func_147132_au();
    ChatComponentTranslation var8 = new ChatComponentTranslation("multiplayer.player.joined", new Object[] {par2EntityPlayerMP.func_145748_c_()});
    var8.getChatStyle().setColor(EnumChatFormatting.YELLOW);
    this.func_148539_a(var8);
    this.playerLoggedIn(par2EntityPlayerMP);
    var7.setPlayerLocation(par2EntityPlayerMP.posX, par2EntityPlayerMP.posY, par2EntityPlayerMP.posZ, par2EntityPlayerMP.rotationYaw, par2EntityPlayerMP.rotationPitch);
    this.updateTimeAndWeatherForPlayer(par2EntityPlayerMP, var5);

    if (this.mcServer.func_147133_T().length() > 0)
    {
        par2EntityPlayerMP.func_147095_a(this.mcServer.func_147133_T());
    }

    Iterator var9 = par2EntityPlayerMP.getActivePotionEffects().iterator();

    while (var9.hasNext())
    {
        PotionEffect var10 = (PotionEffect)var9.next();
        var7.sendPacket(new S1DPacketEntityEffect(par2EntityPlayerMP.getEntityId(), var10));
    }

    par2EntityPlayerMP.addSelfToInternalCraftingInventory();

    if (var3 != null && var3.func_150297_b("Riding", 10))
    {
        Entity var11 = EntityList.createEntityFromNBT(var3.getCompoundTag("Riding"), var5);

        if (var11 != null)
        {
            var11.forceSpawn = true;
            var5.spawnEntityInWorld(var11);
            par2EntityPlayerMP.mountEntity(var11);
            var11.forceSpawn = false;
        }
    }
}
项目:BlazeLoader    文件:BlazeLoaderCoreProvider.java   
@Override
public void onJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket) {
    EventHandlerClient.overrideClientJoinGame(netHandler, loginPacket);
}
项目:BlazeLoader    文件:EventHandlerClient.java   
public static void overrideClientJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket) {
    playerEventClients.all().onClientJoinGame(netHandler, loginPacket);
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
void handleJoinGame(S01PacketJoinGame packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
void handleJoinGame(S01PacketJoinGame packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
void handleJoinGame(S01PacketJoinGame packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
void handleJoinGame(S01PacketJoinGame packetIn);
项目:Resilience-Client-Source    文件:INetHandlerPlayClient.java   
/**
 * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
 * WorldClient and sets the player initial dimension
 */
void handleJoinGame(S01PacketJoinGame var1);
项目:BlazeLoader    文件:ClientPlayerListener.java   
/**
 * Called when the client connects to a server or singleplayer game
 *
 * @param netHandler  The network handler processing loginPacket
 * @param loginPacket The login packet for this login
 */
public void onClientJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleJoinGame(S01PacketJoinGame p_147282_1_);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleJoinGame(S01PacketJoinGame p_147282_1_);