Commit Graph

476 Commits

Author SHA1 Message Date
Dylan K. Taylor
2940547026 Eliminate repeated calls to Position->getWorld()
as well as improving readability, it also improves performance in some areas.
2022-07-20 20:44:05 +01:00
Dylan K. Taylor
24e72ec109 ContainerTrait: improve performance of block destroy hook
this was creating useless vector3s for every iteration, as well as repeatedly invoking Position->getWorld() for no reason.
2022-07-20 20:39:37 +01:00
IvanCraft623
fec89b7803 Lava burns entities for only 8 seconds in Bedrock (#5173) 2022-07-17 20:50:15 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
df2d1fd4f9 of course there were two bugs on one line ... 2022-06-24 01:40:26 +01:00
Dylan K. Taylor
9f65fb5f90 Fixed top-side skulls with no-drop flag set being treated as unknown blocks 2022-06-24 01:31:11 +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
6d7318af43 Liquid: fixed merge regression 2022-05-26 18:48:45 +01:00
Dylan K. Taylor
4ccae2d1de BlockFactory: use import aliases to reduce code width 2022-05-26 15:50:29 +01:00
Dylan K. Taylor
179cac45f5 Merge branch 'stable' into next-minor 2022-05-22 16:21:05 +01:00
Dylan K. Taylor
a45a96b3ee ShulkerBoxInventory: fixed inappropriate usage of BlockLegacyIds when comparing item IDS 2022-05-21 15:40:25 +01:00
ShockedPlot7560
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
Dylan K. Taylor
d4b7f66e15 Promote some constructors 2022-05-17 22:34:58 +01:00
Dylan K. Taylor
071067effb Fixed flower pot accepting any block 2022-05-17 20:30:02 +01:00
ipad54
1e59679ec2 Implemented Stonecutter (#4732) 2022-05-17 16:01:03 +01:00
Duo Incure
1da6aa40f8 Leaves: drop sticks with a 2% chance (#5019)
as per vanilla
2022-05-10 14:17:18 +01:00
Dylan K. Taylor
937bb4c6ce Merge branch 'stable' into next-minor 2022-04-28 21:00:23 +01:00
Dylan K. Taylor
72cff0ee11 Modernize property declarations in pocketmine\block namespace 2022-04-25 13:00:29 +01:00
Dylan K. Taylor
09778e3f1b Fixed build failure 2022-04-25 12:56:16 +01:00
Dylan K. Taylor
9f5d4180c9 Spawnable: remove dead code, deprecate isDirty() and setDirty() 2022-04-25 12:46:01 +01:00
Dylan K. Taylor
5a98b08ee8 Fixed several crashes on bad data due to inadequate TAG_List type checks 2022-04-19 16:48:18 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
ab93135b84 Merge branch 'stable' into next-minor 2022-03-22 15:49:58 +00:00
Dylan K. Taylor
879476d8e0 ItemFrame: added missing bounds check for setItemDropChance() 2022-03-09 22:20:04 +00:00
Dylan K. Taylor
025f6407e2 Fire: fixed sticking to transparent top-sides of blocks
closes #4879
closes #2819
2022-03-09 16:59:26 +00:00
IvanCraft623
10c0d83fa5 ShulkerBox: Allow opening unless the lid is obstructed by a solid block (#4885)
fixes #4884
2022-03-09 16:37:23 +00:00
Dylan K. Taylor
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
Leo Lee
6a39caa204 Fixed mycelium spreading onto coarse dirt (#4816) 2022-03-03 19:02:13 +00:00
ipad54
91f81d4c8e Sweet Berry Bush now absorbs fall damage (#4876) 2022-03-03 19:00:44 +00:00
Dylan K. Taylor
70f923714c Merge branch 'stable' into next-minor 2022-03-02 18:43:34 +00:00
Rush2929
d47a7f48bd BrewingStand: avoid duplicate method call (#4874) 2022-03-02 17:32:56 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
3ed336fa0e Merge branch 'stable' into next-minor 2022-02-19 20:16:49 +00:00
Dylan K. Taylor
7e903fde5b Fixed multiple players being able to sleep in the same bed 2022-02-10 00:57:43 +00:00
Dylan K. Taylor
735e4cc3bc Merge branch 'staging/4.1' into next-minor 2022-02-07 17:22:42 +00:00
Dylan K. Taylor
e9dd9df0a0 Merge remote-tracking branch 'origin/stable' into staging/4.1 2022-02-07 17:22:18 +00:00
Dylan K. Taylor
256826d9c7 Fixed uninitialized color fields of stained glass, stained clay and stained hardened glass 2022-02-07 15:39:54 +00:00
Dylan K. Taylor
c273b29dec BambooSapling: fixed wrong bit being used for readiness
closes #4809
2022-02-07 15:38:05 +00:00
Dylan K. Taylor
7ddd547190 Merge remote-tracking branch 'origin/stable' into staging/4.1 2022-02-06 23:55:52 +00:00
Dylan K. Taylor
0642364a44 block: added constants for various integer property bounds 2022-01-28 21:27:30 +00:00
Dylan K. Taylor
cfdbfa3d58 Liquid: fixed implicit assumption of 0 == air 2022-01-28 21:07:41 +00:00
Dylan K. Taylor
e9a6c0ba58 Liquid: added missing bounds check for setDecay() 2022-01-28 21:03:44 +00:00
Dylan K. Taylor
d16b6fe61e Merge branch 'stable' into staging/4.1 2022-01-28 20:40:07 +00:00
Dylan K. Taylor
7a75fcda44 Merge branch 'bell-4745' into stable 2022-01-28 20:21:28 +00:00
NTT1906
8d289ab01d Bell: fixed collision boxes
closes #4745
2022-01-28 20:20:41 +00:00
Dylan K. Taylor
a7bdef69e2 Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-27 00:40:34 +00:00
Rush2929
3155c90396 Fixed incorrect drops for Cobweb (#4759) 2022-01-26 00:25:00 +00:00
Dylan K. Taylor
75d0fc4749 BlockFactory: Make stone slab registration a little less unpleasant to read 2022-01-25 19:23:04 +00:00
Dylan K. Taylor
ea161af4e5 Added FurnaceType->getCookSound() 2022-01-25 19:01:49 +00:00
ShockedPlot7560
0bf5f97fe9 Implement furnace sound (#4755)
closes #4363 

The following classes have been added:
- BlastFurnaceSound
- SmokerSound
- FurnaceSound
2022-01-25 18:52:31 +00:00