本文整理汇总了Java中net.minecraft.network.PacketBuffer.writeUuid方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.writeUuid方法的具体用法?Java PacketBuffer.writeUuid怎么用?Java PacketBuffer.writeUuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.writeUuid方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例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.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());
}
}
}
示例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.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());
}
}
}
示例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.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);
}
示例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.writeVarIntToBuffer(this.type);
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);
}
示例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.playerId);
buf.writeInt(this.x);
buf.writeInt(this.y);
buf.writeInt(this.z);
buf.writeByte(this.yaw);
buf.writeByte(this.pitch);
buf.writeShort(this.currentItem);
this.watcher.writeTo(buf);
}
示例7: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeUuid(this.uniqueId);
buf.writeEnumValue(this.operation);
switch (this.operation)
{
case ADD:
buf.writeTextComponent(this.name);
buf.writeFloat(this.percent);
buf.writeEnumValue(this.color);
buf.writeEnumValue(this.overlay);
buf.writeByte(this.getFlags());
case REMOVE:
default:
break;
case UPDATE_PCT:
buf.writeFloat(this.percent);
break;
case UPDATE_NAME:
buf.writeTextComponent(this.name);
break;
case UPDATE_STYLE:
buf.writeEnumValue(this.color);
buf.writeEnumValue(this.overlay);
break;
case UPDATE_PROPERTIES:
buf.writeByte(this.getFlags());
}
}
示例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.writeVarIntToBuffer(this.entityID);
buf.writeUuid(this.uniqueId);
buf.writeString(this.title);
buf.writeBlockPos(this.position);
buf.writeByte(this.facing.getHorizontalIndex());
}
示例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.writeUuid(this.uniqueId);
buf.writeEnumValue(this.operation);
switch (this.operation)
{
case ADD:
buf.writeTextComponent(this.name);
buf.writeFloat(this.percent);
buf.writeEnumValue(this.color);
buf.writeEnumValue(this.overlay);
buf.writeByte(this.getFlags());
case REMOVE:
default:
break;
case UPDATE_PCT:
buf.writeFloat(this.percent);
break;
case UPDATE_NAME:
buf.writeTextComponent(this.name);
break;
case UPDATE_STYLE:
buf.writeEnumValue(this.color);
buf.writeEnumValue(this.overlay);
break;
case UPDATE_PROPERTIES:
buf.writeByte(this.getFlags());
}
}
示例10: write
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public void write(PacketBuffer buf, Optional<UUID> value)
{
buf.writeBoolean(value.isPresent());
if (value.isPresent())
{
buf.writeUuid((UUID)value.get());
}
}
示例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.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);
}
示例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.writeUuid(this.id);
}
示例13: 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);
buf.writeVarIntToBuffer(this.players.size());
for (S38PacketPlayerListItem.AddPlayerData s38packetplayerlistitem$addplayerdata : this.players)
{
switch (this.action)
{
case ADD_PLAYER:
buf.writeUuid(s38packetplayerlistitem$addplayerdata.getProfile().getId());
buf.writeString(s38packetplayerlistitem$addplayerdata.getProfile().getName());
buf.writeVarIntToBuffer(s38packetplayerlistitem$addplayerdata.getProfile().getProperties().size());
for (Property property : s38packetplayerlistitem$addplayerdata.getProfile().getProperties().values())
{
buf.writeString(property.getName());
buf.writeString(property.getValue());
if (property.hasSignature())
{
buf.writeBoolean(true);
buf.writeString(property.getSignature());
}
else
{
buf.writeBoolean(false);
}
}
buf.writeVarIntToBuffer(s38packetplayerlistitem$addplayerdata.getGameMode().getID());
buf.writeVarIntToBuffer(s38packetplayerlistitem$addplayerdata.getPing());
if (s38packetplayerlistitem$addplayerdata.getDisplayName() == null)
{
buf.writeBoolean(false);
}
else
{
buf.writeBoolean(true);
buf.writeChatComponent(s38packetplayerlistitem$addplayerdata.getDisplayName());
}
break;
case UPDATE_GAME_MODE:
buf.writeUuid(s38packetplayerlistitem$addplayerdata.getProfile().getId());
buf.writeVarIntToBuffer(s38packetplayerlistitem$addplayerdata.getGameMode().getID());
break;
case UPDATE_LATENCY:
buf.writeUuid(s38packetplayerlistitem$addplayerdata.getProfile().getId());
buf.writeVarIntToBuffer(s38packetplayerlistitem$addplayerdata.getPing());
break;
case UPDATE_DISPLAY_NAME:
buf.writeUuid(s38packetplayerlistitem$addplayerdata.getProfile().getId());
if (s38packetplayerlistitem$addplayerdata.getDisplayName() == null)
{
buf.writeBoolean(false);
}
else
{
buf.writeBoolean(true);
buf.writeChatComponent(s38packetplayerlistitem$addplayerdata.getDisplayName());
}
break;
case REMOVE_PLAYER:
buf.writeUuid(s38packetplayerlistitem$addplayerdata.getProfile().getId());
}
}
}
示例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);
buf.writeVarIntToBuffer(this.players.size());
for (SPacketPlayerListItem.AddPlayerData spacketplayerlistitem$addplayerdata : this.players)
{
switch (this.action)
{
case ADD_PLAYER:
buf.writeUuid(spacketplayerlistitem$addplayerdata.getProfile().getId());
buf.writeString(spacketplayerlistitem$addplayerdata.getProfile().getName());
buf.writeVarIntToBuffer(spacketplayerlistitem$addplayerdata.getProfile().getProperties().size());
for (Property property : spacketplayerlistitem$addplayerdata.getProfile().getProperties().values())
{
buf.writeString(property.getName());
buf.writeString(property.getValue());
if (property.hasSignature())
{
buf.writeBoolean(true);
buf.writeString(property.getSignature());
}
else
{
buf.writeBoolean(false);
}
}
buf.writeVarIntToBuffer(spacketplayerlistitem$addplayerdata.getGameMode().getID());
buf.writeVarIntToBuffer(spacketplayerlistitem$addplayerdata.getPing());
if (spacketplayerlistitem$addplayerdata.getDisplayName() == null)
{
buf.writeBoolean(false);
}
else
{
buf.writeBoolean(true);
buf.writeTextComponent(spacketplayerlistitem$addplayerdata.getDisplayName());
}
break;
case UPDATE_GAME_MODE:
buf.writeUuid(spacketplayerlistitem$addplayerdata.getProfile().getId());
buf.writeVarIntToBuffer(spacketplayerlistitem$addplayerdata.getGameMode().getID());
break;
case UPDATE_LATENCY:
buf.writeUuid(spacketplayerlistitem$addplayerdata.getProfile().getId());
buf.writeVarIntToBuffer(spacketplayerlistitem$addplayerdata.getPing());
break;
case UPDATE_DISPLAY_NAME:
buf.writeUuid(spacketplayerlistitem$addplayerdata.getProfile().getId());
if (spacketplayerlistitem$addplayerdata.getDisplayName() == null)
{
buf.writeBoolean(false);
}
else
{
buf.writeBoolean(true);
buf.writeTextComponent(spacketplayerlistitem$addplayerdata.getDisplayName());
}
break;
case REMOVE_PLAYER:
buf.writeUuid(spacketplayerlistitem$addplayerdata.getProfile().getId());
}
}
}