本文整理汇总了Java中net.minecraft.network.PacketBuffer.writeDouble方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.writeDouble方法的具体用法?Java PacketBuffer.writeDouble怎么用?Java PacketBuffer.writeDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.writeDouble方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf byteBuf) {
PacketBuffer buf = new PacketBuffer(byteBuf);
buf.writeEnumValue(particleF);
buf.writeDouble(x);
buf.writeDouble(y);
buf.writeDouble(z);
buf.writeInt(amount);
buf.writeDouble(xSpeed);
buf.writeDouble(ySpeed);
buf.writeDouble(zSpeed);
buf.writeInt(args.length);
for (int arg : args) {
buf.writeInt(arg);
}
}
示例2: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.entityId);
buf.writeUuid(this.uniqueId);
buf.writeByte(this.type & 255);
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeByte(this.yaw);
buf.writeByte(this.pitch);
buf.writeByte(this.headPitch);
buf.writeShort(this.velocityX);
buf.writeShort(this.velocityY);
buf.writeShort(this.velocityZ);
this.dataManager.writeEntries(buf);
}
示例3: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.entityId);
buf.writeInt(this.snapshots.size());
for (SPacketEntityProperties.Snapshot spacketentityproperties$snapshot : this.snapshots)
{
buf.writeString(spacketentityproperties$snapshot.getName());
buf.writeDouble(spacketentityproperties$snapshot.getBaseValue());
buf.writeVarIntToBuffer(spacketentityproperties$snapshot.getModifiers().size());
for (AttributeModifier attributemodifier : spacketentityproperties$snapshot.getModifiers())
{
buf.writeUuid(attributemodifier.getID());
buf.writeDouble(attributemodifier.getAmount());
buf.writeByte(attributemodifier.getOperation());
}
}
}
示例4: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.entityId);
buf.writeInt(this.field_149444_b.size());
for (S20PacketEntityProperties.Snapshot s20packetentityproperties$snapshot : this.field_149444_b)
{
buf.writeString(s20packetentityproperties$snapshot.func_151409_a());
buf.writeDouble(s20packetentityproperties$snapshot.func_151410_b());
buf.writeVarIntToBuffer(s20packetentityproperties$snapshot.func_151408_c().size());
for (AttributeModifier attributemodifier : s20packetentityproperties$snapshot.func_151408_c())
{
buf.writeUuid(attributemodifier.getID());
buf.writeDouble(attributemodifier.getAmount());
buf.writeByte(attributemodifier.getOperation());
}
}
}
示例5: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.entityId);
buf.writeUuid(this.uniqueId);
buf.writeByte(this.type);
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeByte(this.pitch);
buf.writeByte(this.yaw);
buf.writeInt(this.data);
buf.writeShort(this.speedX);
buf.writeShort(this.speedY);
buf.writeShort(this.speedZ);
}
示例6: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.entityId);
buf.writeUuid(this.uniqueId);
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeByte(this.yaw);
buf.writeByte(this.pitch);
this.watcher.writeEntries(buf);
}
示例7: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeFloat(this.yaw);
buf.writeFloat(this.pitch);
super.writePacketData(buf);
}
示例8: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeFloat(this.yaw);
buf.writeFloat(this.pitch);
super.writePacketData(buf);
}
示例9: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeEnumValue(this.action);
switch (this.action)
{
case SET_SIZE:
buf.writeDouble(this.targetSize);
break;
case LERP_SIZE:
buf.writeDouble(this.diameter);
buf.writeDouble(this.targetSize);
buf.writeVarLong(this.timeUntilTarget);
break;
case SET_CENTER:
buf.writeDouble(this.centerX);
buf.writeDouble(this.centerZ);
break;
case SET_WARNING_BLOCKS:
buf.writeVarIntToBuffer(this.warningDistance);
break;
case SET_WARNING_TIME:
buf.writeVarIntToBuffer(this.warningTime);
break;
case INITIALIZE:
buf.writeDouble(this.centerX);
buf.writeDouble(this.centerZ);
buf.writeDouble(this.diameter);
buf.writeDouble(this.targetSize);
buf.writeVarLong(this.timeUntilTarget);
buf.writeVarIntToBuffer(this.size);
buf.writeVarIntToBuffer(this.warningDistance);
buf.writeVarIntToBuffer(this.warningTime);
}
}
示例10: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeFloat(this.yaw);
buf.writeFloat(this.pitch);
}
示例11: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeFloat(this.yaw);
buf.writeFloat(this.pitch);
buf.writeByte(SPacketPlayerPosLook.EnumFlags.pack(this.flags));
buf.writeVarIntToBuffer(this.teleportId);
}
示例12: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
buf.writeFloat(this.yaw);
buf.writeFloat(this.pitch);
buf.writeByte(S08PacketPlayerPosLook.EnumFlags.func_180056_a(this.field_179835_f));
}
示例13: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeDouble(this.x);
buf.writeDouble(this.y);
buf.writeDouble(this.z);
super.writePacketData(buf);
}
示例14: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeEnumValue(this.action);
switch (this.action)
{
case SET_SIZE:
buf.writeDouble(this.targetSize);
break;
case LERP_SIZE:
buf.writeDouble(this.diameter);
buf.writeDouble(this.targetSize);
buf.writeVarLong(this.timeUntilTarget);
break;
case SET_CENTER:
buf.writeDouble(this.centerX);
buf.writeDouble(this.centerZ);
break;
case SET_WARNING_BLOCKS:
buf.writeVarIntToBuffer(this.warningDistance);
break;
case SET_WARNING_TIME:
buf.writeVarIntToBuffer(this.warningTime);
break;
case INITIALIZE:
buf.writeDouble(this.centerX);
buf.writeDouble(this.centerZ);
buf.writeDouble(this.diameter);
buf.writeDouble(this.targetSize);
buf.writeVarLong(this.timeUntilTarget);
buf.writeVarIntToBuffer(this.size);
buf.writeVarIntToBuffer(this.warningDistance);
buf.writeVarIntToBuffer(this.warningTime);
}
}