Class TypeRemapper<T>

    • Constructor Summary

      Constructor Description
      TypeRemapper​(Type<T> type)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T read​(PacketWrapper wrapper)
      Reads value from a PacketWrapper
      void write​(PacketWrapper output, T inputValue)
      Write a value to a packet
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeRemapper

        public TypeRemapper​(Type<T> type)
    • Method Detail

      • read

        public T read​(PacketWrapper wrapper)
               throws java.lang.Exception
        Description copied from interface: ValueReader
        Reads value from a PacketWrapper
        Specified by:
        read in interface ValueReader<T>
        wrapper - The wrapper to read from
        Returns the desired type
        java.lang.Exception - Throws exception if it fails to read
      • write

        public void write​(PacketWrapper output,
                          T inputValue)
        Description copied from interface: ValueWriter
        Write a value to a packet
        Specified by:
        write in interface ValueWriter<T>
        output - The packet wrapper to write to
        inputValue - The value to write