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


Java PacketBuffer.readBlockPos方法代码示例

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


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

示例1: readFrom

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void readFrom(ByteBuf buf)
{
    PacketBuffer pb = new PacketBuffer(buf);
    abc_md5s = new ArrayList<>();
    int size = buf.readInt();
    for(int i = 0; i < size; i++)
    {
        abc_md5s.add(ByteBufUtils.readUTF8String(buf));
    }
    bandName = ByteBufUtils.readUTF8String(buf);
    syncPlay = buf.readBoolean();
    syncTrack = buf.readBoolean();
    repeat = buf.readInt();
    shuffle = buf.readBoolean();
    pos = pb.readBlockPos();
}
 
开发者ID:iChun,项目名称:Clef,代码行数:18,代码来源:PacketInstrumentPlayerInfo.java

示例2: readFrom

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

示例3: readFrom

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void readFrom(ByteBuf buf)
{
    PacketBuffer buffer = new PacketBuffer(buf);
    pos = buffer.readBlockPos();
    channel = new ArrayList<>();
    int count = buffer.readInt();
    for(int i = 0; i < count; i++)
    {
        channel.add(buffer.readBlockPos());
    }
}
 
开发者ID:iChun,项目名称:GeneralLaymansAestheticSpyingScreen,代码行数:13,代码来源:PacketWirelessOrder.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.soundType = buf.readInt();
    this.soundPos = buf.readBlockPos();
    this.soundData = buf.readInt();
    this.serverWide = buf.readBoolean();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:11,代码来源:S28PacketEffect.java

示例5: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.position = buf.readBlockPos();
    this.placedBlockDirection = buf.readUnsignedByte();
    this.stack = buf.readItemStackFromBuffer();
    this.facingX = (float)buf.readUnsignedByte() / 16.0F;
    this.facingY = (float)buf.readUnsignedByte() / 16.0F;
    this.facingZ = (float)buf.readUnsignedByte() / 16.0F;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:C08PacketPlayerBlockPlacement.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.blockPos = buf.readBlockPos();
    this.lines = new IChatComponent[4];

    for (int i = 0; i < 4; ++i)
    {
        this.lines[i] = buf.readChatComponent();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:14,代码来源:S33PacketUpdateSign.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.blockPosition = buf.readBlockPos();
    this.instrument = buf.readUnsignedByte();
    this.pitch = buf.readUnsignedByte();
    this.block = Block.getBlockById(buf.readVarIntFromBuffer() & 4095);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:11,代码来源:SPacketBlockAction.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.blockPos = buf.readBlockPos();
    this.metadata = buf.readUnsignedByte();
    this.nbt = buf.readNBTTagCompoundFromBuffer();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:SPacketUpdateTileEntity.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.message = buf.readStringFromBuffer(32767);
    boolean flag = buf.readBoolean();

    if (flag)
    {
        this.targetBlock = buf.readBlockPos();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:14,代码来源:C14PacketTabComplete.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.playerID = buf.readVarIntFromBuffer();
    this.bedPos = buf.readBlockPos();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:SPacketUseBed.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.blockPosition = buf.readBlockPos();
    this.blockState = (IBlockState)Block.BLOCK_STATE_IDS.getByValue(buf.readVarIntFromBuffer());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:S23PacketBlockChange.java

示例12: read

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public BlockPos read(PacketBuffer buf)
{
    return buf.readBlockPos();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:DataSerializers.java

示例13: readPacketData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.spawnBlockPos = buf.readBlockPos();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:S05PacketSpawnPosition.java


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