* Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality
* Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already
* Reduced GetStackValue verbosity
+ Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness
+ Give SettingsRepositoryInterface a move constructor to simplify main.cpp code
- Remove do {} while (false) construction in redstone handler
* fixed network
fixed explosion
fixed ticking
added network broadcast to Setter method
added nullptr protection
using macros in 1.10 Protocol_1_10.cpp
revealed functions to LUA API
small fixups, typos, less functions used
fixed more doc
readded info that saving is done only if the beam is displayed
made the constructor transfer all needed members
fixed wrong commit
removed default parameters on SpawnEnderCrystal
fixed wrong metadata
moved call to destroy in the right place
fixed some typos
Fixed Ender Crystal
* fixed documentation
* fixed doc and added proper error message
* Parameters, arrows
* Parameters
Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* cBlockInfo: further cleanup
+ Use switch statements instead of lookup in dynamically initialised arrays
- Remove some deprecated bindings
* Update Stubs removing references to BlockInfoArray
* Use lapis for enchanting, subtract correct number of levels, ClientHandle now selects from pregenerated list.
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Implement Dropspenser Hook
Implemented a hook for dropspensing.
HOOK_DROPSPENSE
When plugin callback returns true then dropspense is cancelled
* Update src/Bindings/PluginManager.h
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
* Create OnDropSpense.lua
* Fix indent
* Forgot include
Forgot to include the plugin manager. Although now im confused why it was working on my end without including the plugin manager
* Update plugins.lua with dropspense
* fix typos
* haha notepad++ go brr
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
- Removed the calculation in the noteblock block entity
I did the calculation in python if anyone is interested where the numbers are from
Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Write into a single fmt::memory_buffer
* Use string_view instead of AString for listener callbacks
* Also collapsed vFLOG and vLOG functions into one per formatting type
* Avoid inefficient AString -> c_str() -> AString round trip
* Avoid redundant string init expressions
* Avoid unnecessary return, continue, etc.
* Add .clang-format to help with clang-tidy fix-its
* Avoid unnecessary passing by value
* Avoid unnecessary local copying
* Avoid copying in range-for loops
* Avoid over-complicated boolean expressions
* Some violations missed by my local clang-tidy
* Allow unnecessary continue statements
* Add brackets
* Another expression missed locally
* Move BindingsProcessor call into clang-tidy.sh and add space
* Fix pushd not found error
* Different grouping of CheckBlockInteractionRate
Closes#4708
This updates jsoncpp, mbedtls, TCLAP and SQLiteCpp to their latest stable release. A few additional changes were needed:
* jsoncpp deprecated Reader, FastWriter and StyledWriter which I've replaced
with some helper functions in JsonUtils.cpp
* SQLiteCpp changed how it builds with external sqlite libraries, now expecting
them to be installed. The simplest path was to remove sqlite from cuberite's
submodule and just use SQLiteCpp's internal version.
In manually bound functions, allows one to use any Vector3<T> value, as well as a {x, y, z} table, in Lua as any Vector3<T> parameter.
Has example in Debuggers' /vector command.
Unfortunately doesn't work in auto-bindings.
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change)
The BlockInfo.h file was removed from Globals.h (main change)
The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics)
The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor)
Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header.
That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified.
eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
* Correct off-by-one error in manual bindings for FillRelCuboid
Fixes#4454
* Fix inconsistent error messages in manual bindings for BlockArea
* Generate error if invalid coords passed to FillRelCuboid
* Prevent player from being destroyed by plugins
Add manual binding, bails out with error message if attempted
entity to destroy is player.
* Improve warnings and documentation, remove automatic binding
* Remove old and unnecessary deprecated function
* Now having two funcs, Push(cEntity* ..) and Push(const cEntity* ...).
For now, the const function just casts away the const qualifier and
passes to the other.
Co-authored-by: mluchterhand <mluchterhand@max.de>
* Stabilise MoveToWorld
* Fix comments and deprecate ScheduleMoveToWorld
* Enhanced thread safety for m_WorldChangeInfo
* Return unique_ptr from cAtomicUniquePtr::exchange
* cWorld now calls entity cEntity::OnAddToWorld and cEntity::OnRemoveFromWorld.
Allows broadcasting entities added to the world from the world's tick thread.
This also factors out some common code from cEntity::DoMoveToWorld and cEntity::Initialize.
As a consequence, cEntity::Destroy(false) (i.e. Destroying the entity without broadcasting) is impossible.
This isn't used anywhere in Cuberite so it's now deprecated.
* Update entity position after removing it from the world.
Fixes broadcasts being sent to the wrong chunk.
* Fix style
* cEntity: Update LastSentPosition when sending spawn packet
* Add Wno-deprecated-declarations to the lua bindings
* Kill uses of ScheduleMoveToWorld