10 Commits

Author SHA1 Message Date
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 K. Taylor
8523f0fb0b
CS fix 2021-10-13 20:31:24 +01:00
Dylan K. Taylor
b570324288
LegacyStringToItemParser: rely exclusively on item_from_string_bc_map.json, do not interpret integers given as strings
fixes #4507
2021-10-13 20:29:18 +01:00
Dylan K. Taylor
6284cd14c7
LegacyStringToItemParser: added getMappings() 2021-10-13 20:19:44 +01:00
Dylan K. Taylor
8847aa2d7f
LegacyStringToItemParser: mark as deprecated, and point people towards StringToItemParser, which is much nicer 2021-08-29 16:13:19 +01:00
Dylan K. Taylor
654fc9a2a6
LegacyStringToItemParser: Throw more specific exceptions 2021-07-10 21:03:12 +01:00
Dylan K. Taylor
76a74b3931
Revert "Item: skip a step when decoding PC itemstacks"
This reverts commit 9b52af62b6f469771f2355a964b35ecffa5117d9.

We shouldn't assume that a string maps directly to a legacy ID,
because we might want string aliases (e.g. dark_oak_boat) which refer to
items that have a specific meta value in the MCPE system.

Overall, I want to get rid of the reliance on IDs here and register all
this stuff using closure callbacks on VanillaItems, so getting rid of
this assumption also serves that goal.
2021-06-30 13:13:53 +01:00
Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths (#4287) 2021-06-29 19:40:43 +01:00
Dylan K. Taylor
9b52af62b6 Item: skip a step when decoding PC itemstacks 2020-07-10 21:32:39 +01:00
Dylan K. Taylor
11ef9fb0c0 Item-from-string parsing no longer depends on ItemIds
after this is done I'm banning the constant() function.
2020-05-13 00:18:49 +01:00