private void OnBlockCrumbled(Block block) { if (!BlockMap.Remove(block.Position)) { throw new Exception($"Attempted to crumble block, but could not find it at {block.Position}."); } else { _log.Info($"Block crumbled at {block.Position}."); } OnChunkChanged.Raise(this); }
private void OnBlockDestroyed(Block block) { block.OnBlockCrumbled -= OnBlockCrumbled; block.OnBlockDestroyed -= OnBlockDestroyed; if (!BlockMap.Remove(block.Position)) { _log.Info($"Attempted to destroy block, but could not find it at {block.Position}."); } else { _log.Info($"Block destroyed at {block.Position}."); } OnChunkChanged.Raise(this); }