Examples of ByteBuf


Examples of net.minecraft.util.io.netty.buffer.ByteBuf

    // We'll take care of NULL packets as well
    output.writeBoolean(handle != null);

    try {
      if (MinecraftReflection.isUsingNetty()) {
        ByteBuf buffer = createPacketBuffer();
        MinecraftMethods.getPacketWriteByteBufMethod().invoke(handle, buffer);
       
        output.writeInt(buffer.readableBytes());
        buffer.readBytes(output, buffer.readableBytes());
       
      } else {
        // Call the write-method
        output.writeInt(-1);
        getMethodLazily(writeMethods, handle.getClass(), "write", DataOutput.class).
View Full Code Here

Examples of net.minecraft.util.io.netty.buffer.ByteBuf

        handle = StructureCache.newPacket(type);
       
      // Call the read method
      try {
        if (MinecraftReflection.isUsingNetty()) {
          ByteBuf buffer = createPacketBuffer();
          buffer.writeBytes(input, input.readInt());
         
          MinecraftMethods.getPacketReadByteBufMethod().invoke(handle, buffer);
        } else {
          if (input.readInt() != -1)
            throw new IllegalArgumentException("Cannot load a packet from 1.7.2 in 1.6.4.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.