• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java S01PacketJoinGame类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.network.play.server.S01PacketJoinGame的典型用法代码示例。如果您正苦于以下问题:Java S01PacketJoinGame类的具体用法?Java S01PacketJoinGame怎么用?Java S01PacketJoinGame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



S01PacketJoinGame类属于net.minecraft.network.play.server包,在下文中一共展示了S01PacketJoinGame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: handleJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
/**
 * 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())));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:21,代码来源:NetHandlerPlayClient.java


示例2: handleJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
/**
 * 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())));
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:25,代码来源:NetHandlerPlayClient.java


示例3: handleVanilla

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
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;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:13,代码来源:NetworkDispatcher.java


示例4: handleJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
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]);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:15,代码来源:NetHandlerPlayClient.java


示例5: handleVanilla

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
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;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:13,代码来源:NetworkDispatcher.java


示例6: handleJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
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]);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:15,代码来源:NetHandlerPlayClient.java


示例7: getOverrideDimension

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
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();
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:5,代码来源:NetworkDispatcher.java


示例8: onPreJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
@Override
public boolean onPreJoinGame(INetHandler netHandler,
		S01PacketJoinGame joinGamePacket) {
	confirmHC = false;
	return true;
}
 
开发者ID:unknownloner,项目名称:HeroMod,代码行数:7,代码来源:LiteModHeroMod.java


示例9: initializeConnectionToPlayer

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
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;
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:62,代码来源:ServerConfigurationManager.java


示例10: onJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
@Override
public void onJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket) {
    EventHandlerClient.overrideClientJoinGame(netHandler, loginPacket);
}
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:5,代码来源:BlazeLoaderCoreProvider.java


示例11: overrideClientJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
public static void overrideClientJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket) {
    playerEventClients.all().onClientJoinGame(netHandler, loginPacket);
}
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:4,代码来源:EventHandlerClient.java


示例12: handleJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
/**
 * 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);
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:INetHandlerPlayClient.java


示例13: handleJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
/**
 * 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);
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:6,代码来源:INetHandlerPlayClient.java


示例14: onClientJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
/**
 * 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);
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:8,代码来源:ClientPlayerListener.java


示例15: handleJoinGame

import net.minecraft.network.play.server.S01PacketJoinGame; //导入依赖的package包/类
void handleJoinGame(S01PacketJoinGame p_147282_1_); 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:2,代码来源:INetHandlerPlayClient.java



注:本文中的net.minecraft.network.play.server.S01PacketJoinGame类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OSCByteArrayToJavaConverter类代码示例发布时间:2022-05-22
下一篇:
Java FileUtil类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap