Dylan K. Taylor
06f20234f7
Scrub unused imports
2021-03-26 22:56:09 +00:00
Dylan K. Taylor
5e9ce92b55
Explosion: don't depend on air having stateID 0
2021-03-25 23:17:33 +00:00
IceCruelStuff
8dd900a2c6
Sugarcane: allow placement on podzol ( #4094 )
2021-03-23 00:00:13 +00:00
Dylan K. Taylor
eb9b644447
PressurePlate: remove collision boxes, closes #4045
2021-03-22 21:54:27 +00:00
Dylan K. Taylor
49438d360d
RegistryUtils: generate ordered doc comments
...
this makes things easier to find, especially in the large ones like VanillaBlocks.
2021-03-22 16:16:28 +00:00
Dylan K. Taylor
90161f24e3
Added script to update registry/enum docblocks
2021-03-22 16:00:09 +00:00
Dylan K. Taylor
b844c4266d
Added World::Y_MIN
...
preparation for Y axis expansion in 1.17
2021-03-17 23:19:49 +00:00
Dylan K. Taylor
c1e5dd2a4e
Merge branch 'stable'
2021-03-07 20:15:11 +00:00
Dylan K. Taylor
b5361d5831
Falling lava may not harden
...
fixes #4050
this was not an issue on PM3 because the decay and falling state were both combined into the meta.
2021-02-25 22:36:53 +00:00
Govdim
e061028b69
Added Hopper::setFacing() and Hopper::getFacing() ( #4030 )
2021-02-09 16:04:05 +00: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
bd4ce8d941
TNT: expose unstable flag
2021-02-06 23:46:51 +00:00
Dylan K. Taylor
fd2ebd84b4
Recognize underwater TNT
2021-02-06 23:37:05 +00:00
Dylan K. Taylor
609b21679f
Added Torch::setFacing() and Torch::getFacing()
...
these are not implemented with AnyFacingTrait because it would break LSP to have a setFacing that doesn't accept DOWN.
2021-02-06 22:31:36 +00:00
Dylan K. Taylor
ce855f2133
Added isPressed() and setPressed() to PressurePlate
2021-02-06 21:20:38 +00:00
Dylan K. Taylor
7c1f0ecb8b
Fixed getAxis()/setAxis() not being seen by static analysers for some blocks
...
when using VanillaBlocks::CHISELED_QUARTZ(), VanillaBlocks::PURPUR_PILLAR() or VanillaBlocks::QUARTZ_PILLAR(), static analysis was unable to detect getAxis() and setAxis(), because these blocks were implemented using anonymous classes.
2021-02-06 20:39:23 +00:00
Dylan K. Taylor
9887138ac1
Get rid of anonymous classes for infested stone
2021-02-06 20:30:25 +00:00
Dylan K. Taylor
82bb83211f
CocoaBlock: deduplicate attachment condition checking
2021-02-06 19:34:52 +00:00
Dylan K. Taylor
9ab3c57789
RedstoneRepeater: added getDelay() and setDelay()
2021-02-06 19:03:33 +00:00
Dylan K. Taylor
233616aa6a
RedstoneLamp now uses PoweredByRedstoneTrait
2021-02-06 19:02:13 +00:00
Dylan K. Taylor
5be03c3196
Make more use of PoweredByRedstoneTrait
2021-02-06 18:43:33 +00:00
Dylan K. Taylor
48ef8771cd
Added AnalogRedstoneSignalEmitterTrait
2021-02-06 18:33:14 +00:00
Dylan K. Taylor
02b0036cbe
DaylightSensor: refactor power -> signalStrength
2021-02-06 17:47:29 +00:00
Dylan K. Taylor
4fc3bc53f7
Clean up hierarchy of rails
...
detector rail has fundamentally different functionality than activator and powered rails, so it's misleading to present the same APIs for both.
detector rail's 'powered' state is better referred to as 'activated', since it means the detector rail is actually _producing_ power, and not _receiving_ power.
2021-02-05 22:00:17 +00:00
Dylan K. Taylor
6ccfe21d57
Block: improved accuracy of isFullCube()
2021-02-04 23:10:13 +00:00
Dylan K. Taylor
a9f8afa077
Banner: remove Deque usages
...
originally I introduced this to make it easier to implement the various APIs addPattern removePattern etc, but those were later removed in favour of simple getPatterns() and setPatterns(), allowing plugin developers to use ext-ds APIs to manipulate patterns.
However, ds poses a number of headaches because of mutability combined with by-ref semantics, which make it a pain to use these on the APIs because we can't guarantee that they won't be modified.
As much as arrays suck, they have two significant advantages over ext-ds: 1) they have copy-on-write semantics, and 2) they support PHP 8.0 without any extra work from me.
2021-01-15 00:17:56 +00:00
Mohamed
5392ddf0b9
Fixed TNT broadcasting ignition sound ( #3996 )
...
closes #3952
2021-01-07 21:18:18 +00:00
Dylan K. Taylor
9228f006d4
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# composer.json
# composer.lock
# resources/vanilla
# src/CrashDump.php
# src/PocketMine.php
# src/pocketmine/Server.php
# src/pocketmine/item/Bucket.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/Chunk.php
# src/pocketmine/level/format/io/leveldb/LevelDB.php
# src/pocketmine/level/format/io/region/McRegion.php
# src/pocketmine/network/mcpe/protocol/BatchPacket.php
# src/pocketmine/tile/Furnace.php
# src/pocketmine/utils/UUID.php
# src/utils/ServerKiller.php
2020-12-20 20:54:13 +00:00
Dylan K. Taylor
2af15557b9
Merge branch 'stable'
...
# Conflicts:
# .travis.yml
# resources/vanilla
# src/block/BlockToolType.php
# src/network/mcpe/protocol/types/entity/MetadataProperty.php
# tests/travis/setup-php.yml
2020-12-11 22:44:04 +00:00
Dylan K. Taylor
870d237260
BlockFactory::get() second parameter is now mandatory
2020-11-18 00:50:01 +00:00
ipad54
6a1f551aab
[ci skip] update TileFactory TODOs ( #3912 )
2020-11-17 11:04:26 +00:00
Dylan K. Taylor
16b71a265f
Barrel: added missing function import
2020-11-16 19:09:59 +00:00
Dylan K. Taylor
a9faed7171
[ci skip] update BlockFactory TODOs
2020-11-16 18:23:01 +00:00
Dylan K. Taylor
563336cdc9
CoralType: remove unused magicNumber stuff
2020-11-16 18:12:38 +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
Dylan K. Taylor
55a9ce46b9
VanillaBlocks: added BARREL
2020-11-16 17:56:13 +00:00
Dylan K. Taylor
d7c6a20b34
Barrel: added @return $this to setOpen()
2020-11-16 17:29:24 +00:00
Aericio
b2765f32e9
Implemented Barrels, closes #3672
2020-11-16 17:26:07 +00:00
Dylan K. Taylor
1cf3a500f8
Clean up ChestInventory handling
...
longer term I want to rip this crap out completely, but right now this provides minor maintainability benefits, while also making it slightly less nasty to deal with other containers which animate their blocks, such as barrels and shulker boxes.
2020-11-16 16:59:19 +00:00
Dylan K. Taylor
4ade7b6225
added CoralType enum
2020-11-14 16:24:13 +00:00
Dylan K. Taylor
06efad94b6
Separated metadata handling from PillarRotationTrait
2020-11-14 16:21:50 +00:00
Dylan K. Taylor
8e0cba56b8
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/entity/Entity.php
# src/pocketmine/tile/Tile.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/l7-baseline.neon
2020-11-12 22:10:47 +00:00
Dylan K. Taylor
518a7827a6
BlockFactory: make slab registration slightly less awful to look at
2020-11-03 19:28:32 +00:00
Dylan K. Taylor
32929925aa
Block: added a bunch of state manipulation APIs
2020-11-03 19:13:32 +00:00
Dylan K. Taylor
0a8dc3edd3
Fixed users of ColorInMetadataTrait having uninitialized default colours
2020-11-03 18:42:40 +00:00
Dylan K. Taylor
bcedbc364b
BlockDataSerializer: added methods to read/write coral facing
2020-11-03 18:41:12 +00:00
Dylan K. Taylor
5cc2a9c3dd
World: rename getChunkAtPosition() to getOrLoadChunkAtPosition()
...
this more accurately reflects what it does.
2020-11-03 14:12:47 +00:00
Dylan K. Taylor
3e21e47b7a
Liquid: make getFlowVector() slightly less cancerous to read
2020-11-01 14:39:59 +00:00
Dylan K. Taylor
241a50387b
World: added getHighestAdjacentRealBlockSkyLight()
...
this is the same as its 'non-real' counterpart, but it accounts for time of day.
2020-10-31 16:44:42 +00:00
Dylan K. Taylor
014317381f
Sugarcane: deduplicate growth code
...
this also fixes sugarcane attempting to grow past the top of the world (closes #3883 ).
2020-10-27 18:05:41 +00:00