Package com.rvandoosselaer.blocks
Class TypeRegistry
java.lang.Object
com.rvandoosselaer.blocks.TypeRegistry
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTypeRegistry
(@NonNull com.jme3.asset.AssetManager assetManager) Will register default materialsTypeRegistry
(@NonNull com.jme3.asset.AssetManager assetManager, BlocksTheme theme) Will register default materialsTypeRegistry
(@NonNull com.jme3.asset.AssetManager assetManager, BlocksTheme theme, boolean registerDefaultMaterials) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
static com.jme3.texture.Texture
combineTextures
(com.jme3.texture.Texture topTexture, com.jme3.texture.Texture sideTexture, com.jme3.texture.Texture bottomTexture) com.jme3.material.Material
getAll()
com.jme3.material.Material
com.jme3.material.Material
void
boolean
void
setDefaultTheme
(@NonNull BlocksTheme defaultTheme) void
setTheme
(BlocksTheme theme) boolean
-
Field Details
-
DEFAULT_BLOCK_MATERIAL
- See Also:
-
FAITHFUL_THEME
-
-
Constructor Details
-
TypeRegistry
public TypeRegistry(@NonNull @NonNull com.jme3.asset.AssetManager assetManager) Will register default materials -
TypeRegistry
Will register default materials -
TypeRegistry
public TypeRegistry(@NonNull @NonNull com.jme3.asset.AssetManager assetManager, BlocksTheme theme, boolean registerDefaultMaterials)
-
-
Method Details
-
register
-
register
public com.jme3.material.Material register(@NonNull @NonNull String name, @NonNull @NonNull com.jme3.material.Material material) -
get
-
remove
-
usingTheme
public boolean usingTheme() -
clear
public void clear() -
getAll
-
registerDefaultMaterials
public void registerDefaultMaterials() -
setTheme
-
setDefaultTheme
-
combineTextures
public static com.jme3.texture.Texture combineTextures(com.jme3.texture.Texture topTexture, com.jme3.texture.Texture sideTexture, com.jme3.texture.Texture bottomTexture)
-