Class EntityStatMap
java.lang.Object
com.hypixel.hytale.server.core.modules.entitystats.EntityStatMap
- All Implemented Interfaces:
Component<EntityStore>,Cloneable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<EntityStatMap> protected booleanprotected booleanfinal it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<EntityStatUpdate>> final it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.floats.FloatList> final it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<EntityStatUpdate>> (package private) float[]private Map<String, EntityStatValue> private EntityStatValue[]static final intFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddChange(EntityStatMap.Predictable predictable, int index, EntityStatOp op, float previousValue, float value) private voidaddChange(EntityStatMap.Predictable predictable, int index, EntityStatOp op, float previousValue, float value, Map<String, Modifier> modifierMap) private voidaddChange(EntityStatMap.Predictable predictable, int index, EntityStatOp op, float previousValue, String key, Modifier modifier) private voidaddInitChange(int index, EntityStatValue value) floataddStatValue(int index, float amount) floataddStatValue(EntityStatMap.Predictable predictable, int index, float amount) voidclone()booleanit.unimi.dsi.fastutil.ints.Int2ObjectMap<EntityStatUpdate[]> booleanit.unimi.dsi.fastutil.ints.Int2ObjectMap<EntityStatUpdate[]> it.unimi.dsi.fastutil.ints.Int2ObjectMap<EntityStatUpdate[]> createInitUpdate(boolean all) get(int index) Deprecated.static ComponentType<EntityStore, EntityStatMap> getModifier(int index, String key) it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.floats.FloatList> it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<EntityStatUpdate>> private static EntityStatUpdatemakeInitChange(EntityStatValue value) floatmaximizeStatValue(int index) floatmaximizeStatValue(EntityStatMap.Predictable predictable, int index) floatminimizeStatValue(int index) floatminimizeStatValue(EntityStatMap.Predictable predictable, int index) voidprocessStatChanges(EntityStatMap.Predictable predictable, it.unimi.dsi.fastutil.ints.Int2FloatMap entityStats, ValueType valueType, ChangeStatBehaviour changeStatBehaviour) putModifier(int index, String key, Modifier modifier) putModifier(EntityStatMap.Predictable predictable, int index, String key, Modifier modifier) removeModifier(int index, String key) removeModifier(EntityStatMap.Predictable predictable, int index, String key) floatresetStatValue(int index) floatresetStatValue(EntityStatMap.Predictable predictable, int index) floatsetStatValue(int index, float newValue) floatsetStatValue(EntityStatMap.Predictable predictable, int index, float newValue) intsize()floatsubtractStatValue(int index, float amount) floatsubtractStatValue(EntityStatMap.Predictable predictable, int index, float amount) static it.unimi.dsi.fastutil.ints.Int2ObjectMap<Modifier[]> toPacket(it.unimi.dsi.fastutil.ints.Int2ObjectMap<StaticModifier[]> modifiers) toString()private booleantryMergeUpdate(List<EntityStatUpdate> updates, EntityStatOp op, float value, Map<String, Modifier> modifierMap, boolean isPredictable) voidupdate()private it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<EntityStatUpdate[]> updatesToProtocol(it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<EntityStatUpdate>> localUpdates) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializable
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
CODEC
-
unknown
-
values
-
tempRegenerationValues
float[] tempRegenerationValues -
selfUpdates
-
selfStatValues
public final it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.floats.FloatList> selfStatValues -
otherUpdates
-
isSelfNetworkOutdated
protected boolean isSelfNetworkOutdated -
isNetworkOutdated
protected boolean isNetworkOutdated
-
-
Constructor Details
-
EntityStatMap
public EntityStatMap()
-
-
Method Details
-
getComponentType
-
size
public int size() -
get
-
get
Deprecated. -
update
public void update() -
getModifier
-
putModifier
-
putModifier
@Nullable public Modifier putModifier(EntityStatMap.Predictable predictable, int index, String key, Modifier modifier) -
removeModifier
-
removeModifier
@Nullable public Modifier removeModifier(EntityStatMap.Predictable predictable, int index, String key) -
setStatValue
public float setStatValue(int index, float newValue) -
setStatValue
-
addStatValue
public float addStatValue(int index, float amount) -
addStatValue
-
subtractStatValue
public float subtractStatValue(int index, float amount) -
subtractStatValue
-
minimizeStatValue
public float minimizeStatValue(int index) -
minimizeStatValue
-
maximizeStatValue
public float maximizeStatValue(int index) -
maximizeStatValue
-
resetStatValue
public float resetStatValue(int index) -
resetStatValue
-
getSelfUpdates
-
getSelfStatValues
@Nonnull public it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.floats.FloatList> getSelfStatValues() -
consumeSelfUpdates
-
clearUpdates
public void clearUpdates() -
consumeOtherUpdates
-
updatesToProtocol
@Nonnull private it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<EntityStatUpdate[]> updatesToProtocol(@Nonnull it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<EntityStatUpdate>> localUpdates) -
createInitUpdate
@Nonnull public it.unimi.dsi.fastutil.ints.Int2ObjectMap<EntityStatUpdate[]> createInitUpdate(boolean all) -
consumeSelfNetworkOutdated
public boolean consumeSelfNetworkOutdated() -
consumeNetworkOutdated
public boolean consumeNetworkOutdated() -
addInitChange
-
addChange
private void addChange(EntityStatMap.Predictable predictable, int index, @Nonnull EntityStatOp op, float previousValue, float value) -
addChange
private void addChange(EntityStatMap.Predictable predictable, int index, @Nonnull EntityStatOp op, float previousValue, float value, Map<String, Modifier> modifierMap) -
addChange
private void addChange(EntityStatMap.Predictable predictable, int index, EntityStatOp op, float previousValue, String key, @Nullable Modifier modifier) -
tryMergeUpdate
private boolean tryMergeUpdate(@Nonnull List<EntityStatUpdate> updates, @Nonnull EntityStatOp op, float value, @Nullable Map<String, Modifier> modifierMap, boolean isPredictable) -
processStatChanges
public void processStatChanges(EntityStatMap.Predictable predictable, @Nonnull it.unimi.dsi.fastutil.ints.Int2FloatMap entityStats, ValueType valueType, @Nonnull ChangeStatBehaviour changeStatBehaviour) -
toString
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Overrides:
clonein classObject
-
makeInitChange
-
toPacket
public static it.unimi.dsi.fastutil.ints.Int2ObjectMap<Modifier[]> toPacket(@Nullable it.unimi.dsi.fastutil.ints.Int2ObjectMap<StaticModifier[]> modifiers)
-