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


Java PacketBuffer.writeByteArray方法代码示例

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


在下文中一共展示了PacketBuffer.writeByteArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.writeVarIntToBuffer(this.mapId);
    buf.writeByte(this.mapScale);
    buf.writeVarIntToBuffer(this.mapVisiblePlayersVec4b.length);

    for (Vec4b vec4b : this.mapVisiblePlayersVec4b)
    {
        buf.writeByte((vec4b.func_176110_a() & 15) << 4 | vec4b.func_176111_d() & 15);
        buf.writeByte(vec4b.func_176112_b());
        buf.writeByte(vec4b.func_176113_c());
    }

    buf.writeByte(this.mapMaxX);

    if (this.mapMaxX > 0)
    {
        buf.writeByte(this.mapMaxY);
        buf.writeByte(this.mapMinX);
        buf.writeByte(this.mapMinY);
        buf.writeByteArray(this.mapDataBytes);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:27,代码来源:S34PacketMaps.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.writeVarIntToBuffer(this.mapId);
    buf.writeByte(this.mapScale);
    buf.writeBoolean(this.trackingPosition);
    buf.writeVarIntToBuffer(this.icons.length);

    for (Vec4b vec4b : this.icons)
    {
        buf.writeByte((vec4b.getType() & 15) << 4 | vec4b.getRotation() & 15);
        buf.writeByte(vec4b.getX());
        buf.writeByte(vec4b.getY());
    }

    buf.writeByte(this.columns);

    if (this.columns > 0)
    {
        buf.writeByte(this.rows);
        buf.writeByte(this.minX);
        buf.writeByte(this.minZ);
        buf.writeByteArray(this.mapDataBytes);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:28,代码来源:SPacketMaps.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.writeVarIntToBuffer(this.mapId);
    buf.writeByte(this.mapScale);
    buf.writeBoolean(this.trackingPosition);
    buf.writeVarIntToBuffer(this.icons.length);

    for (MapDecoration mapdecoration : this.icons)
    {
        buf.writeByte((mapdecoration.getType() & 15) << 4 | mapdecoration.getRotation() & 15);
        buf.writeByte(mapdecoration.getX());
        buf.writeByte(mapdecoration.getY());
    }

    buf.writeByte(this.columns);

    if (this.columns > 0)
    {
        buf.writeByte(this.rows);
        buf.writeByte(this.minX);
        buf.writeByte(this.minZ);
        buf.writeByteArray(this.mapDataBytes);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:28,代码来源:SPacketMaps.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.writeString(this.hashedServerId);
    buf.writeByteArray(this.publicKey.getEncoded());
    buf.writeByteArray(this.verifyToken);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:S01PacketEncryptionRequest.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.writeInt(this.chunkX);
    buf.writeInt(this.chunkZ);
    buf.writeBoolean(this.field_149279_g);
    buf.writeShort((short)(this.extractedData.dataSize & 65535));
    buf.writeByteArray(this.extractedData.data);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:S21PacketChunkData.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.writeByteArray(this.secretKeyEncrypted);
    buf.writeByteArray(this.verifyTokenEncrypted);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:C01PacketEncryptionResponse.java


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