mirror of
https://github.com/Motschen/Adventura.git
synced 2025-12-16 03:45:10 +01:00
docs: add more comments
This commit is contained in:
@@ -32,6 +32,14 @@ public:
|
||||
registerBlock(SAND);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a block by its encoding.
|
||||
*
|
||||
* If the block is not registered, a non-solid decoration block is created for it.
|
||||
*
|
||||
* @param encoding The encoding of the block to get.
|
||||
* @return The block with the given encoding.
|
||||
*/
|
||||
const Block getByEncoding(char encoding) {
|
||||
for (Block block : registeredBlocks) {
|
||||
if (block.getEncoding() == encoding) return block;
|
||||
|
||||
Reference in New Issue
Block a user