Dylan K. Taylor
fd99445c5b
World->getSafeSpawn() now throws if the target is in ungenerated terrain, instead of silently returning the default
...
this WILL cause crashes in some cases on slower machines (#2724 ), but it's
better than randomly spawning at the top of the map.
2020-11-26 19:36:37 +00:00
Dylan K. Taylor
4102205ba6
Enhance type information in PlayerCreationEvent
2020-11-24 16:28:36 +00:00
Dylan K. Taylor
af1fe7c293
Merge branch 'stable'
2020-11-21 21:13:48 +00:00
Dylan K. Taylor
bc208e11f4
phpstan 0.12.57
2020-11-21 18:07:14 +00:00
Dylan K. Taylor
9e85ee4a7a
Fixed missing field on Persona skin encode
2020-11-21 18:01:56 +00:00
Dylan K. Taylor
23849b7f63
3.16.1 is next
2020-11-21 01:25:06 +00:00
Dylan K. Taylor
d2f68836c6
Release 3.16.0
2020-11-21 01:25:06 +00:00
Dylan K. Taylor
d19db5d2e4
fix phpstan warnings
2020-11-21 01:16:04 +00:00
Dylan K. Taylor
98cdc80d37
Protocol changes for 1.16.100
2020-11-21 01:07:25 +00:00
Dylan K. Taylor
f2bdbb0c35
TypeConverter: fix using singleton to get its own context
...
I guess this must have been refactored from some other class?...
2020-11-20 21:31:06 +00:00
Dylan K. Taylor
8273f789ee
Backport SingletonTrait to PM3
2020-11-20 21:00:47 +00:00
Dylan K. Taylor
870d237260
BlockFactory::get() second parameter is now mandatory
2020-11-18 00:50:01 +00:00
Dylan K. Taylor
28335e3c45
Player: fixed self-defeating condition in item consuming
...
this was giving players infinite food and potions.
2020-11-17 20:33:20 +00:00
ipad54
6a1f551aab
[ci skip] update TileFactory TODOs ( #3912 )
2020-11-17 11:04:26 +00:00
Dylan K. Taylor
62b9d97060
Break circular dependency in Player->disconnect() usages
...
none of these usages require onPlayerDestroyed() to be fired since they are all being called during disconnects anyway.
2020-11-16 23:05:56 +00:00
Dylan K. Taylor
09b22c1e79
NetworkSession: drop @var doc comment referring to nonexisting variable
2020-11-16 22:51:03 +00:00
Dylan K. Taylor
c3c647d51e
NetworkSession: remove useless disconnect() call
...
this can't execute here because of the disconnectGuard, so this call always does nothing.
2020-11-16 22:13:48 +00:00
Dylan K. Taylor
37299ab804
ChunkCache: explicitly check for requesting of unloaded chunk
...
NetworkSession will never do this, but other things might.
2020-11-16 19:45:46 +00:00
Dylan K. Taylor
1d27225553
Relocate cache-related classes to mcpe\cache namespace
2020-11-16 19:39:30 +00:00
Dylan K. Taylor
869c9dabf1
SetCommandsEnabledPacket: added ::create()
2020-11-16 19:11:10 +00:00
Dylan K. Taylor
ca6a892834
[ci skip] NetworkSession: added some extra TODOs
2020-11-16 19:10:27 +00:00
Dylan K. Taylor
16b71a265f
Barrel: added missing function import
2020-11-16 19:09:59 +00:00
Dylan K. Taylor
a9faed7171
[ci skip] update BlockFactory TODOs
2020-11-16 18:23:01 +00:00
Dylan K. Taylor
563336cdc9
CoralType: remove unused magicNumber stuff
2020-11-16 18:12:38 +00:00
Dylan K. Taylor
1eee24f1fa
Implemented coral blocks
...
there are some complications with coral plants due to the fact we're stuck with R12 worlds right now - and also coral fans are a major pain to implement due to how messed up the metadata is.
2020-11-16 18:05:39 +00:00
Dylan K. Taylor
55a9ce46b9
VanillaBlocks: added BARREL
2020-11-16 17:56:13 +00:00
Dylan K. Taylor
d7c6a20b34
Barrel: added @return $this to setOpen()
2020-11-16 17:29:24 +00:00
Aericio
b2765f32e9
Implemented Barrels, closes #3672
2020-11-16 17:26:07 +00:00
Dylan K. Taylor
1cf3a500f8
Clean up ChestInventory handling
...
longer term I want to rip this crap out completely, but right now this provides minor maintainability benefits, while also making it slightly less nasty to deal with other containers which animate their blocks, such as barrels and shulker boxes.
2020-11-16 16:59:19 +00:00
Dylan K. Taylor
4ade7b6225
added CoralType enum
2020-11-14 16:24:13 +00:00
Dylan K. Taylor
06efad94b6
Separated metadata handling from PillarRotationTrait
2020-11-14 16:21:50 +00:00
Dylan K. Taylor
7469f28f24
Server: rename getPlayer() to getPlayerByPrefix()
...
closes #3910
the existing naming was misleading, and many plugin devs assumed that it returns an exact match. However, this is not guaranteed, and it's possible for two different players to match the same prefix.
- There is no defined behaviour for what happens when multiple players can equally match a prefix (e.g. 'fr' could match 'fred' or 'frog' equally, because the name lengths are the same)
- A prefix might match a different player at a different time (e.g. 'fr' could match 'freddie' before 'fred' joins, after which it will match 'fred' instead)
With these flaws in mind, it's better to break compatibility on this to make the intent more clear, and to make plugin developers reassess their usages of this method. In most non-command use cases, they should likely be using getPlayerExact() instead.
2020-11-14 15:49:41 +00:00
Dylan K. Taylor
8e0cba56b8
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/entity/Entity.php
# src/pocketmine/tile/Tile.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/l7-baseline.neon
2020-11-12 22:10:47 +00:00
Dylan K. Taylor
e30b1ee2c7
Clean up entity and tile saveID handling
...
we only ever need the first entry, so there's no point storing all of them. In addition, the field is private, which guarantees that nothing else needs the array either.
This also fixes phpstan/phpstan@c50650c5dd .
2020-11-12 21:49:12 +00:00
Dylan K. Taylor
0d9561c93f
Removed crafting data cache from CraftingManager
2020-11-12 21:30:59 +00:00
Dylan K. Taylor
31089ce3b2
Timings: added broadcastPackets timer
...
the body of this function is potentially very expensive and isn't currently recorded by any timer.
2020-11-12 17:53:07 +00:00
Dylan K. Taylor
afbef242c6
bootstrap: remove useless phpdoc
2020-11-12 17:12:08 +00:00
Dylan K. Taylor
5efd0eba13
Imports cleanup
2020-11-12 17:11:34 +00:00
Dylan K. Taylor
c4d35d52e8
Do not store a pre-compressed cache for crafting data
...
this reduces bandwidth efficiency because it can't be compressed with everything else this way. If we want to cache stuff sent during the login sequence, it's better to stuff a bunch of stuff into a batch (e.g. crafting, creative, actor ids, biome defs) and pre-compress that as one big package instead.
2020-11-11 18:20:03 +00:00
Dylan K. Taylor
d08c9ee634
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/VersionInfo.php
2020-11-10 22:44:59 +00:00
Dylan K. Taylor
574b7f6343
3.15.5 is next
2020-11-10 16:48:18 +00:00
Dylan K. Taylor
e8b6b56330
Release 3.15.4
2020-11-10 16:48:18 +00:00
Dylan K. Taylor
c368ebb5e7
InventoryTransaction: beware of conflicting slot change actions with the same origin/target
...
these types of chains would never normally occur, but they've been seen in the wild. Attempting to resolve such chains has exponentially increasing complexity.
2020-11-10 16:45:20 +00:00
Dylan K. Taylor
75f2f12b99
NetworkSession: rename some badly-named hooks
2020-11-10 15:01:48 +00:00
Dylan K. Taylor
e23379c34b
EncryptionContext: provide the packet ID in the exception message
2020-11-10 14:45:19 +00:00
Dylan K. Taylor
6a266bcbd1
Separated XUID stuff from PlayerInfo into its own XboxLivePlayerInfo
2020-11-10 14:25:08 +00:00
Dylan K. Taylor
463bc044df
Rename PluginLoadOrder -> PluginEnableOrder
...
this more accurately describes its real purpose.
2020-11-09 20:28:08 +00:00
Dylan K. Taylor
6cf875ca3a
Item: rename onActivate() to onInteractBlock()
2020-11-09 19:33:13 +00:00
Dylan K. Taylor
8c480ffab9
Player: fix a few more cases of held-item getting trashed after some events
2020-11-09 19:31:48 +00:00
Dylan K. Taylor
e573226025
ItemStack: fixed phpstan failure
2020-11-09 19:10:02 +00:00