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

Error related to "Slimefun calls PaperLib.getBlockState(block, false)" #3649

Closed
4 tasks done
EchocallingEarth opened this issue Aug 10, 2022 · 2 comments
Closed
4 tasks done
Labels
invalid This Issue or Pull Request is invalid.

Comments

@EchocallingEarth
Copy link

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

Running Slimefun with TransportPipes.
I am getting a bug/error which when I spoke to the dev of TransportPipes (the affected plugin) he (Panda) said and I quote
The specific issue is Slimefun calls PaperLib.getBlockState(block, false) on the "fake" hoppers that TransportPipes creates to check for build permissions. Since TransportPipes is made to be compatible with Spigot, and PaperLib only checks if the server is running Paper and not if the method exists when it's called, the method call fails and throws the AbstractMethodError

Is this something that can be fixed? or should I reach out to the devs of PaperLib (not sure how I do that)

📑 Reproduction Steps

Install Slimefun and TransportPipes
And attempt to place or use TransportPipes

💡 Expected Behavior

No error in Console related to either plugin

📷 Screenshots / Videos

No response

📜 Server Log

https://pastebin.com/q2W662j0

📂 /error-reports/ folder

No response

💻 Server Software

Purpur

🎮 Minecraft Version

1.19.x

⭐ Slimefun version

Slimefun vDEV - 1026 (git 85e8fe8)

🧭 Other plugins

TransportPipes

https://github.com/BlackBeltPanda/Transport-Pipes

@EchocallingEarth EchocallingEarth added 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. 🐞 Bug Report A bug that needs to be fixed. labels Aug 10, 2022
@EchocallingEarth
Copy link
Author

I know this is now marked "needs testing", however, if I can provide any other info please let me know - Thanks

@TheBusyBiscuit TheBusyBiscuit added invalid This Issue or Pull Request is invalid. and removed 🐞 Bug Report A bug that needs to be fixed. 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. labels Aug 18, 2022
@TheBusyBiscuit
Copy link
Member

This is not something we should or even can really "fix".
Slimefun uses the PaperLib API to access methods from Paper for optimization purposes.
If you are using Paper for your server, it is to be expected that these methods are available in that environment.

The maintainer(s) of TransportPipes will need to implement these methods if they want to fix this issue.
After a quick look at the corresponding code it seems to be related to a mock class of Block.java.
So this fix should be as straight-forward as for them to implement the missing method, can even default to the non-Paper method for BlockStates for that.

I looked at the linked issue and my assumption seems to be inline with what a Paper team member (@electronicboy) posted there:

Nevermind, that's nothing to do with paper, that's a compatibility issue with transportpipes not implementing methods used in paper, thus causing issues plugins due to the induced API contract violation, there's not much paperlib can do about this without tryna catch such exceptions and fall back to just returning a standard block state
[...]
if you don't care about supporting the faster state snapshots, you can just create a method which delegates to the standard method and leave out the override annotation; ideally, you'd made that method call the proper method when running in paper, i.e. using reflection if needs be

So yeah, I am closing this issue on this particular bug tracker as not relevant. The maintainer of TransportPipes seems to be aware of this issue and the suggested approach to fix it. If they need help, they can of course comment and/or ask :)

@TheBusyBiscuit TheBusyBiscuit closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This Issue or Pull Request is invalid.
Projects
None yet
Development

No branches or pull requests

2 participants