public class CommandBuffer
Defers entity operations until after the current tick. Use command buffers to safely modify entities from within system callbacks, avoiding concurrent modification issues.
java.lang.Object > CommandBuffer
Field Summary
trackedRef
Field trackedRef.
trackedRefRemoved
Field trackedRefRemoved.
parentBuffer
Field parentBuffer.
thread
Field thread.
refs
Field refs.
ref
Field ref.
source
Field source.
component
Field component.
newComponent
Field newComponent.
wasRemoved
Field wasRemoved.
forkedBuffer
Field forkedBuffer.
Method Detail
run
void
run
(@Nonnull final Consumer> consumer)
Method run.
- Parameters:
@Nonnull final Consumerconsumer>
getComponent
Method getComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
getExternalData
ECS_TYPE
getExternalData
()
Method getExternalData.
addEntities
Method addEntities.
- Parameters:
@Nonnull final Holderholders[] @Nonnull final AddReasonreason
addEntity
Method addEntity.
- Parameters:
@Nonnull final Holderholder@Nonnull final AddReasonreason
tryRemoveEntity
Method tryRemoveEntity.
- Parameters:
@Nonnull final Refref@Nonnull final RemoveReasonreason
removeEntity
Method removeEntity.
- Parameters:
@Nonnull final Refref@Nonnull final RemoveReasonreason
ensureComponent
Method ensureComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
ensureAndGetComponent
Method ensureAndGetComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
addComponent
Method addComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
replaceComponent
void
replaceComponent
(@Nonnull final Ref ref, @Nonnull final ComponentType componentType, @Nonnull final T component)
Method replaceComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType@Nonnull final Tcomponent
removeComponent
Method removeComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
tryRemoveComponent
Method tryRemoveComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
putComponent
void
putComponent
(@Nonnull final Ref ref, @Nonnull final ComponentType componentType, @Nonnull final T component)
Method putComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType@Nonnull final Tcomponent
consumeWasTrackedRefRemoved
boolean
consumeWasTrackedRefRemoved
()
Method consumeWasTrackedRefRemoved.
consume
void
consume
()
Method consume.
setThread
boolean
setThread
()
Method setThread.
AssertionError
new
AssertionError
((Object)
Method AssertionError.
- Parameters:
(Object(Object
validateEmpty
void
validateEmpty
()
Method validateEmpty.