73bf5d4b29
DoubleChestInventory: specialize isSlotEmpty() and getMatchingItemCount()
2023-04-27 21:17:55 +01:00
0dca85af44
Merge branch 'minor-next' into major-next
2023-04-26 23:28:27 +01:00
0d21e591d1
Support sign editing UI in 1.19.80, with APIs to allow plugins to use it
...
this doesn't support editing the rear side of a sign, since the 1.12 format doesn't allow us to represent the rear text, and it would necessitate API breaks to support anyway.
However, we can quite trivially support APIs for the sign GUI, which plugins can use to enable editing signs. PocketMine-MP doesn't currently permit this, since it's currently an experimental feature in 1.20, but plugins can simply use Player->openSignEditor() to mimic it.
This is, however, a byproduct of the fact that APIs needed to be added in order to facilitate the use of OpenSignPacket in 1.19.80.
2023-04-26 22:55:05 +01:00
edcaeef831
VanillaBlocks: reduce width of element block registration
2023-04-21 21:33:45 +01:00
d4ca566fd0
Move block permutation generation into Block
...
this allows sealing off a whole bunch of internal APIs.
2023-04-21 20:38:28 +01:00
6c0ad9589b
Block: rename isSameType() to hasSameTypeId()
...
this should remove any ambiguity about its behaviour.
2023-04-21 20:25:21 +01:00
1026811741
Merge branch 'minor-next' into major-next
2023-04-14 21:00:08 +01:00
692e1253c6
Fixed AABB height for farmland and grass paths (fixed in 1.19.50)
2023-04-14 16:02:28 +01:00
6acabf7a1b
Block: add clarifying note about isSameType()
...
I'm still not happy with this method though...
2023-04-13 13:40:53 +01:00
b122703fd0
BaseCoral: fixed late property initialization
2023-04-13 13:18:47 +01:00
e40774d62f
Block: make internal methods private (they are no longer used outside of Block)
2023-04-13 13:06:56 +01:00
5950707267
Block: simplify required type data / state data bits code
2023-04-13 12:55:09 +01:00
6703f46a08
Remove random dead TODOs
2023-04-13 12:47:08 +01:00
874fdf5adb
ItemBlock: reference blocks directly (take 2)
...
This was first attempted in f64dc01bd1
, but reverted, since I hadn't considered how to handle stripping state data from blocks.
This removes the abusable API RuntimeBlockStateRegistry::fromTypeId() and related methods. These were only used to allow ItemBlocks to magically start referencing other blocks if the blocks were overridden by a plugin, but this was never a well-supported use-case anyway.
Instead of relying on RuntimeBlockStateRegistry, we remember the state that the block had during its constructor, and use that to normalize the non-item properties for asItem().
closes #5609
2023-04-13 12:44:54 +01:00
bea878e9e9
Implement anvil fall damage ( #5312 )
2023-03-27 20:17:08 +01:00
72853677bb
Fixed mushroom blocks for PM5
...
closes #5284
2023-03-15 16:54:13 +00:00
5f9e0081fd
Fixed mushroom block silk-touch drops and block picking behaviour
...
fixes #5284
2023-03-15 16:36:35 +00:00
fff8f0f815
Use Item->canStackWith() instead of Item->equals() wherever possible
2023-03-07 17:08:35 +00:00
b9d62de29d
Pack wall connections into 7 bits for runtime data encoding
2023-03-04 15:47:34 +00:00
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
972f107972
Block: added documentation for describeType() and describeState()
2023-03-02 17:31:52 +00:00
e15e53859f
tidy
2023-03-02 17:25:48 +00:00
4692552fdc
Block: improve documentation of type ID and state ID
2023-03-02 16:32:33 +00:00
cbb58d3e0d
Block: reduce method placement chaos
2023-03-02 16:23:40 +00:00
7c974a12e1
Revert "ItemBlock: drop the charade about overriding built-in block types"
...
This reverts commit f64dc01bd1
.
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
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
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
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
c2f6d8139a
Added interface RuntimeDataDescriber
2023-02-16 16:23:32 +00:00
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
4c3892b2d6
RuntimeBlockStateRegistry: separate permutation expansion from register()
2023-02-16 15:41:43 +00:00
75f74454c6
Implemented reinforced deepslate ( #5553 )
2023-02-15 15:15:04 +00:00
5226300b99
Ring bell when hit by a projectile ( #5505 )
2023-01-27 23:07:41 +00:00
0f81b7be15
Fixed deepslate drops ( #5535 )
...
Co-authored-by: Dylan T <dktapps@pmmp.io >
2023-01-26 15:08:15 +00:00
f56339c306
Fix build
2023-01-26 14:48:43 +00:00
2cd8e4d270
...
2023-01-25 19:02:42 +00:00
0a3ecfdae9
Clean up terminology around block state IDs and their handling
2023-01-25 19:01:15 +00:00
2f469ef4a0
Added mangrove, azalea and flowering azalea leaves
2023-01-25 18:50:14 +00:00
3a13f5cf5f
Merge branch 'next-minor' into next-major
2023-01-16 19:56:51 +00:00
edb8f19a0c
Merge branch 'stable' into next-minor
2023-01-16 19:56:38 +00:00
6c0254c1eb
Block: document parameters of place()
2023-01-16 19:49:24 +00:00
69967a0e55
Properly localize jukebox popups
2023-01-13 17:48:56 +00:00
8909aa6a18
Merge branch 'next-minor' into next-major
2023-01-13 17:29:25 +00:00
a9f06fc5f4
Replaced hardcoded record.nowPlaying with KnownTranslationKeys
2023-01-13 17:27:57 +00:00
6dd006e730
Update BlockTypeIds.php
2023-01-13 01:31:24 +00:00
39218017ca
Fixed walls and thin blocks not connecting to each other
...
closes #5498
2023-01-12 22:16:41 +00:00
ecd8f151f1
Merge branch 'next-minor' into next-major
2023-01-12 22:08:25 +00:00
c671d8a80b
ItemFrame: fixed support conditions
2023-01-12 21:57:35 +00:00
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
91ac47ecba
Merge branch 'stable' into next-minor
2023-01-12 21:47:37 +00:00