commoble.exmachina.content

## Class BuiltinFunctions

- java.lang.Object
- - commoble.exmachina.content.BuiltinFunctions

    public class BuiltinFunctions
    extends java.lang.Object

### Field Summary

Fields
`static com.google.gson.Gson` `GSON`
`static java.lang.reflect.Type` `STATE_TABLE_TYPE`

### Constructor Summary

Constructors
Constructor and Description
`BuiltinFunctions()`

### Method Summary

All Methods Static Methods Concrete Methods
`static java.util.Set<net.minecraft.util.math.BlockPos>` `getAdjacentPositions(net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction[] directions)`
`static java.util.Set<net.minecraft.util.math.BlockPos>` `getAllDirectionsConnectionSet(net.minecraft.world.IWorld world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state)` Return the set of the six block positions around a given position.
`static commoble.exmachina.api.StaticPropertyFactory` `getConstantPropertyReader(com.google.gson.JsonObject object)` Return a constant value
`static commoble.exmachina.api.Connector` `getRotatedDirections(net.minecraft.block.Block block, java.lang.String facingPropertyName, net.minecraft.util.Direction unrotatedDirection, net.minecraft.util.Direction[] directions)`
`static java.util.Set<net.minecraft.util.math.BlockPos>` `getRotatedPositions(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state, net.minecraft.state.DirectionProperty directionProperty, net.minecraft.util.Direction defaultStateFacing, net.minecraft.util.Direction[] directions)`
`static commoble.exmachina.api.StaticProperty` `getStateTableProperty(net.minecraft.block.Block block, java.util.Map<java.lang.String,java.lang.Double> data)`
`static commoble.exmachina.api.StaticPropertyFactory` `getStateTablePropertyReader(com.google.gson.JsonObject object)`
`static commoble.exmachina.api.StaticPropertyFactory` `readBlockstateMultiplier(com.google.gson.JsonObject json)`
`static commoble.exmachina.api.ConnectorFactory` `readRotatableDirections(com.google.gson.JsonObject object)`

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

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

### Field Detail

#### STATE_TABLE_TYPE

    public static final java.lang.reflect.Type STATE_TABLE_TYPE

#### GSON

    public static final com.google.gson.Gson GSON

### Constructor Detail

#### BuiltinFunctions

    public BuiltinFunctions()

### Method Detail

#### getAllDirectionsConnectionSet

    public static java.util.Set<net.minecraft.util.math.BlockPos> getAllDirectionsConnectionSet(net.minecraft.world.IWorld world,
                                                                                                net.minecraft.util.math.BlockPos pos,
                                                                                                net.minecraft.block.BlockState state)

Return the set of the six block positions around a given position.

Parameters:
  `world` - A world
  `pos` - A position in the world
  `state` - The blockstate at the given position in the world
Returns:
  The set of the six positions adjacent to the given position

#### getAdjacentPositions

    public static java.util.Set<net.minecraft.util.math.BlockPos> getAdjacentPositions(net.minecraft.util.math.BlockPos pos,
                                                                                       net.minecraft.util.Direction[] directions)

#### readRotatableDirections

    public static commoble.exmachina.api.ConnectorFactory readRotatableDirections(@Nonnull
                                                                                  com.google.gson.JsonObject object)

#### getRotatedDirections

    public static commoble.exmachina.api.Connector getRotatedDirections(net.minecraft.block.Block block,
                                                                        java.lang.String facingPropertyName,
                                                                        @Nullable
                                                                        net.minecraft.util.Direction unrotatedDirection,
                                                                        net.minecraft.util.Direction[] directions)

#### getRotatedPositions

    public static java.util.Set<net.minecraft.util.math.BlockPos> getRotatedPositions(net.minecraft.util.math.BlockPos pos,
                                                                                      net.minecraft.block.BlockState state,
                                                                                      net.minecraft.state.DirectionProperty directionProperty,
                                                                                      net.minecraft.util.Direction defaultStateFacing,
                                                                                      net.minecraft.util.Direction[] directions)

#### getConstantPropertyReader

    public static commoble.exmachina.api.StaticPropertyFactory getConstantPropertyReader(@Nonnull
                                                                                         com.google.gson.JsonObject object)

Return a constant value

Parameters:
  `object` - A json object for the static property
Returns:
  a static property factory
Throws:
  `com.google.gson.JsonParseException` - If "value" field in json is null

#### getStateTablePropertyReader

    public static commoble.exmachina.api.StaticPropertyFactory getStateTablePropertyReader(@Nonnull
                                                                                           com.google.gson.JsonObject object)

#### getStateTableProperty

    public static commoble.exmachina.api.StaticProperty getStateTableProperty(net.minecraft.block.Block block,
                                                                              java.util.Map<java.lang.String,java.lang.Double> data)

#### readBlockstateMultiplier

    public static commoble.exmachina.api.StaticPropertyFactory readBlockstateMultiplier(com.google.gson.JsonObject json)