public class ArchetypeChunk
Class ArchetypeChunk. Provides archetypechunk functionality for the Hytale server.
java.lang.Object > ArchetypeChunk
Field Summary
entitiesSize
protected
int
entitiesSize
Field entitiesSize.
refs
protected
Ref[]
refs
Field refs.
components
protected
Component[][]
components
Field components.
entityIndex
final
int
entityIndex
Field entityIndex.
oldLength
final
int
oldLength
Field oldLength.
newLength
final
int
newLength
Field newLength.
componentTypeIndex
final
int
componentTypeIndex
Field componentTypeIndex.
entityComponents
final
Component[]
entityComponents
Field entityComponents.
component
final
Component
component
Field component.
serializableArchetype
final
Archetype
serializableArchetype
Field serializableArchetype.
lastIndex
final
int
lastIndex
Field lastIndex.
ref
final
Ref
ref
Field ref.
newEntityIndex
final
int
newEntityIndex
Field newEntityIndex.
newSize
final
int
newSize
Field newSize.
componentArr
final
Component[]
componentArr
Field componentArr.
Method Detail
ArchetypeChunk
Method ArchetypeChunk.
- Parameters:
@Nonnull final Storestore@Nonnull final Archetypearchetype
size
public
int
size
()
Method size.
getReferenceTo
Method getReferenceTo.
- Parameters:
final intindex
setComponent
public
void
setComponent
(final int index, @Nonnull final ComponentType componentType, @Nonnull final T component)
Method setComponent.
- Parameters:
final intindex@Nonnull final ComponentTypecomponentType@Nonnull final Tcomponent
IllegalArgumentException
public
new
IllegalArgumentException
("Entity doesn't have component type " + String.valueOf(componentType)
Method IllegalArgumentException.
- Parameters:
"Entity doesn't have component type " +String.valueOf(componentType
getComponent
Method getComponent.
- Parameters:
final intindex@Nonnull final ComponentTypecomponentType
copySerializableEntity
public
Holder
copySerializableEntity
(@Nonnull final ComponentRegistry.Data data, final int entityIndex, @Nonnull final Holder target)
Method copySerializableEntity.
- Parameters:
@Nonnull final ComponentRegistry.Datadatafinal intentityIndex@Nonnull final Holdertarget
transferTo
public
void
transferTo
(@Nonnull final Holder tempInternalEntityHolder, @Nonnull final ArchetypeChunk chunk, @Nonnull final Consumer> modification, @Nonnull final IntObjectConsumer> referenceConsumer)
Method transferTo.
- Parameters:
@Nonnull final HoldertempInternalEntityHolder@Nonnull final ArchetypeChunkchunk@Nonnull final Consumermodification> @Nonnull final IntObjectConsumer>referenceConsumer
transferSomeTo
public
void
transferSomeTo
(@Nonnull final Holder tempInternalEntityHolder, @Nonnull final ArchetypeChunk chunk, @Nonnull final IntPredicate shouldTransfer, @Nonnull final Consumer> modification, @Nonnull final IntObjectConsumer> referenceConsumer)
Method transferSomeTo.
- Parameters:
@Nonnull final HoldertempInternalEntityHolder@Nonnull final ArchetypeChunkchunk@Nonnull final IntPredicateshouldTransfer@Nonnull final Consumermodification> @Nonnull final IntObjectConsumer>referenceConsumer
fillEmptyIndex
protected
void
fillEmptyIndex
(final int entityIndex, final int lastIndex)
Method fillEmptyIndex.
- Parameters:
final intentityIndexfinal intlastIndex
appendDump
public
void
appendDump
(@Nonnull final String prefix, @Nonnull final StringBuilder sb)
Method appendDump.
- Parameters:
@Nonnull final Stringprefix@Nonnull final StringBuildersb
toString
public
String
toString
()
Method toString.