Closes#4236
CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/".
#include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
This is my attempt to fix#4112. The root cause of the issue was that the lapis slot was treated exactly the same as the enchanting slot, so it on the server side it would only ever slot one item.
My fix is to check if its the second slot in the window, then check if it's lapis (it would slot whatever). If it is lapis I call the base click handler.
* Replace cWorld::FindClosesPlayer with cWorld::DoWithClosestPlayer
* Implement experience reward splitting into the orb sizes used in vanilla
* Modified speed calculation in cExpOrb::Tick to make the orbs fly towards the player
Fixes#4216
* Change reinterpret_cast -> static_cast wherever possible
* Remove more unnecessary `const_cast`s.
reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
* Smelting Exp
Smelting now gives experience
* Furnace.txt update
Exp rewards are entered in furnace.txt, Reward calculation is now done
is the furnaceentity class
* furnace.txt update
Changed alignment tabs to spaces
Included documentation of exp in recipe
* Updated StringToFloat
changed strtod to strtof
* Explicit Float to Int
* Reworked Smelting Rewards
* No C casts
-Adds new function to the api
-Sets reward counter to 0 in furnace constructor
* Style and exp lock removed
-Fixed style mistakes accoring to PR notes
-XP isn't locked to a single player anymore
* No Smelter API
-Removed SetLastSmelter and GetLastSmelter
-Fixed comments
-Fixed log reward amounts
Fixes#4093
Window updates are only broadcast to players in the m_OpenedBy list. Normally players are added after sending a window open packet but no packet is sent for a player's inventory. This meant broadcasts were never sent for the inventory window.
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
* Made BroadcastSoundEffect take vector parameters.
* Added docs for new vectored methods
* Removed old code
* Fixed lua warnings
* Made old BroadcastSoundEffect not an override.
* m_Block to m_BlockPos, used Vector3d constructor where prettier.
* a_Block to a_BlockPos
* Changed thunderbolt a_Block to a_BlockPos
* Fix switch warnings
* Fix a variety of -Wswitch and -Wswitch-enum warnings
* Remove unneeded -Wno-error flags
* Reorganise some eMonsterType switches
* Alpha sort eMonsterType cases in WriteMobMetadata
and in cNBTChunkSerializer::AddMonsterEntity
* List all mob types in protocol 1.12 and NBTChunkSerializer
* cStructGenTrees::GetNumTrees: remove switch default
* cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type