1
0
Commit Graph

5693 Commits

Author SHA1 Message Date
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
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
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
Peter Bell
104961b889 sizeof(char) 2020-05-16 09:39:05 +01:00
Peter Bell
c1e9d9d0e0 Use thread safe localtime_r on linux 2020-05-16 09:39:05 +01:00
Peter Bell
89c9a7f563 Enable debug logging in test builds 2020-05-16 09:39:05 +01:00
Peter Bell
6dee68cb63 Avoid a copy when logging lua strings 2020-05-16 09:39:05 +01:00
Peter Bell
3189a3cbee Update logging code to reduce unnecessary string copying:
* 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
2020-05-16 09:39:05 +01:00
peterbell10
13144a08e4
Enable some more clang-tidy linter checks (#4738)
* 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
2020-05-14 22:15:35 +00:00
Mat
e053f72db8
Android build cleanup (#4734)
* Android build cleanup

* Remove unnecessary workaround

* Remove more unnecessities

* Bump cmake version
2020-05-10 16:18:28 +00:00
peterbell10
84289a2ba9
Cleanup some workarounds and warnings (#4735)
* Cleanup thread_local usage in FastRandom

* Use constexpr to avoid clang warning

* Fix more Wglobal-constructor warnings

* Make MSVC happy?
2020-05-10 16:16:49 +00:00
peterbell10
154df6b09d
Cleanup unneeded globals (#4736) 2020-05-10 16:16:38 +00:00
Peter Bell
1123c95cf2 Enable C++17 in build 2020-05-09 20:37:16 +01:00
peterbell10
e6634ed26c
Update submodules (#4727)
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.
2020-05-09 15:51:15 +01:00
peterbell10
bd54cb71e5
Fix clang-tidy errors (#4730) 2020-05-09 01:38:17 +00:00
Tiger Wang
a9e06d33c5 Add some comments about terracing 2020-05-08 10:52:35 +01:00
Tiger Wang
6ac11925f1 Update RedstoneWireHandler style 2020-05-08 10:52:35 +01:00
mBornand
1565d9b3ce
Use Vector3 for cLineBlockTracer and cBlockTracer (#4715)
* cLineBlockTracer uses Vector
2020-05-08 10:04:07 +01:00
peterbell10
c4ca11b372
Fix SetBlockMeta call in observer handler (#4728) 2020-05-08 09:46:03 +01:00
Mat
c710f6a4ea
Remove old Android leftovers (#4722) 2020-05-07 22:14:00 +03:00
mBornand
b9f441294d
Add tree generation for ExtemeHills and other biomes (#4713) 2020-05-06 17:31:52 +02:00
Mattes D
bdb8830b9c Fixed various MSVC warnings. 2020-05-06 12:53:37 +01:00
peterbell10
57952505e5
Update fmt to 6.2.0 (#4718)
* Update fmt to 6.2.0
2020-05-05 22:52:14 +01:00
Mat
f4b5c4c341
Remove cRankManager migration code (#4714)
* Remove cRankManager migration code

* Restore mistakenly removed code

* Display log message when creating ranks
2020-05-05 21:20:07 +03:00
Alexander Harkness
4e4ef9052e
Refactor minecart collision detection code. (#4712)
* Refactor minecart collision detection code.

 - Use new GetBoundingBox function.
 - Handle descending and ascending rails.
 - Snap to descending rails.

* Add message for UNREACHABLE
2020-05-04 21:04:21 +00:00
Tiger Wang
24833f7386 Add two missing include guards 2020-05-04 13:58:43 +01:00
Tiger Wang
eb3ca16921 Fix one definition rule violations 2020-05-04 13:29:56 +01:00
Tiger Wang
9b68fab8ed Fix incorrect formatter invocation 2020-05-04 12:19:12 +01:00
Lukas Pioch
e3de0aef64
Added check if player is in spectator mode (#4709) 2020-05-04 08:14:59 +00:00
Alexander Harkness
8240894d07
Add comment for boat position broadcast 2020-05-04 09:13:55 +01:00
Tiger Wang
07ca095740
Improve entity position updates (#4701)
* 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
2020-05-04 08:10:47 +00:00
DrButcher
258318ab98
Buttons can now be triggered by arrows. (#4670)
* Buttons can now be triggered by arrows.
2020-05-03 21:05:32 +01:00
Alexander Harkness
994036a3b8
Add cEntity::GetBoundingBox, and use where appropriate. (#4711)
* Add cEntity::GetBoundingBox, and use where appropriate.
2020-05-03 21:04:33 +01:00
mBornand
5b92e6654f Update src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2020-05-03 11:51:11 +01:00
mBornand
1c579f58aa Update src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2020-05-03 11:51:11 +01:00
Marc_Bornand
83193f132c Made some style update and add comments 2020-05-03 11:51:11 +01:00
Marc_Bornand
055c9ef90e Fix the connexion to the side of the repeater 2020-05-03 11:51:11 +01:00
Alexander Harkness
942403de2b Modify pickup collection behaviour to correspond to vanilla.
As documented here: https://www.spigotmc.org/threads/item-pickup-radius.337271/#post-3141146
2020-05-03 11:49:07 +01:00
Mat
f5ce03d10d Assert if world is incorrect 2020-05-03 11:49:00 +01:00