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

Telepathy enchant dupes carrots with ZithiumCollectors #4378

Open
Projecki opened this issue Jun 20, 2024 · 8 comments
Open

Telepathy enchant dupes carrots with ZithiumCollectors #4378

Projecki opened this issue Jun 20, 2024 · 8 comments
Labels
Resolution: Not a Bug This issue isn't a bug. Status: Awaiting Response Waiting for someone to respond Type: Plugin Conflict AE is conflicting with another plugin

Comments

@Projecki
Copy link

Describe the bug

When using a chunk collector from https://www.spigotmc.org/resources/zithiumcollectors-1-20-chunk-collectors-crop-mob-hoppers-optimized.114135/ as well as Telepathy enchant, crops that are broken are sent both to the collector as well as put into your inventory. This creates double the crop yield as expected.

How to reproduce

Break any block or crop using telepathy enchant in a chunk with a chunk collector

Screenshots / Videos

https://youtu.be/EwHaEYUByGQ

"/ae plinfo" link

https://paste.md-5.net/nogolonare

Server Log

No response

@Projecki Projecki added the Bug: Unconfirmed This could possibly be a bug, but it hasn't been confirmed yet. label Jun 20, 2024
@Projecki
Copy link
Author

ZithiumCollectors dev ask I make a report here

@ThomasWega
Copy link
Collaborator

ThomasWega commented Jun 22, 2024

The plugin dev should modify the drops of the items on lower

@ThomasWega ThomasWega added Type: Plugin Conflict AE is conflicting with another plugin Resolution: Not a Bug This issue isn't a bug. and removed Bug: Unconfirmed This could possibly be a bug, but it hasn't been confirmed yet. labels Jun 22, 2024
@Teamplayer
Copy link

@ThomasWega Feel free to elaborate on how to do that. I'm not sure how active you are in the development of AE, but AE doesn't care about previous events and generates telepathy items based off of Block#getDrops which as you may know returns a copy of a list of what that kind of items that block can drop. Are you suggesting other plugin authors use reflection to modify what that method returns before and after it is read by AE just to supply AE with the correct data?

@ThomasWega
Copy link
Collaborator

ThomasWega commented Jun 22, 2024

@Teamplayer I didn't realize it was a copy and that it's immutable. Although it does seem pretty unrealistic to add hook to every plugin which has similar interaction to yours. Worst case scenario I just add hook to your plugin or check for nbt on items. I wonder if you have any other ideas how to approach this?

@Teamplayer
Copy link

@ThomasWega I'm not the developer of the ZithiumCollectors, just a helping for fun. Both plugins need to update to using BlockDropItemEvent instead of listening and modifying the drops on the BlockBreakEvent. This list at BlockDropItemEvent#getItems does have the desired functionality. This list can be modified and subsequent listeners will get the same list to modify as they see fit. I understand this isn't that small of a change, but it will increase compatibility in both plugins with other plugins. @ItzSave Tagging you so you can implement the change in ZithiumCollectors as well.

@ThomasWega
Copy link
Collaborator

This unfortunately most likely won't be applicable to us. The ways our abilities work, I don't think we can listen to this event while keeping the same functionality as intended. I am able to ignore items with certain NBT in drops though

@ThomasWega ThomasWega added the Status: Awaiting Response Waiting for someone to respond label Jun 23, 2024
@Teamplayer
Copy link

What were you thinking for that? Does AE have a public API that other plugins can hook into? If so, the best option would be to provide a utility method somewhere to add the right NBT to an item stack so that AE can tell what to ignore. I do think implementing the other event would be the best for long term compatibility, but I understand that is an undertaking considering the structure of the project.

@ThomasWega
Copy link
Collaborator

Creating a method in API that will keep list of string NBT to ignore could be the solution. And pretty easy to implement for everyone imo. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Not a Bug This issue isn't a bug. Status: Awaiting Response Waiting for someone to respond Type: Plugin Conflict AE is conflicting with another plugin
Projects
None yet
Development

No branches or pull requests

3 participants