private BaseEntity SpawnSmallShelves(Vector3 pos, Quaternion rot, DecayEntity floor) { BaseEntity ent = GameManager.server.CreateEntity("assets/scripts/entity/misc/visualstoragecontainer/visualshelvestest.prefab", pos, rot); LootContainer container = ent.GetComponent <LootContainer>(); container.destroyOnEmpty = false; container.initialLootSpawn = false; container.SetFlag(BaseEntity.Flags.Locked, true); ent.GetComponent <DecayEntity>().AttachToBuilding(floor); DestroyOnGroundMissing des = ent.gameObject.AddComponent <DestroyOnGroundMissing>(); GroundWatch watch = ent.gameObject.AddComponent <GroundWatch>(); watch.InvokeRepeating("OnPhysicsNeighbourChanged", 0f, 0.15f); ent.Spawn(); return(ent); }