style: apply code-style cleanup (explicit types, this-qualification, switch expressions)
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user