Dylan K. Taylor
0910054c41
NetworkSession: Fixed InventoryManager nullability disaster
...
fixes #4277
fixes #4275
fixes #3139
2021-06-26 17:44:42 +01:00
Dylan K. Taylor
444d902990
Fix CS
2021-06-21 20:45:31 +01:00
Dylan K. Taylor
2a6009f8bf
Check consistency of block remaps
2021-06-21 20:45:30 +01:00
Dylan K. Taylor
745f455bd2
Door: change thickness to match MCPE
...
since MCPE-19214 still hasn't been fixed after all these years, it's safe to say they won't fix it in the near future, and this causes placement glitches in PM.
2021-06-18 19:10:50 +01:00
Jason
ec6103d61e
Leaves can now be silk touched, closes #3714 ( #4240 )
2021-06-17 15:37:02 +01:00
Dylan K. Taylor
61c59be299
Replace hardcoded block metadata shifts and masks with constants
...
we might want to make these bigger than 4 bits in the future.
2021-06-16 12:48:09 +01:00
Jason
6fb364b16f
Store ender chest viewer count on the tile, instead of relying on the inventory's viewer count ( #4238 )
...
Fixes #4021
2021-06-13 14:37:09 +01:00
Dylan K. Taylor
0ebafbd224
.... adding the most important part would probably help
2021-06-12 20:46:53 +01:00
Dylan K. Taylor
7dcc4891ca
Block: added getDropsForIncompatibleTool()
2021-06-11 19:09:14 +01:00
Dylan K. Taylor
e4ed7bc4ea
Fixed Mushroom Stem blocks never dropping anything
2021-06-11 19:04:12 +01:00
Dylan K. Taylor
f68b9e79e1
Use typed properties in block namespace
2021-05-22 23:52:31 +01:00
Dylan K. Taylor
73c229a236
Block: fixed LSP violations in blocks using BlockIdentifierFlattened
...
a property's type can't be changed by a subclass
2021-05-22 23:40:54 +01:00
Dylan K. Taylor
285ad25168
BlockFactory: use the vars we already have, instead of repeated method calls
2021-05-22 12:45:08 +01:00
Dylan K. Taylor
f655d262be
Added stripped all-sided-log variants
...
again, these should be dynamic; but right now it's not possible.
2021-05-22 12:43:07 +01:00
Dylan K. Taylor
ac04911e88
BlockFactory: fix potential crash
2021-05-21 21:44:17 +01:00
Dylan K. Taylor
24405b63c1
Coarse is now a state of Dirt, instead of a separate block
2021-05-21 21:36:49 +01:00
Dylan K. Taylor
df260034cd
BlockFactory: Fill default state for all variants covered by bitmask when mismatch occurs
2021-05-21 21:12:34 +01:00
Dylan K. Taylor
7968a72f0e
Eliminate some duplicated breakinfos
2021-05-20 23:18:33 +01:00
Dylan K. Taylor
376d2c4cd4
Consistently declare BlockBreakInfo at the constructor call site
...
instead of inside the class
2021-05-20 22:49:51 +01:00
Dylan K. Taylor
af678f985d
All types of coral now have fully dynamic types
2021-05-19 22:49:44 +01:00
Dylan K. Taylor
b2e806e2fa
World: Harden chunk loading against bad data in entity/tile NBT
2021-05-12 12:26:41 +01:00
Dylan K. Taylor
f909557529
Cleaned up implementations for EnderChestInventory/DoubleChestInventory
...
previously, these were forced to extend BaseInventory because of the amount of crap in Inventory's interface.
This meant that these inventories had their own slots storage, which would be _mostly_ unused because these inventories aren't real inventories, but rather just delegates.
This lead to a variety of bugs in the past, such as certain API methods on BaseInventory not working correctly for DoubleChestInventory in particular.
Now, BaseInventory just implements the functional part of the inventory implementation, leaving the storage system up to the implementation.
A SimpleInventory class is provided with a simple SplFixedArray storage backing, which is used by most inventories.
EnderChestInventory and DoubleChestInventory now extend BaseInventory directly, and implement custom methods for dealing with their delegates.
2021-05-09 20:51:16 +01:00
Dylan K. Taylor
7b2c6c5ceb
Avoid more $this refs on long-life closures
2021-05-06 14:27:56 +01:00
Dylan K. Taylor
4ca5558ec1
Merge remote-tracking branch 'origin/stable'
2021-05-05 11:14:01 +01:00
Dylan K. Taylor
b8645f5c15
Clean up EnderChestInventory implementation
...
now, EnderChestInventory is just a temporary window, much like anvil/enchanting windows. It provides a gateway to the player's PlayerEnderInventory.
This removes one of the remaining obstacles to disallowing null World in Position constructor.
2021-05-02 14:26:27 +01:00
Dylan K. Taylor
988c976459
Remove unused import
2021-05-02 13:40:18 +01:00
Dylan K. Taylor
f538440bce
De-spaghettify the hierarchy for chest inventories
2021-04-30 13:44:39 +01:00
Dylan K. Taylor
d37016f43b
Vine: added API to get/set faces
2021-04-30 13:35:38 +01:00
Dylan K. Taylor
726978b8f1
Migrate all coloured blocks (except glazed terracotta) to dynamic colours
2021-04-29 20:11:03 +01:00
Dylan K. Taylor
593a8ac529
Added Loom blocks
...
these don't support doing patterns yet, but their inventories work.
2021-04-29 19:51:09 +01:00
Dylan K. Taylor
b33bf1f433
Unfuck banners ...
2021-04-28 18:44:21 +01:00
Dylan K. Taylor
d5e5a81cff
Don't explode when data contains invalid dye colour IDs
2021-04-28 13:39:03 +01:00
Dylan K. Taylor
a44203a3d4
Separate BannerPatternLayer from BannerPatternType
2021-04-28 12:47:42 +01:00
Dylan K. Taylor
8a3df1212a
Added a trait for blocks which face opposite their placing player
2021-04-27 21:28:26 +01:00
Dylan K. Taylor
72045b3d7e
CoralBlock: added setCoralType()
2021-04-27 21:03:23 +01:00
Dylan K. Taylor
f204d6b3dd
Make a trait for blocks which share the same horizontal facing metadata logic
2021-04-27 20:59:20 +01:00
Dylan K. Taylor
11263909ab
Added stripped logs (incomplete)
...
this isn't practical to fully implement right now due to limitations
imposed by the legacy shitfest system we're using. To make stripped
dynamic, we would need to switch the IDs _and_ variant info dynamically,
and I have no idea what bizarre side effects that might have.
2021-04-27 20:35:58 +01:00
Dylan K. Taylor
ed80490234
Added more APIs to Skull
...
setRotation() is conditionally useless, but there's not much we can do about this right now; and exposing it like this is better than having plugins interacting with tiles.
2021-04-27 19:31:08 +01:00
Dylan K. Taylor
c9cf33b21b
Skull: added block property APIs
...
I need these for my R13 block deserializer.
2021-04-27 19:22:45 +01:00
Dylan K. Taylor
0aa0d77307
Skull: recognize noDrops flag
2021-04-27 19:21:29 +01:00
Dylan K. Taylor
017ca55a58
Vine: use facing as both keys and values
2021-04-27 15:19:55 +01:00
Dylan K. Taylor
fc01735b6f
Fixed infinite loop when placing two coral plants next to each other
...
the dead flag is not persisted in their metadata, so they forget their state when next read from the world.
2021-04-19 23:01:57 +01:00
Dylan K. Taylor
129c638e29
Remove unused import
2021-04-18 20:33:49 +01:00
Dylan K. Taylor
53ebe4f9f9
World: added getHighestAdjacentFullLightAt()
2021-04-18 20:20:08 +01:00
Mohamed
5dfa6a2296
Fix dragon egg teleporting in creative ( #4180 )
...
closes #4179
2021-04-17 19:11:10 +01:00
Dylan K. Taylor
a32eb4ebc3
Implemented coral and coral fans
...
this implementation is very rough due to having to hack around lots more MCPE bullshit, and currently doesn't allow dynamic coral types; but it's there. We'll clean this up after 1.13 migration is done.
2021-04-17 02:04:10 +01:00
Dylan K. Taylor
d5e1b4bd39
Furnace: Separate light/extinguish code into onStartSmelting() and onStopSmelting() hooks
...
this is a preparation for other kinds of furnaces which might not be plain old Furnaces.
2021-04-17 01:36:16 +01:00
Dylan K. Taylor
da51f106de
ItemFactory/BlockFactory: give more specific class descriptions
...
these classes both have a very specific purpose now, which is much lesser than it was in PM3.
2021-04-16 21:27:28 +01:00
Dylan K. Taylor
c979ab8aa0
Be more specific with documentation of ItemFactory::register() and BlockFactory::register()
2021-04-16 21:24:16 +01:00
Dylan K. Taylor
6071746993
Mark ItemFactory::get() and BlockFactory::get() as @deprecated
2021-04-16 21:16:27 +01:00