Commit Graph

435 Commits

Author SHA1 Message Date
6a0c54f850 Block: Relocate and document addVelocityToEntity()
maybe we should consider merging this with onEntityInside(), since they are both called for the same reasons? ...
2022-09-24 17:32:02 +01:00
77a18d0aea Block: add documentation for getFrictionFactor()
has no one ever questioned the fact that a higher _friction_ factor _reduces_ the block's friction???
2022-09-24 17:05:38 +01:00
140a809c40 Block: improve documentation of hasEntityCollision() and onEntityInside() 2022-09-24 17:04:42 +01:00
cb7c136035 Added documentation for some base Block classes 2022-09-24 16:54:21 +01:00
88eafdd614 Improve type info for RegistryTrait::getAll() and its users 2022-09-02 19:57:22 +01:00
f88c4d9a8c Remove more unnecessary local static variable usages
these are never mutated. Local constants would be better, if we had those.
2022-09-02 19:19:04 +01:00
d72e947d15 BlockFactory: avoid unnecessary local static variable usage
phpstan treats these as always mixed, because it can't be sure what their types will be.
2022-09-02 19:14:35 +01:00
85678aa356 phpstan 1.8.3 2022-09-02 18:28:33 +01:00
709a869045 Vines can now only be placed on full cube blocks (#5053)
fixes #2673
2022-08-21 21:04:24 +01:00
fc8434308b SignText: changed misleading documentation
this looks like a leftover from the days when sign text was handled by the tile directly
2022-08-21 20:45:23 +01:00
8fa81242d6 Sugarcane: fixed support conditions (#5052) 2022-08-15 17:08:26 +01:00
fec89b7803 Lava burns entities for only 8 seconds in Bedrock (#5173) 2022-07-17 20:50:15 +01:00
269b6ed16a FallableTrait: fixed logic for block replacement
closes #5126

I don't know why it wasn't done this way to begin with. FallingBlock always used canBeReplaced()...
2022-07-06 16:16:49 +01:00
df2d1fd4f9 of course there were two bugs on one line ... 2022-06-24 01:40:26 +01:00
9f65fb5f90 Fixed top-side skulls with no-drop flag set being treated as unknown blocks 2022-06-24 01:31:11 +01:00
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
6d7318af43 Liquid: fixed merge regression 2022-05-26 18:48:45 +01:00
4ccae2d1de BlockFactory: use import aliases to reduce code width 2022-05-26 15:50:29 +01:00
179cac45f5 Merge branch 'stable' into next-minor 2022-05-22 16:21:05 +01:00
a45a96b3ee ShulkerBoxInventory: fixed inappropriate usage of BlockLegacyIds when comparing item IDS 2022-05-21 15:40:25 +01:00
6482aa7c64 Block: introduce logic for face support types (#4886)
fixes #4856
fixes #458
fixes #4529
fixes #3299

Added API method Block::getSupportType(Facing) : SupportType
Added SupportType enum
fixes torch, lantern, door etc. placement on slabs and upside-down stairs
2022-05-20 15:18:34 +01:00
d4b7f66e15 Promote some constructors 2022-05-17 22:34:58 +01:00
071067effb Fixed flower pot accepting any block 2022-05-17 20:30:02 +01:00
1e59679ec2 Implemented Stonecutter (#4732) 2022-05-17 16:01:03 +01:00
1da6aa40f8 Leaves: drop sticks with a 2% chance (#5019)
as per vanilla
2022-05-10 14:17:18 +01:00
937bb4c6ce Merge branch 'stable' into next-minor 2022-04-28 21:00:23 +01:00
72cff0ee11 Modernize property declarations in pocketmine\block namespace 2022-04-25 13:00:29 +01:00
09778e3f1b Fixed build failure 2022-04-25 12:56:16 +01:00
9f5d4180c9 Spawnable: remove dead code, deprecate isDirty() and setDirty() 2022-04-25 12:46:01 +01:00
5a98b08ee8 Fixed several crashes on bad data due to inadequate TAG_List type checks 2022-04-19 16:48:18 +01:00
4fc712119f FlowerPot: allow removing the planted item
closes #4896
closes #4898

this is not completely consistent with client-side predictions due to a bug in the client, which I believe is a problem limited to the legacy transaction system.
2022-04-08 23:07:08 +01:00
ab93135b84 Merge branch 'stable' into next-minor 2022-03-22 15:49:58 +00:00
879476d8e0 ItemFrame: added missing bounds check for setItemDropChance() 2022-03-09 22:20:04 +00:00
025f6407e2 Fire: fixed sticking to transparent top-sides of blocks
closes #4879
closes #2819
2022-03-09 16:59:26 +00:00
10c0d83fa5 ShulkerBox: Allow opening unless the lid is obstructed by a solid block (#4885)
fixes #4884
2022-03-09 16:37:23 +00:00
5d970cf5bd Fire: do not overwrite blocks during burning unless they were unchanged by onIncinerate()
onIncinerate() by custom blocks might produce custom results which aren't supposed to be burned away (e.g. wood could turn into charred wood, or something of that nature).
closes #4764
2022-03-03 19:19:59 +00:00
6a39caa204 Fixed mycelium spreading onto coarse dirt (#4816) 2022-03-03 19:02:13 +00:00
91f81d4c8e Sweet Berry Bush now absorbs fall damage (#4876) 2022-03-03 19:00:44 +00:00
70f923714c Merge branch 'stable' into next-minor 2022-03-02 18:43:34 +00:00
d47a7f48bd BrewingStand: avoid duplicate method call (#4874) 2022-03-02 17:32:56 +00:00
1ea0b8a9df VanillaBlocks generator now reverse-lookups ID constants instead of baking numeric IDs into the code
this makes it easier to spot errors.
similar treatment as VanillaItems received in the previous commit
2022-02-26 16:17:23 +00:00
3ed336fa0e Merge branch 'stable' into next-minor 2022-02-19 20:16:49 +00:00
7e903fde5b Fixed multiple players being able to sleep in the same bed 2022-02-10 00:57:43 +00:00
735e4cc3bc Merge branch 'staging/4.1' into next-minor 2022-02-07 17:22:42 +00:00
e9dd9df0a0 Merge remote-tracking branch 'origin/stable' into staging/4.1 2022-02-07 17:22:18 +00:00
256826d9c7 Fixed uninitialized color fields of stained glass, stained clay and stained hardened glass 2022-02-07 15:39:54 +00:00
c273b29dec BambooSapling: fixed wrong bit being used for readiness
closes #4809
2022-02-07 15:38:05 +00:00
7ddd547190 Merge remote-tracking branch 'origin/stable' into staging/4.1 2022-02-06 23:55:52 +00:00
0642364a44 block: added constants for various integer property bounds 2022-01-28 21:27:30 +00:00
cfdbfa3d58 Liquid: fixed implicit assumption of 0 == air 2022-01-28 21:07:41 +00:00