Skip to content

Add StructureLocateEvent#4333

Merged
MiniDigger merged 1 commit into
PaperMC:masterfrom
dfsek:master
Jan 16, 2021
Merged

Add StructureLocateEvent#4333
MiniDigger merged 1 commit into
PaperMC:masterfrom
dfsek:master

Conversation

@dfsek
Copy link
Copy Markdown

@dfsek dfsek commented Sep 16, 2020

This PR adds a StructureLocateEvent, which fires when the /locate command is used, when an eye of ender is used, explorer maps are opened, etc.
The event is Cancellable, and also contains getters and setters for the search radius, origin location, structure type, whether to only search unexplored structures, and the resulting location (result location can only be set, as the event fires before the structure is actually located. If developers wish to manipulate the result, they may use StructureLocateEvent#setResult(Location) and set the result. Setting the result skips the actual check)

This is useful in custom world generators, where developers may wish to implement their own structures.

It is also useful for making Eyes of Ender point to igloos, if that's your sort of thing.

@dfsek dfsek requested a review from a team as a code owner September 16, 2020 09:24
Comment thread Spigot-Server-Patches/0580-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-Server-Patches/0580-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-Server-Patches/0580-Add-StructureLocateEvent.patch Outdated
@Proximyst Proximyst added the type: feature Request for a new Feature. label Oct 3, 2020
Comment thread Spigot-Server-Patches/0580-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-Server-Patches/0580-Add-StructureLocateEvent.patch Outdated
@dfsek dfsek requested a review from electronicboy October 14, 2020 05:55
BillyGalbreath
BillyGalbreath previously approved these changes Oct 14, 2020
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-API-Patches/0227-Add-StructureLocateEvent.patch Outdated
Comment thread Spigot-Server-Patches/0580-Add-StructureLocateEvent.patch
@stale
Copy link
Copy Markdown

stale Bot commented Jan 15, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@duplexsystem
Copy link
Copy Markdown

These changes LGTM. This should be merged.

@stale stale Bot removed the resolution: stale label Jan 15, 2021
Signed-off-by: MiniDigger <admin@minidigger.me>
@MiniDigger MiniDigger merged commit 193f801 into PaperMC:master Jan 16, 2021
@MiniDigger
Copy link
Copy Markdown
Member

thanks for the contribution!
in the future, please don't use the master branch to make pull requests, that makes my life easier :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Request for a new Feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants