1
0
Commit Graph

10898 Commits

Author SHA1 Message Date
Tiger Wang
1432afefdb Use string redirection in Windows service
+ Localisation support
2020-07-23 21:17:58 +01:00
Tiger Wang
4f217c450b zh-cn translation in resource file
+ Add resource description
+ Add more descriptive flags
2020-07-23 21:17:50 +01:00
Tiger Wang
330626ab22 Update submodules 2020-07-23 00:32:47 +01:00
Tiger Wang
07f3f7ec30 Remove some unused inclusions 2020-07-20 09:28:02 +01:00
Tiger Wang
2f30e98dae Remove GetProtocolVersion unneeded comments 2020-07-19 23:11:02 +01:00
Tiger Wang
3dae696b41 Remove ProtocolPalettes 2020-07-19 21:20:27 +01:00
Tiger Wang
5dd51e87e5 Inherit constructors, remove duplication 2020-07-19 20:49:29 +01:00
Tiger Wang
e2f15776c7 Remove Waterlogged value from registry
(apparently they're going to remove it, we don't want such a large breaking change)

* Also alpha sort ids, parameters
2020-07-19 20:27:26 +01:00
Tiger Wang
3f712ca9cf Precompile unordered_map/set
+ Add inclusions to Globals.h
* Sort Globals.h
- Remove sys/stat.h from Globals.h
2020-07-19 19:58:53 +01:00
Tiger Wang
f4fe137ab5 Use 1.13.1 block palette 2020-07-19 17:02:14 +01:00
Tiger Wang
00f8c3a225 Implement "caching" in ChunkDataSerializer
+ When sending a chunk to multiple clients, group them by protocol version and send the same data
2020-07-19 16:29:49 +01:00
Tiger Wang
bedddfffbc Reduce duplication in CompressPacket
- Remove line 1742 that wrote data which was then immediately cleared
* Store the compress/no compress threshold in a constant
- Remove adding a noncompressed header in SendPacket, CompressPacket handles everything now
2020-07-19 16:21:05 +01:00
Tiger Wang
c99ddbc376 1.13.1, 1.13.2 connection support 2020-07-19 00:43:33 +01:00
Tiger Wang
1b9b587734 Add 1.13.1 to 1.15.2 mappings 2020-07-19 00:43:33 +01:00
Tiger Wang
9c6b5a3ec9 Delete unused member 2020-07-18 19:23:10 +01:00
Tiger Wang
bc1b70dcde Use cMultiVersionProtocol's buffer 2020-07-18 19:23:10 +01:00
Tiger Wang
5141d05ba6 Delete duplicated status request handlers
Here we go again...
2020-07-18 19:23:10 +01:00
Tiger Wang
7425305154 1.13 items support
+ Add 1.16 block and item definitions
2020-07-18 19:23:10 +01:00
Tiger Wang
951a0212d8 Move IsValidSocket out of global namespace 2020-07-18 14:20:31 +01:00
Mat
eb0f640fa0
Initial work on 1.13 entity metadata (#4539)
* Initial work on 1.13 entity metadata

* Largely complete metadata

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-07-17 19:33:02 +01:00
Tiger Wang
ff2c246de2
cProtocolRecognizer goes on a diet (#4770)
- Removed inheritance from cProtocol
2020-07-17 18:46:50 +01:00
Tiger Wang
d8406c7c58 SimplePlaceableItemHandler style 2020-07-14 18:28:06 +01:00
Tiger Wang
9d277f1d10
cWorld * -> cWorld (#4771)
* cWorld * -> cWorld
2020-07-14 17:57:30 +01:00
Tobias Wilken
36eab1b323
Introduce recipe book functionality (#4493)
* 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>
2020-07-14 17:56:42 +01:00
Tiger Wang
6e3f6d58a4 Custom command depend is automatic 2020-07-13 13:02:21 +01:00
Tiger Wang
c94f3c7ae0 Jenkins crosscompile 2020-07-13 12:35:38 +01:00
Tiger Wang
1c714312eb Remove unnecessary includes 2020-07-12 23:41:54 +01:00
Tiger Wang
3cf671b4fc Jenkins fixes 2020-07-12 23:38:13 +01:00
Tiger Wang
bd20afd6ce Reduce buildlogspam
- Turn off unused parameter warning
2020-07-12 23:38:08 +01:00
Tiger Wang
4f85931c42 Address comments 2020-07-12 22:00:07 +01:00
Tiger Wang
2c0fc395ba Funktions 2020-07-12 22:00:07 +01:00
Tiger Wang
6317176d7e More CMake cleanup 2020-07-12 22:00:07 +01:00
KrystilizeNevaDies
d0f38f52cb Remove Schematic Chunk height limitation 2020-07-06 20:56:47 +01:00
Tiger Wang
3f33b0736e Comment capitalisation 2020-07-06 20:56:05 +01:00
Tiger Wang
a24dd3a2ab Use enum to represent light states 2020-07-06 20:56:05 +01:00
Tiger Wang
f49f90906c Reduced packet spam when entities idle
* Try not to send look packets when nothing's changed.
2020-07-06 20:56:05 +01:00
Tiger Wang
e205d4109b Made grass spreader prettier 2020-07-06 20:56:05 +01:00
Peter Bell
58ab289b56 Update mbedtls to 2.23.0 2020-07-06 20:53:04 +01:00
Peter Bell
ad935ef40f Update libevent to 2.1.12-stable 2020-07-06 20:53:04 +01:00
Peter Bell
829f8d46f0 Update fmtlib to 7.0.0 2020-07-06 20:53:04 +01:00
MaxwellScroggs
5cdaf073be
cWindow: Convert XYZ to Vector3 (#4764) 2020-07-04 23:49:17 +02:00
Franklin Kong
868e28b44f
Merged trivial item handlers into cSimplePlaceableItemHandler (#4766)
- Remove unused files

Co-authored-by: aiugai <aiugai@umich.edu>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-06-26 21:34:22 +01:00
morsmordere
60c10ef248
Cactus cannot be placed on a forbidden blocks (#4767)
Co-authored-by: Franklin T Kong <ftk@umich.edu>
Co-authored-by: aiugai <aiugai@umich.edu>

Fixes #4641

Overrode GetPlacementBlockTypeMeta for CactusBlock, which gets called before a player places the cactus block, so it returns true if the placement is allowed or false if not, in which case the cactus does not drop as a block but stays in the player's hand which is the expected behavior. Tested in Minecraft client 1.12.2.
2020-06-26 01:23:47 +01:00
Mat
e0a361de2a
Send entities in cChunkSender (#4532)
Confer issue #3696
2020-06-24 12:48:50 +01:00
peterbell10
6036971c77
libevent: Enable IOCP backend on windows (#4745) 2020-06-08 21:03:29 +01:00
peterbell10
99d96337da
Fire sim: Handle fuel block being destroyed (#4751) 2020-05-31 20:27:08 +01:00
Tiger Wang
8b0b800008
Configurable LTO (#4755) 2020-05-31 20:26:50 +01:00
Tiger Wang
78f72bbfc4 Resolve IPO flags mismatch 2020-05-31 13:05:19 +01:00
Peter Bell
ce1d6a7ebd Protocol: Avoid crashing on invalid sign text 2020-05-29 13:46:11 +01:00
Tiger Wang
9e8598fb1c
Upgrade to C++17 [CMake] (#4717)
* Make our CMake slightly less insane
2020-05-16 20:59:10 +01:00