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


Java PacketBuffer.readStringFromBuffer方法代码示例

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


在下文中一共展示了PacketBuffer.readStringFromBuffer方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.matches = new String[buf.readVarIntFromBuffer()];

    for (int i = 0; i < this.matches.length; ++i)
    {
        this.matches[i] = buf.readStringFromBuffer(32767);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:13,代码来源:S3APacketTabComplete.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
{
    String s = buf.readStringFromBuffer(36);
    String s1 = buf.readStringFromBuffer(16);
    UUID uuid = UUID.fromString(s);
    this.profile = new GameProfile(uuid, s1);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:S02PacketLoginSuccess.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.hashedServerId = buf.readStringFromBuffer(20);
    this.publicKey = CryptManager.decodePublicKey(buf.readByteArray());
    this.verifyToken = buf.readByteArray();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:S01PacketEncryptionRequest.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.name = buf.readStringFromBuffer(16);
    this.action = buf.readByte();

    if (this.action == 0 || this.action == 2)
    {
        this.displayName = buf.readStringFromBuffer(32);
        this.prefix = buf.readStringFromBuffer(16);
        this.suffix = buf.readStringFromBuffer(16);
        this.friendlyFlags = buf.readByte();
        this.nameTagVisibility = buf.readStringFromBuffer(32);
        this.collisionRule = buf.readStringFromBuffer(32);
        this.color = buf.readByte();
    }

    if (this.action == 0 || this.action == 3 || this.action == 4)
    {
        int i = buf.readVarIntFromBuffer();

        for (int j = 0; j < i; ++j)
        {
            this.players.add(buf.readStringFromBuffer(40));
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:30,代码来源:SPacketTeams.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.windowId = buf.readUnsignedByte();
    this.inventoryType = buf.readStringFromBuffer(32);
    this.windowTitle = buf.readTextComponent();
    this.slotCount = buf.readUnsignedByte();

    if (this.inventoryType.equals("EntityHorse"))
    {
        this.entityId = buf.readInt();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:SPacketOpenWindow.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.lang = buf.readStringFromBuffer(7);
    this.view = buf.readByte();
    this.chatVisibility = EntityPlayer.EnumChatVisibility.getEnumChatVisibility(buf.readByte());
    this.enableColors = buf.readBoolean();
    this.modelPartFlags = buf.readUnsignedByte();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:C15PacketClientSettings.java

示例7: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.objectiveName = buf.readStringFromBuffer(16);
    this.field_149342_c = buf.readByte();

    if (this.field_149342_c == 0 || this.field_149342_c == 2)
    {
        this.objectiveValue = buf.readStringFromBuffer(32);
        this.type = IScoreObjectiveCriteria.EnumRenderType.func_178795_a(buf.readStringFromBuffer(16));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:15,代码来源:S3BPacketScoreboardObjective.java

示例8: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.soundName = buf.readStringFromBuffer(256);
    this.posX = buf.readInt();
    this.posY = buf.readInt();
    this.posZ = buf.readInt();
    this.soundVolume = buf.readFloat();
    this.soundPitch = buf.readUnsignedByte();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:13,代码来源:S29PacketSoundEffect.java

示例9: readWatchedListFromPacketBuffer

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public static List<DataWatcher.WatchableObject> readWatchedListFromPacketBuffer(PacketBuffer buffer) throws IOException
{
    List<DataWatcher.WatchableObject> list = null;

    for (int i = buffer.readByte(); i != 127; i = buffer.readByte())
    {
        if (list == null)
        {
            list = Lists.<DataWatcher.WatchableObject>newArrayList();
        }

        int j = (i & 224) >> 5;
        int k = i & 31;
        DataWatcher.WatchableObject datawatcher$watchableobject = null;

        switch (j)
        {
            case 0:
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, Byte.valueOf(buffer.readByte()));
                break;

            case 1:
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, Short.valueOf(buffer.readShort()));
                break;

            case 2:
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, Integer.valueOf(buffer.readInt()));
                break;

            case 3:
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, Float.valueOf(buffer.readFloat()));
                break;

            case 4:
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, buffer.readStringFromBuffer(32767));
                break;

            case 5:
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, buffer.readItemStackFromBuffer());
                break;

            case 6:
                int l = buffer.readInt();
                int i1 = buffer.readInt();
                int j1 = buffer.readInt();
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, new BlockPos(l, i1, j1));
                break;

            case 7:
                float f = buffer.readFloat();
                float f1 = buffer.readFloat();
                float f2 = buffer.readFloat();
                datawatcher$watchableobject = new DataWatcher.WatchableObject(j, k, new Rotations(f, f1, f2));
        }

        list.add(datawatcher$watchableobject);
    }

    return list;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:61,代码来源:DataWatcher.java

示例10: readPacketData

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

示例11: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.profile = new GameProfile((UUID)null, buf.readStringFromBuffer(16));
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:C00PacketLoginStart.java

示例12: read

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public String read(PacketBuffer buf) throws IOException
{
    return buf.readStringFromBuffer(32767);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:DataSerializers.java

示例13: read

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public String read(PacketBuffer buf)
{
    return buf.readStringFromBuffer(32767);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:DataSerializers.java


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