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


Java PacketBuffer.readByteArray方法代码示例

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


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

示例1: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.mapId = buf.readVarIntFromBuffer();
    this.mapScale = buf.readByte();
    this.mapVisiblePlayersVec4b = new Vec4b[buf.readVarIntFromBuffer()];

    for (int i = 0; i < this.mapVisiblePlayersVec4b.length; ++i)
    {
        short short1 = (short)buf.readByte();
        this.mapVisiblePlayersVec4b[i] = new Vec4b((byte)(short1 >> 4 & 15), buf.readByte(), buf.readByte(), (byte)(short1 & 15));
    }

    this.mapMaxX = buf.readUnsignedByte();

    if (this.mapMaxX > 0)
    {
        this.mapMaxY = buf.readUnsignedByte();
        this.mapMinX = buf.readUnsignedByte();
        this.mapMinY = buf.readUnsignedByte();
        this.mapDataBytes = buf.readByteArray();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:26,代码来源:S34PacketMaps.java

示例2: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.mapId = buf.readVarIntFromBuffer();
    this.mapScale = buf.readByte();
    this.trackingPosition = buf.readBoolean();
    this.icons = new Vec4b[buf.readVarIntFromBuffer()];

    for (int i = 0; i < this.icons.length; ++i)
    {
        short short1 = (short)buf.readByte();
        this.icons[i] = new Vec4b((byte)(short1 >> 4 & 15), buf.readByte(), buf.readByte(), (byte)(short1 & 15));
    }

    this.columns = buf.readUnsignedByte();

    if (this.columns > 0)
    {
        this.rows = buf.readUnsignedByte();
        this.minX = buf.readUnsignedByte();
        this.minZ = buf.readUnsignedByte();
        this.mapDataBytes = buf.readByteArray();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:27,代码来源:SPacketMaps.java

示例3: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.mapId = buf.readVarIntFromBuffer();
    this.mapScale = buf.readByte();
    this.trackingPosition = buf.readBoolean();
    this.icons = new MapDecoration[buf.readVarIntFromBuffer()];

    for (int i = 0; i < this.icons.length; ++i)
    {
        short short1 = (short)buf.readByte();
        this.icons[i] = new MapDecoration(MapDecoration.Type.func_191159_a((byte)(short1 >> 4 & 15)), buf.readByte(), buf.readByte(), (byte)(short1 & 15));
    }

    this.columns = buf.readUnsignedByte();

    if (this.columns > 0)
    {
        this.rows = buf.readUnsignedByte();
        this.minX = buf.readUnsignedByte();
        this.minZ = buf.readUnsignedByte();
        this.mapDataBytes = buf.readByteArray();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:27,代码来源:SPacketMaps.java

示例4: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.hashedServerId = buf.readStringFromBuffer(20);
    this.publicKey = CryptManager.decodePublicKey(buf.readByteArray());
    this.verifyToken = buf.readByteArray();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:S01PacketEncryptionRequest.java

示例5: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.chunkX = buf.readInt();
    this.chunkZ = buf.readInt();
    this.field_149279_g = buf.readBoolean();
    this.extractedData = new S21PacketChunkData.Extracted();
    this.extractedData.dataSize = buf.readShort();
    this.extractedData.data = buf.readByteArray();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:S21PacketChunkData.java

示例6: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.secretKeyEncrypted = buf.readByteArray();
    this.verifyTokenEncrypted = buf.readByteArray();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:C01PacketEncryptionResponse.java


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