This pull request adds random tick events for blocks. Tick events can be
added by using the `tickEvent` trait and contain the `name` of the
callback function and the probability ( `chance`).
Resolves: https://github.com/PixelGuys/Cubyz/issues/77
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
I also removed the legacy (java) blockEntity references.
fixes#1454
@Argmaster since you wrote the original code in #1224, please review and
check if the new names are fine for you.
This is done by replacing all illegal file name characters with `-`. Unicode is still preserved because it doesn't seem to be a problem for modern file systems.
The idea of file name encoding/decoding is discarded, instead the name is just stored in the zon
fixes#606
* Move to glslang's convention for shader file suffix
* Update ci.yml
* Oops, a mistake in the shader, how could that happen?
* Does the command error on its own?
* Update ci.yml
* Revert "Oops, a mistake in the shader, how could that happen?"
This reverts commit 869c3323f3d3b5fa607b40e7847c389a12b01f33.
* Update ci.yml
they are already bad enough as it is, and having them fragile too makes them even less likely to be used (and we do want them to be used, see e.g. #1398)
* Add the vulkan headers from the new Cubyz-libs version
* Add a GraphicsPipeline abstraction that's based on Vulkan's pipeline parameters.
This will help get rid of all the glEnable implicit state, and it will make #102 easier.
* I'm leaving out the viewport for now, it seems that it would make migration difficult
* Small fixes and rename graphics.GraphicsPipeline to just graphics.Pipeline
* Pipelinify the UI shaders
* Fix formatting
* Pipelines everywhere
* Fix the crosshair and remove remaining glEnable and related calls
* fix format
* How many more things does it need to clear the thing correctly?
* Fix selection
* Fix bloom
* Added Blueprints and SBBs for oak and birch trees
* Whoops! Added .zig to .zon
* Format Change (agh)
* Fixes to generators
* Changed nulls and put trees in Tree folder
* Removed Treefixes
* Update leaf_1.zig.zon
* Omitted chances
* 5 years
* Changed the two oak roots I had neglected
* Remove unused `directionalLight` uniform
* Add glslang libraries
* Update to the new Cubyz-libs version
* Dehardcode OS-dependent library file name stuff
* Audio somehow crashes on close, not sure why but I assume it's probably because of the library being compiled with a new zig version.
* Remove irrelevant uniforms from Window uniform list
* Remove unused itemdrop uniform
* Implement SPIR-V compilation code, the actual output is discarded
* Improve linking shader errors by passing a file path
* Fix formatting
* Add up down message history
* Deduplicate messages when inserting into history
* Add dedicated function for inserting strings into TextInput
* Fix formatting issues
* Change history behavior
* Rename inputString to setString
* Move clearing to setString
* Apply suggestions from code review
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Remove unused cursor capture
* Use FixedSizeCircularBuffer for history
* Restore large queue size
* Allow navigation to empty entry
* self.len must never be bigger than capacity
* Move optional callbacks into struct
* Use enum for moveCursorVertically return value
* WA attempt #1
* Fix edge case from review
* Update src/gui/windows/chat.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Remove isEmpty and isFull
* Allow for empty history entry
* Change empty message handling some more
* Remove unused methods
* Go to hell with all of those edge cases <3
* WA for 4b
* Remove CircularBufferQueue methods
* Fix queue thing
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Revert "Remove SBBGen"
This reverts commit b49048412f21c57d5638144da7f039753a94cafc.
* Revert "Remove example SBB"
This reverts commit afc5d6fed0ba92b558ccda91893fdb3fc63f69ec.
* Revert "Remove blueprint code"
This reverts commit 2553950adbdcef9c1c68afe4109f9247b74abb92.
* Fix compilation errors
* Fix compilation errors #2
* Fix test errors
* Fix rotateZ
* Resolve structure reference while instantiating SBBGen
* Fix formatting issues
* Add new trees to forest
* Add new trees to grassland
* Decrease forest density so you can find new trees
* Add degradable paste mode
* Remove substitutions
* Apply review suggestions
* Use lookup table for alignment
* Apply suggestions from code review
* Update src/server/terrain/simple_structures/_list.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Fix inital SBB offset
* Never place air in placeInGeneration
* Integrate void block with paste
* Revert "Move hashInt and hashCombine to utils"
This reverts commit 9bb276f69f60ad60f1170d07ec30ebd02307a36a.
* Make PasteMode comptime
* Fix remaining issues with void block integration
* Fix formatting
* Apply review change requests
* Remove origin and child blocks while resolving sbbs
* Apply review change requests
* I hate indexing
* Fix example tree models
* Use single index for chunk and blueprint in pasteInGeneration
* Fix formatting
* Extract blueprintOffset
* Fix formatting
* Apply suggestions from code review
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Apply Quantums suggestion for Y and Z
* No cast
* Use pos instead of chunkOffset
* Remove test tree
* Apply suggestions from code review
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Batch block updates
* Apply review change requests
* Allow blockUpdate to carry multiple block updates in single message
* Read until there is nothing left
* Use mesh_storage.BlockUpdate
* Break instead of boolean
* Restore client side neighbor updates
* Move side check in blockUpdate out of the loop
* Update src/utils.zig
* Fix minor issues
* Reverse ownership logic + change contains into liesInChunk
* Update liesInChunk
* No name for upadeBlock param
* Apply review change requests
* Fix formatting
* Restore onBreakClient where it should be
* Update src/renderer/chunk_meshing.zig
* Update src/renderer/chunk_meshing.zig
* Converge formatting with master
* fix formatting (https://github.com/ziglang/zig-spec/issues/38 is so stupid)
---------
Co-authored-by: IntegratedQuantum <jahe788@gmail.com>