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

项目:CustomWorldGen    文件:EntityPlayerSP.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    if (this.worldObj.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ)))
    {
        super.onUpdate();

        if (this.isRiding())
        {
            this.connection.sendPacket(new CPacketPlayer.Rotation(this.rotationYaw, this.rotationPitch, this.onGround));
            this.connection.sendPacket(new CPacketInput(this.moveStrafing, this.moveForward, this.movementInput.jump, this.movementInput.sneak));
            Entity entity = this.getLowestRidingEntity();

            if (entity != this && entity.canPassengerSteer())
            {
                this.connection.sendPacket(new CPacketVehicleMove(entity));
            }
        }
        else
        {
            this.onUpdateWalkingPlayer();
        }
    }
}
项目:ExpandedRailsMod    文件:EntityPlayerSP.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    if (this.worldObj.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ)))
    {
        super.onUpdate();

        if (this.isRiding())
        {
            this.connection.sendPacket(new CPacketPlayer.Rotation(this.rotationYaw, this.rotationPitch, this.onGround));
            this.connection.sendPacket(new CPacketInput(this.moveStrafing, this.moveForward, this.movementInput.jump, this.movementInput.sneak));
            Entity entity = this.getLowestRidingEntity();

            if (entity != this && entity.canPassengerSteer())
            {
                this.connection.sendPacket(new CPacketVehicleMove(entity));
            }
        }
        else
        {
            this.onUpdateWalkingPlayer();
        }
    }
}
项目:Zombe-Modpack    文件:EntityPlayerSP.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    if (this.world.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ)))
    {
        //-ZMod-----------------------------------------------------------
        ZHandle.handle("onClientUpdate",this);
        //----------------------------------------------------------------
        super.onUpdate();

        if (this.isRiding())
        {
            this.connection.sendPacket(new CPacketPlayer.Rotation(this.rotationYaw, this.rotationPitch, this.onGround));
            this.connection.sendPacket(new CPacketInput(this.moveStrafing, this.moveForward, this.movementInput.jump, this.movementInput.sneak));
            Entity entity = this.getLowestRidingEntity();

            if (entity != this && entity.canPassengerSteer())
            {
                this.connection.sendPacket(new CPacketVehicleMove(entity));
            }
        }
        else
        {
            //-ZMod-------------------------------------------------------
            ZHandle.handle("beforeSendMotion", this);
            this.onUpdateWalkingPlayer();
            ZHandle.handle("afterSendMotion", this);
            //------------------------------------------------------------
        }
    }
}
项目:ForgeHax    文件:FreecamMod.java   
@SubscribeEvent
public void onPacketSend(PacketEvent.Outgoing.Pre event) {
    if(event.getPacket() instanceof CPacketPlayer || event.getPacket() instanceof CPacketInput) {
        event.setCanceled(true);
    }
}
项目:Zombe-Modpack    文件:NetHandlerPlayServer.java   
/**
 * Processes player movement input. Includes walking, strafing, jumping, sneaking; excludes riding and toggling
 * flying/sprinting
 */
public void processInput(CPacketInput packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.setEntityActionState(packetIn.getStrafeSpeed(), packetIn.getForwardSpeed(), packetIn.isJumping(), packetIn.isSneaking());
}
项目:Backmemed    文件:NetHandlerPlayServer.java   
/**
 * Processes player movement input. Includes walking, strafing, jumping, sneaking; excludes riding and toggling
 * flying/sprinting
 */
public void processInput(CPacketInput packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.setEntityActionState(packetIn.getStrafeSpeed(), packetIn.getForwardSpeed(), packetIn.isJumping(), packetIn.isSneaking());
}
项目:CustomWorldGen    文件:NetHandlerPlayServer.java   
/**
 * Processes player movement input. Includes walking, strafing, jumping, sneaking; excludes riding and toggling
 * flying/sprinting
 */
public void processInput(CPacketInput packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.setEntityActionState(packetIn.getStrafeSpeed(), packetIn.getForwardSpeed(), packetIn.isJumping(), packetIn.isSneaking());
}
项目:CrystalMod    文件:FakeNetHandlerPlayServer.java   
@Override
public void processInput(CPacketInput p_147358_1_) {
}
项目:ExpandedRailsMod    文件:NetHandlerPlayServer.java   
/**
 * Processes player movement input. Includes walking, strafing, jumping, sneaking; excludes riding and toggling
 * flying/sprinting
 */
public void processInput(CPacketInput packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.setEntityActionState(packetIn.getStrafeSpeed(), packetIn.getForwardSpeed(), packetIn.isJumping(), packetIn.isSneaking());
}
项目:EnderIO    文件:FakeNetHandlerPlayServer.java   
@Override
public void processInput(@Nonnull CPacketInput p_147358_1_) {
}
项目:DankNull    文件:NetServerHandlerFake.java   
@Override
public void processInput(CPacketInput packetIn) {

}
项目:Backmemed    文件:INetHandlerPlayServer.java   
/**
 * Processes player movement input. Includes walking, strafing, jumping, sneaking; excludes riding and toggling
 * flying/sprinting
 */
void processInput(CPacketInput packetIn);
项目:CustomWorldGen    文件:INetHandlerPlayServer.java   
/**
 * Processes player movement input. Includes walking, strafing, jumping, sneaking; excludes riding and toggling
 * flying/sprinting
 */
void processInput(CPacketInput packetIn);