Package net.commoble.exmachina.internal.power

# Class ComponentBaker

java.lang.Object
net.commoble.exmachina.internal.power.ComponentBaker

@Internal public final class ComponentBaker extends Object
Cache of baked power graph components

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
Clears the cache
`int`
`generation()`
Returns the current cache generation number.
`static ComponentBaker`
`get()`
Returns the ComponentBaker.
`StateComponent`
`getComponent(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.RegistryAccess registries)`
Returns StateComponent for a given blockstate.
`void`
`preBake(net.minecraft.core.RegistryAccess registries)`
Does some initial caching after datapack registries load

### Methods inherited from class java.lang.Object

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

## Method Details

### get

public static ComponentBaker get()
Returns the ComponentBaker .

Returns:
  the ComponentBaker

### clear

public void clear()
Clears the cache

### generation

public int generation()
Returns the current cache generation number.

Returns:
  the current cache generation number

### preBake

public void preBake(net.minecraft.core.RegistryAccess registries)
Does some initial caching after datapack registries load

Parameters:
  `registries` - RegistryAccess from the level

### getComponent

public StateComponent getComponent(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.RegistryAccess registries)
Returns StateComponent for a given blockstate.

Parameters:
  `state` - BlockState to get component for
  `registries` - RegistryAccess from level
Returns:
  StateComponent for a given blockstate