当前位置: 首页>>代码示例>>Java>>正文


Java S08PacketPlayerPosLook.func_148932_c方法代码示例

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


在下文中一共展示了S08PacketPlayerPosLook.func_148932_c方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handlePlayerPosLook

import net.minecraft.network.play.server.S08PacketPlayerPosLook; //导入方法依赖的package包/类
/**
 * Handles changes in player positioning and rotation such as when travelling to a new dimension, (re)spawning,
 * mounting horses etc. Seems to immediately reply to the server with the clients post-processing perspective on the
 * player positioning
 */
public void handlePlayerPosLook(S08PacketPlayerPosLook p_147258_1_)
{
    EntityClientPlayerMP var2 = this.gameController.thePlayer;
    double var3 = p_147258_1_.func_148932_c();
    double var5 = p_147258_1_.func_148928_d();
    double var7 = p_147258_1_.func_148933_e();
    float var9 = p_147258_1_.func_148931_f();
    float var10 = p_147258_1_.func_148930_g();
    var2.ySize = 0.0F;
    var2.motionX = var2.motionY = var2.motionZ = 0.0D;
    var2.setPositionAndRotation(var3, var5, var7, var9, var10);
    this.netManager.scheduleOutboundPacket(new C03PacketPlayer.C06PacketPlayerPosLook(var2.posX, var2.boundingBox.minY, var2.posY, var2.posZ, p_147258_1_.func_148931_f(), p_147258_1_.func_148930_g(), p_147258_1_.func_148929_h()), new GenericFutureListener[0]);

    if (!this.doneLoadingTerrain)
    {
        this.gameController.thePlayer.prevPosX = this.gameController.thePlayer.posX;
        this.gameController.thePlayer.prevPosY = this.gameController.thePlayer.posY;
        this.gameController.thePlayer.prevPosZ = this.gameController.thePlayer.posZ;
        this.doneLoadingTerrain = true;
        this.gameController.displayGuiScreen((GuiScreen)null);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:28,代码来源:NetHandlerPlayClient.java

示例2: handlePlayerPosLook

import net.minecraft.network.play.server.S08PacketPlayerPosLook; //导入方法依赖的package包/类
public void handlePlayerPosLook(S08PacketPlayerPosLook p_147258_1_)
{
    EntityClientPlayerMP entityclientplayermp = this.gameController.thePlayer;
    double d0 = p_147258_1_.func_148932_c();
    double d1 = p_147258_1_.func_148928_d();
    double d2 = p_147258_1_.func_148933_e();
    float f = p_147258_1_.func_148931_f();
    float f1 = p_147258_1_.func_148930_g();
    entityclientplayermp.ySize = 0.0F;
    entityclientplayermp.motionX = entityclientplayermp.motionY = entityclientplayermp.motionZ = 0.0D;
    entityclientplayermp.setPositionAndRotation(d0, d1, d2, f, f1);
    this.netManager.scheduleOutboundPacket(new C03PacketPlayer.C06PacketPlayerPosLook(entityclientplayermp.posX, entityclientplayermp.boundingBox.minY, entityclientplayermp.posY, entityclientplayermp.posZ, p_147258_1_.func_148931_f(), p_147258_1_.func_148930_g(), p_147258_1_.func_148929_h()), new GenericFutureListener[0]);

    if (!this.doneLoadingTerrain)
    {
        this.gameController.thePlayer.prevPosX = this.gameController.thePlayer.posX;
        this.gameController.thePlayer.prevPosY = this.gameController.thePlayer.posY;
        this.gameController.thePlayer.prevPosZ = this.gameController.thePlayer.posZ;
        this.doneLoadingTerrain = true;
        this.gameController.displayGuiScreen((GuiScreen)null);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:23,代码来源:NetHandlerPlayClient.java


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