Class TypeRegistry


  • public class TypeRegistry
    extends java.lang.Object
    A thread safe register for block types. The register is used so only one instance of a type is used throughout the Blocks framework.
    • Field Detail

      • DEFAULT_BLOCK_MATERIAL

        public static final java.lang.String DEFAULT_BLOCK_MATERIAL
        See Also:
        Constant Field Values
      • FAITHFUL_THEME

        public static final BlocksTheme FAITHFUL_THEME
    • Constructor Detail

      • TypeRegistry

        public TypeRegistry​(@NonNull
                            @NonNull com.jme3.asset.AssetManager assetManager)
      • TypeRegistry

        public TypeRegistry​(@NonNull
                            @NonNull com.jme3.asset.AssetManager assetManager,
                            BlocksTheme theme)
    • Method Detail

      • register

        public com.jme3.material.Material register​(@NonNull
                                                   @NonNull java.lang.String name)
      • register

        public com.jme3.material.Material register​(@NonNull
                                                   @NonNull java.lang.String name,
                                                   @NonNull
                                                   @NonNull com.jme3.material.Material material)
      • get

        public com.jme3.material.Material get​(java.lang.String name)
      • usingTheme

        public boolean usingTheme()
      • clear

        public void clear()
      • getAll

        public java.util.Collection<java.lang.String> getAll()
      • registerDefaultMaterials

        public void registerDefaultMaterials()
      • setTheme

        public void setTheme​(BlocksTheme theme)
      • setDefaultTheme

        public void setDefaultTheme​(@NonNull
                                    @NonNull BlocksTheme defaultTheme)