Package net.commoble.exmachina.internal.mechanical

# Class MechanicalGraphBuffer

java.lang.Object
net.minecraft.world.level.saveddata.SavedData
net.commoble.exmachina.internal.mechanical.MechanicalGraphBuffer

public final class MechanicalGraphBuffer extends net.minecraft.world.level.saveddata.SavedData
Buffer in which mechanical graph updates in serverlevels are enqueued. All enqueued updates run at the end of each server tick.

## Nested Class Summary

## Nested classes/interfaces inherited from class net.minecraft.world.level.saveddata.SavedData

`net.minecraft.world.level.saveddata.SavedData.Context`

## Method Summary

Modifier and Type
Method
Description
`void`
`enqueue(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> levelKey, net.minecraft.core.BlockPos pos)`
Enqueues a blockpos to run a mechanical graph update at at the end of the tick
`static MechanicalGraphBuffer`
`get(net.minecraft.server.MinecraftServer server)`
Returns MechanicalGraphBuffer for the overworld.
`boolean`
`isDirty()`
`void`
`tick(net.minecraft.server.MinecraftServer server)`
Invoked at the end of each server tick to proc mechanical graph updates

### Methods inherited from class net.minecraft.world.level.saveddata.SavedData

`setDirty, setDirty`

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

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

## Method Details

### get

@Internal public static MechanicalGraphBuffer get(net.minecraft.server.MinecraftServer server)
Returns MechanicalGraphBuffer for the overworld.

Parameters:
  `server` - MinecraftServer to get the buffer for
Returns:
  MechanicalGraphBuffer for the overworld

### enqueue

@Internal public void enqueue(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> levelKey, net.minecraft.core.BlockPos pos)
Enqueues a blockpos to run a mechanical graph update at at the end of the tick

Parameters:
  `levelKey` - ResourceKey of the level to enqueue an update at
  `pos` - BlockPos to enqueue a mechanical graph update at

### tick

@Internal public void tick(net.minecraft.server.MinecraftServer server)
Invoked at the end of each server tick to proc mechanical graph updates

Parameters:
  `server` - MinecraftServer being ticked

### isDirty

public boolean isDirty()

Overrides:
  `isDirty` in class `net.minecraft.world.level.saveddata.SavedData`