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


Java PacketBuffer.readDouble方法代码示例

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


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

示例1: fromBytes

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf byteBuf) {
	PacketBuffer buf = new PacketBuffer(byteBuf);
	particleF = buf.readEnumValue(ParticleF.class);
	x = buf.readDouble();
	y = buf.readDouble();
	z = buf.readDouble();
	amount = buf.readInt();
	xSpeed = buf.readDouble();
	ySpeed = buf.readDouble();
	zSpeed = buf.readDouble();
	int argCount = buf.readInt();
	args = new int[argCount];
	for (int i = 0; i < argCount; i++) {
		args[i] = buf.readInt();
	}
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:18,代码来源:ParticleMessage.java

示例2: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.entityId = buf.readVarIntFromBuffer();
    this.uniqueId = buf.readUuid();
    this.type = buf.readByte();
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.pitch = buf.readByte();
    this.yaw = buf.readByte();
    this.data = buf.readInt();
    this.speedX = buf.readShort();
    this.speedY = buf.readShort();
    this.speedZ = buf.readShort();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:SPacketSpawnObject.java

示例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.entityId = buf.readVarIntFromBuffer();
    int i = buf.readInt();

    for (int j = 0; j < i; ++j)
    {
        String s = buf.readStringFromBuffer(64);
        double d0 = buf.readDouble();
        List<AttributeModifier> list = Lists.<AttributeModifier>newArrayList();
        int k = buf.readVarIntFromBuffer();

        for (int l = 0; l < k; ++l)
        {
            UUID uuid = buf.readUuid();
            list.add(new AttributeModifier(uuid, "Unknown synced attribute modifier", buf.readDouble(), buf.readByte()));
        }

        this.field_149444_b.add(new S20PacketEntityProperties.Snapshot(s, d0, list));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:S20PacketEntityProperties.java

示例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.entityId = buf.readVarIntFromBuffer();
    this.uniqueId = buf.readUuid();
    this.type = buf.readByte() & 255;
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readByte();
    this.pitch = buf.readByte();
    this.headPitch = buf.readByte();
    this.velocityX = buf.readShort();
    this.velocityY = buf.readShort();
    this.velocityZ = buf.readShort();
    this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:20,代码来源:SPacketSpawnMob.java

示例5: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    super.readPacketData(buf);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:C03PacketPlayer.java

示例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.entityId = buf.readVarIntFromBuffer();
    this.uniqueId = buf.readUuid();
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readByte();
    this.pitch = buf.readByte();
    this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:SPacketSpawnPlayer.java

示例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.entityId = buf.readVarIntFromBuffer();
    this.type = buf.readByte();
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:SPacketSpawnGlobalEntity.java

示例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.entityId = buf.readVarIntFromBuffer();
    this.posX = buf.readDouble();
    this.posY = buf.readDouble();
    this.posZ = buf.readDouble();
    this.yaw = buf.readByte();
    this.pitch = buf.readByte();
    this.onGround = buf.readBoolean();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:14,代码来源:SPacketEntityTeleport.java

示例9: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readFloat();
    this.pitch = buf.readFloat();
    this.field_179835_f = S08PacketPlayerPosLook.EnumFlags.func_180053_a(buf.readUnsignedByte());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:S08PacketPlayerPosLook.java

示例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.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readFloat();
    this.pitch = buf.readFloat();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:12,代码来源:SPacketMoveVehicle.java

示例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.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readFloat();
    this.pitch = buf.readFloat();
    super.readPacketData(buf);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:13,代码来源:CPacketPlayer.java

示例12: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.entityID = buf.readVarIntFromBuffer();
    this.posX = buf.readDouble();
    this.posY = buf.readDouble();
    this.posZ = buf.readDouble();
    this.xpValue = buf.readShort();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:SPacketSpawnExperienceOrb.java


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