Class TypeRegistry

java.lang.Object
com.rvandoosselaer.blocks.TypeRegistry

public class TypeRegistry extends 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 Details

  • Constructor Details

    • TypeRegistry

      public TypeRegistry(@NonNull @NonNull com.jme3.asset.AssetManager assetManager)
      Will register default materials
    • TypeRegistry

      public TypeRegistry(@NonNull @NonNull com.jme3.asset.AssetManager assetManager, BlocksTheme theme)
      Will register default materials
    • TypeRegistry

      public TypeRegistry(@NonNull @NonNull com.jme3.asset.AssetManager assetManager, BlocksTheme theme, boolean registerDefaultMaterials)
  • Method Details

    • register

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

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

      public com.jme3.material.Material get(String name)
    • remove

      public boolean remove(@NonNull @NonNull String name)
    • usingTheme

      public boolean usingTheme()
    • clear

      public void clear()
    • getAll

      public Collection<String> getAll()
    • registerDefaultMaterials

      public void registerDefaultMaterials()
    • setTheme

      public void setTheme(BlocksTheme theme)
    • setDefaultTheme

      public void setDefaultTheme(@NonNull @NonNull BlocksTheme defaultTheme)
    • combineTextures

      public static com.jme3.texture.Texture combineTextures(com.jme3.texture.Texture topTexture, com.jme3.texture.Texture sideTexture, com.jme3.texture.Texture bottomTexture)