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


Java PacketBuffer.writeBlockPos方法代码示例

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


在下文中一共展示了PacketBuffer.writeBlockPos方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.writeBlockPos(this.blockPos);

    for (int i = 0; i < 4; ++i)
    {
        buf.writeChatComponent(this.lines[i]);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:S33PacketUpdateSign.java

示例2: writeTo

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void writeTo(ByteBuf buf)
{
    PacketBuffer buffer = new PacketBuffer(buf);
    buffer.writeBlockPos(wirelessPos);
    buffer.writeBlockPos(masterPos);
}
 
开发者ID:iChun,项目名称:GeneralLaymansAestheticSpyingScreen,代码行数:8,代码来源:PacketSetProjector.java

示例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.writeBlockPos(this.blockPosition);
    buf.writeByte(this.instrument);
    buf.writeByte(this.pitch);
    buf.writeVarIntToBuffer(Block.getIdFromBlock(this.block) & 4095);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:S24PacketBlockAction.java

示例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.breakerId);
    buf.writeBlockPos(this.position);
    buf.writeByte(this.progress);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:SPacketBlockBreakAnim.java

示例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.writeBlockPos(this.position);
    buf.writeByte(this.placedBlockDirection);
    buf.writeItemStackToBuffer(this.stack);
    buf.writeByte((int)(this.facingX * 16.0F));
    buf.writeByte((int)(this.facingY * 16.0F));
    buf.writeByte((int)(this.facingZ * 16.0F));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:C08PacketPlayerBlockPlacement.java

示例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.writeEnumValue(this.status);
    buf.writeBlockPos(this.position);
    buf.writeByte(this.facing.getIndex());
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:10,代码来源:C07PacketPlayerDigging.java

示例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.writeBlockPos(this.blockPos);
    buf.writeByte((byte)this.metadata);
    buf.writeNBTTagCompoundToBuffer(this.nbt);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:10,代码来源:SPacketUpdateTileEntity.java

示例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.writeBlockPos(this.pos);

    for (int i = 0; i < 4; ++i)
    {
        IChatComponent ichatcomponent = this.lines[i];
        String s = IChatComponent.Serializer.componentToJson(ichatcomponent);
        buf.writeString(s);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:15,代码来源:C12PacketUpdateSign.java

示例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.writeInt(this.soundType);
    buf.writeBlockPos(this.soundPos);
    buf.writeInt(this.soundData);
    buf.writeBoolean(this.serverWide);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:SPacketEffect.java

示例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.writeVarIntToBuffer(this.playerID);
    buf.writeBlockPos(this.bedPos);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:S0APacketUseBed.java

示例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.writeBlockPos(this.blockPosition);
    buf.writeVarIntToBuffer(Block.BLOCK_STATE_IDS.get(this.blockState));
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:9,代码来源:S23PacketBlockChange.java


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