Class Material.Builder

  • Enclosing class:
    Material

    public static class Material.Builder
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Material build​(Engine engine)
      Creates and returns the Material object.
      Material.Builder payload​(java.nio.Buffer buffer, int size)
      Specifies the material data.
      • Methods inherited from class java.lang.Object

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

      • Builder

        public Builder()
    • Method Detail

      • payload

        @NonNull
        public Material.Builder payload​(@NonNull
                                        java.nio.Buffer buffer,
                                        @IntRange(from=0L)
                                        int size)
        Specifies the material data. The material data is a binary blob produced by libfilamat or by matc.
        Parameters:
        buffer - buffer containing material data
        size - size of the material data in bytes
      • build

        @NonNull
        public Material build​(@NonNull
                              Engine engine)
        Creates and returns the Material object.
        Parameters:
        engine - reference to the Engine instance to associate this Material with
        Returns:
        the newly created object
        Throws:
        java.lang.IllegalStateException - if the material could not be created