djytw / libnbt Goto Github PK
View Code? Open in Web Editor NEWMinecraft NBT/MCA/SNBT file parser in C
License: GNU Lesser General Public License v3.0
Minecraft NBT/MCA/SNBT file parser in C
License: GNU Lesser General Public License v3.0
Running make
within the example directory fails using GNU Make 4.3 and gcc 11.2.0 (Ubuntu 11.2.0-19ubuntu1), on Pop!_OS (Linux, like Ubuntu) fails, with the following error:
gcc basic.c ../nbt.c -o ../target/basic -Wall -g -lz -L. -I..
gcc basic_opt.c ../nbt.c -o ../target/basic_opt -Wall -g -lz -L. -I..
basic_opt.c: In function ‘main’:
basic_opt.c:60:35: error: ‘ERROR_BUFFER_OVERFLOW’ undeclared (first use in this function); did you mean ‘LIBNBT_ERROR_BUFFER_OVERFLOW’?
60 | if (ret && error.errid == ERROR_BUFFER_OVERFLOW) {
| ^~~~~~~~~~~~~~~~~~~~~
| LIBNBT_ERROR_BUFFER_OVERFLOW
basic_opt.c:60:35: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:21: ../target/basic_opt] Error 1
Replacing ERROR_BUFFER_OVERFLOW
with LIBNBT_ERROR_BUFFER_OVERFLOW
as suggested appears to fix the error, but literally just cloned the repository, and I'm not a C programmer, so I'd rather not open a pull request without more of an understanding of what's going on.
Lets say I have this NBT (as sNBT):
{i:[{id:38s,Count:1b,Damage:0s}]}
(With most of it stripped away)
Is it possible to access id or other things in the array with this library?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.