| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* Alpha sort functions
* Simplify hand handling
* Fix left handed mode client-side display
|
| |
|
|
|
|
|
|
|
| |
* Update player list gamemode on world change
* Fix invisibility for spectators, use entity metadata
* Populate m_World for cPlayers on load
- Remove SendPlayerMaxSpeed, a duplicate of SendEntityProperties
|
|
|
|
| |
Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge.
|
|
|
|
|
|
|
|
|
| |
* Teleport off of mount when throwing enderpearl
* Simplify returning boolean
* Oops forgot a semicolon
* Fix code conventions in Player.h
|
|
|
|
|
|
| |
* Basic elytra flight
Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
|
|
|
|
| |
* Kick player if data were corrupt to avoid making it worse
|
|
|
|
|
|
|
| |
* Change TimeOfDay to WorldDate
* Do not wrap at 20 minutes, continue incrementing
* Fixes #4737
* Fixes #5159
|
|
|
|
|
| |
* Use the batch update feature of the packet.
* Lengthen interval between time and ping update packets (ref. http://github.com/cuberite/cuberite/issues/4082#issuecomment-348675321).
|
| |
|
|
|
|
|
|
|
|
| |
+ A cPlayer, once created, has a strong pointer to the cClientHandle. The player ticks the clienthandle. If he finds the handle destroyed, he destroys himself in turn. Nothing else can kill the player.
* The client handle has a pointer to the player. Once a player is created, the client handle never outlasts the player, nor does it manage the player's lifetime. The pointer is always safe to use after FinishAuthenticate, which is also the point where cProtocol is put into the Game state that allows player manipulation.
+ Entities are once again never lost by constructing a chunk when they try to move into one that doesn't exist.
* Fixed a forgotten Super invocation in cPlayer::OnRemoveFromWorld.
* Fix SaveToDisk usage in destructor by only saving things cPlayer owns, instead of accessing cWorld.
|
|
|
|
|
|
|
|
|
|
| |
* Fix potential destruction crashes
* Fix destructors accessing destroyted objects
* Fix cPlayer not destroying windows (Destroyed never called)
* Tentatively fixes #4608, fixes #3236, fixes #3262
- Remove cEntity::Destroyed() and replace with cEntity::OnRemoveFromWorld()
* Add missing call to OnRemoveFromWorld
|
|
|
|
| |
* Players are no longer kicked when clicking on bedrock
* Fixes #5022
|
|
|
| |
Co-authored-by: 12xx12 <12xx12100@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Tried to fix a small issue...
Ended up rewriting a bunch of god awful, opaque code with no source
and no sense. Who names a function GetPlayerRelativeBlockHardness???
It's gone now. We're safe again.
* Testing anti-cheat.
* Tidy up debug logging.
* Remove empty member declaration.
* Rewrite GetDigSpeed slightly for better readability.
* GetMiningProgressPerTick now returns 1 when instantly mined. Fixed hasily written typo.
* Comment style and typo fixes.
|
|
|
|
|
| |
* Use lapis for enchanting, subtract correct number of levels, ClientHandle now selects from pregenerated list.
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
|
|
|
|
|
| |
* FaceIntToBlockFace in 1.8/1.9 protocol merged
- Removed undefined permissions stuff in Player header
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Introduce recipe book functionality
The recipe book helps especially new players. Missing it gives the
impression that cuberite is not as advanced as it is.
The handling of the recipe book uses the following functions:
- Unlock Recipes
(https://wiki.vg/index.php?title=Protocol&oldid=14204#Unlock_Recipes) to
make recipes available and show the notification for new recipes.
Initialization is done on player login for known ones, the update is done
when new items are discovered.
- Craft Recipe Request
(https://wiki.vg/index.php?title=Protocol&oldid=14204#Craft_Recipe_Request)
when the user selects a recipe from the recipe book to fill the slots.
Known recipes are initialized on player login via `Unlock Recipes` with
`Action` 0.
As soon as a new recipe is discovered this is added via `Unlock Recipes`
with `Action` 1.
To be able to know and recognize new recipes the player class is
extended with `KnownItems` and `KnownRecipes`. As soon as a player
touches an item this is compared to the list of `KnownItems`, if the
item is unknown the recipes are checked for this item and the other
ingredients are checked with the list of `KnownItems`. If a full match
is discovered the recipe is unlocked with the client and stored in the
`KnownRecipes`.
To unlock recipes the recipe ID is sent to the client. A mapping file
(for protocol 1.12.2) translated the minecraft recipe names to ids. The
crafting.txt is extended with and minecraft recipe names is possible.
Limitations:
Only a single recipe is added to the crafting area. Multiple clicks or
shift click does not increase the number of builds.
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
* Address first issues mentioned by @peterbell10
- Some linting
- Extract loading of recipe specific protocol mapping into a function
- Build `RecipeNameMap` only once
- Use `std::optional`
- Extract `LoadRecipe` from `Window`
* Start to implement new suggestions
* Update with suggestions from @peterbell10
* Some minor cleanup
* Update protocol packet IDs
* Remove unused include
* Include header in cmake
* Change a vector to integer counter
* Change dromedaryCase method names to PascalCase
* Address suggestions from @madmaxoft
* Read Protocol subdirectories to load recipe books
To load all recipebooks iterate over the `Protocol` subdirectories
to find mapping files.
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
* Make puking pickups fly nicer
* Improve entity position updates
* Move determination of whether a delta is too big for a packet into the protocol handlers
+ Less jittery movement
+ Generalise CollectEntity to take any entity
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Replace buckets to the selected hotbar slot, rather than the first available.
Replicates vanilla behaviour, as well as being more logical.
* Refactor cInventory::AddItem. Behaviour is now documented
* Add new cInventory::ReplaceOneEquippedItem and ::SetEquippedItem methods
* Return empty potion to the same slot after drinking
* Replace buckets correctly in other situations, not simply water and lava
Uses the new ReplaceOneEquippedItem method
* Correct collecting water from source block with bottle
* Add cPlayer::ReplaceOneEquippedItemTossRest method
* Handle stacked filled buckets (in theory)
Use new cPlayer::ReplaceOneEquippedItemTossRest method
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
1. Base knockback on an entity's bounding box intersection with the explosion
2. Armor blast protection reduces knockback
3. Don't apply knockback to players flying in creative mode
Fixes #4139
|
|
|
|
| |
This allows players game mode to update to the default after portal to another world.
Fixes #4207
|
|
|
|
|
|
|
| |
1. implement protocol message SendHeldItemChange
2. add save / load inventory equipped item slot in JSON
3. send held item slot message after player connect to server
Fixes #4189
|
|
|
|
|
|
| |
Ref: minecraft.gamepedia.com/Enchanting#Unbreaking
#915
|
|
|
|
|
|
|
|
| |
Hi,
I found cuberite don't support to press key "F" to swap items on main hand and offhand, so I implemented this feature.
Best regards
Changyong
|
|
|
|
|
|
|
| |
Armour durability also no longer changes when it
is used to break blocks or attack mobs.
Fixes #4119
|
|
|
|
|
|
|
|
|
|
| |
* Implement horse inventory
* Fix sign conversions
* Add API doc for ItemCategory::IsHorseArmor
* Improve HandleOpenHorseInventory comment and style fixes.
|
|
|
|
|
|
|
|
| |
* Fire effect now shown for creative and spectator mode players
Fixes #3989
* Add documentation for IsFireproof
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Check for intersection between placed blocks and entities.
+ Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks.
* Factored block-entity placement checking into another function in cPlayer.
- Removed vector min/max functions
* Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity.
+ Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
|
|
|
|
|
|
|
|
| |
* Updated armor damage calculation.
+ Added lua docs, added casts from float to int.
* Changed verbage in docstring and comment.
|
| |
|
|
|
|
|
| |
- Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check
- Close open lua window in destructor, to avoid dangling pointers
|
|
|
| |
Fixes issue #1721
|
|
|
|
|
| |
- Added override keyword
- Removed inherited member variables
|
| |
|
| |
|
| |
|
|
|
| |
Added block hardness checks when breaking blocks.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Should fix #604
|
| |
|
|
|
|
| |
Spaces around some operators are checked.
|
|
|
|
|
|
|
|
| |
•Pathfinder improvements
•Fixes #1217
•Fixes #1933
Merge remote-tracking branch 'SafwatHalaby/water2' into fixes
|
|
|
|
| |
Fixes #1331.
|
|\
| |
| | |
Handle client 'leave bed' request
|
| |
| |
| |
| | |
* Fixes #1728
|
| | |
|
|/
|
|
| |
modified: src/Entities/Player.h
|
| |
|
| |
|
| |
|
|
|
|
| |
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
|
|
|
|
| |
The hooks now have fewer parameters but are called on all player-placed blocks (#1618).
|
|
|
|
| |
Fixes #1618.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/ClientHandle.cpp
src/ClientHandle.h
src/Protocol/Protocol.h
src/Protocol/Protocol125.cpp
src/Protocol/Protocol125.h
src/Protocol/Protocol17x.cpp
src/Protocol/Protocol17x.h
src/Protocol/ProtocolRecognizer.cpp
src/Protocol/ProtocolRecognizer.h
src/World.cpp
src/World.h
|
| |
| |
| | |
Added Spectator Gamemode
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Name to UUID
|
| |\ |
|
| | |
| | |
| | |
| | | |
The loading expected dashed UUIDs, MCS uses short UUIDs throughout.
|
| |/
|/| |
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
src/World.h
|
| |\|
| | |
| | |
| | |
| | | |
Conflicts:
src/BlockInfo.cpp
|
| | | |
|
| |/
| |
| | |
Fixes #1181
|
| | |
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/Chunk.cpp
src/Entities/Player.cpp
src/Root.cpp
src/World.cpp
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fixes end portals' solidity
* Fixed crashes to do with multithreading and removing an entity from
the wrong world
* Fixed crashes due to bad merge
* Fixed crashes due to an object being deleted twice
* Simplified cWorld::Start() and added comments to configuration files
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/Blocks/WorldInterface.h
src/ClientHandle.cpp
src/ClientHandle.h
src/Entities/Player.cpp
src/Entities/Player.h
src/Generating/FinishGen.cpp
src/Protocol/Protocol.h
src/Protocol/Protocol125.cpp
src/Protocol/Protocol125.h
src/Protocol/Protocol16x.cpp
src/Protocol/Protocol16x.h
src/Protocol/Protocol17x.cpp
src/Protocol/Protocol17x.h
src/Protocol/ProtocolRecognizer.cpp
src/Protocol/ProtocolRecognizer.h
src/Root.h
src/World.cpp
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
|
| |\ |
|
| | |\
| | | |
| | | | |
Death messages
|
| | | | |
|
| |\| | |
|
| | | | |
|
| |\| | |
|
| | | | |
|
| | |/ |
|
| |\|
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/Entities/Player.cpp
src/Entities/ProjectileEntity.cpp
|
| | |\
| | | |
| | | | |
Properly implemented enderchests
|
| | | | |
|
| | |/ |
|
| | | |
|
| | |
| | |
| | |
| | | |
Changed effect map to take a pointer of the effect as a result.
|
| | |
| | |
| | |
| | | |
Exported entity effect functions for ToLua and documented them in APIDesc.lua
|
| | | |
|
| | |
| | |
| | |
| | | |
http://minecraft.gamepedia.com/Hunger#Behavior
|
| |/
| |
| |
| |
| |
| | |
Implemented hunger, instant health, damage, poison, regen
Added "template" entity effect implementations
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/Chunk.cpp
src/Entities/Entity.h
src/Entities/Player.h
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Furnace.txt: newline
BlockID: removed extraneous dimension mapping
cEntity: fixed typo
cPlayer: WorldPtr typedef
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/ClientHandle.cpp
src/Entities/Player.cpp
src/Entities/Player.h
src/Protocol/Protocol125.cpp
src/Protocol/Protocol17x.cpp
|
| |
| |
| |
| | |
This alone doesn't work properly yet, further changes to cPlayer are needed.
|
| | |
|
| |
| |
| |
| |
| |
| | |
+ Implemented bed home positions
* Fixed some inventory and health server/client mismatches after world
change
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|\|
| |
| |
| |
| | |
Conflicts:
src/World.h
|
| | |
|
| | |
|
|/
|
|
| |
* Added comments to BroadcastMovementUpdate() and the collision tracer
|
| |
|
| |
|
|
|
|
| |
Value of 1 means "default speed", 2 means "double the speed", 0.5 means "half the speed". This allows for easier plugins and is more future-proof.
|
|\
| |
| | |
Beds now work properly, fixes #707
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also fixes FS392
Conflicts:
src/Blocks/WorldInterface.h
src/ClientHandle.cpp
|
|/ |
|
|
|
|
| |
Fixes #658.
|
|
|
|
|
| |
- Removed unused PlaySoundEffect
* Simplified and parenthesised code
|
| |
|
|
|
|
|
| |
This allows plugins to send composite chat messages, containing URLs, commands to run and cmdline suggestions.
Fixes #678.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/Root.cpp
src/Root.h
src/World.cpp
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* Moved string manipulation into cClientHandle and therefore...
+ Added configuration option for prefixes.
* Cleaned up code.
* Updated documentation for API.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
| |
As requested by @bearbin, one no longer needs to download a file that
links to Core. The server does it! Hopefully this encourages standards
compliance.
|
|
|
|
|
|
| |
+ Implemented mobile fall damage
* Formatting fixes
+ Defined new Position->Integer macros
|
|
|
|
|
| |
* Implemented mob drowning
* Iron Golems and squids are excluded
|
|\ |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
* Players now search for an area around themselves to teleport to when
detaching from something
|
| |
|
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
When the player was initialized, the Tick() function continued to stream chunk, while the cWorld called Tick() from its tick thread.
Final fix for #187.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Conflicts:
GNUmakefile
|
|
|