Instead of storing 14 different array lists, the parts of the mesh are now constructed on the stack and then directly inserted into the full list (which I abstracted into a generic data structure)
fixes#1188
makes #182 less severe (it is now overshadowed by #1202)
* add pipes, which are like branches but you can have different textures on each mode
* fix formatting
* remove testing block
* fix more formatting issues
* fix more formatting issues
* simplify fromRelPos
* fix fromRelPos and give pipe same properties as branch
* fix flashing dots caused by floating point inaccuracies
* remove debug object
* fix formatting issues
* fix a couple things
* remove debug textures
* fix formatting and also make dir an enum
* fix more formatting issues
* remove branches
* rename pipe to branch
* remove floating point fix
* remove branch model
* Add back branches and add temporary textures
* add back the branches
* fix some stuff
* small changes
* fix compiler error
---------
Co-authored-by: Carrie <carriecapp9@gmail.com>
* Make hash function more complicated
* Change seed value for array and vector hashes
* Fix formatting issues
* Fix formatting issues
* Update src/server/terrain/biomes.zig
* update VirtualList to new page size API
* Resolve TODO
mprotect needs its slices page-aligned. Since the VirtualList range
is contiguous, using a larger page size wouldn't necessarily reduce
memory anyways. And since pageSize() will only get called when
allocating, it is not particularly expensive.
* replace pageSize() with page_size_max in comptime
* determine maxSizeBytes at runtime
* remove assertion
* add aarch64 linux to CI
* revert CI
* Format all the zon assets to prepare for running the the format check with our zig fmt
* Update ci.yml
* Remove zon files from the old formatter
* Add a formatting violation to test the CI
* Undo the check
* Refactor compressChunk to use BinaryWriter
* Refactor decompressChunk to use BinaryReader
* Back to fat switch we go
* Yeet // @import("../utils.zig");
* Update src/server/storage.zig
* Add block touch detection
* Fix touch detection syntax errors
* Remove Whitespace
* Fix off by one in negatives
* Remove Block Touch Detection
* Simpler touch detection as suggested by Quantum
* Remove touchRetraction because for some reason it is no longer needed
* Touch Functions are now function pointers
* Remove unwanted debug prints
* Add parameter names to TouchFunction declaration
* Add error check
---------
Co-authored-by: gfh <@>
Co-authored-by: SuperIceG <102669377+SEGenjoysBlivits@users.noreply.github.com>
* Refactor RegionFile to use BinaryReader for loading
* Refactor RegionFile to use BinaryWriter for writing
* Apply review suggestions
* Add trace logging
* Restore region version mismatch message
* Update src/server/storage.zig
* Rename chunkSizes to chunkDataLengths
* Remove redundant whitespace
* Replace readAlloc with readSlice
This is my first contribution to Cubyz. There were too many cacti spawning in the desert. I adjusted the rates so they would appear more infrequently and make the desert look more natural.
This seems to cause trouble sometimes, not sure why. The library file has a capital X, so I guess somehow there was any alias on my PC.
fixes#1148fixes#1040
* Add block migrations logic
* TEMP: Example migration
* Adjust block migrations according to review
* Fix indentation in example file
* Remove unused migration enums
* Fix indentation in example file
* Extract asset ID creation to separate function
* Remove example migration
* Restore readAllFilesInAddons to shrink the diff
* Revert "Extract asset ID creation to separate function"
This reverts commit 3fea996152bd464643a9d84a52008e568f726f34.
* Shrink diff in assets.zig
* Fix migration behavior with empty migration map
* Restore birch_log.png
* Shrink diff
* Fix use of commonBlocksMigrations
* Remove biome and item migrations code
* Remove Palette changes
* Apply review suggestions
* Fix use after free in migration code
* Revert readAllZonFilesInAddons back to how it was but with migrations included
* Remove stray whitespace
* Remove stray defer
* Fix style issues
* Apply review suggestions
* Fix formatting issues
* Apply review suggestions
* Apply review suggestions
* Remove addon name from migrations
* Change migration notation to list of objects
* Apply review suggestions
* Apply review suggestions
* Apply review suggestions