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


Java PacketBuffer.writerIndex方法代码示例

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


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

示例1: S3FPacketCustomPayload

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public S3FPacketCustomPayload(String channelName, PacketBuffer dataIn)
{
    this.channel = channelName;
    this.data = dataIn;

    if (dataIn.writerIndex() > 1048576)
    {
        throw new IllegalArgumentException("Payload may not be larger than 1048576 bytes");
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:S3FPacketCustomPayload.java

示例2: C17PacketCustomPayload

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public C17PacketCustomPayload(String channelIn, PacketBuffer dataIn)
{
    this.channel = channelIn;
    this.data = dataIn;

    if (dataIn.writerIndex() > 32767)
    {
        throw new IllegalArgumentException("Payload may not be larger than 32767 bytes");
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:C17PacketCustomPayload.java

示例3: CPacketCustomPayload

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public CPacketCustomPayload(String channelIn, PacketBuffer bufIn)
{
    this.channel = channelIn;
    this.data = bufIn;

    if (bufIn.writerIndex() > 32767)
    {
        throw new IllegalArgumentException("Payload may not be larger than 32767 bytes");
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:CPacketCustomPayload.java

示例4: SPacketCustomPayload

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public SPacketCustomPayload(String channelIn, PacketBuffer bufIn)
{
    this.channel = channelIn;
    this.data = bufIn;

    if (bufIn.writerIndex() > 1048576)
    {
        throw new IllegalArgumentException("Payload may not be larger than 1048576 bytes");
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:SPacketCustomPayload.java

示例5: CPacketCustomPayload

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public CPacketCustomPayload(String channelIn, PacketBuffer bufIn)
{
    this.channel = channelIn;
    this.data = bufIn;

    if (bufIn.writerIndex() > 32767)
    {
        throw new IllegalArgumentException("Payload may not be larger than 32767 bytes");
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:CPacketCustomPayload.java


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