Map that works fine on vanilla/paper server does not work properly on folia #180
Labels
No labels
documentation
good first issue
help wanted
resolution: duplicate
resolution: invalid
resolution: won't fix
status: needs triage
type: bug
type: feature
type: performance
type: question
version: 1.19.4
version: 1.20
version: 1.20.1
version: 1.20.2
version: 1.20.4
version: 1.20.6
version: 1.21.11
version: 1.21.4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Minecraft/Folia#180
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expected behavior
I got a map with datapacks (bingo) and expect it to work on folia server.
Observed/Actual behavior
The map get loaded but it doesn't work fine on folia server. The server failed to load mcfunctions like this in the logfile:
[11:51:13] [ServerMain/ERROR]: Failed to load function flytre:full_init java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Unknown or incomplete command, see below for error at position 0: <--[HERE] at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.lang.Thread.run(Thread.java:1623) ~[?:?] Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Unknown or incomplete command, see below for error at position 0: <--[HERE] at net.minecraft.commands.functions.CommandFunction.fromLines(CommandFunction.java:73) ~[folia-1.20.4.jar:git-Folia-"6928284"] at net.minecraft.server.ServerFunctionLibrary.lambda$reload$2(ServerFunctionLibrary.java:80) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] ... 3 morethere are a lot of errors like this, but the full log is too long so I paste a part of it.
Steps/models to reproduce
maps I use: (bingo)
Download the map and unzip it into world folder
start scripts:
@echo off java -Dfile.encoding=GB8030 -Xms3G -Xmx16G -jar folia-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar -nogui pausejava version: jdk 17
start the server with this script
Plugin and Datapack List
No plugin is installed.
I failed to run /datapack list
Server response Unknown command
Folia version
[12:31:01] [Region Scheduler Thread #0/INFO]: Checking version, please wait... [12:31:02] [Thread-8/INFO]: This server is running Folia version git-Folia-"6928284" (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 6928284 on dev/1.20.4) Error obtaining version information Previous version: git-Purpur-2110 (MC: 1.20.4)Other
No response
Folia does not support all vanilla commands. The disabled commands include the /datapack, /schedule and /function commands. Your datapack looks like its using those and other disabled commands as well as command functions which also do not work on Folia.
As such, this is expected behaviour and not a bug
Vanilla commands expect to be run within a global context, not a limited one like Folia. Its unlikely that command functions will ever work on Folia. They can be replaced using plugins which also offer much better performance and have proper ways of dealing with the different tick threads and scheduling that Folia has.