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

项目:WurstSDK    文件:CrashCommand.java   
@Override
public void call(String[] args) throws CmdException {
    if (args.length != 1)
        throw new CmdSyntaxError(this.getCmdName() + " " + this.getSyntax()[0]);

    if (!NumberUtils.isNumber(args[0])) {
        Chat.error("No number!");
        return;
    }
    int number = (int) (NumberUtils.createDouble(args[0]) * 1000);
    Chat.message("Trying to crash using " + args[0] + " packets...");
    for (int i = 0; i < number; i++) {
        Objects.requireNonNull(mc.getConnection()).sendPacketBypass(new CPacketAnimation());
    }
    Chat.message(ChatColor.DARK_BLUE + "Done!");
}
项目:ForgeHax    文件:AntiAfkMod.java   
@SubscribeEvent
public void onUpdate(LocalPlayerUpdateEvent event) {
    if(!timer.isStarted())
        timer.start();
    else {
        if(timer.hasTimeElapsed(delay.get())) {
            timer.start(); // restart timer
            if (silent.getAsBoolean())
                getNetworkManager().sendPacket(new CPacketAnimation(EnumHand.MAIN_HAND));
            else
                getLocalPlayer().swingArm(EnumHand.MAIN_HAND);
        }
    }
}
项目:Zombe-Modpack    文件:EntityPlayerSP.java   
public void swingArm(EnumHand hand)
{
    //-ZMod-ghost---------------------------------------------------------
    if (!ZHandle.handle("allowSwing", true)) return;
    //--------------------------------------------------------------------
    super.swingArm(hand);
    this.connection.sendPacket(new CPacketAnimation(hand));
}
项目:wizards-of-lua    文件:WolChannelInboundHandlerAdapter.java   
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
  if (msg instanceof CPacketAnimation) {
    CPacketAnimation animation = (CPacketAnimation) msg;
    ItemStack item = player.getHeldItem(animation.getHand());
    MinecraftForge.EVENT_BUS.post(new SwingArmEvent(player, animation.getHand(), item));
  }
  super.channelRead(ctx, msg);
}
项目:Wurst-MC-1.12-OF    文件:WPlayer.java   
public static void swingArmPacket()
{
    WConnection.sendPacket(new CPacketAnimation(EnumHand.MAIN_HAND));
}
项目:Wurst-MC-1.12    文件:WPlayer.java   
public static void swingArmPacket()
{
    WConnection.sendPacket(new CPacketAnimation(EnumHand.MAIN_HAND));
}
项目:Zombe-Modpack    文件:NetHandlerPlayServer.java   
public void handleAnimation(CPacketAnimation packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.markPlayerActive();
    this.playerEntity.swingArm(packetIn.getHand());
}
项目:EMC    文件:IEntityPlayer.java   
public static void swingArmPacket() {
    if (isNull()) {
        return;
    }
    Minecraft.getMinecraft().player.connection.sendPacket(new CPacketAnimation(EnumHand.MAIN_HAND));
}
项目:Backmemed    文件:NetHandlerPlayServer.java   
public void handleAnimation(CPacketAnimation packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.markPlayerActive();
    this.playerEntity.swingArm(packetIn.getHand());
}
项目:Backmemed    文件:EntityPlayerSP.java   
public void swingArm(EnumHand hand)
{
    super.swingArm(hand);
    this.connection.sendPacket(new CPacketAnimation(hand));
}
项目:CustomWorldGen    文件:NetHandlerPlayServer.java   
public void handleAnimation(CPacketAnimation packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.markPlayerActive();
    this.playerEntity.swingArm(packetIn.getHand());
}
项目:CustomWorldGen    文件:EntityPlayerSP.java   
public void swingArm(EnumHand hand)
{
    super.swingArm(hand);
    this.connection.sendPacket(new CPacketAnimation(hand));
}
项目:Wurst-MC-1.11    文件:WPlayer.java   
public static void swingArmPacket()
{
    WConnection.sendPacket(new CPacketAnimation(EnumHand.MAIN_HAND));
}
项目:Wurst-MC-1.10    文件:WPlayer.java   
public static void swingArmPacket()
{
    WConnection.sendPacket(new CPacketAnimation(EnumHand.MAIN_HAND));
}
项目:Wurst-MC-1.9    文件:WPlayer.java   
public static void swingArmPacket()
{
    WConnection.sendPacket(new CPacketAnimation(EnumHand.MAIN_HAND));
}
项目:ExpandedRailsMod    文件:NetHandlerPlayServer.java   
public void handleAnimation(CPacketAnimation packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    this.playerEntity.markPlayerActive();
    this.playerEntity.swingArm(packetIn.getHand());
}
项目:ExpandedRailsMod    文件:EntityPlayerSP.java   
public void swingArm(EnumHand hand)
{
    super.swingArm(hand);
    this.connection.sendPacket(new CPacketAnimation(hand));
}
项目:DankNull    文件:NetServerHandlerFake.java   
@Override
public void handleAnimation(CPacketAnimation packetIn) {

}
项目:CrystalMod    文件:FakeNetHandlerPlayServer.java   
@Override
public void handleAnimation(CPacketAnimation packetIn) {

}
项目:EnderIO    文件:FakeNetHandlerPlayServer.java   
@Override
public void handleAnimation(@Nonnull CPacketAnimation packetIn) {

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