897 Commits

Author SHA1 Message Date
Dylan K. Taylor
5c905d9a95
BlockBreakInfo: use strict comparison
weak compare isn't needed here since this can be float/float
2025-01-06 22:44:16 +00:00
Dylan K. Taylor
8b23231537
Fixup PHPDoc for blocks 2025-01-06 22:44:16 +00:00
ipad54
b10caf7437
Remove tool tier of some blocks to match vanilla (#6573) 2024-12-13 21:54:48 +00:00
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
Dylan K. Taylor
6b2da15b80
Fixed signs 2024-12-05 19:58:52 +00:00
IvanCraft623
f1a3b42620
Implement frost walker enchantment (#5497)
Co-authored-by: Dylan T. <dktapps@pmmp.io>
2024-12-01 19:46:38 +00:00
Dylan K. Taylor
a593180ef9
Deprecate some stuff 2024-12-01 15:01:41 +00:00
Akmal Fairuz
269effcecf
Introduce Utils::getRandomFloat() (#6532)
Drop-in replacement for lcg_value() for PHP 8.4
2024-11-26 11:33:29 +00:00
Dylan K. Taylor
12ae8dc03b
Merge branch 'stable' into minor-next 2024-11-25 14:32:30 +00:00
Dylan K. Taylor
5325ecee37
Deal with a whole lot of PHPStan suppressed key casting errors
closes #6534
2024-11-25 14:30:58 +00:00
Dylan K. Taylor
30ee0aa63d
Merge branch 'stable' into minor-next 2024-11-24 23:50:56 +00:00
Dylan K. Taylor
53aa380ca3
Candle: fix extinguish logic
closes #5983
2024-11-24 23:49:32 +00:00
github-actions
fb1213e964 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11862895039
2024-11-15 20:21:32 +00:00
bonbionseker
8474eaf5f1
Adjust Sugar Cane to break when there is no water (#6486) 2024-11-15 16:27:27 +00:00
ipad54
0b0c425805
Extract glow lichen multi face logic into traits (#6396)
This will be useful for future block additions
2024-11-15 15:47:26 +00:00
ipad54
b5469dede2
Flowable blocks now can't be placed inside liquid (#5392) 2024-11-15 00:10:43 +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
Dylan K. Taylor
f3cc4a28e1
Easy wins for PHPStan 2.0 support 2024-11-12 22:12:54 +00:00
ipad54
7e343617b9
Rename ICopper to CopperMaterial (#6470) 2024-10-23 11:34:42 +01:00
IvanCraft623
4e6b34f573
Implement new 1.21 copper blocks (#6366)
Added the following new blocks:
- All types of Copper Bulb
- All types of Copper Door
- All types of Copper Trapdoor
- All types of Chiseled Copper
- All types of Copper Grate
2024-09-24 21:25:10 -05:00
github-actions
a4a07a8e5a Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/10986731877
2024-09-23 02:36:00 +00:00
ipad54
8cb2e577a1
Implement missing last interacted slot property in chiseled bookshelf (#6440) 2024-09-02 18:02:06 -05:00
Vega Nicholas S.
9381fc4172
Blue Ice: No longer emits light & it's now dropped when mined with a tool with silk touch enchantment (#6438) 2024-08-31 22:33:11 -06:00
github-actions
994fa5f792 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/10373700926
2024-08-13 16:37:45 +00:00
ipad54
585dc835e7
Fixed anvil placing rotation. (#6375)
Co-authored-by: IvanCraft623 <57236932+IvanCraft623@users.noreply.github.com>
2024-08-13 16:19:07 +01:00
ipad54
13f5cc9f87
ChiseledBookshelf: fixed function visibility (#6421) 2024-08-13 16:11:22 +01:00
IvanCraft623
787afb6b00
Implement all new 1.21 tuff blocks (#6391) 2024-07-23 11:34:46 -05:00
Dylan T
ef9791eaed
Merge pull request #6397 from pmmp/stable
Merge branch 'stable' into minor-next
2024-07-10 18:56:52 +01:00
ipad54
accaa0acce
Implement ICopper interface for blocks with common properties (#6390) 2024-07-10 11:15:06 -05:00
Arie1906
68d2e2915e
Bells always drops themselves (#4802) 2024-07-07 15:20:45 -05:00
ipad54
2ffc38c835
Implement campfire & soul campfire (#4696) 2024-07-07 15:01:34 -05:00
ipad54
b342c497d1 Added 1.21 banner patterns. 2024-06-23 13:27:52 +03:00
Hugo_
f772bb7384
WoodenStairs can be a fuel (#6345) 2024-05-13 09:34:18 +01:00
Dylan K. Taylor
dad9a7e6cd
Merge branch 'stable' into minor-next 2024-04-02 16:35:31 +01:00
ShockedPlot7560
2584314202
NetherRoots: fix placement on soul soil (#6299) 2024-03-25 10:53:16 +00:00
ipad54
337e462c8f
Added new banner patterns (#6298) 2024-03-25 10:52:21 +00:00
ipad54
b680a1693c
Added sound when picking sweet berries (#6287) 2024-03-19 10:18:30 +00:00
Dylan K. Taylor
d211392b67
Merge remote-tracking branch 'origin/stable' into minor-next 2024-02-12 11:46:48 +00:00
Dylan K. Taylor
fe06bfcda0
Import alias cleanup courtesy of newest php-cs-fixer 2024-02-07 12:50:37 +00:00
IvanCraft623
f207d1bbf2
Make CocoaBlock Flowable (#6218) 2024-02-05 12:36:09 +00:00
Dylan K. Taylor
a459e3c1a9
Block: improve some documentation 2024-01-09 13:35:36 +00:00
Dylan K. Taylor
288bd4018b
Block: deprecate isSolid()
As discussed many years ago in #2551, no one actually knows what this property actually means. It definitely isn't the conventionally expected definition of 'solid' found in the real world, as signs are solid but flower pots are not.
2024-01-09 13:35:10 +00:00
Hugo_
c51b1b2812
Create LightableTrait and remove repetitive code (#6111) 2023-12-20 15:21:11 +00:00
Dylan K. Taylor
944dd7d3e4
BaseBanner: remove unnecessary array_filter() usage 2023-12-15 15:19:44 +00:00
ace
d596dc571d
Fix pitcher pod wrongly registered as a block (#6162) 2023-11-27 14:46:20 +00:00
Dylan K. Taylor
519784460f
Merge branch 'stable' into minor-next 2023-11-17 12:04:10 +00:00
ace
89fbb3fd0d
Fix loading of Item Frame item rotation (#6123) 2023-11-16 10:16:29 +00:00
Dylan K. Taylor
dd98e4aaed
block: clean up unnecessary getter usages
with the assistance of a custom phpstan rule
this inconsistent mess has been bothering me for a long time
2023-11-14 12:47:33 +00:00