Commit Graph

26 Commits

Author SHA1 Message Date
f909557529 Cleaned up implementations for EnderChestInventory/DoubleChestInventory
previously, these were forced to extend BaseInventory because of the amount of crap in Inventory's interface.
This meant that these inventories had their own slots storage, which would be _mostly_ unused because these inventories aren't real inventories, but rather just delegates.
This lead to a variety of bugs in the past, such as certain API methods on BaseInventory not working correctly for DoubleChestInventory in particular.

Now, BaseInventory just implements the functional part of the inventory implementation, leaving the storage system up to the implementation.
A SimpleInventory class is provided with a simple SplFixedArray storage backing, which is used by most inventories.
EnderChestInventory and DoubleChestInventory now extend BaseInventory directly, and implement custom methods for dealing with their delegates.
2021-05-09 20:51:16 +01:00
7b2c6c5ceb Avoid more $this refs on long-life closures 2021-05-06 14:27:56 +01:00
c61f66d973 Removed ext-ds dependency 2021-02-11 15:40:37 +00:00
0d9561c93f Removed crafting data cache from CraftingManager 2020-11-12 21:30:59 +00:00
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
e1d80f05b1 Merge branch 'stable' into master 2020-08-03 20:14:46 +01:00
7e6adc41f0 Merge 1.16 support into PM4 (with changes) 2020-06-26 22:21:09 +01:00
fe1b5d2d01 Merge commit '3d50aafcc'
# Conflicts:
#	resources/vanilla
#	src/crafting/ShapedRecipe.php
2020-06-13 11:30:44 +01:00
017afead3b extract FurnaceRecipeManager unit from CraftingManager
I'd like to have this directly provided to Furnace, but I don't know how to short of making into a singleton. Since I want to have per-furnace recipe managers (e.g. for stuff like blast furnace vs regular furnace etc), a singleton isn't really an option.
2020-06-03 18:59:59 +01:00
b7cf4f01f9 remove utils\UUID, switch to pocketmine/uuid package 2020-05-11 10:46:48 +01:00
8093a94e5d do not hardcode data deserialization into CraftingManager 2020-04-28 18:56:27 +01:00
f9a587d40e imports cleanup 2020-04-28 17:27:38 +01:00
3be9548b1e net: compressors are now fully dynamic (or at least the potential to be)
the compressor used by RakLibInterface when opening a session is still
hardcoded, but that's because we have no way to select the correct
compressor at that point in the login sequence, since we aren't
propagating the protocol information up from RakLib right now.
2020-04-28 16:21:18 +01:00
d9e4783b24 start making network compressors dynamic
this will facilitate future multi version support where compression types are different between versions
2020-04-28 14:47:01 +01:00
a97cafd4f6 moving serializers into protocol namespace 2020-04-27 13:54:39 +01:00
f3fed60d57 crafting: ditch MultiRecipe, it's a network-only thing
MultiRecipes are really nothing more than feature toggles at the network layer, and they don't belong in the main core code.
2020-04-23 19:45:59 +01:00
18d48869a0 the great airgapping of recipes and itemstacks 2020-04-23 14:11:48 +01:00
b108fb61bf Inventory: drop $send params from setItem() and clear() 2020-02-12 13:34:35 +00:00
fb1126797a Merge branch 'stable' 2020-02-07 18:13:55 +00:00
09b24d3c32 Merge commit '4c36ca58e2710c8fd03eec1f50a885fb97fd9b68'
# Conflicts:
#	resources/vanilla
2020-01-31 19:19:06 +00:00
9492325eef Merge branch 'stable' 2020-01-29 20:01:30 +00:00
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
cda1143a79 Merge branch 'stable' 2020-01-09 17:17:42 +00:00
0f718ea28b Merge commit '8726604899d1a371567141e0831ed570d3233356' 2019-12-25 14:19:35 +00:00
d3d7709ead Merge branch 'next-minor' 2019-12-03 11:55:45 +00:00
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00