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
Aericio
fc090e238d
Add Shulker Boxes ( #3678 )
...
this implementation is working, although incomplete:
- The shulker close sound should not be played until the end of the shulker closing animation, which takes approximately 1 second.
- An open shulker box has a different collision box than a closed one - it should be +0.5 in whichever direction the shulker is facing. (During the animation, the bounding box also dynamically changes size - you can see this in vanilla by shooting an arrow into the top of an open shulkerbox facing UP, and then closing it - the arrow will fall and collide with the lid multiple times.
However, resolving both of these issues requires significant internal changes which are beyond the scope of this PR.
2021-07-10 19:48:38 +01:00
Dylan K. Taylor
4e731f61af
BlockFactory: Remap double slab IDs with 0x8 bit set to their base DOUBLE state, instead of BOTTOM
...
this was causing problems with slabs in converted Java worlds, where the
0x8 bit means 'smooth', instead of 'double'. In MCPE it has no effect.
Since Slab doesn't retain the high/low flag for DOUBLE type slabs, this
caused BlockFactory to assume that those states were invalid, and
remapped them to their base state instead.
The following changes resulted in the consistency check:
Remap changed for 43:8 (44:0 (Smooth Stone Slab) -> 43:0 (Smooth Stone Slab))
Remap changed for 43:9 (44:1 (Sandstone Slab) -> 43:1 (Sandstone Slab))
Remap changed for 43:10 (44:2 (Fake Wooden Slab) -> 43:2 (Fake Wooden Slab))
Remap changed for 43:11 (44:3 (Cobblestone Slab) -> 43:3 (Cobblestone Slab))
Remap changed for 43:12 (44:4 (Brick Slab) -> 43:4 (Brick Slab))
Remap changed for 43:13 (44:5 (Stone Brick Slab) -> 43:5 (Stone Brick Slab))
Remap changed for 43:14 (44:6 (Quartz Slab) -> 43:6 (Quartz Slab))
Remap changed for 43:15 (44:7 (Nether Brick Slab) -> 43:7 (Nether Brick Slab))
Remap changed for 157:8 (158:0 (Oak Slab) -> 157:0 (Oak Slab))
Remap changed for 157:9 (158:1 (Spruce Slab) -> 157:1 (Spruce Slab))
Remap changed for 157:10 (158:2 (Birch Slab) -> 157:2 (Birch Slab))
Remap changed for 157:11 (158:3 (Jungle Slab) -> 157:3 (Jungle Slab))
Remap changed for 157:12 (158:4 (Acacia Slab) -> 157:4 (Acacia Slab))
Remap changed for 157:13 (158:5 (Dark Oak Slab) -> 157:5 (Dark Oak Slab))
Remap changed for 181:8 (182:0 (Red Sandstone Slab) -> 181:0 (Red Sandstone Slab))
Remap changed for 181:9 (182:1 (Purpur Slab) -> 181:1 (Purpur Slab))
Remap changed for 181:10 (182:2 (Prismarine Slab) -> 181:2 (Prismarine Slab))
Remap changed for 181:11 (182:3 (Dark Prismarine Slab) -> 181:3 (Dark Prismarine Slab))
Remap changed for 181:12 (182:4 (Prismarine Bricks Slab) -> 181:4 (Prismarine Bricks Slab))
Remap changed for 181:13 (182:5 (Mossy Cobblestone Slab) -> 181:5 (Mossy Cobblestone Slab))
Remap changed for 181:14 (182:6 (Smooth Sandstone Slab) -> 181:6 (Smooth Sandstone Slab))
Remap changed for 181:15 (182:7 (Red Nether Brick Slab) -> 181:7 (Red Nether Brick Slab))
Remap changed for 422:8 (417:0 (End Stone Brick Slab) -> 422:0 (End Stone Brick Slab))
Remap changed for 422:9 (417:1 (Smooth Red Sandstone Slab) -> 422:1 (Smooth Red Sandstone Slab))
Remap changed for 422:10 (417:2 (Polished Andesite Slab) -> 422:2 (Polished Andesite Slab))
Remap changed for 422:11 (417:3 (Andesite Slab) -> 422:3 (Andesite Slab))
Remap changed for 422:12 (417:4 (Diorite Slab) -> 422:4 (Diorite Slab))
Remap changed for 422:13 (417:5 (Polished Diorite Slab) -> 422:5 (Polished Diorite Slab))
Remap changed for 422:14 (417:6 (Granite Slab) -> 422:6 (Granite Slab))
Remap changed for 422:15 (417:7 (Polished Granite Slab) -> 422:7 (Polished Granite Slab))
Remap changed for 423:8 (421:0 (Mossy Stone Brick Slab) -> 423:0 (Mossy Stone Brick Slab))
Remap changed for 423:9 (421:1 (Smooth Quartz Slab) -> 423:1 (Smooth Quartz Slab))
Remap changed for 423:10 (421:2 (Stone Slab) -> 423:2 (Stone Slab))
Remap changed for 423:11 (421:3 (Cut Sandstone Slab) -> 423:3 (Cut Sandstone Slab))
Remap changed for 423:12 (421:4 (Cut Red Sandstone Slab) -> 423:4 (Cut Red Sandstone Slab))
2021-07-08 20:37:19 +01:00
Dylan K. Taylor
e43bca95bf
Fixed build
2021-06-26 17:40:43 +01:00
Dylan K. Taylor
2a6009f8bf
Check consistency of block remaps
2021-06-21 20:45:30 +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
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
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
af678f985d
All types of coral now have fully dynamic types
2021-05-19 22:49:44 +01:00
Dylan K. Taylor
e8cb49f7ae
php-cs-fixer fixing php-cs-fixer's own mess
2021-05-05 11:25:11 +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
2eb05a2420
Updated block factory consistency check
2021-04-27 21:00:22 +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
81ced66bd0
BlockIdentifier: variant parameter of constructor is now mandatory
2021-04-16 20:14:29 +01:00
Dylan K. Taylor
e80c1a0ce9
Split Mushroom Stem away from other mushroom variants
...
mushroom stem (and all-sided stem) are unique blocks, which don't drop anything and which don't stack with other shroom variants when block-picked.
They also get mapped to the same block when placed, and there's no distinction between red mushroom stem and brown mushroom stem.
2021-02-07 22:02:50 +00:00
Dylan K. Taylor
fd2ebd84b4
Recognize underwater TNT
2021-02-06 23:37:05 +00:00
Dylan K. Taylor
ae75d73f48
Extract MainLoggerThread unit from MainLogger
...
MainLogger is no longer a Thread, as per the recent changes to pocketmine/log-pthreads.
2021-02-04 16:28:49 +00:00
Dylan K. Taylor
870d237260
BlockFactory::get() second parameter is now mandatory
2020-11-18 00:50:01 +00:00
Dylan K. Taylor
1eee24f1fa
Implemented coral blocks
...
there are some complications with coral plants due to the fact we're stuck with R12 worlds right now - and also coral fans are a major pain to implement due to how messed up the metadata is.
2020-11-16 18:05:39 +00:00
Aericio
b2765f32e9
Implemented Barrels, closes #3672
2020-11-16 17:26:07 +00:00
Dylan K. Taylor
be1da07ee5
tests: phpdoc cleanup
2020-11-01 14:23:44 +00:00
Dylan K. Taylor
d6d9dde0b2
imports cleanup
2020-11-01 14:23:21 +00:00
Dylan K. Taylor
73a8c90bee
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/world/Explosion.php
# tests/phpunit/item/ItemTest.php
# tests/phpunit/world/format/io/region/RegionLoaderTest.php
# tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php
# tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php
2020-11-01 14:21:47 +00:00
Dylan K. Taylor
500fd2d842
tests: strip useless phpdoc
2020-10-26 15:59:17 +00:00
Dylan K. Taylor
792f38f474
Carpet and Wool now have dynamic colours
2020-10-15 14:45:28 +01:00
Dylan K. Taylor
0ef0848c44
Concrete and ConcretePowder colour is now dynamic
2020-10-15 14:30:07 +01:00
Dylan K. Taylor
309d23acfb
regenerated blockfactory consistency check
2020-10-04 19:12:36 +01:00
Dylan K. Taylor
d3a3a41d2b
Revert back to separated floor/wall sign
...
the conditionally useless properties are problematic.
2020-10-04 17:52:23 +01:00
Dylan K. Taylor
388a19ef5d
Persistent block metadata may now have mutable parts
...
Not allowing this makes stuff like anvil damage, colour, wood type, live/dead bit, wet/dry etc all too much hassle to deal with.
Naturally I want to get rid of this shit altogether, but first it's necessary to construct a new system that we can shift into before all this bullshit can be addressed fully, so for now we have to work within the bounds of the old system.
This change will permit dynamic colours for concrete/concrete powder etc, dynamic wood types where the wood type isn't embedded in the legacy ID, and so forth. Allowing full flexibility requires either more old system hacks or completing the migration to a new system which doesn't have these limitations. I prefer to do the latter, but this change will make it somewhat easier to do.
2020-10-04 11:40:05 +01:00
Dylan K. Taylor
5807a385cc
Added stub classes for Beacon
...
this doesn't do anything yet, it's intended solely to prevent further loss of data.
2020-10-02 00:59:53 +01:00
Dylan K. Taylor
7a436dc47c
updated blockfactory consistency check
2020-10-01 22:10:02 +01:00
Dylan K. Taylor
ec7c5fd669
Added a BrewingStandSlot enum
2020-09-26 17:20:02 +01:00
Dylan T
bf401421fa
Implemented bamboo ( #3762 )
2020-08-16 20:39:51 +01:00
Jack Honour
ff2a3baa8e
Implemented Jukebox & Records ( #3742 )
...
Co-authored-by: Dylan K. Taylor <odigiman@gmail.com>
2020-08-07 21:07:58 +01:00
Dylan K. Taylor
d3c90c4dce
update block factory consistency check
2020-07-11 18:54:35 +01:00
Dylan K. Taylor
dae2a4ffce
SignText: added failing test case for index omission in constructor
2020-06-29 19:35:09 +01:00
Dylan K. Taylor
13d784cd0c
Convert BlockFactory to singleton
2020-04-23 23:45:13 +01:00
Dylan K. Taylor
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
Dylan K. Taylor
5ad66c3c9b
BlockTest: throw exception instead of always-false assert
2020-02-06 13:21:39 +00:00
Dylan K. Taylor
532dc0fb6f
tests/phpunit: populate iterable types for phpstan
2020-02-06 13:11:56 +00:00
Dylan K. Taylor
b543744534
Rename Solid -> Opaque
...
the old naming was misleading, particularly in conjunction with isSolid().
2019-07-22 19:56:01 +01:00
Dylan K. Taylor
a9c6489e08
updated consistency check for e388ac9c8b133fbf0382ef56f6ab75f04249a670
2019-07-21 13:11:59 +01:00
Dylan K. Taylor
08e1f6405c
implemented Carved Pumpkin
2019-07-09 17:56:09 +01:00
Dylan K. Taylor
4a6d4953f2
updated consistency check for previous commit
2019-07-03 16:19:24 +01:00
Dylan K. Taylor
f30cee15ca
added Dried Kelp block
2019-06-07 18:03:17 +01:00
Dylan K. Taylor
9d42bc3c0c
updated consistency check for ad79e6cd8e121ae3db02a10b7e86bc1bba8287f7
2019-06-01 12:12:55 +01:00
Dylan K. Taylor
c29523baf4
added a bunch of new blocks
2019-05-24 19:59:03 +01:00