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

Unusable datapacks #20

Open
xmk2333 opened this issue Mar 31, 2023 · 7 comments
Open

Unusable datapacks #20

xmk2333 opened this issue Mar 31, 2023 · 7 comments
Labels
resolution: won't fix Issue will not be resolved or feature not added. status: needs triage type: bug Something doesn't work as it was intended to. version: 1.19.4 Game version 1.19.4

Comments

@xmk2333
Copy link

xmk2333 commented Mar 31, 2023

Expected behavior

7LOG_SRGY4C9TFI$1AI5HG3

Observed/Actual behavior

%IC)J97A2KH 5488XI IQRW

Steps/models to reproduce

I am using translation software, so what I said may be incorrect. I apologize
I added several datapacks of vanilla that can be used normally under paper, but there are several issues with function under folia

Plugin and Datapack List

I found that the “/datapack list” command cannot be used

Folia version

[20:45:00 INFO]: This server is running Folia version git-Folia-"ed7a5c5" (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: ed7a5c5)
You are running the latest version
Previous version: git-Purpur-1947 (MC: 1.19.4)

Other

In addition, I found that the “/datapack list” command cannot be used

@xmk2333 xmk2333 added status: needs triage type: bug Something doesn't work as it was intended to. labels Mar 31, 2023
@electronicboy
Copy link
Member

electronicboy commented Mar 31, 2023 via email

@xmk2333
Copy link
Author

xmk2333 commented Mar 31, 2023

thanks

@Spottedleaf
Copy link
Member

Unlikely that command functions will ever be fixed. This is because now commands need to schedule onto the owning target's region, whether it be a block, entity, player, or something else. They may not even need to be scheduled at all.

This results in undefined completion order of the commands, which while some command functions may be able to tolerate, some may not be able to. There is no solution to this issue that I can see.

@Spottedleaf Spottedleaf added the resolution: won't fix Issue will not be resolved or feature not added. label Apr 1, 2023
@koteelok
Copy link

What if we do something like a command execution stack and only run the next vanilla command after the logic of the previous command is complete?

@electronicboy
Copy link
Member

Because vanilla commands expect to be run within a global context, not a limited one
delaying execution of stuff would break behavior as now you'd have commands running across various ticks; teleport entity to Y, set flag on entity, etc, etc, would be spread across ticks and cause many dozens of issues.

Command functions are also generally replacable using plugins which offers a much more performant solution and allows them to deal with those issues on their own, as they won't need to delay execution in an uncontrolled manner

@TheRedXD
Copy link

I think you could have a synchronous context running for datapacks that's running on a single thread - while you can't really implement multithreading here, most servers that would use Folia for big server networks won't even use datapacks, while people who just want to get the most bang out of their server would still have compatibility with VanillaTweaks and whatever else they need to run. It's a bit complicated to act on things that are on different threads, you'd need some kind of localized system that lets specifically datapacks/vanilla minecraft commands access them

The intent would be to provide compatibility with pre-existing vanilla things while giving the ability to expand beyond that for servers that need more power.

It's something that needs to be thought out well, I think if you want for average people to use this just like paper, you need that sort of compatibility there. While plugins could replicate these functions, not everyone's up to replicating all of these with plugins.

If I have enough time on my hands, I might look into implementing datapack functionality into Folia, and maybe making a PR if it works out.

@electronicboy
Copy link
Member

except now you'd need to have a tick thread which locks each region from ticking so that it itself can tick once per tick in a global state for the world, which would break the whole "you can have a region tanking performance without killing the entire server" 'feature'

I don't think that that would really be something that would be deemed acceptable to the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: won't fix Issue will not be resolved or feature not added. status: needs triage type: bug Something doesn't work as it was intended to. version: 1.19.4 Game version 1.19.4
Projects
None yet
Development

No branches or pull requests

6 participants