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

disguise api #11793

Closed

Conversation

yannicklamprecht
Copy link
Contributor

pre hard fork PR: #10478

relates to #10584

Adds a simple disguise api that also makes sure that invalid entity data, not belonging to the type that is faked, is filtered.
It also adds a server generator module to reduce maintenance of the entity data filter.

tldr; The API provides a way to disguise any entity as another or a player with having the possibility to interact with the entity like with any others. The big advantage is that you've the whole vanilla logic and Mob Goal and Pathfinding included without hassle.

Testing the changes can be done using the following snippet:
https://gist.github.com/yannicklamprecht/639acba127a54f5617e1281f099b7aff

Effective loc:

600 loc in patches
3k+ loc generated filter classe
400 loc generator code copied from api-generator
100 loc for generating the filter class.

@yannicklamprecht yannicklamprecht requested a review from a team as a code owner December 23, 2024 19:48
@yannicklamprecht yannicklamprecht mentioned this pull request Dec 23, 2024
9 tasks
@kennytv kennytv added the type: feature Request for a new Feature. label Dec 24, 2024
@lynxplay
Copy link
Contributor

Given we already chatted about this on other channels, I'll be closing this PR as we do not believe such an API is the right fit for the main server API, especially when looking towards evolving this API continuously (outside of the version-specific values) and the general upkeep such an API includes.

We do however acknowledge that such functionality is essential for a lot of developers out there and that implementing such functionality purely via a plugin is cumbersome and limiting. To that degree, we'd offer you the following next steps if you are interested:

  1. Move this API to a separate plugin, for now under your own namespace.
  2. Getting the generator to work outside of the server environment is something we might be able to help with via discord. In this case, only the vanilla remapped jar + libs
    should be needed, which mache might help with?
  3. To skip potentially slow reflective calls, we'd accept "internal" API for your API as a feature patch along the line of io.papermc.paper.network. ChannelInitializeListenerHolder. It being a feature patch means we do not need to update it to newer versions during upgrades immediately. This way, the server can operate
    without potential slowdowns but can be "enabled" for the disguise API if your plugin/api is installed.

@lynxplay lynxplay closed this Dec 26, 2024
@yannicklamprecht yannicklamprecht deleted the feature/disguise-api-new branch December 26, 2024 16:48
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
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants