Package commoble.exmachina.engine.internal.circuit

# Enum Class EmptyCircuit

java.lang.Object
java.lang.Enum<EmptyCircuit>
commoble.exmachina.engine.internal.circuit.EmptyCircuit

All Implemented Interfaces:
  `Circuit`, `Serializable`, `Comparable<EmptyCircuit>`, `Constable`

public enum EmptyCircuit extends Enum<EmptyCircuit> implements Circuit

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`INSTANCE`

## Method Summary

Modifier and Type
Method
Description
`Map<net.minecraft.core.BlockPos,org.apache.commons.lang3.tuple.Pair<net.minecraft.world.level.block.state.BlockState,StateComponent>>`
`components()`
Returns the immutable map of blockpositions this circuit occupies and the states that existed there when the circuit was built.
`double`
`getCurrent()`
Returns the current running through the circuit (in charge/second).
`double`
`getPowerSuppliedTo(net.minecraft.core.BlockPos pos)`
Returns the power in energy/second this Circuit is supplying to a given position.
`boolean`
`isPresent()`
Returns Whether this circuit has any valid components..
`void`
`markNeedingDynamicUpdate()`
Mark a circuit as needing to read data from its dynamic components.
`static EmptyCircuit`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static EmptyCircuit[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

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

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### INSTANCE

public static final EmptyCircuit INSTANCE

## Method Details

### values

public static EmptyCircuit[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static EmptyCircuit valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null

### getPowerSuppliedTo

public double getPowerSuppliedTo(net.minecraft.core.BlockPos pos)
Description copied from interface: `Circuit`
Returns the power in energy/second this Circuit is supplying to a given position. This is positive for power consumers and negative for power sources. If a position is both consuming and supplying power, the returned value is positive if it is consuming more power than it is supplying.

Specified by:
  `getPowerSuppliedTo` in interface `Circuit`
Returns:
  The power supplied to a position, or 0 if the circuit is invalid or does not exist at the given position

### getCurrent

public double getCurrent()
Description copied from interface: `Circuit`
Returns the current running through the circuit (in charge/second). Voltage across a block can be determined via voltage = power / current

Specified by:
  `getCurrent` in interface `Circuit`
Returns:
  The current through the circuit, or 0 if the circuit is invalid.

### markNeedingDynamicUpdate

public void markNeedingDynamicUpdate()
Description copied from interface: `Circuit`
Mark a circuit as needing to read data from its dynamic components. If your component block has a dynamic source or load, this should be called when the value updates to notify the circuit that it has to redo some math.

Specified by:
  `markNeedingDynamicUpdate` in interface `Circuit`

### isPresent

public boolean isPresent()
Description copied from interface: `Circuit`
Returns Whether this circuit has any valid components..

Specified by:
  `isPresent` in interface `Circuit`
Returns:
  Whether this circuit has any valid components.

### components

public Map<net.minecraft.core.BlockPos,org.apache.commons.lang3.tuple.Pair<net.minecraft.world.level.block.state.BlockState,StateComponent>> components()
Description copied from interface: `Circuit`
Returns the immutable map of blockpositions this circuit occupies and the states that existed there when the circuit was built.

Specified by:
  `components` in interface `Circuit`
Returns:
  the immutable map of blockpositions this circuit occupies and the states that existed there when the circuit was built