-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add Point Of Interest API #12117
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
base: main
Are you sure you want to change the base?
Add Point Of Interest API #12117
Conversation
paper-server/src/main/java/io/papermc/paper/util/PaperPoiSearchResult.java
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/io/papermc/paper/entity/PaperPoiType.java
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
Outdated
Show resolved
Hide resolved
|
Is there any way in specific we should handle this case
I got this comment on spigot a few months ago. Do we either
|
|
I think that documenting the fact that some POITypes are used more as "markers" for the block rather than storing occupancy would be useful. Could maybe even add a method onto the poi type class if it has 0 max tickets so people can check themselves. |
| * | ||
| * @return true if this PoiType is acting as a "marker" otherwise false | ||
| */ | ||
| boolean isMarker(); |
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.
@Owen1212055 thoughts on this method? I think I might need to tweak the docs a bit more on this one. I also changed the comment on the PoiType interface to go into more depth about what this method entails.
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.
Maybe instead we could say "hasOcccupants" whether or not this POI can hold occupants. Reuses terminology
…oiType in the generator
ac5a8ef to
0e4c170
Compare
paper-server/src/main/java/io/papermc/paper/entity/poi/PaperPoiSearchResult.java
Show resolved
Hide resolved
paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
Outdated
Show resolved
Hide resolved
| .map(record -> PaperPoiSearchResult.from(record, this)) | ||
| .toList(); | ||
| /* | ||
| with Moonrise: |
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.
Yea, we need a feature hook for this and then moonrise can patch that over.
I don't think we need a moonrise PR for that, moonrise does not maintain the feature hook class in its repo.
The goal of this Pull Request is to add a basic level of support for Point of Interest in the API. This more used within entity AI, however, there can be exposed a useful detect Point of interests in the world. I want to flesh this out if possible, however I also want testing to be done on the current API to make sure it works as intended.
I will work more on testing and seeing if this API can be fleshed out more in the coming days/weeks.