Tiger Wang
d92509a6e7
Re-implement up/down placement metadata ( #5219 )
...
+ Use player position when placing blocks which can face up or down, seems to better correspond to Vanilla behaviour.
* Fixes #4651
2021-05-14 10:42:08 +01:00
Tiger Wang
125df19477
Do not fake a tool when converting to pickups ( #5170 )
...
* When the cause of destruction was world-induced (CanBeAt check failed) there is no tool. Pass the nullptr directly to ConvertToPickups and let it handle it.
* Fixes #4795
- Remove unused a_Digger parameter to ConvertToPickups.
2021-03-28 14:41:34 +01:00
12xx12
3381c0f6d6
Merged OnBreak with OnPlayerBreak ( #4967 )
...
Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-08 20:13:44 +01:00
peterbell10
a9031b6bae
Fix cmake not adding Werror on clang, and _lots_ of warnings ( #4963 )
...
* Fix cmake not adding Werror on clang, and _lots_ of warnings
* WIP: Build fixes
* Cannot make intermediate blockhandler instance
* Tiger's changes
* Fix BitIndex check
* Handle invalid NextState values in cMultiVersionProtocol
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-05 10:27:14 +00:00
Tiger Wang
c53a0ba5f6
Unify block entity pickup conversion
...
- Removed normal BlockHandler knowledge of block entities during conversion
+ Added cBlockEntity::ConvertToPickups that handles it
2020-09-25 09:07:01 +00:00
Tiger Wang
68cced73af
BlockHandler initialisation is a constant expression ( #4891 )
...
* BlockHandler initialisation is a constant expression
If we can't make it all namespaces, this is the next best I guess.
+ Tag handlers constexpr, const as needed
+ Inherit constructors
* Privatise handler functions
* More constexpr
Co-authored-by: Alexander Harkness <me@bearbin.net>
2020-09-20 13:50:52 +00: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
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
Mattes D
9ee47e5999
Using Super.
2020-04-16 20:07:48 +00:00
Alexander Harkness
8914355895
Fix rotation metas on blocks
2020-04-11 19:00:05 +00:00
Alexander Harkness
f40aba941e
Add mixins for blocks that rotate based on player yaw at placement
...
Also add observer block handler.
2020-04-10 13:07:16 +00:00
Mat
3d5a295423
Ender chest is not affected by piston ( #4526 )
2020-03-22 00:18:49 +00:00
Mattes D
221cc4ec5c
Refactored block-to-pickup conversion. ( #4417 )
2019-10-16 10:06:34 +02:00
Tiger Wang
b8ab03bc6b
At long last... Piston animations!
...
* Fixes #3198
* Fixes #57 (again lol)
2018-07-25 15:29:53 +01:00
peterbell10
0d0323608d
cBlockHandler: take player by ref
2017-08-01 08:21:20 +02:00
peterbell10
60dfaa0967
Allocate redstone component handlers upfront
2017-07-17 21:40:43 +02:00
mathiascode
4311f4a658
Added some blocks and items ( #3503 )
2017-02-14 11:13:55 +01:00
Tiger Wang
d46f7ce2c8
Redstone fixes ( #3285 )
...
* Comparators and pistons no longer update instantly
* Fixes #3168 .
* Consolidated comparator code
* As a result, fixed an issue where GetPowerLevel didn't consider block
entities behind it (only GetFrontPowerLevel did)
2016-07-31 21:54:35 +01:00
Mattes D
a3112cdc45
Revert "Redstone fixes"
2016-07-29 07:56:50 +02:00
Tiger Wang
04cc8aa0f5
Comparators and pistons no longer update instantly
...
* Fixes #3168 .
2016-07-28 23:20:52 +01:00
LogicParrot
ca6ef58b1e
Bulk clearing of whitespace
2016-02-05 23:50:18 +02:00
Tiger Wang
5b62c4c314
Reorganised the redstone simulator
...
-> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan!
* Uses classes and inheritance now
* Speed should be improved
2015-12-18 13:17:38 +00:00
bibo38
ea55e75672
Refactored code to use vectors in the cPistonHandler class
2015-11-07 17:34:54 +01:00
bibo38
429f615390
Added some code improvements
2015-11-07 17:23:02 +01:00
bibo38
0447af8bcb
Renamed GetDirectionVec into VectorFromMetaData to improve code readability.
2015-11-07 17:23:02 +01:00
bibo38
f8c28cc373
Commented the GetDirectionVec method
2015-11-07 17:23:02 +01:00
bibo38
64012bf46f
Fixed the style problems and added some comments
2015-11-07 17:23:02 +01:00
bibo38
5fa077f869
Removed unused CanPull method
2015-11-07 17:23:02 +01:00
bibo38
558991a725
Extracted block moving code into a seperate method
2015-11-07 17:23:02 +01:00
bibo38
f35060e8b5
Replaced the usage of pistonMeta with a direction vector to allow better meta value abstraction
2015-11-07 17:23:02 +01:00
bibo38
e2d88106a9
Added the CanPushBlock method for the piston push check.
...
This allows the recursive check for blocks to push, which is needed to implement the slime blocks into the piston system.
2015-11-07 17:23:02 +01:00
Mattes D
6e4122e551
Unified the doxy-comment format.
2015-07-31 16:49:10 +02:00
Tiger Wang
8656e149c8
Improved maps
2015-07-14 21:46:30 +01:00
Mattes D
c13b1931ff
More style checking.
...
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
bibo38
3058c4c010
Removed Metavalue from Piston drops. Bugfix #1765
2015-03-20 11:14:42 +01:00
Masy98
1d875d0bc8
Added Daylight Sensors to the "can't push" list
2014-10-01 18:08:31 +02:00
Masy98
cc9e598803
Added missing 1.8 blocks, E_METAs and sounds
2014-10-01 17:57:53 +02:00
Masy98
2feee3b316
Merge branch 'master' into blocks
...
Conflicts:
src/Items/ItemHandler.cpp
src/Simulator/IncrementalRedstoneSimulator.cpp
2014-09-26 18:32:31 +02:00
Tycho
6e7c0e33b5
Added first test to show the object can be created
2014-09-17 18:40:10 +01:00
Masy98
741791ecfc
Added barrier block
2014-09-11 16:07:54 +02:00
Howaner
89b1bbdc5f
Added beacon.
2014-07-30 21:59:35 +02:00
madmaxoft
5e198c6730
Basic style fixes.
2014-07-17 22:50:58 +02:00
madmaxoft
2423fbf2ef
Normalized comments.
...
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.
2014-07-17 22:15:34 +02:00
Masy98
2d245264b1
Added various missing blocks in the lists in BlockInfo.cpp
2014-07-15 13:34:45 +02:00
Tiger Wang
416c160fb5
Suggestions
2014-07-11 19:40:33 +01:00
Tiger Wang
9e44b0aae1
Implemented trapped chests & others
...
+ Added trapped chests
* Fixed a bunch of bugs in the redstone simulator concerning wires and
repeaters
* Other potential bugfixes
2014-07-06 23:50:22 +01:00
Tiger Wang
aa4477822a
Suggestions
2014-05-29 16:03:41 +01:00
Tiger Wang
ee929793f0
Hopefully fixed piston duplication issues
...
* Fixes #879
* Fixes #714
2014-05-25 13:46:34 +01:00
Tycho
8464f689ea
Improved Type safety of eBlockFace
...
May Fix #640
2014-02-04 10:59:05 -08:00
Tycho
cf3b4ec226
Changed Signiture of OnDestroyedByPlayer
2014-02-01 06:01:13 -08:00