EffectControllerComponent

public class EffectControllerComponent implements Component

Component for tracking effectcontroller state. Attach this component to entities that need to track effectcontroller data.

java.lang.Object > EffectControllerComponent

Field Summary

cachedActiveEffectIndexes

protected int[] cachedActiveEffectIndexes

Field cachedActiveEffectIndexes.

changes

protected ObjectList changes

Field changes.

isNetworkOutdated

protected boolean isNetworkOutdated

Field isNetworkOutdated.

originalModel

protected Model originalModel

Field originalModel.

activeModelChangeEntityEffectIndex

protected int activeModelChangeEntityEffectIndex

Field activeModelChangeEntityEffectIndex.

isInvulnerable

protected boolean isInvulnerable

Field isInvulnerable.

activeEntityEffects

final ActiveEntityEffect[] activeEntityEffects

Field activeEntityEffects.

entityEffectIndex

final int entityEffectIndex

Field entityEffectIndex.

infinite

final boolean infinite

Field infinite.

duration

final float duration

Field duration.

overlapBehavior

final OverlapBehavior overlapBehavior

Field overlapBehavior.

currentActiveEntityEffectEntry

final ActiveEntityEffect currentActiveEntityEffectEntry

Field currentActiveEntityEffectEntry.

activeEntityEffect

final ActiveEntityEffect activeEntityEffect

Field activeEntityEffect.

activeEntityEffectEntry

final ActiveEntityEffect activeEntityEffectEntry

Field activeEntityEffectEntry.

ownerEntity

final Entity ownerEntity

Field ownerEntity.

modelComponent

final ModelComponent modelComponent

Field modelComponent.

modelAsset

final ModelAsset modelAsset

Field modelAsset.

scaledModel

final Model scaledModel

Field scaledModel.

playerSkinComponent

final PlayerSkinComponent playerSkinComponent

Field playerSkinComponent.

entityEffect

final EntityEffect entityEffect

Field entityEffect.

activeEffectEntry

final ActiveEntityEffect activeEffectEntry

Field activeEffectEntry.

keys

final IntSet keys

Field keys.

temp

final boolean temp

Field temp.

changeArray

final EntityEffectUpdate[] changeArray

Field changeArray.

iterator

final ObjectIterator> iterator

Field iterator.

entry

final Int2ObjectMap.Entry entry

Field entry.

Method Detail

getComponentType

public EffectControllerComponent> getComponentType ()

Method getComponentType.

EffectControllerComponent

public public EffectControllerComponent ()

Method EffectControllerComponent.

isInvulnerable

public boolean isInvulnerable ()

Method isInvulnerable.

setInvulnerable

public void setInvulnerable (final boolean invulnerable)

Method setInvulnerable.

Parameters:
final boolean invulnerable

addEffect

public boolean addEffect (@Nonnull final Ref ownerRef, @Nonnull final EntityEffect entityEffect, @Nonnull final ComponentAccessor componentAccessor)

Method addEffect.

Parameters:
@Nonnull final Ref ownerRef
@Nonnull final EntityEffect entityEffect
@Nonnull final ComponentAccessor componentAccessor

EntityEffectUpdate

public new EntityEffectUpdate (EffectOp.Add, entityEffectIndex, currentActiveEntityEffectEntry.remainingDuration, false, currentActiveEntityEffectEntry.debuff, currentActiveEntityEffectEntry.statusEffectIcon)

Method EntityEffectUpdate.

Parameters:
EffectOp.Add EffectOp.Add
entityEffectIndex entityEffectIndex
currentActiveEntityEffectEntry.remainingDuration currentActiveEntityEffectEntry.remainingDuration
false false
currentActiveEntityEffectEntry.debuff currentActiveEntityEffectEntry.debuff
currentActiveEntityEffectEntry.statusEffectIcon currentActiveEntityEffectEntry.statusEffectIcon

ActiveEntityEffect

