Dylan K. Taylor
5556861000
ItemFactory: move SweetBerries registration to the correct place
2021-11-26 00:46:35 +00:00
Dylan K. Taylor
5c7125f190
Improved error handling for loading broken entity / tile data
2021-11-23 17:41:26 +00:00
Dylan K. Taylor
3dd03075cb
StringToItemParser: added some quality-of-life aliases
2021-11-14 15:52:50 +00:00
Dylan K. Taylor
639867a640
Added missing aliases for wooden items
2021-11-14 15:51:41 +00:00
Dylan K. Taylor
19a3efe893
.......
2021-11-08 18:57:14 +00:00
Dylan K. Taylor
a1ecdc27e5
Removed Vanilla*::fromString()
...
these were misbegotten and should never have existed.
If someone really needs these for some reason, they can use getAll()[name].
2021-11-08 18:52:14 +00:00
Dylan K. Taylor
1fb60b5b3a
CS fix again
2021-11-08 18:45:05 +00:00
Dylan K. Taylor
08420c2556
Added new dynamic StringToEnchantmentParser
...
this should be used instead of VanillaEnchantments::fromString(), because it allows registering custom aliases.
2021-11-08 18:44:15 +00:00
Dylan K. Taylor
18f5fb66bb
Abstract the base functionality of StringToItemParser
2021-11-08 18:37:05 +00:00
Rush2929
ede4157814
Check to see if the player can start using the Releasable item. ( #4532 )
2021-11-02 14:36:16 +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
IceCruelStuff
49c1e4c06e
Implement fletching table ( #4501 )
2021-10-12 21:21:05 +01:00
Dylan K. Taylor
dbeaf27cb7
Document that Item::setNamedTag() may cause NbtException to be thrown
...
if the NBT is bogus for some reason
in PM3, these kinds of bugs wouldn't show up until/unless the item NBT was actually used, but on PM4, we decode it ahead of time, so the errors always show up immediately.
2021-10-05 19:09:22 +01:00
Dylan K. Taylor
05e2bef5ce
ItemFactory: fix crash when checking if blockitem IDs are registered
2021-09-16 14:53:19 +01:00
Dylan K. Taylor
c062282954
Drop enchantment runtime IDs
2021-09-03 21:20:43 +01:00
Dylan K. Taylor
aa5a9f6d12
Enchantment: use Translatable instead of hardcoded translation keys
2021-09-03 20:52:05 +01:00
Dylan K. Taylor
fbbaef4401
Enchantment: use promoted properties
2021-09-03 20:41:43 +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
2d025bf02f
Populate StringToItemParser with some names from VanillaBlocks
...
this makes just about everything easily accessible via commands.
There are some stuff that shouldn't be here due to not being actual items (e.g. door blocks, bed blocks, wall coral fans) but since there were legacy aliases for all those things already, I figured what the heck - it's more effort to exclude them, so whatever.
2021-08-23 14:49:30 +01:00
Dylan K. Taylor
78b0275a6c
StringToItemParser: added a bunch of nice new aliases
...
this should especially make potions less cancerous to /give.
2021-08-23 14:25:00 +01:00
SalmonDE
7fd712c1ff
Refactor Block & Tile: getPos() to getPosition() ( #4395 )
...
this also changes the name of the class property 'pos' to 'position' as well as Block->getPosOffset() to Block->getPositionOffset()
2021-08-23 14:01:32 +01:00
Dylan K. Taylor
22316976fa
Introduce next-generation StringToItemParser
...
this isn't specced up with some of the finer features of LegacyStringToItemParser such as metadata parsing, but those are still a work in progress (and probably limited to specific items like durable stuff).
The goal is to unbind these aliases from legacy internal IDs, while also providing a nice flexible way for plugins to add their own items and aliases to the existing system.
This system allows mapping a string to any item at all, irrespective of state, internal IDs, or any of that nonsense. This means it's finally possible to have stuff like lapis_lazuli and bone_meal aliases in commands.
2021-08-23 00:39:20 +01:00
Dylan K. Taylor
270ee5c085
Simplify registry method generation
2021-08-22 23:02:36 +01:00
Rush2929
cf77b33c3b
Bows can now use offhand arrows ( #4356 )
2021-08-10 19:36:57 +01:00
Angel
309bed414f
Implemented sweet berries ( #4164 )
...
this doesn't implement the server-side logic for the "stickiness" (slowdown) because we don't have the system needed for it yet.
It also doesn't have parity with vanilla on the damage.
2021-07-19 20:01:33 +01:00
Dylan K. Taylor
654fc9a2a6
LegacyStringToItemParser: Throw more specific exceptions
2021-07-10 21:03:12 +01:00
Dylan K. Taylor
7a35fdb1bb
Allow Blocks to specify their max stack size
2021-06-30 19:28:16 +01:00
Dylan K. Taylor
c05f6db8d9
Bed and Skull items now return a correct block, with appropriate type information
...
I wanted to do the same for banners, but unfortunately banners are a tad more complicated.
2021-06-30 17:27:14 +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 K. Taylor
7ba573db77
Added API method Item::canStackWith()
2021-06-29 19:52:52 +01:00
Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
Dylan K. Taylor
7029f85c1c
Regenerated VanillaItems
2021-06-29 18:23:24 +01:00
Dylan K. Taylor
0ec869823b
Added potion display names to Potion and SplashPotion
2021-06-29 18:21:41 +01:00
Dylan K. Taylor
07d97bbdeb
PotionType: Added display names
2021-06-29 18:19:27 +01:00
Dylan K. Taylor
f68caa878a
Potion: added getType()
2021-06-29 16:53:26 +01:00
Dylan K. Taylor
5d6146a01f
Register missing potion types
2021-06-19 21:53:08 +01:00
Dylan K. Taylor
5387456e44
Move potion types to enum
2021-06-19 21:39:23 +01:00
Dylan K. Taylor
6fea09ded4
SplashPotion: Require potionId in constructor
2021-06-19 19:47:44 +01:00
Dylan K. Taylor
af678f985d
All types of coral now have fully dynamic types
2021-05-19 22:49:44 +01:00
Dylan K. Taylor
b33bf1f433
Unfuck banners ...
2021-04-28 18:44:21 +01:00
Dylan K. Taylor
d5e5a81cff
Don't explode when data contains invalid dye colour IDs
2021-04-28 13:39:03 +01:00
Dylan K. Taylor
a44203a3d4
Separate BannerPatternLayer from BannerPatternType
2021-04-28 12:47:42 +01:00
Dylan K. Taylor
a32eb4ebc3
Implemented coral and coral fans
...
this implementation is very rough due to having to hack around lots more MCPE bullshit, and currently doesn't allow dynamic coral types; but it's there. We'll clean this up after 1.13 migration is done.
2021-04-17 02:04:10 +01:00
Dylan K. Taylor
01c3668375
ItemFactory: Check the bounds of durability, instead of trying to catch exceptions
2021-04-16 21:30:48 +01:00
Dylan K. Taylor
da51f106de
ItemFactory/BlockFactory: give more specific class descriptions
...
these classes both have a very specific purpose now, which is much lesser than it was in PM3.
2021-04-16 21:27:28 +01:00
Dylan K. Taylor
c979ab8aa0
Be more specific with documentation of ItemFactory::register() and BlockFactory::register()
2021-04-16 21:24:16 +01:00
Dylan K. Taylor
6071746993
Mark ItemFactory::get() and BlockFactory::get() as @deprecated
2021-04-16 21:16:27 +01:00
Dylan K. Taylor
49438d360d
RegistryUtils: generate ordered doc comments
...
this makes things easier to find, especially in the large ones like VanillaBlocks.
2021-03-22 16:16:28 +00:00