# Class Material

java.lang.Object
com.codename1.gaming.level.Material

public class Material extends Object
A pluggable surface material used by terrain cells and `TerrainFeature`s. A material is referenced everywhere by its string `#getId()` and resolved through the `MaterialRegistry`, so applications can register their own materials (sand, lava, ice, ...) without changing the level format. Carries authoring + light-runtime hints (base colour, whether it blocks movement, friction) plus an optional `#getArtId()` for textured rendering.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Material()`
  `Material(String id, String name, int color)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getArtId()`
  Optional asset id supplying the material's texture art (resolved via `AssetCatalog`).
  `int`
  `getColor()`
  Base RGB colour (0xRRGGBB) used to render the material before art is applied.
  `double`
  `getFriction()`
  Movement friction multiplier (1 = normal, <1 = slippery like ice).
  `String`
  `getId()`
  `String`
  `getName()`
  `boolean`
  `isSolid()`
  Whether walkers are blocked by this material (e.g. water, lava).
  `Map<String,Object>`
  `props()`
  Free-form authoring properties for app-specific material data.
  `Material`
  `setArtId(String artId)`
  `Material`
  `setColor(int color)`
  `Material`
  `setFriction(double friction)`
  `Material`
  `setId(String id)`
  `Material`
  `setName(String name)`
  `Material`
  `setSolid(boolean solid)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Material

    public Material()

  - ### Material

    public Material(String id, String name, int color)

- ## Method Details

  - ### getId

    public String getId()

  - ### setId

    public Material setId(String id)

  - ### getName

    public String getName()

  - ### setName

    public Material setName(String name)

  - ### getColor

    public int getColor()
    Base RGB colour (0xRRGGBB) used to render the material before art is applied.

  - ### setColor

    public Material setColor(int color)

  - ### isSolid

    public boolean isSolid()
    Whether walkers are blocked by this material (e.g. water, lava).

  - ### setSolid

    public Material setSolid(boolean solid)

  - ### getFriction

    public double getFriction()
    Movement friction multiplier (1 = normal, <1 = slippery like ice).

  - ### setFriction

    public Material setFriction(double friction)

  - ### getArtId

    public String getArtId()
    Optional asset id supplying the material's texture art (resolved via `AssetCatalog`).

  - ### setArtId

    public Material setArtId(String artId)

  - ### props

    public Map<String,Object> props()
    Free-form authoring properties for app-specific material data.