-
Notifications
You must be signed in to change notification settings - Fork 147
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
TrampleCrop Handler #868
TrampleCrop Handler #868
Conversation
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.
I think it might be more suitable to have a HandleCropTrample method in world.Handler
. That way we don't have to duplicate this method for every entity (because ultimately, all entities can trample crops). That would mean calling this event in the EntityLand method of block.Farmland
.
I was looking through issues when I saw this and I saw the discussion that you and Tal both thought it would be better to have it in a player/entity handler |
Good point, let me think about it a bit more. |
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.
I think it's fine to have this as a player handler. Got one more comment naming wise, but otherwise all is good once conflicts are resolved.
…rample # Conflicts: # server/player/handler.go
should be good to merge |
added position of crop users might find it useful if they just want to cancel it in a certain area |
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.
Looks good! Thanks for the PR!
This PR implements TrampleCrop handler to prevent players from trampling crops.