本文整理汇总了Java中net.minecraftforge.fml.common.network.ByteBufUtils.readVarInt方法的典型用法代码示例。如果您正苦于以下问题:Java ByteBufUtils.readVarInt方法的具体用法?Java ByteBufUtils.readVarInt怎么用?Java ByteBufUtils.readVarInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fml.common.network.ByteBufUtils
的用法示例。
在下文中一共展示了ByteBufUtils.readVarInt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fromBytes
import net.minecraftforge.fml.common.network.ByteBufUtils; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
this.entityId = ByteBufUtils.readVarInt(buf, 4);
this.flag = ByteBufUtils.readVarInt(buf, 4);
this.value = buf.readBoolean();
}
示例2: fromBytes
import net.minecraftforge.fml.common.network.ByteBufUtils; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
this.entityId = ByteBufUtils.readVarInt(buf, 4);
this.rotationYaw = buf.readFloat();
this.rotationPitch = buf.readFloat();
}
示例3: fromBytes
import net.minecraftforge.fml.common.network.ByteBufUtils; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
entityId = ByteBufUtils.readVarInt(buf, 4);
// DEBUG
//logger.info("fromBytes");
}
示例4: fromBytes
import net.minecraftforge.fml.common.network.ByteBufUtils; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buffer)
{
super.fromBytes(buffer);
int modCount = ByteBufUtils.readVarInt(buffer, 2);
for (int i = 0; i < modCount; i++)
{
modTags.put(ByteBufUtils.readUTF8String(buffer), ByteBufUtils.readUTF8String(buffer));
}
}
示例5: fromBytes
import net.minecraftforge.fml.common.network.ByteBufUtils; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf)
{
entityId = ByteBufUtils.readVarInt(buf, 4);
}