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


Java PacketBuffer.writeVarIntToBuffer方法代码示例

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


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

示例1: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeString(this.field_149320_a);
    buf.writeByte(this.field_149314_f);

    if (this.field_149314_f == 0 || this.field_149314_f == 2)
    {
        buf.writeString(this.field_149318_b);
        buf.writeString(this.field_149319_c);
        buf.writeString(this.field_149316_d);
        buf.writeByte(this.field_149315_g);
        buf.writeString(this.field_179816_e);
        buf.writeByte(this.field_179815_f);
    }

    if (this.field_149314_f == 0 || this.field_149314_f == 3 || this.field_149314_f == 4)
    {
        buf.writeVarIntToBuffer(this.field_149317_e.size());

        for (String s : this.field_149317_e)
        {
            buf.writeString(s);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:29,代码来源:S3EPacketTeams.java

示例2: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeInt(this.chunkX);
    buf.writeInt(this.chunkZ);
    buf.writeBoolean(this.loadChunk);
    buf.writeVarIntToBuffer(this.availableSections);
    buf.writeVarIntToBuffer(this.buffer.length);
    buf.writeBytes(this.buffer);
    buf.writeVarIntToBuffer(this.tileEntityTags.size());

    for (NBTTagCompound nbttagcompound : this.tileEntityTags)
    {
        buf.writeNBTTagCompoundToBuffer(nbttagcompound);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:SPacketChunkData.java

示例3: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeInt(this.particleType.getParticleID());
    buf.writeBoolean(this.longDistance);
    buf.writeFloat(this.xCoord);
    buf.writeFloat(this.yCoord);
    buf.writeFloat(this.zCoord);
    buf.writeFloat(this.xOffset);
    buf.writeFloat(this.yOffset);
    buf.writeFloat(this.zOffset);
    buf.writeFloat(this.particleSpeed);
    buf.writeInt(this.particleCount);
    int i = this.particleType.getArgumentCount();

    for (int j = 0; j < i; ++j)
    {
        buf.writeVarIntToBuffer(this.particleArguments[j]);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:23,代码来源:S2APacketParticles.java

示例4: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeInt(this.chunkPosCoord.chunkXPos);
    buf.writeInt(this.chunkPosCoord.chunkZPos);
    buf.writeVarIntToBuffer(this.changedBlocks.length);

    for (S22PacketMultiBlockChange.BlockUpdateData s22packetmultiblockchange$blockupdatedata : this.changedBlocks)
    {
        buf.writeShort(s22packetmultiblockchange$blockupdatedata.func_180089_b());
        buf.writeVarIntToBuffer(Block.BLOCK_STATE_IDS.get(s22packetmultiblockchange$blockupdatedata.getBlockState()));
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:16,代码来源:S22PacketMultiBlockChange.java

示例5: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.field_148976_a.size());

    for (Entry<StatBase, Integer> entry : this.field_148976_a.entrySet())
    {
        buf.writeString(((StatBase)entry.getKey()).statId);
        buf.writeVarIntToBuffer(((Integer)entry.getValue()).intValue());
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:14,代码来源:S37PacketStatistics.java

示例6: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.entityId);
    buf.writeEnumValue(this.action);

    if (this.action == C02PacketUseEntity.Action.INTERACT_AT)
    {
        buf.writeFloat((float)this.hitVec.xCoord);
        buf.writeFloat((float)this.hitVec.yCoord);
        buf.writeFloat((float)this.hitVec.zCoord);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:16,代码来源:C02PacketUseEntity.java

示例7: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.entityID);
    buf.writeInt(this.posX);
    buf.writeInt(this.posY);
    buf.writeInt(this.posZ);
    buf.writeShort(this.xpValue);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:S11PacketSpawnExperienceOrb.java

示例8: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.entityId);
    buf.writeUuid(this.uniqueId);
    buf.writeDouble(this.x);
    buf.writeDouble(this.y);
    buf.writeDouble(this.z);
    buf.writeByte(this.yaw);
    buf.writeByte(this.pitch);
    this.watcher.writeEntries(buf);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:SPacketSpawnPlayer.java

示例9: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.entityId);
    buf.writeUuid(this.playerId);
    buf.writeInt(this.x);
    buf.writeInt(this.y);
    buf.writeInt(this.z);
    buf.writeByte(this.yaw);
    buf.writeByte(this.pitch);
    buf.writeShort(this.currentItem);
    this.watcher.writeTo(buf);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:16,代码来源:S0CPacketSpawnPlayer.java

示例10: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.entityId);
    buf.writeDouble(this.posX);
    buf.writeDouble(this.posY);
    buf.writeDouble(this.posZ);
    buf.writeByte(this.yaw);
    buf.writeByte(this.pitch);
    buf.writeBoolean(this.onGround);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:14,代码来源:SPacketEntityTeleport.java

示例11: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.protocolVersion);
    buf.writeString(this.ip + "\0FML\0");
    buf.writeShort(this.port);
    buf.writeVarIntToBuffer(this.requestedState.getId());
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:11,代码来源:C00Handshake.java

示例12: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.entityID);
    buf.writeString(this.title);
    buf.writeBlockPos(this.position);
    buf.writeByte(this.facing.getHorizontalIndex());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:S10PacketSpawnPainting.java

示例13: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.compressionTreshold);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:S03PacketEnableCompression.java

示例14: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.entityId);
    EntityDataManager.writeEntries(this.dataManagerEntries, buf);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:9,代码来源:SPacketEntityMetadata.java

示例15: writePacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Writes the raw packet data to the data stream.
 */
public void writePacketData(PacketBuffer buf) throws IOException
{
    buf.writeVarIntToBuffer(this.id);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:S00PacketKeepAlive.java


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