style: apply code-style cleanup (explicit types, this-qualification, switch expressions)

This commit is contained in:
2026-05-28 13:29:13 +02:00
parent 8e3195ca37
commit 70c986529b
9 changed files with 110 additions and 102 deletions

View File

@@ -14,13 +14,13 @@ public sealed class BlockRegistry
public BlockRegistry()
{
// Index by id. Order does not matter; slot = block.Id.
var blocks = new IBlock[] { Air, Stone, Dirt, Grass };
_byId = new IBlock[blocks.Length];
IBlock[] blocks = new IBlock[] { this.Air, this.Stone, this.Dirt, this.Grass };
this._byId = new IBlock[blocks.Length];
foreach (IBlock block in blocks)
{
_byId[block.Id] = block;
this._byId[block.Id] = block;
}
}
public IBlock Get(ushort id) => _byId[id];
public IBlock Get(ushort id) => this._byId[id];
}