本文整理汇总了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);
}
}
}
示例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);
}
}
示例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]);
}
}
示例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()));
}
}
示例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());
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}