6f6b23d4e4
Integrate dev-major-next version of pocketmine/math
...
this is a reduced version compared to the original, due to the difficulty of getting rid of Facing values internally.
2025-08-29 21:47:20 +01:00
5899f2fc1d
Block: introduce new methods to reduce support type boilerplate checks
...
this switches from a 'can be supported by' concept to a 'can stay at this position' paradigm, which requires way less boilerplate code.
there may be further improvements we can make from here, such as adding traits, but this is a good first step.
2023-07-21 15:02:25 +01:00
2940547026
Eliminate repeated calls to Position->getWorld()
...
as well as improving readability, it also improves performance in some areas.
2022-07-20 20:44:05 +01:00
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
79d1feff9c
Replace disallowed operators in src/block/
2022-01-20 16:57:09 +00: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
e97234d420
Refactor Rail handling to allow LSP-complaint shape handling
...
the reason there hasn't been any API until now is because of how inconvenient it was to expose a LSP-compliant API _and_ use the same base class for handling all the connection logic. This commit fixes that problem by abstracting shape handling away from BaseRail entirely, so that now it deals exclusively with connections. Deciding the shape of rail to use is now the job of the subclasses.
2021-07-22 17:35:10 +01:00
2476f40cc6
Rail: store shape instead of connections
...
shape is what we'll eventually expose on the API.
2021-07-22 16:45:42 +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
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
86e051b7bf
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
2020-04-18 17:33:05 +01:00
aac7da6c96
eliminate remaining empty() usages
2020-02-07 21:51:50 +00:00
cb16f5c142
Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/lang/Language.php
# src/network/mcpe/protocol/AddItemActorPacket.php
# src/network/mcpe/protocol/AddPlayerPacket.php
# src/network/mcpe/protocol/SetActorDataPacket.php
# src/network/mcpe/serializer/NetworkBinaryStream.php
# src/permission/Permission.php
# src/pocketmine/block/Leaves.php
# src/pocketmine/entity/DataPropertyManager.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/item/Banner.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/io/LevelProvider.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/network/mcpe/protocol/AddActorPacket.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
# src/pocketmine/tile/Banner.php
# src/scheduler/BulkCurlTask.php
# src/updater/AutoUpdater.php
# src/utils/Config.php
# src/utils/Utils.php
# src/world/generator/Flat.php
# src/world/generator/Generator.php
2020-01-31 21:07:34 +00:00
1388a2287a
Merge commit '5c8a625d88e511a6ebad765714b75f1a86dfd37f'
2020-01-31 18:50:23 +00:00
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
794c7b2469
clean up imports
2019-08-20 15:59:27 +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