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
537721fe7d
Replace Closure::fromCallable() usages with first-class callables
...
PHP 8.1 <3
2023-07-19 13:34:42 +01:00
Dylan K. Taylor
c9bb4335a1
Item: added getStateId(), removed state data from public API
...
state data was only used for indexing stuff along with state ID anyway, so it makes more sense to lock it away in here instead.
2023-05-16 14:14:18 +01:00
Dylan K. Taylor
015c668885
Change confusing 'type data' and 'state data' terminology for blocks and items
...
For blocks, we now use 'block-item state' and 'block-only state', which should be much clearer for people implementing custom stuff.
'block-item state', as the name suggests, sticks to the item when the block is acquired as an item.
'block-only state' applies only to the block and is discarded when the block is acquired as an item.
'type data' for items was also renamed, since 'type' is too ambiguous to be anything but super confusing.
2023-05-16 14:07:29 +01:00
Dylan K. Taylor
a8dec1adb1
PM5-specific changes for 1.19.80
2023-04-26 23:30:56 +01:00
Dylan K. Taylor
a0346fb6d3
Merge branch 'minor-next' into major-next
2023-04-26 14:29:32 +01:00
Dylan K. Taylor
f86fde064d
CraftingManager: fixed uninitialized field
...
I'm having deja vu about this ...
2023-04-24 12:34:34 +01:00
Dylan K. Taylor
453ad997e9
Merge branch 'item-stack-request' into item-stack-request-pm5
2023-03-20 22:05:12 +00:00
Dylan K. Taylor
4864444440
Added CraftingManager::getCraftingRecipeFromIndex()
2023-03-19 22:14:23 +00:00
Dylan K. Taylor
dace20ad1f
Merge branch 'item-stack-request' into item-stack-request-pm5
2023-03-14 22:34:47 +00:00
Dylan K. Taylor
a573a279fa
Merge branch 'minor-next' into item-stack-request
2023-03-14 22:25:49 +00:00
Dylan K. Taylor
9b1ec261c4
...
2023-03-08 22:20:12 +00: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
c2918709a3
Merge branch 'next-minor' into next-major
2023-01-06 01:59:04 +00:00
Dylan K. Taylor
ece49f011c
Merge branch 'stable' into next-minor
2023-01-06 01:50:17 +00:00
Dylan K. Taylor
2e9a3f9160
Working crafting :woohoo:
2023-01-04 22:29:29 +00:00
Dylan K. Taylor
fc63c54116
CraftingManager: more detailed type information for shapelessRecipes and shapedRecipes
2023-01-04 00:32:26 +00:00
Alexey
172ce659b8
Use str_starts_with, str_ends_with and str_contains instead of strpos ( #5485 )
2022-12-31 13:02:23 +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
ba4d038972
ShapelessRecipe: make type parameter mandatory
2022-12-15 21:41:33 +00:00
Dylan K. Taylor
4d79aced07
Merge branch 'next-minor' into next-major
2022-12-15 19:50:27 +00:00
Dylan K. Taylor
99996b62d6
Align PhpDoc @param tags according to PHP-CS-Fixer
2022-12-06 13:21:20 +00:00
Dylan K. Taylor
18c2e90574
fix CS
2022-12-05 14:47:44 +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
b39eaaf91f
Merge branch 'next-minor' into next-major
2022-09-21 15:07:11 +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
68cbe46600
Exterminate legacy item IDs
2022-07-05 15:12:55 +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
cab56b0479
fix PHPStan
2022-06-29 17:18:44 +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
aa9f8781ff
Merge branch 'next-minor' into next-major
2022-06-07 19:56:26 +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
083a35f970
Modernize property type declarations
2022-06-04 18:16:32 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00