public override void Initialize() { base.Initialize(); Contents = ContainerManagerComponent.Ensure <Container>($"{typeof(EntityStorageComponent).FullName}{Owner.Uid.ToString()}", Owner); if (!Owner.TryGetComponent(out StorageComponent)) { StorageComponent = Owner.AddComponent <ServerStorageComponent>(); // TODO: This is a terrible hack. // Components should not need to be manually initialized in Initialize(). StorageComponent.Initialize(); } entityQuery = new IntersectingEntityQuery(Owner); }