本文整理汇总了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);
}
}
示例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);
}
示例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();
}
示例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));
}
}
}
示例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();
}
}
示例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();
}
示例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));
}
}
示例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();
}
示例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;
}
示例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);
}
示例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));
}
示例12: read
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public String read(PacketBuffer buf) throws IOException
{
return buf.readStringFromBuffer(32767);
}
示例13: read
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public String read(PacketBuffer buf)
{
return buf.readStringFromBuffer(32767);
}