Commit Graph

43 Commits

Author SHA1 Message Date
pmmp-admin-bot[bot]
aae88c5c26 Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/17310812886
2025-08-29 00:02:52 +00:00
Dylan K. Taylor
dd9030f1f5 tools/generate-bedrock-data-from-packets: generate less noise for items
if we have only a name (the majority case), we can just return the name directly instead of an object.
this massively reduces the amount of noise in the files as seen in pmmp/BedrockData@f814036229
2025-08-28 21:15:09 +01:00
Dylan K. Taylor
15eaf67a0c Merge branch 'minor-next' into major-next 2024-11-25 14:36:25 +00:00
Dylan K. Taylor
5325ecee37 Deal with a whole lot of PHPStan suppressed key casting errors
closes #6534
2024-11-25 14:30:58 +00:00
Dylan K. Taylor
c9e8d382c5 Merge branch 'minor-next' of github.com:pmmp/PocketMine-MP into major-next 2024-08-09 13:33:07 +01:00
ipad54
2ffc38c835 Implement campfire & soul campfire (#4696) 2024-07-07 15:01:34 -05:00
Dylan K. Taylor
f121654452 Assemble 1.21.0 2024-06-13 18:41:41 +01:00
Dylan K. Taylor
cd6b780d31 Merge branch 'minor-next' into major-next 2023-09-07 20:10:31 +01:00
Dylan K. Taylor
94d98fb5c4 Migrate all but two remaining legacy enums to native PHP 8.1 enums 2023-09-07 19:32:45 +01:00
Dylan K. Taylor
ae564e445d Start migrating EnumTrait enums to PHP 8.1 native enums 2023-09-07 17:20:52 +01:00
Dylan K. Taylor
3c0e7ae492 Merge branch 'minor-next' into major-next 2023-07-24 12:07:55 +01:00
Dylan K. Taylor
537721fe7d Replace Closure::fromCallable() usages with first-class callables
PHP 8.1 <3
2023-07-19 13:34:42 +01:00
IvanCraft623
74cfd687d7 CraftingManagerFromDataHelper: Fix parameter name typo (#5870)
due to named parameters, this change must target PM6
2023-07-19 11:05:52 +01:00
Dylan K. Taylor
6151576baa Added model for smithing recipe 2023-03-08 21:50:03 +00:00
Dylan K. Taylor
da5302ca86 BlockStateData: introduce and use current() 2023-02-02 16:21:50 +00:00
Dylan K. Taylor
c89df7eb1c Merge remote-tracking branch 'origin/next-minor' into next-major 2022-12-25 18:22:13 +00:00
Dylan K. Taylor
0d169b4e80 Filesystem: added fileGetContents to reduce ErrorToExceptionHandler boilerplate code 2022-12-25 17:13:51 +00:00
Dylan K. Taylor
ca3b5c38b7 Added internal support for tag recipe ingredients 2022-12-02 14:03:58 +00:00
Dylan K. Taylor
fba4895a17 Merge branch 'next-minor' into next-major 2022-10-31 19:11:39 +00:00
Dylan K. Taylor
f88ae93897 BC break: Replaced webmozart/path-util with symfony/filesystem, closes #5332 2022-10-13 16:43:36 +01:00
Dylan K. Taylor
566f5935a3 CraftingManagerFromDataHelper: do not register recipes with unknown outputs
fixes #5093

we don't need to check the inputs, since unknown input items shouldn't be obtainable anyway.
2022-08-12 17:19:47 +01:00
Dylan K. Taylor
eb8fb63409 Added cartography and smithing tables
these have working inventories, and their crafting menus will 'just work' once the items for the associated recipes have been implemented (maps, netherite).
2022-07-14 18:01:47 +01:00
Dylan K. Taylor
99ff78a8a5 Updated BedrockData 2022-07-09 18:57:32 +01:00
Dylan K. Taylor
9ffee7cfc3 always the CS ... 2022-07-09 16:30:59 +01:00
Dylan K. Taylor
ccb3c3cb05 BlockStateData: use array<Tag> instead of CompoundTag to store state properties
this reduces the footprint of RuntimeBlockMapping by a further 1 MB, as well as simplifying various parts of the code, and solidifying the immutability guarantee of BlockStateData.
2022-07-09 16:03:51 +01:00
Dylan K. Taylor
56cf59355f Use more consistent exceptions 2022-07-04 21:38:18 +01:00
Dylan K. Taylor
9f0b32e748 Updated creative and crafting data to 1.19 2022-07-04 20:28:07 +01:00
Dylan K. Taylor
db2b523762 Item is no longer JsonSerializable
before anyone starts screaming:

1) it's easy to create your own wrapper that converts items to arrays
2) there is no longer a single standard way to encode items.
3) the way that item serialization now works requires an ItemSerializer, which, barring singleton use, must be dependency-injected. Since there's no way to inject dependencies into jsonSerialize(), this means that its behaviour cannot be customized.
2022-06-30 19:16:49 +01:00
Dylan K. Taylor
5e4e5147d9 Remove ItemFactory involvement from brewing
this involves a very nasty hack for potion container change, but for the time being it can't be helped.
2022-06-29 16:11:15 +01:00
Dylan K. Taylor
541a624d48 ItemFactory::get() now consistently throws SavedDataLoadingException on any error, including unknown items 2022-06-27 17:14:43 +01:00
Dylan K. Taylor
b61a934c9f CraftingManagerFromDataHelper: fixed recipes with unknown items being registered without said items 2022-06-27 14:23:14 +01:00
Dylan K. Taylor
55cb68e5b5 Burn meta wildcards from Item, allow more dynamic recipe inputs
this was an obstacle for getting rid of legacy item IDs.
2022-06-27 13:33:26 +01:00
Dylan K. Taylor
1ff69136a3 Merge branch 'next-major' into modern-world-support 2022-06-07 20:01:40 +01:00
Dylan K. Taylor
93124c79ea Fixed incorrect unknown item filtering logic
this caused recipes with wildcard inputs to not show up at all.
2022-06-06 18:50:40 +01:00
Dylan K. Taylor
08fbf92d8d Filter out recipes containing unknown items 2022-06-06 18:25:14 +01:00
Dylan K. Taylor
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
ipad54
1e59679ec2 Implemented Stonecutter (#4732) 2022-05-17 16:01:03 +01:00
VixikHD
e0da99a973 feat: Implement Brewing (#4413)
The following API constants have been added:
- tile\BrewingStand::BREW_TIME_TICKS
The following public API methods have been added:
- utils\BrewingStandSlot->getSlotNumber() : int
- CraftingManager->getPotionTypeRecipes() : array<string, array<string, PotionTypeRecipe>>
- CraftingManager->getPotionContainerChangeRecipes() : array<int, array<string, PotionContainerChangeRecipe>>
- CraftingManager->registerPotionTypeRecipe(PotionTypeRecipe $recipe) : void
- CraftingManager->registerPotionContainerChangeRecipe(PotionContainerChangeRecipe $recipe) : void
The following classes have been added:
- BrewingRecipe
- PotionTypeRecipe
- PotionContainerChangeRecipe
- BrewItemEvent
- BrewingFuelUseEvent
- PotionFinishBrewingSound
2022-01-22 16:54:58 +00:00
Dylan K. Taylor
889d048ca3 Make use of Utils::assumeNotFalse() in a bunch of places
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
2021-12-08 19:39:04 +00:00
Dylan T
27e0ecf7ee Implemented Blast Furnace and Smoker (#4362) 2021-08-12 23:27:05 +01:00
Dylan K. Taylor
e1d80f05b1 Merge branch 'stable' into master 2020-08-03 20:14:46 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
8093a94e5d do not hardcode data deserialization into CraftingManager 2020-04-28 18:56:27 +01:00