Dylan K. Taylor
99996b62d6
Align PhpDoc @param tags according to PHP-CS-Fixer
2022-12-06 13:21:20 +00:00
SlimyBoy2
95263795a8
Durable: fix misbehaviour of isBroken() since fe982c697bec3265c4222b73fe5ed17c9ef3b1ce ( #5436 )
...
this broke tool and armour break sounds.
2022-11-27 00:13:41 +00:00
Dylan K. Taylor
1671405cd0
Merge branch 'stable' into next-minor
2022-11-02 16:03:30 +00:00
Dylan K. Taylor
fe982c697b
Durable: reset durability when overstacked items are broken
...
this is not really defined behaviour, but it makes more sense than the current behaviour, which makes the tool unbreakable unintentionally.
fixes #5378
2022-11-02 15:42:44 +00:00
Dylan K. Taylor
7bcc663b60
Migrate core code to using symfony/filesystem
...
webmozart/path-util is retained for plugin compatibility, but is dropped in 5.0
2022-10-14 21:51:29 +01:00
Dylan K. Taylor
0c7f8470b9
Avoid repeated strtolower usages in a couple of places
2022-09-28 21:30:06 +01:00
Dylan K. Taylor
441b06f6c7
Merge branch 'stable' into next-minor
2022-09-15 12:44:53 +01:00
Dylan K. Taylor
88eafdd614
Improve type info for RegistryTrait::getAll() and its users
2022-09-02 19:57:22 +01:00
Dylan K. Taylor
ad2d59923c
Merge branch 'stable' into next-minor
2022-08-18 17:06:15 +01:00
Dylan K. Taylor
dce8bd6d21
CS: Standardize new with braces
2022-08-15 17:16:23 +01:00
Dylan K. Taylor
f7ab0a3b92
Merge branch 'stable' into next-minor
2022-08-14 18:37:56 +01:00
Dylan K. Taylor
2fc84f6c67
ItemFactory: treat durables with negative meta as unknown items
...
fixes #5117
2022-08-12 17:24:43 +01:00
Dylan K. Taylor
44e4dabf6e
Fixed Turtle Master potions giving no effects
2022-08-12 17:05:08 +01:00
Dylan K. Taylor
4e3964ffce
Armor: added clearCustomColor()
2022-07-16 15:10:07 +01:00
Dylan K. Taylor
0ad2985247
Update documentation for Item::__construct()
2022-07-06 23:54:29 +01:00
Dylan K. Taylor
6ecfbd1bde
FishingRod: make class less useless
2022-06-05 20:20:16 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
Dylan K. Taylor
3fcf6372e0
Merge branch 'stable' into next-minor
2022-06-01 15:32:37 +01:00
Dylan K. Taylor
97c0d72e28
ItemFactory: use import aliases to reduce code width
2022-05-26 15:55:33 +01:00
Dylan K. Taylor
b36c6ea13b
StringToItemParser: Use import aliases to reduce code width
2022-05-26 15:40:18 +01:00
Dylan K. Taylor
227f28a6d2
Use VanillaItems::AIR() instead of ItemFactory
2022-05-24 15:47:27 +01:00
Dylan K. Taylor
86efa0aae6
Merge remote-tracking branch 'origin/stable' into next-minor
2022-05-20 17:49:04 +01:00
ipad54
26df37e6ef
Minecart: fixed max stack size to match vanilla ( #5051 )
2022-05-20 16:57:48 +01:00
Dylan K. Taylor
d4b7f66e15
Promote some constructors
2022-05-17 22:34:58 +01:00
Dylan K. Taylor
95ad3f16e1
Modernize private property declarations in src/item
2022-05-17 20:59:24 +01:00
ipad54
1e59679ec2
Implemented Stonecutter ( #4732 )
2022-05-17 16:01:03 +01:00
Dylan K. Taylor
4dbac79e86
Merge branch 'stable' into next-minor
2022-05-16 18:02:25 +01:00
Dylan K. Taylor
7c3b78b0a0
ItemFactory: fix missing registration for dead coral fans
...
closes #5032
this is evidently not an ideal solution, and something more dynamic would be preferred so that we don't have to manually register an item for every permutation.
2022-05-13 13:53:28 +01:00
Dylan K. Taylor
9ff1bf6deb
Merge remote-tracking branch 'origin/stable' into next-minor
2022-05-11 13:12:45 +01:00
Nick
69418084bc
Boat: fixed max stack size to match vanilla ( #5018 )
2022-05-10 13:16:04 +01:00
Dylan K. Taylor
937bb4c6ce
Merge branch 'stable' into next-minor
2022-04-28 21:00:23 +01:00
Dylan K. Taylor
5a98b08ee8
Fixed several crashes on bad data due to inadequate TAG_List type checks
2022-04-19 16:48:18 +01:00
Dylan K. Taylor
f25beab6cb
Use constants for compound meta values
2022-03-23 15:58:27 +00:00
Dylan K. Taylor
03fa5387ac
StringToItemParser: recognize cod, raw_cod and cooked_cod
2022-03-01 21:49:36 +00:00
Dylan K. Taylor
566e4a4196
VanillaItems generator now reverse-lookups ID constants instead of baking numeric IDs into the code
...
this makes it easier to spot errors.
there's nothing we can do about the metadata values, but IDs can be quite easily constified.
there might be some weird artifacts where constants are aliased (e.g. appleenchanted) , but this is inarguably better than baking numeric IDs.
2022-02-26 16:10:34 +00:00
Muqsit Rayyan
55dfacea8d
Item: Improve performance of nbtSerialize() ( #4831 )
...
Replace hasNamedTag() with $nbt->count() > 0
This avoids a duplicate indirect call to Item::serializeCompoundTag() method call when serializing items with namedtags.
2022-02-16 00:32:12 +00:00
Dylan K. Taylor
7ddd547190
Merge remote-tracking branch 'origin/stable' into staging/4.1
2022-02-06 23:55:52 +00:00
Dylan K. Taylor
859f062267
StringToItemParser: fixed *_concrete_powder giving concrete instead of concrete powder
2022-02-01 23:29:47 +00:00
Dylan K. Taylor
22fb02c4e6
Replace disallowed operators in src/item/
2022-01-20 19:16:50 +00:00
ipad54
1366c49f1f
Implemented Lectern ( #4708 )
...
Co-authored-by: Covered123 <58715544+JavierLeon9966@users.noreply.github.com>
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2022-01-15 21:21:29 +00:00
Dylan K. Taylor
75fc7a2d1f
Merge branch 'stable' into next-minor
2022-01-07 20:16:35 +00:00
Dylan K. Taylor
6d249026cc
Merge branch 'legacy/pm3' into stable
2022-01-07 20:15:15 +00:00
Dylan K. Taylor
fb29653ed7
Merge remote-tracking branch 'origin/stable' into next-minor
2022-01-06 22:43:57 +00:00
Dylan T
3ed57ce49a
Merge pull request from GHSA-p62j-hrxm-xcxf
...
This checks the following things:
- Validity of UTF-8 encoding of title, author, and page content
- Maximum soft and hard lengths of title, author, and page content (soft
limits may be bypassed by uncancelling PlayerEditBookEvent; hard
limits may not be bypassed)
- Maximum number of pages. Books with more than 50 pages may still be
edited, but may not have new pages added.
2022-01-04 20:39:02 +00:00
Dylan K. Taylor
a94b88424e
Merge branch 'stable' into next-minor
2021-12-10 19:15:57 +00:00
Dylan K. Taylor
3b77462935
WritableBookBase: fixed crash when finding pages containing corrupted UTF-8 characters
...
maybe we should treat this as corrupted? but for now, it's consistent with how we deal with signs.
2021-12-10 16:39:13 +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 K. Taylor
1d14c8cb6b
Merge branch 'stable' into next-minor
2021-12-07 00:41:48 +00:00
Dylan K. Taylor
ed4978c31b
Added VanillaItems::AIR()
...
we don't usually add VanillaItems entries for blocks since they already exist in VanillaBlocks, but air has a special use case specifically as an itemstack, so we make an exception for this case.
2021-12-07 00:41:07 +00:00
Dylan K. Taylor
5a351d3b17
StringToItemParser: fixed not recognizing slime or slime_block
2021-12-06 23:51:30 +00:00