Commit Graph

60 Commits

Author SHA1 Message Date
ipad54
de66d84d29 Implement new 1.20 and 1.21 records (#6572) 2024-12-13 21:10:34 +03:00
ipad54
42094e6768 Implement resin blocks & items (#6571) 2024-12-12 23:21:41 +03:00
ipad54
b341078765 Implement new pale oak blocks (#6570) 2024-12-12 17:53:52 +03:00
IvanCraft623
f3763ae691 Implement Recovery compass (#5502)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2024-12-01 18:25:45 +00:00
zSALLAZAR
a5f607138c Implement Ice Bomb (#5452)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2024-11-24 15:01:26 +00:00
ipad54
e77f2c5198 Implemented End Crystal (#4715)
Co-authored-by: Dylan T. <dktapps@pmmp.io>
2024-11-16 17:57:57 +00:00
Dylan T.
33a7b46329 Use reflection to locate BlockTypeIds and ItemTypeIds for VanillaBlocks/VanillaItems (#6498)
Use reflection to locate BlockTypeIds and ItemTypeIds for VanillaBlocks/VanillaItems

Since BlockTypeIds and ItemTypeIds are derived from VanillaBlocks and VanillaItems respectively anyway (they only exist to allow identifying blocks/items without having to create instances of them), this hack is probably OK, and reduces the chances of mistakes.
Previously it was explored to have these IDs generated by auto-incrementing in VanillaBlocks/Items and have the constants generated that way, but this proved to be too problematic because of unstable diffs no matter how we chose to sort the elements. See #6313 for previous research on the subject.

This is obviously not a desirable hack to keep long-term. In the future it will probably make sense to redesign VanillaBlocks like so:

enum VanillaBlocks { ... }
VanillaBlocks::STONE (the type ID)
VanillaBlocks::STONE->new() (to create a block)

However, more research is needed on this, as I'd prefer not to make block creation any more verbose.
2024-11-14 17:32:22 +00:00
IvanCraft623
9b58d35516 Implement Goat horns (#5232)
Co-authored-by: ipad54 <63200545+ipad54@users.noreply.github.com>
Co-authored-by: Dylan T. <dktapps@pmmp.io>
2024-11-14 13:57:07 +00:00
Max
371eccd007 Make access modifier consistent with parent abstract class (#6341) 2024-05-07 12:02:50 +01:00
IvanCraft623
920341668f Implemented working Name tag (#5209) 2024-02-19 18:46:48 +00:00
ace
d596dc571d Fix pitcher pod wrongly registered as a block (#6162) 2023-11-27 14:46:20 +00:00
pandaa-be
4103631bc1 Added Smithing Template items (#6132) 2023-11-09 14:25:49 +00:00
Dylan K. Taylor
31cd096b4b Implement torchflower, its seeds and its crop 2023-09-28 17:13:33 +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
5afbb9d807 Allow enchanted books to be enchanted
if an enchanted book is obtained via /give without enchantments, it should be able to receive enchantments in an enchanting table, exactly the same as regular books.
2023-08-15 19:10:03 +01:00
S3v3Nice
39867b97c5 Implement enchanting using enchanting tables (#5953)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2023-08-15 17:28:26 +01:00
Dylan K. Taylor
0f8e61eda4 Implemented new cherry-wood blocks 2023-06-09 18:04:52 +01:00
ipad54
fa719f37d5 Implement Cave Vines & Glow Berries (#5424) 2023-05-08 19:24:23 +01:00
Dylan K. Taylor
299ff5d912 Register mangrove boat item 2023-05-04 16:39:23 +01:00
Dylan K. Taylor
896dd2ec9d Boat: use BoatType enum instead of TreeType
TreeType really belongs in the generator package. Not all types of tree may have their own boat type (e.g. azalea).
We can't use WoodType for this either, because some types of wood also don't have associated boat types (crimson, warped).
2023-05-04 16:35:31 +01:00
zSALLAZAR
b4c7d33388 Implement Medicine (from Education Edition) (#5450) 2022-12-24 17:38:12 +00:00
IvanCraft623
44e288554a Implement new records (#5433) 2022-12-18 21:15:27 +00:00
IvanCraft623
1366a43c22 Implement Turtle Shell (#5235) 2022-09-28 18:19:15 +01:00
Dylan K. Taylor
f80ffd8de0 Merge branch 'next-minor' into next-major 2022-09-15 13:59:21 +01:00
Dylan K. Taylor
88eafdd614 Improve type info for RegistryTrait::getAll() and its users 2022-09-02 19:57:22 +01:00
IvanCraft623
b65e0f64f6 Implement Suspicious Stew (#5224) 2022-08-16 17:26:32 +01:00
IvanCraft623
223de3ad23 Implement Fire Charge (#5225) 2022-08-15 17:00:58 +01:00
Dylan K. Taylor
ba2baba7cc Added netherite blocks and items 2022-07-14 20:39:09 +01:00
Dylan K. Taylor
da9937933b Implemented honey bottle 2022-07-07 01:06:17 +01:00
Dylan K. Taylor
2142eb3cc9 VanillaItems: sort lines alphabetically 2022-07-07 01:01:05 +01:00
Dylan K. Taylor
976502e3db Move item type initialization to VanillaItems
ItemFactory no longer has an obvious purpose, thanks to this ...
2022-07-06 23:47:51 +01:00
Alexey
a005cd6e33 Set the correct max stack size for spyglass (#5133) 2022-07-05 20:43:46 +01:00
Dylan K. Taylor
3c017af6a0 Added a handful of new easy items 2022-07-05 16:46:57 +01:00
Dylan K. Taylor
412dcaa744 Implemented crimson, warped and mangrove signs 2022-07-05 16:18:54 +01:00
Dylan K. Taylor
4e71cc7d79 Remove ItemFactory::get(), use ItemFactory::fromTypeId() for VanillaItems
soon we'll invert the dependency and set up all this stuff in VanillaItems directly, rendering ItemFactory (mostly) unnecessary.
2022-07-05 14:26:02 +01:00
Dylan K. Taylor
db9c7de35c Remove obsolete shim items for Bed and Skull
now that the colour and skull type are included in the block type data, it's no longer necessary to maintain shim items to retain this information in the item data.
2022-07-03 00:47:42 +01:00
Dylan K. Taylor
56428e8a4e Make more item stuff dynamic 2022-06-29 00:26:16 +01:00
Dylan K. Taylor
6058032807 Make potion types dynamic
It became obvious this was needed when I wanted to make new IDs for existing items - there's no way I'm unrolling those registrations...
2022-06-28 23:33:25 +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
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
24bd403e23 Updated VanillaItems 2022-05-24 15:19:22 +01:00
Dylan K. Taylor
cb97f37d13 First look at modern-spec serializer/deserializer for items
this is not yet used by anything
2022-05-12 16:26:38 +01: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
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
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
270ee5c085 Simplify registry method generation 2021-08-22 23:02:36 +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
7029f85c1c Regenerated VanillaItems 2021-06-29 18:23:24 +01:00