38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
6482aa7c64
Block: introduce logic for face support types ( #4886 )
...
fixes #4856
fixes #458
fixes #4529
fixes #3299
Added API method Block::getSupportType(Facing) : SupportType
Added SupportType enum
fixes torch, lantern, door etc. placement on slabs and upside-down stairs
2022-05-20 15:18:34 +01:00
7e903fde5b
Fixed multiple players being able to sleep in the same bed
2022-02-10 00:57:43 +00:00
79d1feff9c
Replace disallowed operators in src/block/
2022-01-20 16:57:09 +00:00
091673d8f1
Fixed "You can only sleep at night" message ( #4671 )
2021-12-23 23:52:07 +00:00
8e2486b96a
Bed: bounce doesn't apply if the entity was sneaking
2021-09-05 20:14:17 +01:00
ded778f422
Implemented bed bouncing
2021-09-05 20:11:49 +01:00
7fd712c1ff
Refactor Block & Tile: getPos() to getPosition() ( #4395 )
...
this also changes the name of the class property 'pos' to 'position' as well as Block->getPosOffset() to Block->getPositionOffset()
2021-08-23 14:01:32 +01:00
804d02b086
TranslationContainer: added prefix(), postfix() and format()
2021-08-14 16:08:22 +01:00
bdac98beaf
Block: get rid of getNonPersistentStateBitmask(), add writeStateToItemMeta()
...
this is more flexible and less confusing.
2021-08-02 19:17:24 +01:00
c05f6db8d9
Bed and Skull items now return a correct block, with appropriate type information
...
I wanted to do the same for banners, but unfortunately banners are a tad more complicated.
2021-06-30 17:27:14 +01:00
2b4a1ffdfb
Bed: use ColoredTrait
2021-06-30 16:07:46 +01:00
94e16f416d
Added KnownTranslationKeys (generated) and start using it
2021-06-29 22:46:04 +01:00
f68b9e79e1
Use typed properties in block namespace
2021-05-22 23:52:31 +01:00
376d2c4cd4
Consistently declare BlockBreakInfo at the constructor call site
...
instead of inside the class
2021-05-20 22:49:51 +01:00
32929925aa
Block: added a bunch of state manipulation APIs
2020-11-03 19:13:32 +00:00
7399e6944e
Consistent fluency for block property setters
2020-08-06 13:46:08 +01:00
56ae3d01da
block: added HorizontalFacingTrait and AnyFacingTrait
...
these are primarily intended for deduplication of code and ability to cross-reference. Don't expect this API to remain the same.
2020-08-05 21:17:37 +01:00
060c300d50
Bed::setOccupied() no longer sets itself into the world
...
setting itself into the world is very annoying when trying to simply set up a blockstate.
2020-08-05 20:59:59 +01:00
68c408268c
Separate dye colour ID management from DyeColor enum
2020-07-05 19:04:22 +01:00
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
5a94af40e2
Convert ItemFactory to singleton
2020-04-24 00:18:31 +01:00
86e051b7bf
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
2020-04-18 17:33:05 +01:00
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
2d4a32fc77
first look at separating Entity and Location
2019-08-19 17:20:34 +01:00
4898a35613
cleanup block dual bounding box clusterfuck
...
"bounding box" serves no tangible purpose, only collision boxes do right now.
2019-08-15 17:23:55 +01:00
53ab860db5
first shot making Block not extend Position
...
this makes some stuff a lot less pretty, but this seems to be the bare minimum necessary to do this task. It can be enhanced later.
2019-08-05 16:44:09 +01:00
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00