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


Java PacketBuffer.readUnsignedByte方法代码示例

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


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

示例1: 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.readInt();
    int i = buf.readUnsignedByte();
    this.hardcoreMode = (i & 8) == 8;
    i = i & -9;
    this.gameType = WorldSettings.GameType.getByID(i);
    this.dimension = buf.readByte();
    this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
    this.maxPlayers = buf.readUnsignedByte();
    this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));

    if (this.worldType == null)
    {
        this.worldType = WorldType.DEFAULT;
    }

    this.reducedDebugInfo = buf.readBoolean();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:23,代码来源:S01PacketJoinGame.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.lang = buf.readStringFromBuffer(7);
    this.view = buf.readByte();
    this.chatVisibility = EntityPlayer.EnumChatVisibility.getEnumChatVisibility(buf.readByte());
    this.enableColors = buf.readBoolean();
    this.modelPartFlags = buf.readUnsignedByte();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:C15PacketClientSettings.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.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:SkidJava,项目名称:BaseClient,代码行数:13,代码来源:C08PacketPlayerBlockPlacement.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.windowId = buf.readUnsignedByte();
    this.inventoryType = buf.readStringFromBuffer(32);
    this.windowTitle = buf.readTextComponent();
    this.slotCount = buf.readUnsignedByte();

    if (this.inventoryType.equals("EntityHorse"))
    {
        this.entityId = buf.readInt();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:16,代码来源:SPacketOpenWindow.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.blockPos = buf.readBlockPos();
    this.metadata = buf.readUnsignedByte();
    this.nbt = buf.readNBTTagCompoundFromBuffer();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:10,代码来源:S35PacketUpdateTileEntity.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.windowId = buf.readUnsignedByte();
    int i = buf.readShort();
    this.itemStacks = new ItemStack[i];

    for (int j = 0; j < i; ++j)
    {
        this.itemStacks[j] = buf.readItemStackFromBuffer();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:15,代码来源:S30PacketWindowItems.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:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:S24PacketBlockAction.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.breakerId = buf.readVarIntFromBuffer();
    this.position = buf.readBlockPos();
    this.progress = buf.readUnsignedByte();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:S25PacketBlockBreakAnim.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.windowId = buf.readUnsignedByte();
    this.actionNumber = buf.readShort();
    this.field_148893_c = buf.readBoolean();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:S32PacketConfirmTransaction.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.windowId = buf.readUnsignedByte();
    this.property = buf.readShort();
    this.value = buf.readShort();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:SPacketWindowProperty.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.windowId = buf.readUnsignedByte();
    this.inventoryType = buf.readStringFromBuffer(32);
    this.windowTitle = buf.readChatComponent();
    this.slotCount = buf.readUnsignedByte();

    if (this.inventoryType.equals("EntityHorse"))
    {
        this.entityId = buf.readInt();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:16,代码来源:S2DPacketOpenWindow.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.onGround = buf.readUnsignedByte() != 0;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:C03PacketPlayer.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.windowId = buf.readUnsignedByte();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:S2EPacketCloseWindow.java

示例14: 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.readUnsignedByte();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:SPacketAnimation.java

示例15: 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.effectId = buf.readUnsignedByte();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:S1EPacketRemoveEntityEffect.java


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