80e150c803
Entity: get rid of temporalVector mutation
...
except for checkBlockCollision, these are all cold paths ... this gets us one step closer to immutable Vector3
2020-06-20 21:41:19 +01:00
42637f97c6
Liquid: eliminate some unnecessary Vector3 field mutations
2020-06-20 21:32:24 +01:00
d38c17835d
Properly switch to string entity IDs
2020-06-20 13:43:31 +01:00
a988578ee0
protocol: move PotionType and PotionContainerChange recipes to types/recipe namespace
2020-06-20 11:43:47 +01:00
0784bfa2fb
phpstan: drop another pattern that was fixed by recent changes
2020-06-20 11:30:14 +01:00
032dc57090
phpstan recognizes the existence of parallel\bootstrap now
2020-06-20 11:29:45 +01:00
6be56de3ed
clean some newly fixed errors from phpstan baselines
2020-06-20 11:24:39 +01:00
d5db163208
protocol: added proper object wrappers for gamerules
2020-06-20 11:24:39 +01:00
d2089afbc3
ItemBlock: get rid of -1 meta check (meta is never -1 in this code path now)
2020-06-20 09:52:02 +01:00
62e7b0e2b1
(Splash)Potion: do not assume that META == potion ID
...
it probably will be, but meta might not be accessible anymore soon.
2020-06-20 09:31:06 +01:00
d62d0762ff
item: remove some unnecessary CompoundTag usages
2020-06-19 22:59:19 +01:00
4e8e10ca45
EntityFactory: remove obsolete indirection (class mappings are redundant here now)
2020-06-19 22:18:42 +01:00
0a43fd816c
EntityFactory: drop unnecessary @param
2020-06-19 22:10:35 +01:00
47baaf4c72
move NBT helper functions from EntityFactory to EntityDataHelper
2020-06-19 22:04:36 +01:00
1a3445f4b5
EntityFactory: drop automatic provisioning of short class name as save ID
2020-06-19 22:03:22 +01:00
012acdd4cb
move runtime entity ID counter from EntityFactory back to Entity
...
EntityFactory is specialized for the purpose of deserializing data from worlds, and runtime ID assignment isn't related.
2020-06-19 21:55:49 +01:00
6d3750994b
EntityFactory: remove dead function
2020-06-19 21:54:23 +01:00
954e8e6e6f
update pocketmine/math dependency
2020-06-19 11:33:10 +01:00
fb4a99a0ef
Position: x,y,z parameters are now mandatory
2020-06-19 11:21:47 +01:00
9f89f2887a
Location: x,y,z parameters are now mandatory
2020-06-19 11:19:05 +01:00
4b0bf34adb
Location: add native typehints
2020-06-19 11:17:20 +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
0a1bb0041b
Player: avoid using NBT for onGround hack
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
3f135da704
Simplify motion handling in ProjectileItem
2020-06-19 10:51:27 +01:00
6a26c0bebf
EntityFactory now exclusively handles loading data from disk
...
this commit removes the ability to replace centrally registered entity classes in favour of using constructors directly.
In future commits I may introduce a dedicated factory interface which allows an _actual_ factory pattern (e.g. factory->createArrow(world, pos, shooter, isCritical) with proper static analysability) but for now it's peripheral to my intended objective.
The purpose of this change is to facilitate untangling of NBT from entity constructors so that they can be properly created without using NBT at all, and instead use nice APIs.
Spawn eggs now support arbitrary entity creation functions like EntityFactory does, allowing much more flexibility in what can be passed to an entity's constructor (e.g. a Plugin reference can be injected by use()ing it in a closure or via traditional DI.
2020-06-19 10:51:27 +01:00
72a7fc68c1
First look at making entity creation closure-driven
...
this allows doing stuff like injecting plugin references to entity constructors for now. I want to make this more flexible still, but I've done about as much as I feel like doing today and don't want this disappearing into a stash to never be seen again.
2020-06-19 10:51:27 +01:00
3bdd9ee860
phpstan: drop a bunch of error patterns that don't appear on 0.12.29+
2020-06-19 10:49:21 +01:00
64e9647334
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/convert/LegacySkinAdapter.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/phpstan-bugs.neon
2020-06-19 10:48:27 +01:00
e32180ce93
phpstan: drop an obsolete phpstan-bugs ignoreError
2020-06-19 10:41:41 +01:00
ced89add3c
Human: remove dead function
2020-06-19 01:13:00 +01:00
cf85857660
Entity: remove duplicated code from saveNBT()
2020-06-19 01:07:18 +01:00
0ae357cf8f
ProjectileItem: get NBT as far away as possible
2020-06-18 20:25:19 +01:00
e105578be0
LegacySkinAdapter: an extra check for resourcePatch (fixes 3 phpstan explicitMixed errors)
2020-06-18 20:08:38 +01:00
b3df5f4e95
CS: strip unneeded phpdoc
2020-06-18 20:01:49 +01:00
11eb1f1c5e
imports cleanup
2020-06-18 20:01:19 +01:00
44814a8421
AutoUpdater: remove useless check (details_url is mandatory)
2020-06-18 19:06:42 +01:00
98f0447912
AutoUpdater: use JsonMapper to handle API response information
2020-06-18 19:03:11 +01:00
2687e63645
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/block/Cake.php
2020-06-18 18:10:27 +01:00
a9d98bdf73
phpstan: baseline our way into checkExplicitMixed territory
2020-06-18 18:07:21 +01:00
755e53cd71
JwtUtils: added a split() function to reduce code duplication
2020-06-18 12:05:54 +01:00
222399d178
EncryptionContext: fix exception message
2020-06-18 11:52:05 +01:00
d931a5bcc0
phpstan: drop an obsolete level 7 ignoreErrors pattern
2020-06-18 11:51:07 +01:00
95114dcc1e
EncryptionContext: fixed a phpstan level 7 error (openssl_digest() might return false for god knows what reason)
2020-06-18 11:50:43 +01:00
edc3156bea
Rename NetworkCipher -> EncryptionContext
2020-06-18 11:37:53 +01:00
c601352777
Fixed wrong meta value when pick cake block. ( #3593 )
2020-06-18 11:14:57 +01:00
82b3e3398b
make more use of igbinary_serialize() and igbinary_unserialize()
2020-06-17 23:03:03 +01:00
6f4d4be3da
InGamePacketHandler: handle InvalidSkinException thrown by SkinAdapter::fromSkinData()
2020-06-17 22:31:44 +01:00
05615b3eb7
ClientDataToSkinDataHelper: move safeB64Decode to its own function
2020-06-17 22:27:13 +01:00