Commit Graph

99 Commits

Author SHA1 Message Date
954e8e6e6f update pocketmine/math dependency 2020-06-19 11:33:10 +01:00
60a6b4b10d Entity: use EntityFactory helper function to deserialize Motion 2020-06-19 10:51:27 +01:00
4b528aa637 NBT is no longer needed to create an entity
it's still able to be provided, but shouldn't be needed in the majority of cases (constructor args and/or API methods should be sufficient).
2020-06-19 10:51:27 +01:00
1205432c34 Extract mandatory parameters into constructor parameters
the goal is obviously to ditch NBT entirely here, but there's more work to be done before that becomes possible.
2020-06-19 10:51:27 +01:00
cf85857660 Entity: remove duplicated code from saveNBT() 2020-06-19 01:07:18 +01:00
3e9018a838 Merge commit '7af4e70f6'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/entity/Entity.php
2020-06-04 14:02:00 +01:00
6df43338df Merge commit 'c3a795e87'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
#	src/pocketmine/entity/Entity.php
2020-05-31 14:56:37 +01:00
6257f717b1 Entity: make networkProperties private
this reduces the temptation to use it in high-level code, as well as making syncNetworkData() more useful (now it can export to many data collections, which means we can start to think about having a property cache per network session, which is more flexible)
2020-05-21 20:29:06 +01:00
ec8ee29291 moving sneak & sprint properties to Living 2020-05-21 19:55:58 +01:00
3f1f135a59 remove a couple more Position->getWorld() usages 2020-05-19 21:38:51 +01:00
337addf1de Eradicate remaining usages of public Position->world field
and as an added bonus, ditch a bunch of extra phpstan errors
2020-05-19 19:14:56 +01:00
8a8b1b0b97 Remove Position->setWorld() 2020-05-19 18:33:16 +01:00
148228e360 update pocketmine/math, adapt to add() changes 2020-05-19 12:26:18 +01:00
c30dd9f1b6 Entity: add abstract getNetworkTypeId(), remove NETWORK_ID constant
this now requires that subclasses supply a proper NETWORK_ID.
2020-05-16 16:08:12 +01:00
9cf410d484 Player: fixed broken behaviour of entity spawning on chunk send, closes #3355 2020-05-05 18:55:13 +01:00
81f982a8d9 remove hardcoded legacy entity type ID mapping, load from resources instead 2020-05-04 13:47:39 +01:00
8682ea35f7 Introduce some (not great) API for entity animations
while this API is a bit yucky, it's a step forward for protocol isolation and offers the possibility of controlling animations by adding events.
2020-05-01 13:57:26 +01:00
c8c0a1533c NetworkSession: seal up actor removal behind API 2020-04-29 17:00:47 +01:00
4ce6525065 NetworkSession: incomplete abstraction of SetActorDataPacket handling
this needs to have the metadata properties separated too, but that's a job that's going to get VERY messy.
2020-04-29 16:50:52 +01:00
7d9df6af6f Convert EntityFactory to singleton 2020-04-24 22:43:02 +01:00
86e051b7bf Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3' 2020-04-18 17:33:05 +01:00
da7ff9b1fe Airgap Attribute, fix decoding of non-registered attributes for protocol debugging 2020-03-24 00:43:44 +00:00
b4b1877ce5 Merge branch 'next-minor' 2020-03-09 14:38:15 +00:00
aac7da6c96 eliminate remaining empty() usages 2020-02-07 21:51:50 +00:00
ff63f6d055 fill in more iterable types (master) 2020-02-01 20:19:57 +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
eb6bb1aae1 Merge commit '839a789180cb3acd2e16006afa9b787903ffbbcd' 2020-01-31 19:16:09 +00:00
055b13a6cf strip extra blank lines (php-cs-fixer) 2020-01-22 15:14:10 +00:00
a3bffd375b master-specific addendum to cd55cdf5c6 2020-01-22 15:07:47 +00:00
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
7762b73647 Merge commit 'd9bbab54f4608954a8ac0fffa88c2f32c07669f1' 2020-01-18 18:07:45 +00:00
aba71762e9 master-specific @var annotations 2020-01-09 17:50:01 +00:00
6935030e0c entity: use 0 for no-target a la vanilla 1.13, fix player arms bug
I have no idea why this was changed, -1 is still used for every other property, but packet traces confirm this is correct.
2019-12-12 00:20:09 +00:00
5b91be81cc Entity: rewrite dbbe1f2d5c for master 2019-12-03 12:16:10 +00:00
d3d7709ead Merge branch 'next-minor' 2019-12-03 11:55:45 +00:00
7e5193355e Remove old entity movement hack
This was intended to try and mitigate player movement clipping through blocks triggering anti cheat. Now that the anti cheat is gone, this code is no longer needed.
2019-08-21 18:46:39 +01:00
6b22f68674 Player: remove sendDataPacket() 2019-08-20 15:50:34 +01:00
965177fb74 Server: drop redundant proxy function broadcastPacket()
this is just making it harder to search for broadcast usages, and we want to get rid of all packet broadcasting shit from Server anyway.
2019-08-19 19:30:57 +01:00
2d4a32fc77 first look at separating Entity and Location 2019-08-19 17:20:34 +01:00
200bcb485e Merge branch 'stable' 2019-08-14 18:20:55 +01:00
d04793145c Remove usages of AxisAlignedBB->setBounds() and AxisAlignedBB->setBB()
these usages make no sense in the contexts they are used in, because their uses require another BB to be created anyway. It makes more sense to simply destroy the old one instead of having it mutable.
2019-08-14 17:28:06 +01:00
e9ed46a9c7 Entity: avoid bad hack on high load which causes bugs on entity move 2019-08-13 18:08:56 +01:00
358fea9645 Move Location to Entity namespace 2019-08-05 17:20:48 +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
cf271dab2b Entity: fixed undefined variable in getTargetEntity() 2019-08-05 16:19:49 +01:00
1cd955c216 Entity: added getEyePos() 2019-08-02 17:29:32 +01:00
c1ef5ba8ab Entity: remove redundant check from spawnToAll() 2019-08-02 17:10:58 +01:00
296061d25d reduce boilerplate around attribute handling 2019-07-31 16:41:09 +01:00
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00