本文整理汇总了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");
}
}
示例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");
}
}
示例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");
}
}
示例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");
}
}
示例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");
}
}