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


Java ByteBuf.readBoolean方法代码示例

本文整理汇总了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());
}
 
开发者ID:TominoCZ,项目名称:PAYDAY,代码行数:17,代码来源:PacketSyncTileEntityClient.java

示例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();
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:8,代码来源:InventoryCommandsImplementation.java

示例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();
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:16,代码来源:AbsoluteMovementCommandsImplementation.java

示例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();
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:8,代码来源:PacketSetLogisticsFluidFilterStack.java

示例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();
}
 
开发者ID:iChun,项目名称:Clef,代码行数:9,代码来源:PacketPlayABC.java

示例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 );
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:10,代码来源:MessageC04ClientSettings.java

示例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();
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:9,代码来源:MessageS26EntityRelMove.java

示例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();
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:8,代码来源:TF2Message.java

示例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();
}
 
开发者ID:JungleTree,项目名称:JungleTree,代码行数:12,代码来源:DisconnectPacketCodec.java

示例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();
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:11,代码来源:MessageS27EntityRelMoveLook.java

示例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();

}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:9,代码来源:MessagePacketSpawnBloodParticle.java

示例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();
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:11,代码来源:TurretStateMessage.java

示例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();
}
 
开发者ID:ObsidianSuite,项目名称:ObsidianSuite,代码行数:8,代码来源:MessageAnimationStart.java

示例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);
        }
    }
}
 
开发者ID:hekate-io,项目名称:hekate,代码行数:48,代码来源:NetworkProtocolCodec.java

示例15: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
    shareResult = buf.readBoolean();
    length = buf.readInt();
}
 
开发者ID:TerminatorNL,项目名称:LagGoggles,代码行数:6,代码来源:RequestScan.java


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