本文整理汇总了Java中io.netty.buffer.ByteBuf.readBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java ByteBuf.readBoolean方法的具体用法?Java ByteBuf.readBoolean怎么用?Java ByteBuf.readBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.netty.buffer.ByteBuf
的用法示例。
在下文中一共展示了ByteBuf.readBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
x = buf.readInt();
y = buf.readInt();
z = buf.readInt();
int count = buf.readInt();
isGameLive = buf.readBoolean();
for (int i = 0; i < count; i++)
players.add(new UUID(buf.readLong(), buf.readLong()));
if (buf.readBoolean())
lobbyHost = new UUID(buf.readLong(), buf.readLong());
}
示例2: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
this.slotA = buf.readInt();
this.slotB = buf.readInt();
this.combine = buf.readBoolean();
}
示例3: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
this.x = buf.readDouble();
this.y = buf.readDouble();
this.z = buf.readDouble();
this.yaw = buf.readFloat();
this.pitch = buf.readFloat();
this.setX = buf.readBoolean();
this.setY = buf.readBoolean();
this.setZ = buf.readBoolean();
this.setYaw = buf.readBoolean();
this.setPitch = buf.readBoolean();
}
示例4: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
super.fromBytes(buf);
if (buf.readBoolean())
settingStack = new FluidStack(FluidRegistry.getFluid(ByteBufUtils.readUTF8String(buf)), buf.readInt(), ByteBufUtils.readTag(buf));
settingIndex = buf.readInt();
}
示例5: readFrom
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void readFrom(ByteBuf buf)
{
abc_md5 = ByteBufUtils.readUTF8String(buf);
bandName = ByteBufUtils.readUTF8String(buf);
syncPlay = buf.readBoolean();
syncTrack = buf.readBoolean();
}
示例6: read
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void read( ByteBuf buf ) throws IOException {
locale = readString( buf );
viewDistance = buf.readByte();
chatMode = readVarInt( buf );
chatColors = buf.readBoolean();
skinParts = buf.readByte();
mainHand = readVarInt( buf );
}
示例7: read
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void read( ByteBuf buf ) throws IOException {
entityId = readVarInt( buf );
deltaX = buf.readShort();
deltaY = buf.readShort();
deltaZ = buf.readShort();
onGround = buf.readBoolean();
}
示例8: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
this.x=buf.readFloat();
this.y=buf.readFloat();
this.z=buf.readFloat();
this.airborne=buf.readBoolean();
}
示例9: decode
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public DisconnectPacket decode(ByteBuf buf) {
boolean hide = buf.readBoolean();
if (hide) {
return DisconnectPacket.builder().build();
}
return DisconnectPacket.builder()
.reason(readString(buf))
.build();
}
示例10: read
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void read( ByteBuf buf ) throws IOException {
entityId = readVarInt( buf );
deltaX = buf.readShort();
deltaY = buf.readShort();
deltaZ = buf.readShort();
yaw = buf.readFloat();
pitch = buf.readFloat();
onGround = buf.readBoolean();
}
示例11: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
this.position = new Vec3d(buf.readDouble(), buf.readDouble(), buf.readDouble());
this.directionSpeed = new Vec3d(buf.readDouble(), buf.readDouble(), buf.readDouble());
this.scale = buf.readFloat();
this.disableMoving = buf.readBoolean();
}
示例12: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
this.entityID = buf.readInt();
this.hasArmorUpgrade = buf.readBoolean();
this.hasWeaponUpgrade = buf.readBoolean();
this.hasRidingUpgrade = buf.readBoolean();
this.hasPlatingUpgrade = buf.readBoolean();
this.hasCommunicationUpgrade = buf.readBoolean();
}
示例13: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
entityID = buf.readInt();
animationName = ByteBufUtils.readUTF8String(buf);
loopAnim = buf.readBoolean();
transitionTime = buf.readFloat();
}
示例14: decodeInternal
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
private Object decodeInternal(ByteBuf in, int offset, int length) throws IOException {
NetworkProtocol.Type type = TYPES[in.readByte()];
switch (type) {
case HANDSHAKE_REQUEST: {
String protocol = NettyMessage.utf(in);
int threadAffinity = in.readInt();
CodecFactory<Object> codecFactory = allCodecs.get(protocol);
if (codecFactory != null) {
Codec<Object> codec = codecFactory.createCodec();
initCodec(codec);
Object payload = null;
if (in.readBoolean()) {
// Handshake payload is always decoded on NIO thread.
payload = message(in, offset, length).decode();
}
return new HandshakeRequest(protocol, payload, threadAffinity, codec);
}
return new HandshakeRequest(protocol, null, threadAffinity);
}
case HANDSHAKE_ACCEPT: {
int hbInterval = in.readInt();
int hbLossThreshold = in.readInt();
boolean hbDisabled = in.readBoolean();
return new HandshakeAccept(hbInterval, hbLossThreshold, hbDisabled);
}
case HANDSHAKE_REJECT: {
String reason = NettyMessage.utf(in);
return new HandshakeReject(reason);
}
case HEARTBEAT: {
return Heartbeat.INSTANCE;
}
default: {
throw new IllegalStateException("Unexpected message type: " + type);
}
}
}
示例15: fromBytes
import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
shareResult = buf.readBoolean();
length = buf.readInt();
}