Class HitboxCollision

java.lang.Object
com.hypixel.hytale.server.core.modules.entity.hitboxcollision.HitboxCollision
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class HitboxCollision extends Object implements Component<EntityStore>
Per-entity collision shape reference.

Legacy migration (temporary). This component used to persist HitboxCollisionConfigIndex, 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. Hard/Soft collision 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 Details

  • Constructor Details

  • Method Details

    • getComponentType

      public static ComponentType<EntityStore, HitboxCollision> getComponentType()
    • getHitboxCollisionConfigIndex

      public int getHitboxCollisionConfigIndex()
    • getHitboxCollisionConfigId

      @Nullable public String getHitboxCollisionConfigId()
    • isMigrated

      public boolean isMigrated()
    • setHitboxCollisionConfig

      public void setHitboxCollisionConfig(@Nonnull HitboxCollisionConfig hitboxCollisionConfig)
    • consumeNetworkOutdated

      public boolean consumeNetworkOutdated()
    • clone

      @Nonnull public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.