Commit Graph

318 Commits

Author SHA1 Message Date
a0dadc6e37 Merge branch 'minor-next' into major-next 2023-04-10 14:38:23 +01:00
f5b4d64668 Player: increase max distance between movements to allow high levels of speed to work correctly
speed 255 may allow the player to move as much as 14.8 blocks per tick when sprinting.
2023-04-07 21:35:58 +01:00
7cdab75b05 Merge branch 'minor-next' into major-next 2023-03-20 22:12:54 +00:00
2751e1ec02 replacing new Vector3(0, 0, 0) with Vector3::zero() (#5640) 2023-03-20 12:54:28 +00:00
419962d3a2 Added timer for player-specific movement code
players use an entirely different pathway for movement processing, which could be costly.
2023-03-19 16:12:47 +00:00
b8f6b66e42 First look at separating disconnect reason and disconnect screen messages (#4512) 2023-01-18 20:57:17 +00:00
c55e23a2c6 Localized disconnect message for spawn selection failure 2023-01-14 20:59:27 +00:00
5c2ed210fc Merge branch 'next-minor' into next-major 2023-01-14 20:53:41 +00:00
289e86e899 Make use of World::requestSafeSpawn() 2023-01-14 17:55:00 +00:00
69967a0e55 Properly localize jukebox popups 2023-01-13 17:48:56 +00:00
b76265cd37 PlayerChatEvent: introduce new formatting API
this API is simultaneously more powerful and cleaner than the previous system.
The previous system relied on undocumented behaviour and was limited to non-localizable strings.

This enables custom servers to implement their own chat formats (e.g. containing localizable tags) which will be displayed in each player's own language (once per-player language has been properly implemented, anyway).
2023-01-13 17:20:08 +00:00
9b4b960eb2 Remove deprecated methods 2023-01-08 17:07:22 +00:00
c2918709a3 Merge branch 'next-minor' into next-major 2023-01-06 01:59:04 +00:00
ece49f011c Merge branch 'stable' into next-minor 2023-01-06 01:50:17 +00:00
33d1755eae Player: fixed not receiving slot updates for small crafting grid
I'm not really sure why this tracking logic is here and not in InventoryManager, but for now it is what it is.
2023-01-04 01:28:25 +00:00
0d31b25fba Use str_starts_with and str_contains instead of strpos (#5482) 2022-12-30 21:41:30 +00:00
7ac6bd79a9 Localized remaining disconnection screens (except one or two that should never actually happen) 2022-12-27 20:05:59 +00:00
f173b91ca1 Introduce support for Translatable disconnection messages
this allows localizing disconnection screens (at least, once #4512 has been addressed) and the disconnect reasons shown on the console.

We already had disconnect messages implicitly localized in a few places, so this is just formalizing it.
This does break BC with any code that previously passed translation keys as the disconnect screen message, because they'll no longer be translated (only Translatables will be translatated now).
2022-12-27 18:36:07 +00:00
f8cc015c51 Merge branch 'next-minor' into next-major 2022-12-23 16:58:59 +00:00
b03733442b Move translation flattening logic from Player to NetworkSession
this is network-specific stuff, so it doesn't belong in Player.
2022-12-22 16:51:09 +00:00
9c9929ff39 Player: break cycle between sendMessage() and sendTranslation() 2022-12-22 16:37:36 +00:00
566a8a261f Player: deprecate sendTranslation() in favour of sendMessage() 2022-12-22 16:32:54 +00:00
a9e5f92958 Show death message on death screen (#5386) 2022-12-22 15:36:31 +00:00
f38b15cf83 Added tag for fire blocks 2022-12-19 15:22:09 +00:00
6e2685cbbb Merge branch 'next-minor' into next-major 2022-12-18 22:25:32 +00:00
bf44edd179 Constify a bunch of NBT keys, pass 1 2022-12-18 22:12:15 +00:00
ffa88aff67 Merge branch 'next-minor' into next-major 2022-12-18 21:05:26 +00:00
c5d716dc9d Added keep on death methods for items (#5395) 2022-12-15 20:10:20 +00:00
4d79aced07 Merge branch 'next-minor' into next-major 2022-12-15 19:50:27 +00:00
95d0a3bf41 Merge branch 'stable' into next-minor 2022-12-15 19:38:22 +00:00
1308cda5c2 Implemented hook method Item::onInteractEntity() (#5432)
this is called when the player right-clicks on an entity to do some action, such as shearing, naming etc.
2022-12-15 19:30:52 +00:00
99996b62d6 Align PhpDoc @param tags according to PHP-CS-Fixer 2022-12-06 13:21:20 +00:00
fdb07cdbcd Added more missing native types according to 8.0 standards 2022-11-23 14:21:38 +00:00
a205d64732 Merge branch 'next-minor' into next-major 2022-11-12 17:02:56 +00:00
a3502a711d Merge branch 'stable' into next-minor 2022-11-12 17:01:58 +00:00
732dac6fc1 Player: revert accidental change from ef100b248b 2022-11-12 14:43:22 +00:00
d5e3636908 Timezone: Apparently timezone_id returned by timezone_abbreviations_list() may be null... 2022-11-12 14:40:37 +00:00
93e661aa4e Removed useless @inheritDoc (#5399) 2022-11-09 13:40:35 +00:00
db7cee6f22 Player: check if the item meaningfully changed before discarding it in creative
fixes #5220
2022-10-11 22:06:03 +01:00
1c6a2b66f7 Merge remote-tracking branch 'origin/next-minor' into next-major 2022-09-29 22:38:26 +01:00
41970feb57 Entity: Fire EntitySpawnEvent/ItemSpawnEvent on the first entity tick, instead of in the constructor (#5314)
This allows plugins to modify the entity via setters in EntitySpawnEvent without their changes getting overwritten by setter calls directly after the 'new YourEntity' statement.

As well as benefiting plugins, this also clears a path for a BC-breaking change in PM5 (to have the programmer use addEntity() to spawn entities, instead of the constructor doing it, which will improve on a number of data handling aspects).

fixes #4973

This targets next-minor because it has some side effects on plugins that depended on the old behaviour, such as VanillaHopper, so it's not suitable for a patch release.
2022-09-29 22:30:12 +01:00
9295afe8b9 Merge branch 'next-minor' into next-major 2022-09-24 18:12:38 +01:00
a7dfa0907c Merge branch 'stable' into next-minor 2022-09-24 18:07:56 +01:00
f6a9949942 Remove PlayerCommandPreprocessEvent
closes #4284
2022-09-24 15:35:49 +01:00
e4fc523251 Introduce Player::sendToastNotification() (#5102) 2022-09-23 11:37:08 +01:00
7804172846 Player: added API documentation for some functions 2022-09-21 14:46:04 +01:00
7d29ac8293 Merge branch 'stable' into next-minor 2022-09-21 14:21:27 +01:00
d1c75da14b Player: lock flight state in spectator mode
players should not be able to stop flying in spectator mode
2022-09-20 21:53:51 +01:00
1ecb10acba Merge branch 'next-minor' into next-major 2022-08-21 19:19:07 +01:00
ad2d59923c Merge branch 'stable' into next-minor 2022-08-18 17:06:15 +01:00