This commit was done specially since it interfaces heavily with Lua.
First it was diffed out in a standard cuberite repo so we can tell what was changed,
and we apply this diff to a basic cuberite repo right before the commit was made.
I then promptly reverted lua changes that would conflict with applying
the patch. I also had to remove whole sections from the patchfile
afterwards but it was made easier having the actual repo with the
patches applied able to remake the diff as needed before i removed the
bigger sections.
Somehow it all worked out.
This new format aligns better with whats in place for this currently. My
IDE wants to auto sort it, mind as well but it needs a clang-format that
matches this. Was having issues for me with the old one.
I used the libpdw one since it works already for me and appears to
replace it nicely.
The code is implimented in this commit and is launchable with the BUILD_CLIENT compile option.
Everything should be launchable by running the one function within
src/nyqubel-client/client.hpp: start_nyqubel_client()
* First Draft of adding endermite
* Update src/Mobs/Endermite.h
Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com>
* Adding Protocols + SpawnEgg
TODO: don't forget to put the endermite in core plugin for the summon
command
* Adding endermite to monster.ini
* Adding 5% change of spawning endermite when throwing enderpearl
* Spawn endermite at last position instead of Hit Position + .cache to .gitignore
* fixup! Spawn endermite at last position instead of Hit Position + .cache to .gitignore
* destroy endermite if 2 min, not if name is set
* Syntax
* Adding Enderman targeting endermite + fixing syntax
* Fixing compile error + return error [but crash on enderman spawn]
* Fix crash but enderman doesn't target
* Enderman targeting endermite finished
* checking style because i'm a noob at git...
* fixup! checking style because i'm a noob at git...
* Added endermite egg meta to docs
* Final touches
Removed unnecesary imports
fixed callback to run only in sight distance and actually check sigtlines
* Fixed error after not pulling branch
---------
Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com>
Co-authored-by: Debucquoy <debucqquoy.anthony@gmail.com>
Regession from #5085
```
[ 79%] Building CXX object Tools/ProtoProxy/CMakeFiles/ProtoProxy.dir/Connection.cpp.o
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:337:26: error: use of undeclared identifier 'AF_INET'
m_ServerSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:337:35: error: use of undeclared identifier 'SOCK_STREAM'
m_ServerSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:337:48: error: use of undeclared identifier 'IPPROTO_TCP'
m_ServerSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:342:2: error: unknown type name 'sockaddr_in'
sockaddr_in localhost;
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:343:25: error: use of undeclared identifier 'AF_INET'
localhost.sin_family = AF_INET;
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:346:53: error: unknown type name 'sockaddr'
if (connect(m_ServerSocket, reinterpret_cast<const sockaddr *>(&localhost), sizeof(localhost)) != 0)
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:362:29: error: use of undeclared identifier 'recv'
int res = static_cast<int>(recv(m_ServerSocket, Buffer, sizeof(Buffer), 0)); // recv returns int on windows, ssize_t on linux
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:402:29: error: use of undeclared identifier 'recv'
int res = static_cast<int>(recv(m_ClientSocket, Buffer, sizeof(Buffer), 0)); // recv returns int on Windows, ssize_t on Linux
^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:451:29: error: use of undeclared identifier 'send'
int res = static_cast<int>(send(a_Socket, reinterpret_cast<const char *>(a_Data.data()), a_Data.size(), 0)); // Windows uses int for a_Size, Linux uses size_t; but Windows doesn't complain. Return type is int on Windows and ssize_t on Linux
^
[ 79%] Building CXX object CMakeFiles/Cuberite.dir/Unity/unity_38_cxx.cxx.o
9 errors generated.
```
This adds a Macro which simply identifies the function and class name for error messages. Examples taken from the MojangAPI class [Choosen because I worked on that]
processing is done during compile time. Should be cross compatible