rvandoosselaer / Blocks

A block (voxel) engine for jMonkeyEngine
BSD 3-Clause "New" or "Revised" License
41 stars 14 forks source link

Make it easier to register blocks #41

Closed rvandoosselaer closed 4 years ago

rvandoosselaer commented 4 years ago

Adding blocks can become very verbose when doing this in code.

Describing blocks in a file is easier and doesn’t require code changes to add or remove blocks.

Extend BlockRegistry to register blocks from a file.

Next to loading blocks from a file a BlockFactory might also help. Some blocks come in multiple variants (shape facing in different directions) but have the same parameters. All those different variants could be generated and registered.