本文整理匯總了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);
}