Java 类net.minecraft.network.play.client.CPacketConfirmTeleport 实例源码

项目:Zombe-Modpack    文件:NetHandlerPlayServer.java   
public void processConfirmTeleport(CPacketConfirmTeleport packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());

    if (packetIn.getTeleportId() == this.teleportId)
    {
        this.playerEntity.setPositionAndRotation(this.targetPos.xCoord, this.targetPos.yCoord, this.targetPos.zCoord, this.playerEntity.rotationYaw, this.playerEntity.rotationPitch);

        if (this.playerEntity.isInvulnerableDimensionChange())
        {
            this.lastGoodX = this.targetPos.xCoord;
            this.lastGoodY = this.targetPos.yCoord;
            this.lastGoodZ = this.targetPos.zCoord;
            this.playerEntity.clearInvulnerableDimensionChange();
        }

        this.targetPos = null;
    }
}
项目:Backmemed    文件:NetHandlerPlayServer.java   
public void processConfirmTeleport(CPacketConfirmTeleport packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());

    if (packetIn.getTeleportId() == this.teleportId)
    {
        this.playerEntity.setPositionAndRotation(this.targetPos.xCoord, this.targetPos.yCoord, this.targetPos.zCoord, this.playerEntity.rotationYaw, this.playerEntity.rotationPitch);

        if (this.playerEntity.isInvulnerableDimensionChange())
        {
            this.lastGoodX = this.targetPos.xCoord;
            this.lastGoodY = this.targetPos.yCoord;
            this.lastGoodZ = this.targetPos.zCoord;
            this.playerEntity.clearInvulnerableDimensionChange();
        }

        this.targetPos = null;
    }
}
项目:CustomWorldGen    文件:NetHandlerPlayServer.java   
public void processConfirmTeleport(CPacketConfirmTeleport packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());

    if (packetIn.getTeleportId() == this.teleportId)
    {
        this.playerEntity.setPositionAndRotation(this.targetPos.xCoord, this.targetPos.yCoord, this.targetPos.zCoord, this.playerEntity.rotationYaw, this.playerEntity.rotationPitch);

        if (this.playerEntity.isInvulnerableDimensionChange())
        {
            this.lastGoodX = this.targetPos.xCoord;
            this.lastGoodY = this.targetPos.yCoord;
            this.lastGoodZ = this.targetPos.zCoord;
            this.playerEntity.clearInvulnerableDimensionChange();
        }

        this.targetPos = null;
    }
}
项目:ExpandedRailsMod    文件:NetHandlerPlayServer.java   
public void processConfirmTeleport(CPacketConfirmTeleport packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());

    if (packetIn.getTeleportId() == this.teleportId)
    {
        this.playerEntity.setPositionAndRotation(this.targetPos.xCoord, this.targetPos.yCoord, this.targetPos.zCoord, this.playerEntity.rotationYaw, this.playerEntity.rotationPitch);

        if (this.playerEntity.isInvulnerableDimensionChange())
        {
            this.lastGoodX = this.targetPos.xCoord;
            this.lastGoodY = this.targetPos.yCoord;
            this.lastGoodZ = this.targetPos.zCoord;
            this.playerEntity.clearInvulnerableDimensionChange();
        }

        this.targetPos = null;
    }
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
public void handlePlayerPosLook(SPacketPlayerPosLook packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    EntityPlayer entityplayer = this.gameController.player;
    double d0 = packetIn.getX();
    double d1 = packetIn.getY();
    double d2 = packetIn.getZ();
    float f = packetIn.getYaw();
    float f1 = packetIn.getPitch();

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X))
    {
        d0 += entityplayer.posX;
    }
    else
    {
        entityplayer.motionX = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y))
    {
        d1 += entityplayer.posY;
    }
    else
    {
        entityplayer.motionY = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Z))
    {
        d2 += entityplayer.posZ;
    }
    else
    {
        entityplayer.motionZ = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X_ROT))
    {
        f1 += entityplayer.rotationPitch;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y_ROT))
    {
        f += entityplayer.rotationYaw;
    }

    entityplayer.setPositionAndRotation(d0, d1, d2, f, f1);
    this.netManager.sendPacket(new CPacketConfirmTeleport(packetIn.getTeleportId()));
    this.netManager.sendPacket(new CPacketPlayer.PositionRotation(entityplayer.posX, entityplayer.getEntityBoundingBox().minY, entityplayer.posZ, entityplayer.rotationYaw, entityplayer.rotationPitch, false));

    if (!this.doneLoadingTerrain)
    {
        this.gameController.player.prevPosX = this.gameController.player.posX;
        this.gameController.player.prevPosY = this.gameController.player.posY;
        this.gameController.player.prevPosZ = this.gameController.player.posZ;
        this.doneLoadingTerrain = true;
        this.gameController.displayGuiScreen((GuiScreen)null);
    }
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
public void handlePlayerPosLook(SPacketPlayerPosLook packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    EntityPlayer entityplayer = this.gameController.player;
    double d0 = packetIn.getX();
    double d1 = packetIn.getY();
    double d2 = packetIn.getZ();
    float f = packetIn.getYaw();
    float f1 = packetIn.getPitch();

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X))
    {
        d0 += entityplayer.posX;
    }
    else
    {
        entityplayer.motionX = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y))
    {
        d1 += entityplayer.posY;
    }
    else
    {
        entityplayer.motionY = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Z))
    {
        d2 += entityplayer.posZ;
    }
    else
    {
        entityplayer.motionZ = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X_ROT))
    {
        f1 += entityplayer.rotationPitch;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y_ROT))
    {
        f += entityplayer.rotationYaw;
    }

    entityplayer.setPositionAndRotation(d0, d1, d2, f, f1);
    this.netManager.sendPacket(new CPacketConfirmTeleport(packetIn.getTeleportId()));
    this.netManager.sendPacket(new CPacketPlayer.PositionRotation(entityplayer.posX, entityplayer.getEntityBoundingBox().minY, entityplayer.posZ, entityplayer.rotationYaw, entityplayer.rotationPitch, false));

    if (!this.doneLoadingTerrain)
    {
        this.gameController.player.prevPosX = this.gameController.player.posX;
        this.gameController.player.prevPosY = this.gameController.player.posY;
        this.gameController.player.prevPosZ = this.gameController.player.posZ;
        this.doneLoadingTerrain = true;
        this.gameController.displayGuiScreen((GuiScreen)null);
    }
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
public void handlePlayerPosLook(SPacketPlayerPosLook packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    EntityPlayer entityplayer = this.gameController.thePlayer;
    double d0 = packetIn.getX();
    double d1 = packetIn.getY();
    double d2 = packetIn.getZ();
    float f = packetIn.getYaw();
    float f1 = packetIn.getPitch();

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X))
    {
        d0 += entityplayer.posX;
    }
    else
    {
        entityplayer.motionX = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y))
    {
        d1 += entityplayer.posY;
    }
    else
    {
        entityplayer.motionY = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Z))
    {
        d2 += entityplayer.posZ;
    }
    else
    {
        entityplayer.motionZ = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X_ROT))
    {
        f1 += entityplayer.rotationPitch;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y_ROT))
    {
        f += entityplayer.rotationYaw;
    }

    entityplayer.setPositionAndRotation(d0, d1, d2, f, f1);
    this.netManager.sendPacket(new CPacketConfirmTeleport(packetIn.getTeleportId()));
    this.netManager.sendPacket(new CPacketPlayer.PositionRotation(entityplayer.posX, entityplayer.getEntityBoundingBox().minY, entityplayer.posZ, entityplayer.rotationYaw, entityplayer.rotationPitch, false));

    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);
    }
}
项目:CrystalMod    文件:FakeNetHandlerPlayServer.java   
@Override
public void processConfirmTeleport(CPacketConfirmTeleport packetIn)
{

}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
public void handlePlayerPosLook(SPacketPlayerPosLook packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    EntityPlayer entityplayer = this.gameController.thePlayer;
    double d0 = packetIn.getX();
    double d1 = packetIn.getY();
    double d2 = packetIn.getZ();
    float f = packetIn.getYaw();
    float f1 = packetIn.getPitch();

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X))
    {
        d0 += entityplayer.posX;
    }
    else
    {
        entityplayer.motionX = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y))
    {
        d1 += entityplayer.posY;
    }
    else
    {
        entityplayer.motionY = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Z))
    {
        d2 += entityplayer.posZ;
    }
    else
    {
        entityplayer.motionZ = 0.0D;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X_ROT))
    {
        f1 += entityplayer.rotationPitch;
    }

    if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y_ROT))
    {
        f += entityplayer.rotationYaw;
    }

    entityplayer.setPositionAndRotation(d0, d1, d2, f, f1);
    this.netManager.sendPacket(new CPacketConfirmTeleport(packetIn.getTeleportId()));
    this.netManager.sendPacket(new CPacketPlayer.PositionRotation(entityplayer.posX, entityplayer.getEntityBoundingBox().minY, entityplayer.posZ, entityplayer.rotationYaw, entityplayer.rotationPitch, false));

    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);
    }
}
项目:EnderIO    文件:FakeNetHandlerPlayServer.java   
@Override
public void processConfirmTeleport(@Nonnull CPacketConfirmTeleport packetIn) {
}
项目:DankNull    文件:NetServerHandlerFake.java   
@Override
public void processConfirmTeleport(CPacketConfirmTeleport packetIn) {

}
项目:Backmemed    文件:INetHandlerPlayServer.java   
void processConfirmTeleport(CPacketConfirmTeleport packetIn);
项目:CustomWorldGen    文件:INetHandlerPlayServer.java   
void processConfirmTeleport(CPacketConfirmTeleport packetIn);