-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
6161 implement interface common block properties #6383
base: minor-next
Are you sure you want to change the base?
6161 implement interface common block properties #6383
Conversation
@dktapps Just want to get a quick review of this to make sure its headed in the intended direction |
Would this be better utilized trait, I think the is the direction most items like this follow. |
Probably should use the trait as there is Horizontal and AnyFacing traits that could be used Possibly out of scope? Would likely fit more into another PR for cleaning up the code |
/** | ||
* Set the current facing direction of the block | ||
*/ | ||
public function setFacing(int $facing) : object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its block not object
@@ -40,7 +41,7 @@ | |||
use pocketmine\world\World; | |||
use function ceil; | |||
|
|||
class Painting extends Entity{ | |||
class Painting extends Entity implements FacingInterface{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design error, you're using an interface made for blocks in an entity, I don't think you should do that
Introduction
The goal of this is to give plugins an easier way of accessing common properties of blocks such as facing and on/off
Relevant issues
Fixes #6161