04aedc6494
Updated BedrockProtocol
2021-10-23 23:54:49 +01:00
6a8280b1ba
Lever: add block property APIs
2021-09-29 00:20:57 +01:00
6b2ab15ea1
MinimumCostFlowCalculator: fix bug caused by recent change
2021-09-18 16:20:01 +01:00
027f7e249b
MinimumCostFlowCalculator: Use match statements where possible
...
coincidentally, this also fixes the build.
2021-09-18 16:17:08 +01:00
a9c4238c59
Liquid: Extract a big chunk of code to MinimumCostFlowCalculator
2021-09-18 16:13:38 +01:00
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
270ee5c085
Simplify registry method generation
2021-08-22 23:02:36 +01:00
60ac76a3bc
Remove more usages of hardcoded translation keys
2021-08-15 19:22:40 +01:00
8221475ce2
BlockDataSerializer: fix wrong exception type being thrown
2021-08-02 19:20:19 +01:00
bdac98beaf
Block: get rid of getNonPersistentStateBitmask(), add writeStateToItemMeta()
...
this is more flexible and less confusing.
2021-08-02 19:17:24 +01:00
83016a97bd
Added getMushroomBlockType() / setMushroomBlockType() APIs to Red/BrownMushroomBlock
2021-07-22 19:13:26 +01:00
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
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
5874ce582a
Implemented bells
2021-07-19 17:00:56 +01:00
b33bf1f433
Unfuck banners ...
2021-04-28 18:44:21 +01:00
d5e5a81cff
Don't explode when data contains invalid dye colour IDs
2021-04-28 13:39:03 +01:00
a44203a3d4
Separate BannerPatternLayer from BannerPatternType
2021-04-28 12:47:42 +01:00
8a3df1212a
Added a trait for blocks which face opposite their placing player
2021-04-27 21:28:26 +01:00
f204d6b3dd
Make a trait for blocks which share the same horizontal facing metadata logic
2021-04-27 20:59:20 +01:00
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
90161f24e3
Added script to update registry/enum docblocks
2021-03-22 16:00:09 +00:00
48ef8771cd
Added AnalogRedstoneSignalEmitterTrait
2021-02-06 18:33:14 +00:00
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
563336cdc9
CoralType: remove unused magicNumber stuff
2020-11-16 18:12:38 +00:00
4ade7b6225
added CoralType enum
2020-11-14 16:24:13 +00:00
06efad94b6
Separated metadata handling from PillarRotationTrait
2020-11-14 16:21:50 +00:00
32929925aa
Block: added a bunch of state manipulation APIs
2020-11-03 19:13:32 +00:00
bcedbc364b
BlockDataSerializer: added methods to read/write coral facing
2020-11-03 18:41:12 +00:00
0ef0848c44
Concrete and ConcretePowder colour is now dynamic
2020-10-15 14:30:07 +01:00
dfee8b7fa5
Added SignLikeRotationTrait
2020-10-04 21:09:45 +01:00
7f9c4355f0
Revert back to floor/wall banner variants
...
this code largely duplicates the same code in FloorSign/WallSign and needs to be de-duplicated.
2020-10-04 19:05:43 +01:00
ec7c5fd669
Added a BrewingStandSlot enum
2020-09-26 17:20:02 +01:00
6054104ecb
drop a few more useless static variables
...
phpstan is better able to understand constant literals, since it knows their types will never change.
2020-09-05 18:43:22 +01:00
ddc5694b70
remove file accidentally committed in 0b05fd1987
2020-08-17 20:25:30 +01:00
ff2a3baa8e
Implemented Jukebox & Records ( #3742 )
...
Co-authored-by: Dylan K. Taylor <odigiman@gmail.com >
2020-08-07 21:07:58 +01:00
2545897fc2
HorizontalFacingTrait: use a cheaper check for horizontal facing
2020-08-06 14:53:51 +01:00
2b044195a5
Update for pocketmine/math Axis refactor
2020-08-06 14:38:54 +01:00
56ae3d01da
block: added HorizontalFacingTrait and AnyFacingTrait
...
these are primarily intended for deduplication of code and ability to cross-reference. Don't expect this API to remain the same.
2020-08-05 21:17:37 +01:00
68c408268c
Separate dye colour ID management from DyeColor enum
2020-07-05 19:04:22 +01:00
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
e61a08a56b
Make SignText immutable
2020-06-29 20:18:10 +01:00
42f543b405
SignText: fixed crash when fetching lines of text if not all lines were provided to the constructor
2020-06-29 19:35:38 +01:00
0b05fd1987
added missing file
2020-06-29 18:54:47 +01:00
4b528aa637
NBT is no longer needed to create an entity
...
it's still able to be provided, but shouldn't be needed in the majority of cases (constructor args and/or API methods should be sufficient).
2020-06-19 10:51:27 +01:00
1205432c34
Extract mandatory parameters into constructor parameters
...
the goal is obviously to ditch NBT entirely here, but there's more work to be done before that becomes possible.
2020-06-19 10:51:27 +01:00
6a26c0bebf
EntityFactory now exclusively handles loading data from disk
...
this commit removes the ability to replace centrally registered entity classes in favour of using constructors directly.
In future commits I may introduce a dedicated factory interface which allows an _actual_ factory pattern (e.g. factory->createArrow(world, pos, shooter, isCritical) with proper static analysability) but for now it's peripheral to my intended objective.
The purpose of this change is to facilitate untangling of NBT from entity constructors so that they can be properly created without using NBT at all, and instead use nice APIs.
Spawn eggs now support arbitrary entity creation functions like EntityFactory does, allowing much more flexibility in what can be passed to an entity's constructor (e.g. a Plugin reference can be injected by use()ing it in a closure or via traditional DI.
2020-06-19 10:51:27 +01:00
337addf1de
Eradicate remaining usages of public Position->world field
...
and as an added bonus, ditch a bunch of extra phpstan errors
2020-05-19 19:14:56 +01:00
86db3af896
remove utils\Color, use new pocketmine/color class
...
we're so close to separating protocol from core !!!
2020-05-14 20:38:08 +01:00
7d9df6af6f
Convert EntityFactory to singleton
2020-04-24 22:43:02 +01:00
86e051b7bf
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
2020-04-18 17:33:05 +01:00