847 Commits

Author SHA1 Message Date
Dylan T
fc3a6c6984
Implemented fire spread (#4617) 2021-12-16 23:36:34 +00:00
Dylan K. Taylor
4b06fe73f2
Merge branch 'stable' into next-minor 2021-12-14 22:54:39 +00:00
Dylan K. Taylor
4ad8cb02a5
BlockIdentifier: ensure that the tile class given is valid 2021-12-14 17:36:25 +00:00
Leo Lee
9e75c1463a
Implement carving pumpkin (#4637) 2021-12-10 19:45:15 +00:00
Dylan K. Taylor
ed4978c31b
Added VanillaItems::AIR()
we don't usually add VanillaItems entries for blocks since they already exist in VanillaBlocks, but air has a special use case specifically as an itemstack, so we make an exception for this case.
2021-12-07 00:41:07 +00:00
Dylan K. Taylor
2486dabd8a
Fire: extract more unrelated changes from #4617 2021-12-06 01:04:59 +00:00
Dylan K. Taylor
9256afd439
Call BlockSpreadEvent when spreading fire to incinerated blocks 2021-12-05 16:06:29 +00:00
Dylan K. Taylor
e2815eed60
BlockFactory: remap a bunch more invalid states 2021-11-27 20:07:58 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
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
Colin
ad56392d95
Skull: fixed calculation of collision boxes (#4591) 2021-11-24 21:42:51 +00:00
Dylan K. Taylor
5c7125f190
Improved error handling for loading broken entity / tile data 2021-11-23 17:41:26 +00:00
Covered123
399824c31c
Add correct drop for Podzol (#4573) 2021-11-14 14:15:36 +00:00
Dylan K. Taylor
09a2e006a8
CS AGAIN 2021-11-09 00:20:06 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
19a3efe893
....... 2021-11-08 18:57:14 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
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
Colin
07b1cff306
Bonemeal is no longer consumed when cancelling plant growth events (#4551) 2021-11-05 16:15:55 +00:00
Colin
ead8ccf08d
CocoaBlock: call BlockGrowEvent when growing for any reason (#4536) 2021-11-02 17:05:07 +00:00
Dylan K. Taylor
e34364412b
Replace InvalidStateException usages with InvalidArgument or LogicException 2021-11-02 16:05:54 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
42ede30e77
... 2021-10-23 23:57:28 +01:00
Dylan K. Taylor
04aedc6494
Updated BedrockProtocol 2021-10-23 23:54:49 +01:00
Dylan K. Taylor
c773e43eda
Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef 2021-10-23 01:16:45 +01:00
Dylan K. Taylor
321345fcc8
Sapling: simplify condition 2021-10-13 23:00:38 +01:00
Dylan K. Taylor
0ac9f4fe61
BlockFactory: move SweetBerryBush to its proper place 2021-10-13 22:26:51 +01:00
IceCruelStuff
49c1e4c06e
Implement fletching table (#4501) 2021-10-12 21:21:05 +01:00
Dylan K. Taylor
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
Matt
09715906c8
StructureGrowEvent: added API to get the player who caused the growth (#4445) 2021-10-09 22:51:46 +01:00
Dylan K. Taylor
8e3772ceef
Block: fixed incorrect behaviour of isSameState() for multi-ID blocks
fixes #4492
2021-10-06 23:16:03 +01:00
Dylan K. Taylor
42bf9578ce
Remove unused constants 2021-10-01 22:05:03 +01:00
Dylan K. Taylor
6a8280b1ba
Lever: add block property APIs 2021-09-29 00:20:57 +01:00
Leo Lee
eb80515e99
Fixed incorrect parameter checking in BlockFactory::get() (#4476) 2021-09-24 15:47:11 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
971cbe3929
Liquid: restore mistakenly removed check 2021-09-19 15:42:17 +01:00
Dylan K. Taylor
18de35ffc7
Liquid: use facing instead of hardcoded integers 2021-09-19 15:37:03 +01:00
Dylan K. Taylor
576c33ee8f
Liquid: make flow vector calculation less cancerous to read 2021-09-18 23:04:28 +01:00
Dylan K. Taylor
6b2ab15ea1
MinimumCostFlowCalculator: fix bug caused by recent change 2021-09-18 16:20:01 +01:00
Dylan K. Taylor
027f7e249b
MinimumCostFlowCalculator: Use match statements where possible
coincidentally, this also fixes the build.
2021-09-18 16:17:08 +01:00
Dylan K. Taylor
a9c4238c59
Liquid: Extract a big chunk of code to MinimumCostFlowCalculator 2021-09-18 16:13:38 +01:00
Dylan K. Taylor
34e1b244fa
Liquid: split canFlowInto() over multiple lines
the original version is very hard to read.
2021-09-18 15:53:54 +01:00
Dylan K. Taylor
b047100719
Liquid: improve minimum cost calculation handling 2021-09-18 15:52:16 +01:00
Dylan K. Taylor
1b5071e074
Liquid: make some code slightly less cancerous to read 2021-09-18 15:28:45 +01:00
Dylan K. Taylor
a1c82da2f2
Liquid: remove useless continue 2021-09-12 16:03:52 +01:00
Dylan K. Taylor
84170ad3e1
Furnace: fixed deactivation after being reloaded from disk (regression from PM3)
closes #4430
2021-09-12 15:49:33 +01:00
Dylan T
4111d92b98
Stop hardcoding chunk dimensions everywhere (#4443) 2021-09-10 16:13:25 +01:00
Cosmic
710345d4b0
Implemented Farmland turns to dirt when jumped on. (#4434) 2021-09-06 12:55:52 +01:00
Dylan K. Taylor
df3b112877
Implemented slime blocks 2021-09-05 20:46:59 +01:00
Dylan K. Taylor
8e2486b96a
Bed: bounce doesn't apply if the entity was sneaking 2021-09-05 20:14:17 +01:00