本文整理汇总了C#中CWrapped.Wrapped.readByteArray方法的典型用法代码示例。如果您正苦于以下问题:C# Wrapped.readByteArray方法的具体用法?C# Wrapped.readByteArray怎么用?C# Wrapped.readByteArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWrapped.Wrapped
的用法示例。
在下文中一共展示了Wrapped.readByteArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read(Wrapped wSock) {
Channel = wSock.readString();
Length = wSock.readShort();
Data = wSock.readByteArray(Length);
}
示例2: Read
public void Read(Wrapped wSock) {
PlayerUUID = new Guid(wSock.readByteArray(16));
X = wSock.readInt();
Y = wSock.readInt();
Z = wSock.readInt();
Yaw = wSock.readByte();
Pitch = wSock.readByte();
CurrentItem = wSock.readShort();
Metadata = WrappedExtension.ReadEntityMetadata(wSock);
}
示例3: ReadSlot
public static SlotData ReadSlot(Wrapped wSock) {
var data = new SlotData {Id = wSock.readShort()};
if (data.Id == -1) {
data.Id = 0;
data.ItemCount = 0;
data.ItemDamage = 0;
return data;
}
data.ItemCount = wSock.readByte();
data.ItemDamage = wSock.readShort();
var nbtLength = wSock.readShort();
if (nbtLength == -1)
return data;
data.NbtData = wSock.readByteArray(nbtLength);
return data;
}
示例4: ReadModifierData
public static ModifierData ReadModifierData(Wrapped wSock) {
var Data = new ModifierData();
Data.UUID = wSock.readByteArray(16); // -- Because fuck Minecraft.
Data.Amount = wSock.readDouble();
Data.Operation = wSock.readByte();
return Data;
}
示例5: ReadSlot
public static SlotData ReadSlot(Wrapped wSock) {
var Data = new SlotData();
Data.ID = wSock.readShort();
if (Data.ID == -1) {
Data.ID = 0;
Data.ItemCount = 0;
Data.ItemDamage = 0;
return Data;
}
Data.ItemCount = wSock.readByte();
Data.ItemDamage = wSock.readShort();
var NBTLength = wSock.readShort();
if (NBTLength == -1)
return Data;
Data.NbtData = wSock.readByteArray(NBTLength);
return Data;
}
示例6: ReadModifierData
public static ModifierData ReadModifierData(Wrapped wSock) {
var data = new ModifierData
{
Uuid = new Guid(wSock.readByteArray(16)),
Amount = wSock.readDouble(),
Operation = wSock.readByte()
};
return data;
}