Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blocks interfaces for commons properties #6639

Open
wants to merge 2 commits into
base: minor-next
Choose a base branch
from

Conversation

Dhaiven
Copy link
Contributor

@Dhaiven Dhaiven commented Feb 21, 2025

Related issues & PRs

Add #6161

Changes

API changes

Add:

  • AgeableInterface
  • AnalogRedstoneSignalEmitterInterface
  • ColoredInterface
  • CoralTypeInterface
  • LightableInterface
  • MultiFacingInterface
  • PillarRotationInterface
  • PoweredByRedstoneInterface
  • SignLikeRotationInterface
  • SingleFacingInterface
  • WoodTypeInterface

Behavioural changes

Backwards compatibility

No BC Break

Follow-up

Tests

@Dhaiven Dhaiven requested a review from a team as a code owner February 21, 2025 13:11
Copy link
Member

@dktapps dktapps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the names of the interfaces are too verbose. I understand why (e.g. WoodType would conflict with the WoodType enum), but I don't like it much.


use pocketmine\math\Facing;

interface SingleFacingInterface{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be split into two variants AnyFacing and HorizontalFacing
The value sets for get/set are different so we shouldn't use the same interface

@dktapps dktapps added Category: API Related to the plugin API Type: Enhancement Contributes features or other improvements to PocketMine-MP Status: Waiting on Author labels Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: API Related to the plugin API Status: Waiting on Author Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants