1
0
Commit Graph

10935 Commits

Author SHA1 Message Date
Tiger Wang
c0d1cffe0b Delete unreferenced variable 2020-08-05 08:35:37 +01:00
Tiger Wang
25906a3b87 Adjust incorrect palette inclusions 2020-08-05 08:35:37 +01:00
Tiger Wang
5ed4222dee Delete redundant std::move in World loader 2020-08-05 08:35:36 +01:00
Alexander Harkness
7cd6f0e01e
fixup! Disable LTO on Android 2020-08-04 23:37:21 +01:00
Alexander Harkness
e317e7aa50
Disable LTO on Android
Build breaks with it enabled
2020-08-04 23:24:35 +01:00
Alexander Harkness
727844a15d
Fix android builds (hopefully) 2020-08-04 23:01:40 +01:00
Alexander Harkness
5e3f51f5ff
Hotpatch optional for macOSX builds on buildserver 2020-08-04 23:01:39 +01:00
12xx12
781d648571
Code cleanup in cChunk.PlaceBlock() for checking if BlockEntity should be spawned (#4812)
* Changed switch for call in cChunk for call to function cBlockEntity to remove unnecessary confusions while implementing new BlockEntities
2020-08-04 19:01:36 +01:00
Tiger Wang
501702065b Fixup test block handler stubs 2020-08-04 18:39:47 +01:00
Tiger Wang
5bb6512435 Simply Y-check in door handler 2020-08-04 18:26:25 +01:00
Tiger Wang
766a950d20 Continue with placement when using iron doors 2020-08-04 18:18:37 +01:00
Tiger Wang
71ba18d6c6 Door drops respect player gamemode
* Rely on caller to handle converting to pickups, all OnBroken needs to do is to maintain the unity of the door
* Fixes #4797
* Fixes #4796
2020-08-04 18:15:18 +01:00
Tiger Wang
c3d6afe47e Corrected wakeup sequences
* Pistons/Ice no longer need to FastSetBlock first (#4600), and the former don't drop items when broken in creative
- Begin migration away from stationary fluids
* Tick the chunk after applying a client's changed
* Broadcast pending blocks at the end of a tick
2020-08-04 18:15:18 +01:00
Tiger Wang
6bdd130aab OnBroken/OnPlaced are for entity actions
* Call OnPlaced/OnBroken in PlaceBlock/DigBlock
- Remove unused Placing/Breaking handlers
* Have the blockhandler's Check handle neighbour updating, instead of QueueTickBlockNeighbors
2020-08-04 18:15:18 +01:00
Tiger Wang
adb86a75da Do not GetBlock individually in simulators
* Have the simulator manager get the block and pass it on
+ Add new overload for WakeUp, called when the manager wakes face positions
2020-08-04 18:15:18 +01:00
Tiger Wang
b205d233bd Use std::queue for the block tick queue 2020-08-02 15:52:06 +01:00
Tiger Wang
71ffa76847 Remove unused block tick related cChunk functions 2020-08-02 15:52:06 +01:00
Tiger Wang
225c2fa9f6 Always use relative coordinates in AddBlock
+ Pass block, use relatives
* Fixes everything immediately converting abs back to rel and getting block, when these data were already available
2020-08-02 15:52:06 +01:00
Tiger Wang
99856df686 Add WakeUp/AddBlock distinction
* WakeUp is for singular changes (block breaking for example). The simulator should check blocks around the position and discover other affected blocks as it sees fit
* AddBlock is for when you know a whole area is to be updated; chunk loading, or area wakeups for example
+ Prepares for correct handling of destroyed blocks after removal of SolidBlockHandler in the redstone simulator
2020-08-02 15:52:06 +01:00
Tiger Wang
6d7b83a69d Do not impose redstone wakup penalty for all blocks 2020-08-02 15:52:06 +01:00
Tiger Wang
fd5191854d Delegate simulator wakeup to cChunk 2020-08-02 15:52:06 +01:00
Tiger Wang
6c47f46c31 Ensure updating relatives calls the correct base case
* Fixed recursive base unintentionally scheduling the origin position for an update because it called the wrong function
2020-08-02 15:52:06 +01:00
Mattes D
46398f4671 Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
12xx12
54e499c065
Added HandleCraftItem call to ShiftClickedResult to make sure achievements are awarded (#4791) 2020-08-01 20:23:01 +02:00
Tiger Wang
fb3d3dac1e Correct Serialise393/477 version annotations 2020-07-28 00:08:57 +01:00
Tiger Wang
99f8c44342 1.14 connection support 2020-07-26 18:55:16 +01:00
Tiger Wang
1673c84978 Remove redundant ErasePowerData call
* Also fix a return that should've been continue
2020-07-26 16:08:20 +01:00
Tiger Wang
860eedd3d7 Toggleables: update simulators when changed 2020-07-26 16:07:37 +01:00
Tiger Wang
7d93742498 Clang Tidy fix 2020-07-26 16:06:57 +01:00
Tiger Wang
2e18e4f51c Comparators: use <= in comparison mode 2020-07-26 14:16:46 +01:00
Tiger Wang
4e5ab02a58 Use SimulateChunk in redstone simulator
+ Improved performance, reduces bottleneck in chunkmap lookup
* Stop allocating and throwing away lots of small vectors in Update/GetValidSourcePositions return values
- Remove unused GetPowerLevel virtual
2020-07-26 14:16:46 +01:00
Tiger Wang
de06ae7add Fix incorrect big flower translation
* Upgrade palette had incorrect values for upper half of large flowers
2020-07-26 01:23:01 +01:00
Tiger Wang
b30d70f09d Call BlockEntityWithItems from ChestEntity slot changed handler
* Small degree of unification for what to do with the current entity
* Make sure to do necessary actions for both sides of a double chest
2020-07-26 00:02:07 +01:00
Tiger Wang
6d650d5f3c Reduce unnecessary wakeups
- cSimulator no longer wakes up positions already woken by cChunk::SetBlock
2020-07-25 20:59:12 +01:00
Tiger Wang
e4c09ca87d Use relative vectors in cChunk::DoWith 2020-07-25 20:31:48 +01:00
Tiger Wang
b6e4a986b6 Correct placement for tripwire hooks
487f9a2aa9 (r40900869)
2020-07-25 20:29:55 +01:00
Tiger Wang
bc01cd5e75 Redstone: check validity of GetBlock 2020-07-24 09:11:40 +01:00
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