public new ActiveEntityEffect (entityEffect.getId()

Method ActiveEntityEffect.

Parameters:
entityEffect.getId( entityEffect.getId(

addInfiniteEffect

public boolean addInfiniteEffect (@Nonnull final Ref ownerRef, final int entityEffectIndex, @Nonnull final EntityEffect entityEffect, @Nonnull final ComponentAccessor componentAccessor)

Method addInfiniteEffect.

Parameters:
@Nonnull final Ref ownerRef
final int entityEffectIndex
@Nonnull final EntityEffect entityEffect
@Nonnull final ComponentAccessor componentAccessor

if

public else if (!currentActiveEntityEffectEntry.isInfinite()

Method if.

Parameters:
!currentActiveEntityEffectEntry.isInfinite( !currentActiveEntityEffectEntry.isInfinite(

setModelChange

public void setModelChange (@Nonnull final Ref ownerRef, @Nonnull final EntityEffect entityEffect, final int entityEffectIndex, @Nonnull final ComponentAccessor componentAccessor)

Method setModelChange.

Parameters:
@Nonnull final Ref ownerRef
@Nonnull final EntityEffect entityEffect
final int entityEffectIndex
@Nonnull final ComponentAccessor componentAccessor

ModelComponent

public new ModelComponent (scaledModel)

Method ModelComponent.

Parameters:
scaledModel scaledModel

tryResetModelChange

public void tryResetModelChange (@Nonnull final Ref ownerRef, final int activeEffectIndex, @Nonnull final ComponentAccessor componentAccessor)

Method tryResetModelChange.

Parameters:
@Nonnull final Ref ownerRef
final int activeEffectIndex
@Nonnull final ComponentAccessor componentAccessor

addActiveEntityEffects

public void addActiveEntityEffects (@Nonnull final ActiveEntityEffect[] activeEntityEffects)

Method addActiveEntityEffects.

Parameters:
@Nonnull final ActiveEntityEffect[] activeEntityEffects

removeEffect

public void removeEffect (@Nonnull final Ref ownerRef, final int entityEffectIndex, @Nonnull final ComponentAccessor componentAccessor)

Method removeEffect.

Parameters:
@Nonnull final Ref ownerRef
final int entityEffectIndex
@Nonnull final ComponentAccessor componentAccessor

IllegalArgumentException

public new IllegalArgumentException (String.format("Unknown EntityEffect with index \"%s\"", entityEffectIndex)

Method IllegalArgumentException.

Parameters:
String.format("Unknown EntityEffect with index \"%s\""
entityEffectIndex entityEffectIndex

addChange

private void addChange (@Nonnull final EntityEffectUpdate update)

Method addChange.

Parameters:
@Nonnull final EntityEffectUpdate update

clearEffects

public void clearEffects (@Nonnull final Ref ownerRef, @Nonnull final ComponentAccessor componentAccessor)

Method clearEffects.

Parameters:
@Nonnull final Ref ownerRef
@Nonnull final ComponentAccessor componentAccessor

IntArraySet

public new IntArraySet (this.activeEffects.keySet()

Method IntArraySet.

Parameters:
this.activeEffects.keySet( this.activeEffects.keySet(

invalidateCache

public void invalidateCache ()

Method invalidateCache.

getActiveEffects

public Int2ObjectMap getActiveEffects ()

Method getActiveEffects.

getActiveEffectIndexes

public int[] getActiveEffectIndexes ()

Method getActiveEffectIndexes.

consumeNetworkOutdated

public boolean consumeNetworkOutdated ()

Method consumeNetworkOutdated.

consumeChanges

public EntityEffectUpdate[] consumeChanges ()

Method consumeChanges.

clearChanges

public void clearChanges ()

Method clearChanges.

createInitUpdates

public EntityEffectUpdate[] createInitUpdates ()

Method createInitUpdates.

getAllActiveEntityEffects

public ActiveEntityEffect[] getAllActiveEntityEffects ()

Method getAllActiveEntityEffects.

toString

public String toString ()

Method toString.

clone

public EffectControllerComponent clone ()

Method clone.