690 Commits

Author SHA1 Message Date
IvanCraft623
bea878e9e9
Implement anvil fall damage (#5312) 2023-03-27 20:17:08 +01:00
Dylan K. Taylor
72853677bb
Fixed mushroom blocks for PM5
closes #5284
2023-03-15 16:54:13 +00:00
Dylan K. Taylor
fff8f0f815
Use Item->canStackWith() instead of Item->equals() wherever possible 2023-03-07 17:08:35 +00:00
Dylan K. Taylor
b9d62de29d
Pack wall connections into 7 bits for runtime data encoding 2023-03-04 15:47:34 +00:00
Dylan K. Taylor
95c18ef99a
Block: change confusing naming of decode/computeStateData
these actually accept a combination of type and state data, so it's a bit inconsistent with other references to 'state data'.
2023-03-02 17:42:44 +00:00
Dylan K. Taylor
972f107972
Block: added documentation for describeType() and describeState() 2023-03-02 17:31:52 +00:00
Dylan K. Taylor
e15e53859f
tidy 2023-03-02 17:25:48 +00:00
Dylan K. Taylor
4692552fdc
Block: improve documentation of type ID and state ID 2023-03-02 16:32:33 +00:00
Dylan K. Taylor
cbb58d3e0d
Block: reduce method placement chaos 2023-03-02 16:23:40 +00:00
Dylan K. Taylor
7c974a12e1
Revert "ItemBlock: drop the charade about overriding built-in block types"
This reverts commit f64dc01bd1c14ff3f79bd6c18d0c337dbc0e87e0.

I forgot that the ItemBlock constructor implicitly strips off any states
of the origin block, which is something that we unfortunately can't do
any other way right now, since the blocks don't remember their default
states.
2023-03-02 15:51:55 +00:00
Dylan K. Taylor
f64dc01bd1
ItemBlock: drop the charade about overriding built-in block types
this allows cleaning up a whole lot of abusable mess from the API, and we never properly supported overriding built-in block types anyway.
2023-03-02 15:50:18 +00:00
Dylan K. Taylor
33140482bb
ItemTypeIds: added fromBlockTypeId() and toBlockTypeId()
this allows checking the type of a blockitem without being required to create a block to do it.
2023-03-02 15:28:50 +00:00
Dylan K. Taylor
55a48e0c84
Block: specifying required type/state data bits is no longer required
RuntimeDataSizeCalculator allows calculating the number of required bits from describeType directly, which considerably reduces boilerplate code.
2023-02-16 16:45:19 +00:00
Dylan K. Taylor
c2f6d8139a
Added interface RuntimeDataDescriber 2023-02-16 16:23:32 +00:00
Dylan K. Taylor
e6f1cb69d1
RuntimeBlockStateRegistry: throw a hard error on blockstates that return different state data than they were given
this suggests improper validation of state data.
2023-02-16 15:44:58 +00:00
Dylan K. Taylor
4c3892b2d6
RuntimeBlockStateRegistry: separate permutation expansion from register() 2023-02-16 15:41:43 +00:00
ipad54
75f74454c6
Implemented reinforced deepslate (#5553) 2023-02-15 15:15:04 +00:00
IvanCraft623
5226300b99
Ring bell when hit by a projectile (#5505) 2023-01-27 23:07:41 +00:00
ipad54
0f81b7be15
Fixed deepslate drops (#5535)
Co-authored-by: Dylan T <dktapps@pmmp.io>
2023-01-26 15:08:15 +00:00
Dylan K. Taylor
f56339c306
Fix build 2023-01-26 14:48:43 +00:00
Dylan K. Taylor
2cd8e4d270
... 2023-01-25 19:02:42 +00:00
Dylan K. Taylor
0a3ecfdae9
Clean up terminology around block state IDs and their handling 2023-01-25 19:01:15 +00:00
Dylan K. Taylor
2f469ef4a0
Added mangrove, azalea and flowering azalea leaves 2023-01-25 18:50:14 +00:00
Dylan K. Taylor
3a13f5cf5f
Merge branch 'next-minor' into next-major 2023-01-16 19:56:51 +00:00
Dylan K. Taylor
edb8f19a0c
Merge branch 'stable' into next-minor 2023-01-16 19:56:38 +00:00
Dylan K. Taylor
6c0254c1eb
Block: document parameters of place() 2023-01-16 19:49:24 +00:00
Dylan K. Taylor
69967a0e55
Properly localize jukebox popups 2023-01-13 17:48:56 +00:00
Dylan K. Taylor
8909aa6a18
Merge branch 'next-minor' into next-major 2023-01-13 17:29:25 +00:00
Dylan K. Taylor
a9f06fc5f4
Replaced hardcoded record.nowPlaying with KnownTranslationKeys 2023-01-13 17:27:57 +00:00
Dylan T
6dd006e730
Update BlockTypeIds.php 2023-01-13 01:31:24 +00:00
Dylan K. Taylor
39218017ca
Fixed walls and thin blocks not connecting to each other
closes #5498
2023-01-12 22:16:41 +00:00
Dylan K. Taylor
ecd8f151f1
Merge branch 'next-minor' into next-major 2023-01-12 22:08:25 +00:00
Dylan K. Taylor
c671d8a80b
ItemFrame: fixed support conditions 2023-01-12 21:57:35 +00:00
Dylan K. Taylor
ca1f1bf09f
Fixed glowing item frames
due to technical limitations, this requires separating them back into two different block types. However, this isn't too egregious since it's just one flag, and actually simplifies some code.

closes #5478
2023-01-12 21:52:52 +00:00
Dylan K. Taylor
91ac47ecba
Merge branch 'stable' into next-minor 2023-01-12 21:47:37 +00:00
Dylan K. Taylor
f4a1d69075
Bell: fixed support requirements
this somehow got overlooked in the support types refactor.
2023-01-12 21:45:25 +00:00
Dylan K. Taylor
cbeae906e1
Torch: remove unused variable 2023-01-12 21:34:44 +00:00
Dylan K. Taylor
b25e8e26f0
BaseBanner: fixed incorrect support requirements 2023-01-12 21:31:50 +00:00
Dylan K. Taylor
a79be994de
World: fixed block placement when clicking on replaceable blocks
in vanilla, it appears to behave as if the player always clicked on the up face if a block was replaced.

In PM, we were still using the original face, which caused bugs when, for example, placing a button next to a wall by clicking on the side of tallgrass. The button would replace the tallgrass, but stick to the wall, instead of placing itself on the ground like vanilla expects.

This may appear unusual to anyone who also happens to implement canBePlacedAt(), since the facing behaviour will be different. However, this behaviour appears to match vanilla, and even slabs (which I feared might break because of this change) work perfectly.

In the future, it may be desirable to pass some other value here, such as null, to indicate that the clicked block is being replaced. However, that's a BC break and therefore outside of the scope of a stable bug fix.
2023-01-12 21:11:48 +00:00
Dylan K. Taylor
e26c8b9e9f
block: eliminate suspicious usages of $blockClicked in place() 2023-01-12 20:35:26 +00:00
Dylan K. Taylor
4e9c3e101d
Bell: fixed blocks not being able to be placed when not ringing the bell 2023-01-12 19:42:33 +00:00
Dylan K. Taylor
d295e1be54
PressurePlate: destroy self when no support is present 2023-01-12 19:36:47 +00:00
Dylan K. Taylor
2f3fcef97c
Fixed blocks incorrectly using blockClicked for support checks
this caused some interesting bugs, such as being able to place floating pressure plates by clicking on the side of a solid block halfway up a wall.
2023-01-12 19:36:23 +00:00
Dylan K. Taylor
5021096bdd
Fixed walls and thin blocks not connecting to each other
closes #5498
2023-01-09 20:46:57 +00:00
ipad54
c5ca0857ee
TileFactory: removed outdated TODO (#5503)
[ci skip]
2023-01-08 15:56:14 +00:00
Dylan K. Taylor
c2918709a3
Merge branch 'next-minor' into next-major 2023-01-06 01:59:04 +00:00
ipad54
85231215e7
Implemented Sculk (#5489) 2023-01-04 20:10:46 +00:00
Alexey
172ce659b8
Use str_starts_with, str_ends_with and str_contains instead of strpos (#5485) 2022-12-31 13:02:23 +00:00
ipad54
b3473960b4
Implemented chain (#5454) 2022-12-22 15:22:04 +00:00
Dylan K. Taylor
f38b15cf83
Added tag for fire blocks 2022-12-19 15:22:09 +00:00