470 Commits

Author SHA1 Message Date
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
Dylan K. Taylor
ded778f422
Implemented bed bouncing 2021-09-05 20:11:49 +01:00
Dylan K. Taylor
2e153624ad
Anvil: actually add slot constants, this time 2021-09-03 12:44:41 +01:00
Dylan K. Taylor
963f4a9cf3
Added constant slot IDs for Furnace, Enchanting, Anvil and Brewing Stand inventories 2021-09-03 12:16:07 +01:00
Dylan K. Taylor
c7f78bec15
Added missing change to complete beba0ffe1578e0632e98b2c38f3c446f2ee0266c 2021-08-27 20:33:17 +01:00
Colin
8f89c04c51
Refactor Tree classes (#4407) 2021-08-27 20:11:05 +01:00
Colin
4189fbdaef
Added StructureGrowEvent (#4354)
This event is currently fired for tree and bamboo growth. Its intended use is for any plant growth that affects multiple blocks at once.

TODO: We could explore using this for cacti and sugarcane?
2021-08-25 14:05:30 +01:00
SalmonDE
7fd712c1ff
Refactor Block & Tile: getPos() to getPosition() (#4395)
this also changes the name of the class property 'pos' to 'position' as well as Block->getPosOffset() to Block->getPositionOffset()
2021-08-23 14:01:32 +01:00
Dylan K. Taylor
270ee5c085
Simplify registry method generation 2021-08-22 23:02:36 +01:00
Dylan K. Taylor
686bf398d5
BlockFactory: simplify get() code 2021-08-21 15:41:00 +01:00
marshall
b3298d7c77
Fix Skull->asItem() (#4375) 2021-08-16 19:06:30 +01:00
Dylan K. Taylor
60ac76a3bc
Remove more usages of hardcoded translation keys 2021-08-15 19:22:40 +01:00
Dylan K. Taylor
804d02b086
TranslationContainer: added prefix(), postfix() and format() 2021-08-14 16:08:22 +01:00
Dylan T
27e0ecf7ee
Implemented Blast Furnace and Smoker (#4362) 2021-08-12 23:27:05 +01:00
Dylan K. Taylor
8221475ce2
BlockDataSerializer: fix wrong exception type being thrown 2021-08-02 19:20:19 +01:00
Dylan K. Taylor
bdac98beaf
Block: get rid of getNonPersistentStateBitmask(), add writeStateToItemMeta()
this is more flexible and less confusing.
2021-08-02 19:17:24 +01:00
Dylan K. Taylor
83016a97bd
Added getMushroomBlockType() / setMushroomBlockType() APIs to Red/BrownMushroomBlock 2021-07-22 19:13:26 +01:00
Dylan K. Taylor
5c609cc1c1
Added getShape() and setShape() APIs to StraightOnlyRail and Rail 2021-07-22 18:37:30 +01:00
Dylan K. Taylor
e97234d420
Refactor Rail handling to allow LSP-complaint shape handling
the reason there hasn't been any API until now is because of how inconvenient it was to expose a LSP-compliant API _and_ use the same base class for handling all the connection logic. This commit fixes that problem by abstracting shape handling away from BaseRail entirely, so that now it deals exclusively with connections. Deciding the shape of rail to use is now the job of the subclasses.
2021-07-22 17:35:10 +01:00
Dylan K. Taylor
2476f40cc6
Rail: store shape instead of connections
shape is what we'll eventually expose on the API.
2021-07-22 16:45:42 +01:00
Angel
309bed414f
Implemented sweet berries (#4164)
this doesn't implement the server-side logic for the "stickiness" (slowdown) because we don't have the system needed for it yet.
It also doesn't have parity with vanilla on the damage.
2021-07-19 20:01:33 +01:00
Dylan K. Taylor
f64ef50ce3
ShulkerBox: fixed incorrect block-picking behaviour 2021-07-19 18:08:13 +01:00
Dylan K. Taylor
dcbc0bc2a6
BrownMushroomBlock: remove useless function 2021-07-19 17:58:24 +01:00
Dylan K. Taylor
71df15b4cc
Removed FlowerPot update_bit hack 2021-07-19 17:39:35 +01:00
Dylan K. Taylor
5874ce582a
Implemented bells 2021-07-19 17:00:56 +01:00
Dylan K. Taylor
d35e818ea0
BlockLegacyMetadata: added constants for bell attachment types 2021-07-17 19:11:28 +01:00
Dylan K. Taylor
19e81b0cd3
BlockFactory: Be aware of potential size changes to metadata bits
during testing I found the need to use more bits (for example, bells have 32 states in 1.12).
2021-07-17 19:06:49 +01:00
Dylan K. Taylor
9afc5be0f5
Shulker open/close sounds != shulker box open/close sounds 2021-07-10 19:59:59 +01:00