public override void OnBlockRemoved() { base.OnBlockRemoved(); if (ambientSound != null) { ambientSound.Stop(); ambientSound.Dispose(); } if (renderer != null) { renderer.Unregister(); renderer = null; } }
public override void OnBlockUnloaded() { base.OnBlockUnloaded(); renderer?.Unregister(); }