151 Commits

Author SHA1 Message Date
Quentin Bazin
d5f5082bb0 Added -Wconversion and fixed warnings.
This mostly forces the casts to be explicit.
2021-06-09 04:36:26 +02:00
Quentin Bazin
5ff8f9b78b Fixed lighting issues. 2021-06-05 17:23:13 +02:00
Quentin Bazin
f30f2ca727 Small optimizations. 2021-06-05 17:23:13 +02:00
Quentin Bazin
a9657751ed [external/sol2] Updated. 2021-06-05 17:23:13 +02:00
Quentin Bazin
d73cb5e274 Small optimizations. 2021-06-05 17:23:13 +02:00
Quentin Bazin
4bef97c3cf [ChunkMeshBuilder] Changed method, fixed lighting bugs. 2021-06-05 17:23:13 +02:00
Quentin Bazin
2496f2e9ee Mesh building is now asynchronous.
- Added ChunkMeshBuilder to replace ChunkBuilder
- Added ThreadPool

Note: Surrounding chunks are not handled yet.
2021-06-05 17:23:13 +02:00
Quentin Bazin
127d20009e [EngineConfig] Changed to 0.0.10. 2021-05-22 21:16:05 +02:00
Quentin Bazin
ebe9887ecf [ChunkLightmap] Removed useless lines.
It doesn't seem the engine needs to revert addSunlight anymore, but it may be subject to change, so I removed it as long as I don't see another problem.
2021-05-22 16:14:47 +02:00
Quentin Bazin
e15dbcc6e5 Cleaned useless commented code. 2021-05-22 16:14:47 +02:00
Quentin Bazin
95a804d9fc [World] Performance fix (for MinGW). 2021-05-22 16:14:47 +02:00
Quentin Bazin
758813a35d [EngineConfig] Bump VERSION_SUFFIX to 'pre8'. 2021-05-22 16:14:47 +02:00
Quentin Bazin
e763330597 Fixed sunlight update. 2021-05-22 16:14:47 +02:00
Quentin Bazin
fa194fd9e2 Fixed dimension change. 2021-05-22 16:14:47 +02:00
Quentin Bazin
b6cf7bd4ad ChunkLightmap::updateLights() no longer returns a boolean.
Updating lights will already enable hasChanged flag of the correct chunks if needed.
2021-05-22 16:14:47 +02:00
Quentin Bazin
eaae61f01b Attempting to remove the big loops in ClientWorld and ServerWorld. 2021-05-22 16:14:47 +02:00
Quentin Bazin
5bdacba397 [ClientPlayer] Now sending PlayerChunkPosUpdate. 2021-05-22 16:14:47 +02:00
Quentin Bazin
b4f210de3a Seems to be working, but some trees are incomplete. 2021-05-22 16:14:47 +02:00
Quentin Bazin
ecdf504bef 2nd attempt. 2021-05-22 16:14:47 +02:00
Quentin Bazin
9fb3064328 Worldgen seed can now be either specified during world creation or generated randomly. 2020-07-30 21:54:50 +02:00
Quentin Bazin
03d1a006b4 Worldgen now uses a seed. Fixed #116. 2020-07-30 21:13:19 +02:00
Quentin Bazin
d0bd710f90 [LuaEntityLoader|LuaMod|Registry] Error messages fixed. 2020-07-30 17:38:52 +02:00
Quentin Bazin
1742eac7ae [Heightmap] Changed height formula.
[EngineConfig] Version suffix increased.
2020-07-30 12:40:05 +02:00
Quentin Bazin
6065c98481 [Heightmap] Small fixes. [ServerCommandHandler] Now spawning player safely. Fixed #117. 2020-07-30 00:46:58 +02:00
Quentin Bazin
98cf9df93e [Heightmap] Added and used in TerrainGenerator. Fixed #135.
[README.md] Fixed typo.
[EngineConfig] Increased pre-release version suffix.
[mods/default] Fixed furnace texture.
2020-07-29 18:01:48 +02:00
Quentin Bazin
bb0b86198d [Item] Added constants for harvest capabilities/requirements. 2020-07-28 23:39:28 +02:00
Quentin Bazin
7d1ee578d9 [Inventory] Hotbar priority fixed. 2020-07-28 22:40:49 +02:00
Quentin Bazin
90d64e263c [DebugOverlay|TitleScreenState] Small fix. [EngineConfig] 'VERSION_SUFFIX' added. [misc/deploy.sh] Now asking if version number has been updated before deploying. 2020-07-28 21:47:49 +02:00
Quentin Bazin
ef5ac1d818 [LuaGUI] Text input definition added.
[creative_inventory] Now has a search bar!
2020-07-28 19:10:02 +02:00
Pedro Gimeno
6202717443 Use gk::abs instead of defining an ABS macro 2020-07-28 11:43:47 +02:00
Quentin Bazin
82f170d654 [Minimap] Added. 2020-07-28 09:12:36 +02:00
Pedro Gimeno
7e308bc988 Improve precision in time calculations to prevent possible problems 2020-07-27 20:59:41 +02:00
Quentin Bazin
f99729d827 Block placement constraints implemented. Closed #137. 2020-07-27 18:12:30 +02:00
Pedro Gimeno
d22785f593 Fix clipping of the skybox
The bottom of the skybox was being clipped as a result of a -50m offset that is applied to its centre. Fix that, and add a constant for said offset in EngineConfig.cpp.
2020-07-26 23:55:06 +02:00
Quentin Bazin
529c0a0427 Fixed missing include and define for MSVC. 2020-07-25 03:11:23 +02:00
Quentin Bazin
54ffc2c33d [Block] 'custom_param_bits' attribute added. Fixed #139. 2020-07-25 01:42:05 +02:00
Quentin Bazin
0564e1cb70 [Chunk] 'onBlockDestroyed' is now called after updating the block. 2020-07-24 23:27:54 +02:00
Quentin Bazin
e85c5f3458 Small fixes. 2020-07-24 19:59:35 +02:00
Pedro Gimeno
2b34e90216 Add constants for sun, moon and stars distance based on far clip 2020-07-23 19:31:28 +02:00
Quentin Bazin
b763b1aa8f [Sky] Added default values for celestial object definitions. 2020-07-21 22:50:19 +02:00
Quentin Bazin
c4feb73b2a Small fixes. 2020-07-21 22:36:56 +02:00
Quentin Bazin
64ddacd08f [mods/default] 'Torch' added.
[BlockState] 'isCollidable' attribute added.
[TextButton] Now rounding position.
2020-07-20 15:31:43 +02:00
Quentin Bazin
4c41ab080a [LuaMod|Inventory] Fixed a small bug preventing items from being gathered. 2020-07-20 09:48:26 +02:00
Quentin Bazin
a2f79aac7d [GameKey] 'BlockInfoToggle' key added. 2020-07-18 03:47:21 +02:00
Quentin Bazin
fae51bceb5 [EngineConfig] Added BLOCK_AIR for air string ID. 2020-07-18 01:53:22 +02:00
Quentin Bazin
a4dfd7a7aa Item stack limit added (server global + per block/item definition). 2020-07-18 01:35:59 +02:00
Quentin Bazin
103127ee96 [LuaMod] 'giveItemStack' now tries to use inventory before hotbar. 2020-07-17 23:45:51 +02:00
Quentin Bazin
7eaac50d48 Now saving last hotbar slot. 2020-07-17 23:32:50 +02:00
Quentin Bazin
1ded0d929e [Lua API] Added 'daylight_cycle' in sky definition to control its presence and speed. 2020-07-17 19:58:45 +02:00
Quentin Bazin
5119ab9985 [Lua API] Added moon, sun and stars attributes in sky definition. 2020-07-17 19:58:45 +02:00