Commit Graph

17 Commits

Author SHA1 Message Date
sfan5 6ca214fefc
Introduce `std::string_view` into wider use (#14368) 2024-02-17 15:35:33 +01:00
Jude Melton-Houghton 3992a13f24
Improve `MetaDataRef:{get,set}_float` precision (#13130) 2023-01-12 15:40:34 -05:00
Jude Melton-Houghton cd8a7fe472
Add MetaDataRef:get_keys (#12841) 2022-11-15 16:45:12 +01:00
Jude Melton-Houghton 7632af3c73
Consolidate API object code (#12728)
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-04 08:31:36 -04:00
Jude Melton-Houghton f4a01f3a5d
Avoid duplication of mod metadata in memory (#12562)
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-26 17:03:43 -04:00
Jude Melton-Houghton 5aa95fef10
Make MetaDataRef:get return nil instead of nothing (#11666) 2021-10-05 15:38:33 +03:00
Lars Müller 82731d0d3d
Revert "Auto delete MetaData when = 0 (#8770)" (#10183)
This reverts commit 808eb4c571.
2020-07-16 19:11:24 +02:00
Lejo 808eb4c571
Auto delete MetaData when = 0 (#8770)
* Auto delete MetaData when = 0
2020-05-02 12:57:04 +02:00
SmallJoker 3d66622772
Send only changed node metadata to clients instead of whole mapblock (#5268)
Includes newer style changes and fixes by est31

Improve the block position de-serialization
Add type NodeMetadataMap
2018-12-04 20:37:48 +01:00
Loïc Blot eef62c82a2
Modernize lua read (part 2 & 3): C++ templating assurance (#7410)
* Modernize lua read (part 2 & 3): C++ templating assurance

Implement the boolean reader
Implement the string reader
Also remove unused & unimplemented script_error_handler
Add a reader with default value
2018-06-30 17:11:38 +02:00
Loïc Blot 180e551c56
Modernize lua read (part 1): C++ templating insurance (#7394)
* Modernize lua read (part 1): C++ templating assurance

Implement the float reader
2018-06-04 22:38:07 +02:00
rubenwardy 0b5b32b026 MetaDataRef: Add contains() and get() (#7214) 2018-04-30 18:42:51 +02:00
rubenwardy 91615f9588 Add player:get_meta(), deprecate player attributes (#7202)
* Add player:get_meta(), deprecate player attributes
2018-04-06 10:52:29 +02:00
sfan5 3f2e0c1206 Check argument types inside MetaDataRef Lua API (#7045) 2018-02-18 10:40:45 +01:00
Loïc Blot 1c1c97cbd1 Modernize source code: last part (#6285)
* Modernize source code: last par

* Use empty when needed
* Use emplace_back instead of push_back when needed
* For range-based loops
* Initializers fixes
* constructors, destructors default
* c++ C stl includes
2017-08-20 13:30:50 +02:00
Dániel Juhász 58d83a7bb2 Hardware coloring for itemstacks
Adds the possibility to colorize item stacks based on their metadata.

In the item/node definition you can specify palette (an image file)
and color (fallback color if the item has no palette or metadata).
Then you can add palette_index to the metadata.

Dropped itemstacks with different colors do not merge.
2017-04-08 18:39:15 -07:00
rubenwardy c2e7b1f579 Derive NodeMetaRef from MetaDataRef 2017-02-04 22:07:55 +00:00