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

项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
/**
 * Sends the player's abilities to the server (if there is one).
 */
public void sendPlayerAbilities()
{
    if (this.playerNetServerHandler != null)
    {
        this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities(this.capabilities));
        this.updatePotionMetadata();
    }
}
项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
/**
 * Sends the player's abilities to the server (if there is one).
 */
public void sendPlayerAbilities()
{
    if (this.playerNetServerHandler != null)
    {
        this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities(this.capabilities));
        this.updatePotionMetadata();
    }
}
项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
public void handlePlayerAbilities(S39PacketPlayerAbilities packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    EntityPlayer entityplayer = this.gameController.thePlayer;
    entityplayer.capabilities.isFlying = packetIn.isFlying();
    entityplayer.capabilities.isCreativeMode = packetIn.isCreativeMode();
    entityplayer.capabilities.disableDamage = packetIn.isInvulnerable();
    entityplayer.capabilities.allowFlying = packetIn.isAllowFlying();
    entityplayer.capabilities.setFlySpeed(packetIn.getFlySpeed());
    entityplayer.capabilities.setPlayerWalkSpeed(packetIn.getWalkSpeed());
}
项目:BaseClient    文件:EntityPlayerMP.java   
/**
 * Sends the player's abilities to the server (if there is one).
 */
public void sendPlayerAbilities()
{
    if (this.playerNetServerHandler != null)
    {
        this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities(this.capabilities));
        this.updatePotionMetadata();
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handlePlayerAbilities(S39PacketPlayerAbilities packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    EntityPlayer entityplayer = this.gameController.thePlayer;
    entityplayer.capabilities.isFlying = packetIn.isFlying();
    entityplayer.capabilities.isCreativeMode = packetIn.isCreativeMode();
    entityplayer.capabilities.disableDamage = packetIn.isInvulnerable();
    entityplayer.capabilities.allowFlying = packetIn.isAllowFlying();
    entityplayer.capabilities.setFlySpeed(packetIn.getFlySpeed());
    entityplayer.capabilities.setPlayerWalkSpeed(packetIn.getWalkSpeed());
}
项目:BaseClient    文件:EntityPlayerMP.java   
/**
 * Sends the player's abilities to the server (if there is one).
 */
public void sendPlayerAbilities()
{
    if (this.playerNetServerHandler != null)
    {
        this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities(this.capabilities));
        this.updatePotionMetadata();
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handlePlayerAbilities(S39PacketPlayerAbilities packetIn) {
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    EntityPlayer entityplayer = this.gameController.thePlayer;
    entityplayer.capabilities.isFlying = packetIn.isFlying();
    entityplayer.capabilities.isCreativeMode = packetIn.isCreativeMode();
    entityplayer.capabilities.disableDamage = packetIn.isInvulnerable();
    entityplayer.capabilities.allowFlying = packetIn.isAllowFlying();
    entityplayer.capabilities.setFlySpeed(packetIn.getFlySpeed());
    entityplayer.capabilities.setPlayerWalkSpeed(packetIn.getWalkSpeed());
}
项目:Resilience-Client-Source    文件:EntityPlayerMP.java   
/**
 * Sends the player's abilities to the server (if there is one).
 */
public void sendPlayerAbilities()
{
    if (this.playerNetServerHandler != null)
    {
        this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities(this.capabilities));
    }
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
public void handlePlayerAbilities(S39PacketPlayerAbilities p_147270_1_)
{
    EntityClientPlayerMP var2 = this.gameController.thePlayer;
    var2.capabilities.isFlying = p_147270_1_.func_149106_d();
    var2.capabilities.isCreativeMode = p_147270_1_.func_149103_f();
    var2.capabilities.disableDamage = p_147270_1_.func_149112_c();
    var2.capabilities.allowFlying = p_147270_1_.func_149105_e();
    var2.capabilities.setFlySpeed(p_147270_1_.func_149101_g());
    var2.capabilities.setPlayerWalkSpeed(p_147270_1_.func_149107_h());
}
项目:Cauldron    文件:EntityPlayerMP.java   
public void sendPlayerAbilities()
{
    if (this.playerNetServerHandler != null)
    {
        this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities(this.capabilities));
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handlePlayerAbilities(S39PacketPlayerAbilities p_147270_1_)
{
    EntityClientPlayerMP entityclientplayermp = this.gameController.thePlayer;
    entityclientplayermp.capabilities.isFlying = p_147270_1_.func_149106_d();
    entityclientplayermp.capabilities.isCreativeMode = p_147270_1_.func_149103_f();
    entityclientplayermp.capabilities.disableDamage = p_147270_1_.func_149112_c();
    entityclientplayermp.capabilities.allowFlying = p_147270_1_.func_149105_e();
    entityclientplayermp.capabilities.setFlySpeed(p_147270_1_.func_149101_g());
    entityclientplayermp.capabilities.setPlayerWalkSpeed(p_147270_1_.func_149107_h());
}
项目:Cauldron    文件:EntityPlayerMP.java   
public void sendPlayerAbilities()
{
    if (this.playerNetServerHandler != null)
    {
        this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities(this.capabilities));
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handlePlayerAbilities(S39PacketPlayerAbilities p_147270_1_)
{
    EntityClientPlayerMP entityclientplayermp = this.gameController.thePlayer;
    entityclientplayermp.capabilities.isFlying = p_147270_1_.func_149106_d();
    entityclientplayermp.capabilities.isCreativeMode = p_147270_1_.func_149103_f();
    entityclientplayermp.capabilities.disableDamage = p_147270_1_.func_149112_c();
    entityclientplayermp.capabilities.allowFlying = p_147270_1_.func_149105_e();
    entityclientplayermp.capabilities.setFlySpeed(p_147270_1_.func_149101_g());
    entityclientplayermp.capabilities.setPlayerWalkSpeed(p_147270_1_.func_149107_h());
}
项目: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;
        }
    }
}
项目:NeptuneMod    文件:MixinEntityPlayerMP.java   
@Override
public void updateCapabilities() {
    this.playerNetServerHandler.sendPacket(new S39PacketPlayerAbilities((PlayerCapabilities) this.getCapabilities()));
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handlePlayerAbilities(S39PacketPlayerAbilities packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handlePlayerAbilities(S39PacketPlayerAbilities packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handlePlayerAbilities(S39PacketPlayerAbilities packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handlePlayerAbilities(S39PacketPlayerAbilities packetIn);
项目:Resilience-Client-Source    文件:INetHandlerPlayClient.java   
void handlePlayerAbilities(S39PacketPlayerAbilities var1);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handlePlayerAbilities(S39PacketPlayerAbilities p_147270_1_);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handlePlayerAbilities(S39PacketPlayerAbilities p_147270_1_);