ClientProxy.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:Battlegear2 作者:
@Override
public void doSpecialAction(EntityPlayer entityPlayer, ItemStack itemStack) {
    FMLProxyPacket p;
    if(itemStack.getItem() instanceof IShield){
        RayTraceResult mop = getMouseOver(4);
        if(mop != null && mop.entityHit instanceof EntityLivingBase){
            p = new SpecialActionPacket(entityPlayer, mop.entityHit).generatePacket();
            if(mop.entityHit instanceof EntityPlayerMP){
                Battlegear.packetHandler.sendPacketToPlayer(p, (EntityPlayerMP) mop.entityHit);
            }
            Battlegear.packetHandler.sendPacketToServer(p);
        }
    }
    else{
        p = new SpecialActionPacket(entityPlayer, null).generatePacket();
        Battlegear.packetHandler.sendPacketToServer(p);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号