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


Java ByteBuf.readFloat方法代码示例

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


在下文中一共展示了ByteBuf.readFloat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
    this.table = new float[8];
    for (int i = 0; i < 8; i++) {
        this.table[i] = buf.readFloat();
    }
}
 
开发者ID:ichttt,项目名称:FirstAid,代码行数:8,代码来源:MessageAddHealth.java

示例3: read

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void read( ByteBuf buf ) throws IOException {
    x = buf.readDouble();
    y = buf.readDouble();
    z = buf.readDouble();
    yaw = buf.readFloat();
    pitch = buf.readFloat();
    onGround = buf.readBoolean();
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:10,代码来源:MessageC0EPPlayerPosAndLook.java

示例4: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buffer) {
    super.fromBytes(buffer);
    soundEvent = new SoundEvent(new ResourceLocation(ByteBufUtils.readUTF8String(buffer)));
    category = SoundCategory.values()[buffer.readInt()];
    volume = buffer.readFloat();
    pitch = buffer.readFloat();
    bool = buffer.readBoolean();
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:10,代码来源:PacketPlaySound.java

示例5: readField

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
public static Object readField(ByteBuf buf, int type) {
    switch (type) {
        case 0:
            return buf.readInt();
        case 1:
            return buf.readFloat();
        case 2:
            return buf.readDouble();
        case 3:
            return buf.readBoolean();
        case 4:
            return ByteBufUtils.readUTF8String(buf);
        case 5:
            return buf.readByte();
        case 6:
            return ByteBufUtils.readItemStack(buf);
        case 7:
            if (!buf.readBoolean()) return null;
            return new FluidStack(FluidRegistry.getFluid(ByteBufUtils.readUTF8String(buf)), buf.readInt(), ByteBufUtils.readTag(buf));
        case 8:
            try {
                PacketBuffer packetBuffer = new PacketBuffer(buf);
                NBTTagCompound tag = packetBuffer.readCompoundTag();
                if (tag == null) return EmptyHandler.INSTANCE;
                ItemStackHandler handler = new ItemStackHandler();
                handler.deserializeNBT(tag);
                return handler;
            } catch (IOException e) {
                return EmptyHandler.INSTANCE;
            }
    }
    throw new IllegalArgumentException("Invalid sync type! " + type);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:34,代码来源:PacketUpdateGui.java

示例6: 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

示例7: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
	int dim = buf.readInt();
	BlockPos pos = BlockPos.fromLong(buf.readLong());

	World world = SimpleTubes.proxy.getWorld(dim);
	this.tile = world.getTileEntity(pos);

	this.id = buf.readInt();
	this.stack = ByteBufUtils.readItemStack(buf);
	this.progress = buf.readFloat();
	this.direction = buf.readByte();
	this.color = buf.readInt();
}
 
开发者ID:oMilkyy,项目名称:SimpleTubes,代码行数:15,代码来源:PacketItemAdd.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: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
    pos = ByteBufTools.readVector3d(buf);
    posTo = ByteBufTools.readVector3d(buf);
    speed = buf.readFloat();
    sipType = ByteBufUtils.readUTF8String(buf);
    amount = buf.readInt();
}
 
开发者ID:PearXTeam,项目名称:PurificatiMagicae,代码行数:10,代码来源:CPacketSpawnSipParticle.java

示例10: readSpawnData

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void readSpawnData(ByteBuf additionalData) 
{
	knife = ByteBufUtils.readItemStack(additionalData);
	baseDamage = additionalData.readFloat();
	force = additionalData.readFloat();
}
 
开发者ID:einsteinsci,项目名称:BetterBeginningsReborn,代码行数:8,代码来源:EntityThrownKnife.java

示例11: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
	this.name = ByteBufUtils.readUTF8String(buf);
	this.pos = new BlockPos(buf.readFloat(), buf.readFloat(), buf.readFloat());
}
 
开发者ID:Zundrel,项目名称:Never-Enough-Currency,代码行数:6,代码来源:MessageSyncController.java

示例12: read

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void read( ByteBuf buf ) throws IOException {
    flags = buf.readByte();
    flyingSpeed = buf.readFloat();
    walkingSpeed = buf.readFloat();
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:7,代码来源:MessageC13PlayerAbilities.java

示例13: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
	this.entityId = buf.readInt();
	this.amount = buf.readFloat();
}
 
开发者ID:Zundrel,项目名称:Never-Enough-Currency,代码行数:6,代码来源:MessageSyncAdd.java

示例14: fromBytes

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buffer) {
    super.fromBytes(buffer);
    fieldId = buffer.readInt();
    value = buffer.readFloat();
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:7,代码来源:PacketUpdatePressureModule.java

示例15: fromByteBuffer

import io.netty.buffer.ByteBuf; //导入方法依赖的package包/类
@Override
public Float fromByteBuffer(ByteBuf source) {
    return source.readFloat();
}
 
开发者ID:Gogume1er,项目名称:Past-Client,代码行数:5,代码来源:PastFloatOption.java


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