BlockStateModule

public class BlockStateModule extends JavaPlugin

Class BlockStateModule. Provides blockstatemodule functionality for the Hytale server.

java.lang.Object > JavaPlugin > BlockStateModule

Field Summary

id

final String id

Field id.

blockState

final BlockState blockState

Field blockState.

index

final int index

Field index.

chunk

final WorldChunk chunk

Field chunk.

position

final Vector3i position

Field position.

chunkX

final int chunkX

Field chunkX.

chunkZ

final int chunkZ

Field chunkZ.

world

final World world

Field world.

worldChunk

final WorldChunk worldChunk

Field worldChunk.

holder

final Holder holder

Field holder.

x

final int x

Field x.

y

final int y

Field y.

z

final int z

Field z.

blockStateComponent

final T blockStateComponent

Field blockStateComponent.

blockStateInfoComponent

final BlockModule.BlockStateInfo blockStateInfoComponent

Field blockStateInfoComponent.

chunkStore

final Store chunkStore

Field chunkStore.

worldChunkComponent

final WorldChunk worldChunkComponent

Field worldChunkComponent.

blockIndex

final int blockIndex

Field blockIndex.

blockType

final BlockType blockType

Field blockType.

state

final SendableBlockState state

Field state.

Method Detail

get

static BlockStateModule get ()

Method get.

getItemContainerSpatialResourceType

public ChunkStore>> getItemContainerSpatialResourceType ()

Method getItemContainerSpatialResourceType.

BlockStateModule

public public BlockStateModule (@Nonnull final JavaPluginInit init)

Method BlockStateModule.

Parameters:
@Nonnull final JavaPluginInit init

setup

protected void setup ()

Method setup.

KDTree

public new KDTree (Ref::isValid)

Method KDTree.

Parameters:
Ref::isValid Ref::isValid

ItemContainerStateSpatialSystem

public new ItemContainerStateSpatialSystem (this.itemContainerSpatialResourceType)

Method ItemContainerStateSpatialSystem.

Parameters:
this.itemContainerSpatialResourceType this.itemContainerSpatialResourceType

ItemContainerStateRefSystem

public new ItemContainerStateRefSystem ()

Method ItemContainerStateRefSystem.

registerBlockState

public BlockStateRegistration registerBlockState (@Nonnull final Class clazz, @Nonnull final String key, final Codec codec)

Method registerBlockState.

Parameters:
@Nonnull final Class clazz
@Nonnull final String key
final Codec codec

LegacyLoadPacketBlockStateSystem

public new LegacyLoadPacketBlockStateSystem ((ComponentType BlockState>)

Method LegacyLoadPacketBlockStateSystem.

Parameters:
(ComponentType BlockState>

LegacyUnloadPacketBlockStateSystem

public new LegacyUnloadPacketBlockStateSystem ((ComponentType BlockState>)

Method LegacyUnloadPacketBlockStateSystem.

Parameters:
(ComponentType BlockState>

BlockStateRegistration

public new BlockStateRegistration (clazz, ()

Method BlockStateRegistration.

Parameters:
clazz clazz
( (

unregisterBlockState

public void unregisterBlockState (final Class clazz, @Nullable final Class dataClass)

Method unregisterBlockState.

Parameters:
final Class clazz
@Nullable final Class dataClass

createBlockState

public T createBlockState (final Class clazz, final WorldChunk chunk, final Vector3i pos, final BlockType blockType)

Method createBlockState.

Parameters:
final Class clazz
final WorldChunk chunk
final Vector3i pos
final BlockType blockType

BsonDocument

public new BsonDocument ()

Method BsonDocument.

getComponentType

public T> getComponentType (@Nullable final Class entityClass)

Method getComponentType.

Parameters:
@Nullable final Class entityClass

LegacyBlockStateHolderSystem

public public LegacyBlockStateHolderSystem (final ComponentType componentType)

Method LegacyBlockStateHolderSystem.

Parameters:
final ComponentType componentType

getQuery

public Query getQuery ()

Method getQuery.

onEntityAdd

public void onEntityAdd (@Nonnull final Holder holder, @Nonnull final AddReason reason, @Nonnull final Store store)

Method onEntityAdd.

Parameters:
@Nonnull final Holder holder
@Nonnull final AddReason reason
@Nonnull final Store store

onEntityRemoved

public void onEntityRemoved (@Nonnull final Holder holder, @Nonnull final RemoveReason reason, @Nonnull final Store store)

Method onEntityRemoved.

Parameters:
@Nonnull final Holder holder
@Nonnull final RemoveReason reason
@Nonnull final Store store

toString

public String toString ()

Method toString.

LegacyBlockStateRefSystem

public public LegacyBlockStateRefSystem (final ComponentType componentType)

Method LegacyBlockStateRefSystem.

Parameters:
final ComponentType componentType

onEntityAdded

public void onEntityAdded (@Nonnull final Ref ref, @Nonnull final AddReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onEntityAdded.

Parameters:
@Nonnull final Ref ref
@Nonnull final AddReason reason
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

Vector3i

public new Vector3i (x, y, z)

Method Vector3i.

Parameters:
x x
y y
z z

onEntityRemove

public void onEntityRemove (@Nonnull final Ref ref, @Nonnull final RemoveReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onEntityRemove.

Parameters:
@Nonnull final Ref ref
@Nonnull final RemoveReason reason
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

LegacyLateInitBlockStateSystem

public public LegacyLateInitBlockStateSystem (final ComponentType componentType)

Method LegacyLateInitBlockStateSystem.

Parameters:
final ComponentType componentType

getDependencies

public Set> getDependencies ()

Method getDependencies.

tick

public void tick (final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tick.

Parameters:
final float dt
final int index
@Nonnull final ArchetypeChunk archetypeChunk
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

LegacyTickingBlockStateSystem

public public LegacyTickingBlockStateSystem (final ComponentType componentType)

Method LegacyTickingBlockStateSystem.

Parameters:
final ComponentType componentType

toMetricResults

public MetricResults toMetricResults (final Store store)

Method toMetricResults.

Parameters:
final Store store

fetch

public void fetch (final int index, @Nonnull final ArchetypeChunk archetypeChunk, final Store store, final CommandBuffer commandBuffer, final PlayerRef player, final List results)

Method fetch.

Parameters:
final int index
@Nonnull final ArchetypeChunk archetypeChunk
final Store store
final CommandBuffer commandBuffer
final PlayerRef player
final List results