Contents
Class Repulsion
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.repulsion.Repulsion
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Per-entity repulsion-field reference.
Legacy migration (temporary). This component used to persist RepulsionConfigIndex, a
runtime asset-table index assigned at load time.
- Bug: the 0.5.5 asset-inheritance fix (
2effea41863) changed the asset load order, so an index saved under the old order now resolves to a different config. Default/Minigames repulsion was swapped on already-saved entities. - Fix: the versioned codec reads such legacy records, maps the old index to its stable config id via a table verified against a pre-0.5.5 boot, and re-saves as version 1 storing the id. The runtime index is re-resolved from the id, so the wire protocol is unchanged.
- Flag:
isMigrated()marks a record upgraded this way, so the player Setup system can re-derive it from config. - Removal: this migration can be dropped once pre-0.5.5 worlds have been re-saved.
-
Field Summary
FieldsFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanstatic ComponentType<EntityStore, Repulsion> intbooleanvoidsetRepulsionConfig(RepulsionConfig repulsionConfig) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
CODEC
-
-
Constructor Details
-
Repulsion
-
-
Method Details
-
getComponentType
-
getRepulsionConfigIndex
public int getRepulsionConfigIndex() -
getRepulsionConfigId
-
isMigrated
public boolean isMigrated() -
setRepulsionConfig
-
consumeNetworkOutdated
public boolean consumeNetworkOutdated() -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-