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

Event Firing - Compatibilities #1274

Closed
muriplz opened this issue Jan 15, 2024 · 4 comments
Closed

Event Firing - Compatibilities #1274

muriplz opened this issue Jan 15, 2024 · 4 comments
Labels
type: bug Issue where something isn't working

Comments

@muriplz
Copy link

muriplz commented Jan 15, 2024

Describe the Bug

When opening a Screen of a BlockEntity it calls EnvExecutor#runWhenOn() which doesn't fire the proper events for other mods to be able to control it.

I think the issue is here https://github.com/Fabricators-of-Create/Porting-Lib/blob/1.20.1/utility/src/main/java/io/github/fabricators_of_create/porting_lib/util/EnvExecutor.java#L10

Sources:

Reproduction Steps

...

Expected Result

Being able to cancel the event, so another mod can handle it, such as a Land Claiming mod

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

windows 11

Mod Version

0.5.1d

Minecraft Version

1.20.1

Other Mods

No response

Additional Context

No response

@muriplz muriplz added the type: bug Issue where something isn't working label Jan 15, 2024
@github-actions github-actions bot added the 1.18 label Jan 15, 2024
@TropheusJ
Copy link
Member

what are the proper events?

@muriplz
Copy link
Author

muriplz commented Jan 15, 2024

If there isn't a corresponding event that Fabric itself supports
https://fabricmc.net/wiki/tutorial:event_index

then the mod should create its own to make it able for other mods to handle interactions, such as who opened a Train Station
https://fabricmc.net/wiki/tutorial:events

@TropheusJ
Copy link
Member

these screens are fully client side, so your example of a land claiming mod preventing opening them makes no sense.
If you have a specific use case, maybe something can be implemented. Closing for now.

@muriplz
Copy link
Author

muriplz commented Jan 18, 2024

But all the screens can modify server's files through packets, and there is no way to deny that from happening unless making a specific addon to bring the events with mixins.
I'll do a proper suggestion for this on main Create in a near future, for now I'll stick to try to maintain this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue where something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants