Commit Graph

354 Commits

Author SHA1 Message Date
cfdbfa3d58 Liquid: fixed implicit assumption of 0 == air 2022-01-28 21:07:41 +00:00
e9a6c0ba58 Liquid: added missing bounds check for setDecay() 2022-01-28 21:03:44 +00:00
7a75fcda44 Merge branch 'bell-4745' into stable 2022-01-28 20:21:28 +00:00
8d289ab01d Bell: fixed collision boxes
closes #4745
2022-01-28 20:20:41 +00:00
3155c90396 Fixed incorrect drops for Cobweb (#4759) 2022-01-26 00:25:00 +00:00
aaf7a88de7 HayBale: fixed fall damage 2022-01-22 21:26:44 +00:00
67a0ae0246 Fixed incorrect drops for ender chest (#4751) 2022-01-22 14:01:56 +00:00
9f4fcfafdb Fixed some incorrect block breaking times (#4723) 2022-01-16 20:57:16 +00:00
6679c53e56 BrewingStand: fixed collision box 2022-01-15 16:41:27 +00:00
6d249026cc Merge branch 'legacy/pm3' into stable 2022-01-07 20:15:15 +00:00
decd1da2d0 BaseSign: remove dead TODO comment 2022-01-03 19:33:03 +00:00
3c6146b5e0 ContainerTrait: avoid absurdly inefficient use of setItem()
this substantially improves the performance of loading containers such as chests.
2022-01-01 15:05:32 +00:00
091673d8f1 Fixed "You can only sleep at night" message (#4671) 2021-12-23 23:52:07 +00:00
4ad8cb02a5 BlockIdentifier: ensure that the tile class given is valid 2021-12-14 17:36:25 +00:00
e2815eed60 BlockFactory: remap a bunch more invalid states 2021-11-27 20:07:58 +00:00
1f9400f901 World: automatically remap invalid blockstates on chunk load
this fixes a wide range of blocks with invalid blockstates becoming update! blocks on the client.

The most common occurrence of this was air with nonzero metadata left behind by world editors which set blockIDs but not block metadata. This caused large ghost structures of update! blocks to appear from nowhere.

The performance impact of this is very minimal (20 microseconds per chunk load in timings, compared to average 660 microseconds to load tiles).
2021-11-27 01:12:30 +00:00
1bc7869f6e Added remapping for almost 4000 invalid blockstates
when a block has sole ownership of an ID, the state bitmask can be ignored and we can just claim the whole metadata range for that single block.
This fixes a large number of issues with unknown blocks on older worlds where world editors did not remove the metadata, although update blocks will currently still appear on initial chunk send due to lack of AOT conversion (TODO).
2021-11-26 01:58:52 +00:00
ad56392d95 Skull: fixed calculation of collision boxes (#4591) 2021-11-24 21:42:51 +00:00
5c7125f190 Improved error handling for loading broken entity / tile data 2021-11-23 17:41:26 +00:00
399824c31c Add correct drop for Podzol (#4573) 2021-11-14 14:15:36 +00:00
09a2e006a8 CS AGAIN 2021-11-09 00:20:06 +00:00
ab002ca06d Improved handling of temporary inventory windows
evacuation behaviour is now consistent regardless of who is doing it
2021-11-08 23:36:58 +00:00
19a3efe893 ....... 2021-11-08 18:57:14 +00:00
a1ecdc27e5 Removed Vanilla*::fromString()
these were misbegotten and should never have existed.
If someone really needs these for some reason, they can use getAll()[name].
2021-11-08 18:52:14 +00:00
45edb94607 Crafting tables now work the same way as anvils and enchanting tables
Removing almost all special-case logic for crafting tables.
2021-11-07 16:20:07 +00:00
07b1cff306 Bonemeal is no longer consumed when cancelling plant growth events (#4551) 2021-11-05 16:15:55 +00:00
ead8ccf08d CocoaBlock: call BlockGrowEvent when growing for any reason (#4536) 2021-11-02 17:05:07 +00:00
e34364412b Replace InvalidStateException usages with InvalidArgument or LogicException 2021-11-02 16:05:54 +00:00
5b8ce7e3e2 Cake: fixed desync on cancellation of eating
closes #3591
we don't support eating in creative right now, but the cake shouldn't appear to be eaten when it's not.
2021-10-30 21:02:24 +01:00
42ede30e77 ... 2021-10-23 23:57:28 +01:00
04aedc6494 Updated BedrockProtocol 2021-10-23 23:54:49 +01:00
c773e43eda Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef 2021-10-23 01:16:45 +01:00
321345fcc8 Sapling: simplify condition 2021-10-13 23:00:38 +01:00
0ac9f4fe61 BlockFactory: move SweetBerryBush to its proper place 2021-10-13 22:26:51 +01:00
49c1e4c06e Implement fletching table (#4501) 2021-10-12 21:21:05 +01:00
fd2df637b6 Block: rename getPositionOffset() -> getModelPositionOffset()
this gives a better idea of what the function does, and is also much less annoying for auto complete.
2021-10-10 22:35:38 +01:00
09715906c8 StructureGrowEvent: added API to get the player who caused the growth (#4445) 2021-10-09 22:51:46 +01:00
8e3772ceef Block: fixed incorrect behaviour of isSameState() for multi-ID blocks
fixes #4492
2021-10-06 23:16:03 +01:00
42bf9578ce Remove unused constants 2021-10-01 22:05:03 +01:00
6a8280b1ba Lever: add block property APIs 2021-09-29 00:20:57 +01:00
eb80515e99 Fixed incorrect parameter checking in BlockFactory::get() (#4476) 2021-09-24 15:47:11 +01:00
1ce388ca0b Liquid: add getMinAdjacentSourcesToFormSource(), remove circular dependency between Liquid and Water
this unpleasantly-named method allows controlling the source-forming behaviour of liquids by changing the required number of adjacent sources that must be present in order for a new source to form. This allows stuff like non-infinite water.
2021-09-19 15:59:16 +01:00
971cbe3929 Liquid: restore mistakenly removed check 2021-09-19 15:42:17 +01:00
18de35ffc7 Liquid: use facing instead of hardcoded integers 2021-09-19 15:37:03 +01:00
576c33ee8f Liquid: make flow vector calculation less cancerous to read 2021-09-18 23:04:28 +01:00
6b2ab15ea1 MinimumCostFlowCalculator: fix bug caused by recent change 2021-09-18 16:20:01 +01:00
027f7e249b MinimumCostFlowCalculator: Use match statements where possible
coincidentally, this also fixes the build.
2021-09-18 16:17:08 +01:00
a9c4238c59 Liquid: Extract a big chunk of code to MinimumCostFlowCalculator 2021-09-18 16:13:38 +01:00
34e1b244fa Liquid: split canFlowInto() over multiple lines
the original version is very hard to read.
2021-09-18 15:53:54 +01:00
b047100719 Liquid: improve minimum cost calculation handling 2021-09-18 15:52:16 +01:00