#folia-help

1 messages Ā· Page 36 of 1

finite hinge
#

Doing it with smaller distances would have a ton of locking overhead

daring nimbus
#

Folia is only a win for very specific kinds of servers, and thats fine

prime juniper
#

What if everyone is in a single region?

#

Wouldn't that mean the regionizer has less work to do?

finite hinge
#

Then it's like a paper server but slower

prime juniper
#

Yes I know

#

But what if there were many players concentrated in far away parts? In groups of 20 for example?

finite hinge
#

As long as you get multiple regions you get a benefit

#

If you have everyone in their own region that's the maximum benefit but having 20 people in each region is still a win

daring nimbus
#

especially if its something like towny/factions and you have multiple groups of players with large farms etc each

finite hinge
#

Your limit for how many can be in a region is similar to how many people could be on a paper server

#

Probably somewhat less since there are overheads but close enough

prime juniper
#

Is it really better for everyone to be alone? Every region requires at least one thread so I assume that having 5 groups of 20 players is better than having 100 groups of a single player even if they were perfectly spread out

finite hinge
#

They don't all get their own thread

#

Number of threads is autodetected based on system core/thread count or whatever you override in the config, it's a thread pool

prime juniper
finite hinge
#

20 regions doesn't mean they all tick in parallel, you might only get like 4-8 ticking at once

daring nimbus
prime juniper
#

It's just paper

#

Is paper-global.yml extended?

prime juniper
finite hinge
#

under global config, threaded-regions.threads

prime juniper
#

Ah

#

Alright fair enough

finite hinge
#

That's from the readme

daring nimbus
prime juniper
#

I was still very impressed with paper coming from fabric. The chunk gen speed and the amount of chunks it can send and the mspt is very good. The tradeoff is the depth of the mods you can install but I'm happy with the performance even with folia's overhead

prime juniper
#

Wall to wall?

#

Or is that the minimum distance to create a new region?

daring nimbus
finite hinge
#

The server is greedy about merging regions but less so about splitting them again later

prime juniper
#

What would a good distance be, based on your experience?

#

To make sure that even with people travelling from one town to the other from time to time, the regions don't merge

finite hinge
#

I don't think I've ever even started a folia jar

prime juniper
#

Oh

#

Fair enough

finite hinge
#

There are only like 6 public users of it afaik

prime juniper
#

Damn

finite hinge
#

Who knows how many are using it and not saying

prime juniper
#

2b2t should fund it

#

It's probably the best use case

daring nimbus
#

I mean theres 600 servers and ~20k players according to bStats

finite hinge
#

I think pretty much everyone publicly using it are using a custom fork too

prime juniper
#

Damn

#

How come command blocks* haven't been figured out yet?

#

Are they impossible?

#

I can use them myself but command blocks don't work

finite hinge
#

scoreboard is pretty much impossible, the rest I dunno

#

Command blocks are definitely impossible

prime juniper
#

Oh

daring nimbus
#

same for datapack functions

#

stuff requires a global state that doesn't exist

prime juniper
#

How do plugins work on folia then? I thought paper plugins don't have as much access to minecraft's internals like fabric / forge

prime juniper
#

Aren't they inherently regionalized

finite hinge
#

Command blocks have an output that is generally how many things they affected, getting that value would require blocking to wait for all of the regions to run the command but for reasons I had straight in my head at some point there is likely no way to do that without a deadlock

#

If you had more than one command running at a time it would definitely be a deadlock

prime juniper
#

There's a command block distance limit built in to the game

#

Isn't there?

daring nimbus
#

not that I know of? just a length limit

daring nimbus
prime juniper
#

Why can't commands just only refer to the region they are in?

#

kill @e would only kill the entities in that region

#

tp x player out of the region isn't recognized

daring nimbus
#

that would work, but at that point just make a plugin doing this instead of modifying vanilla commands

prime juniper
#

Stuff like that

finite hinge
#

You'd be trading missing some vanilla functionality for breaking a ton of vanilla functionality

daring nimbus
#

nobody using Folia in any serious way is going to use command blocks or datapacks anyways, cause their performance is awful

finite hinge
#

And you still wouldn't get scoreboards

finite hinge
#

That got answered

prime juniper
#

Oh yeah you're rifht

finite hinge
#

Paper plugins don't work on Folia, btw

#

You have to specifically write your plugin with Folia in mind and mark your plugin as folia compatible for it to even try to load it

prime juniper
#

I meant that they are made in a similar way + the caveats to work for folia

finite hinge
#

It's just that 99.9% of the time making a plugin work on Folia also makes something that works on Paper

prime juniper
#

Can I learn to make folia plugins without ever having done other modding?

finite hinge
#

Without ever doing any other modding? Sure. Without ever doing any programming? Uh, eventually?

#

Multithreaded programming is basically the final boss of programming šŸ˜„

prime juniper
#

I have done lots of programming and know java at an intermediate level

#

I just have never gotten into minecraft modding

#

I was about to start with fabric, got through some tutorials

#

But if I'm going to use folia that knowledge is not going to be very helpful

finite hinge
#

You can mostly just use the Paper API/documentation for learning how to make Folia plugins, you just have to make sure you use the schedulers if you ever want to access something that might not be in the same region your code is running in

daring nimbus
#

Folia/Paper is imo easier than Fabric, as there is a documented API available for a lot of things. Fabric only has some small basic API and then expects you to do the rest with Minecraft internals

prime juniper
#

That's nice to hear

finite hinge
#

Like, in an event handler if you only touch things related to that event it's probably identical to Paper but if you want to make a command that can do something to all players you have to use the EntityScheduler for each player to run that logic on them

prime juniper
#

I think folia could work for the type of server I want to create

#

Thanks for your help

#

It's a simple idea

#

Just deleting all chunks outside of some designated squares every x days

#

And changing the seed

#

It might not even need to be a plugin

daring nimbus
#

Likely much easier to do with the server stopped and some external tool (MCASelector) tbh

#

large-scale world operations are pretty difficult to do with a running server

prime juniper
#

That's not a problem

#

Wait

#

Actually it is

#

That means it's not going to be a plugin

#

Because the server won't be running

#

So i'll just write some rust code? Maybe?

#

Damn

#

I would still like to make plugins though

#

For fun

daring nimbus
#

MCASelector has a CLI mode, you can probably just write a (very long) command for that and run that during your weekly server restart or similar

prime juniper
#

Will probably be enough for my purposes

#

Does it run on linux?

#

I doubt it wouldn't

#

Anyway I'm getting off topic

#

Thanks again

little sable
#

Currently, there is only one public Folia-compatible plugin available, which you can find on Modrinth. Otherwise, you will most likely have to develop your own plugin.

proud sandal
narrow bough
#

why tps 1.17....

tawdry gullBOT
fair merlin
#

Send a spark report

fair merlin
narrow bough
#

ok

prime juniper
#

Does locatorbar work on 1.21.6 of folia?

#

just updated my server not seeing it

#

set gamerule locatorbar true

quaint panther
#

only 4 regions you have

#

stick to paper bro

tawdry gullBOT
winter heron
#

is the paper engine written for multithreading?.

vestal gulch
# winter heron is the paper engine written for multithreading?.

the JVM supports multithreading. on paper, the world tick uses 1 designated thread referred to as the main thread. other operations are free to use non-main threads, such as chat and anything done with the async schedulers. folia, on the other hand, may use more than 1 thread to tick the world by breaking them into discrete regions

#

hope that answers your question

winter heron
#

@vestal gulch when I wrote to someone that if I made a server with European modes, someone replied to me like this: I think that for so many players, Folia would be required, i.e. a custom engine for multithreading Then you can scale practically infinitely like regions + probably a few proxy servers to handle so many requests.

vestal gulch
#

and on the topic of regionizing, it requires very particular conditions

#

if you just slapped folia onto some random SMP it would probably only use 1 region per world

winter heron
#

@vestal gulch if I want to make a European server with many modes, what should I do to maintain an infinite number of players on each mode without a single lag, stutter, etc. from the beginning to the end of the edition ?.

#

tell me how to solve it.

fair merlin
#

There is no such thing.

#

You can’t have an ā€œinfiniteā€ number of players on anything. The game just doesn’t work that way.

vestal gulch
#

^ an approximate number would help

#

and just, server networks scale, the good ones anyways. you don't need an entire datacenter to get started

winter heron
#

Wasabi I want to have, for example, 10,000 players in each mode.

vestal gulch
#

that is a very large number. it will require either very high specs, aggressive optimization, or both

#

the thing is that if you want all 10,000 players to theoretically be able to interact with eachother, be in the same space even, it all has to be running on the same server and therefore the same machine

daring nimbus
#

Do you have 10k players, right now?

#

Otherwise don't worry about it. Thats an insane number that only very few servers reach

winter heron
#

but how to keep as many players as I mentioned in each mode without lags, stutters, backtracking etc. Give a solution.

daring nimbus
#

you don't

#

Servers with that player numbers run networks with multiple proxies and hundreds of individual servers

narrow bough
# quaint panther lol 149 players in one region

I suspect it's my memory stick, currently DDR4, in the process of replacing it with DDR5. since my util is exceptionally high, the CPU in use at the time was a 7950X in the process of replacing it with a 9950X

#

Is it a problem with my system, the server system is Windows Server 2022

viral stone
#

I mean, folia cares about player spread

#

if your players don't spread enough, they'll be stuck in a single region, and you won't have any of the advantages of folia

dark pivot
#

Plus, Linux is a lot easier to manage and is much more powerful

#

And generally better supported

narrow bough
#

I want to use Ubuntu 22.04 do you know any available Gui tools?

dark pivot
#

There are a few options

#

So you want a GUI on the machine or in your browser

#

What kind of GUI tools are you looking for

narrow bough
#

browser

dark pivot
#

Your instances aren’t virtualized are they

#

What are you currently using

narrow bough
#

No, the machine is owned.

narrow bough
dark pivot
#

That’s not what I mean

#

In terms of managing the instance of Minecraft

narrow bough
#

manual operation.

#

bat Starts the server

vestal gulch
#

you can SSH into it from another machine that does have a graphical environment

#

if you want some kind of control panel, you can install pterodactyl/similar and manage your server from your web browser

#

in terms of linux distros that dont come with a DE, any server distro should do fine. i personally favor the RHELs and particularly Rocky

#

Ubuntu servers are common too, Debian a bit more so I believe

narrow bough
#

ok thx u. I think I get it.

maiden musk
#

i assume -1 dynamically uses as many cores as it needs is it correct?

viral stone
#

No, it calculates a number based on the # of CPU cores available

prime juniper
#

What can I do about spawn chunks? I want to remove them permanently, or at least kick all players and unload them before performing an action if I can't get rid of them
Currently, I can set gamereule spawnChunkRadius 0, stop the server to unload them, restart without spawnchunks, do the action and then stop the server again
I'd like to get it down to one restart

#

Is there some weirdness with setworldspawn?

#

It doesn't seem to be working

maiden musk
#

how does the calculation works though i have 16 cores is it normal that i got only %400 utilisation by default?

inner swift
#

If less than 16 threads, you get 1 region thread
Otherwise, number of threads divided by 8 and rouded down. So, 32/8=4=400%

strange copper
#

Hey! I'm using Folia 1.21.7@942017b, and I'm experiencing significant increases in MSPT when moving or loading new chunks. I've tested this on a server without plugins and the issue persisted. An MSPT increase is normal when loading new chunks, but it shouldn't increase when moving in a circle in loaded chunks. The problem is inconsistent, but I've managed to get 30 MSPT in a single region with 12 players flying in different directions. I don't know if anyone can help with this problem or relate to it, but 30 MSPT with 12 players is way too much. Here is my paper-global.yml config https://pastes.dev/VkWEfGSeFV

quaint panther
abstract karma
#

I am curious to try out Folia. Can I run it on localhost without any special hardware?

viral stone
#

Well, yea, it's generally just server software

#

you'll just perform marginally worse than paper if it doesn't have the resources it needs

abstract karma
viral stone
#

and the investment in adopting it generally means that you probably want to actually have suitable hardware

abstract karma
viral stone
#

No, plugins need to be explictly marked to be folia compatible

dapper venture
#

Hello, I was wondering if Folia would be suitable for a "theme park visit" server, especially when the map can get pretty large and concentrate lots of entities in some places (especially places that have a ride which uses entities, trains, particles). Some area basically makes the whole server lag anytime some area concentrates such lag sources such as entities ? Would Folia be a good way of managing regions individually to address lag independently ? Or should I stick to paper and try to optimize entity management in some other way ?

tawdry gullBOT
inner swift
#

Depends on whether the attractions are very far away from each other and how often (and which path) a player takes to cross for one to another

livid crag
#

Pregenerating when you can is the only way to prevent this.

strange copper
#

Hm, that's very strange. My chunks are already pregenerated. We already have 500 GB of world data, and I'm pretty sure the chunks we were in are pregenerated.

#

And the MSPT started to increase even when we were just moving within a 20-block radius. It wasn't a big increase, but we went from 1.0 to around 8 or 10 with just 10 players jumping around. I don't know if I'm missing something, but this isn't normal, is it?

livid crag
#

Without seeing report I cannot really comment on it. Those numbers are still well below 50 so it’s not an issue anyway.

strange copper
#

That makes sense. Our server will be released in a few days, so we'll see what happens then. If anything noticeable happens, I will send a Spark report. However, I also think it's normal because the players I was testing with didn't notice the rising MSPT at all.

digital bone
#

Hello, I am trying to use -Dcom.mojang.eula.agree for a new server but am getting the below error. Does anyone know what happened to this feature? This is my first time trying to use it on Folia. This is with Folia 1.21.6 on Windows.

Command Line: java -Xms1G -Xmx14G -Dcom.mojang.eula.agree=true -jar C:\serverfiles\server.jar --nogui
Error:Error: Could not find or load main class .mojang.eula.agree=true Caused by: java.lang.ClassNotFoundException: /mojang/eula/agree=true

quasi imp
#

Does every plugin requires a paper-plugin.yml to run on folia? - I mean, what plugins are allowed on folia

viral stone
#

No

#

you just need to define the thing in the whatever.yml you're using

quasi imp
#

How can I use spark in folia

#

do I have to download the plugin or is it built in

#

I cant find the cmd

dire pebble
#

^

vital path
#

This is a few days later but a similar crash has occurred without any intervention from me. At least I think so. The server abruptly closed without any errors in the console so I suspect the same thing happened again.

#

My plugins are designed for use with Plugman and being hot swapped, it's not an issue I'm sure.

#

I'll do the jcmd thing later today and see if there's anything particularly suspect from the third party plugins I'm using

#

I've got two or three plugins that do dynamic library downloading and injection for (in my opinion) no real good reason so I wouldn't be surprised if it's one of them

#

Either that or as ya mentioned, someone's shoddy reflection not boding well with 400+ concurrent users

daring nimbus
#

do not use plugman on a production server. Even that issue aside, there are plenty of other issues with Bukkit itself.
The ability to reload plugins at runtime should have never been added, its an absolute disaster

vital path
#

I've used plugman for work for years

#

I can assure you that's not the problem here

#

Especially considering it happened even without me running anything plugman today

#

We've had higher load days where I've reloaded the plugins I've written explicitly with the intent of being reloaded a dozen times without issues

daring nimbus
vital path
#

Yes. We have daily reboots.

#

The server had been up for short of 12 hours

#

I understand there are numerous problems just plugman reloading random plugins Willy Nilly but there are design patterns that are perfectly doable for using it.

#

And that isn't the problem here

viral stone
#

The jvm ran out of space for compiled classes

#

You would need to work out why you have so much loaded that it ran out

vital path
#

Yeah I'll see what classes are getting dumped into there, should be pretty clear

vital path
vital path
#
    java -Xmx48G \
        -Xms48G \
        -Dcom.sun.management.jmxremote \
        -Dcom.sun.management.jmxremote.port=9040 \
        -Dcom.sun.management.jmxremote.host=127.0.0.1 \
        -Djava.rmi.server.hostname=127.0.0.1 \
        -Dcom.sun.management.jmxremote.rmi.port=9041 \
        -Dcom.sun.management.jmxremote.local.only=true \
        -Dcom.sun.management.jmxremote.authenticate=false \
        -Dcom.sun.management.jmxremote.ssl=false \
        -XX:+AlwaysPreTouch \
        -XX:+DisableExplicitGC \
        -XX:+ParallelRefProcEnabled \
        -XX:+PerfDisableSharedMem \
        -XX:+UnlockExperimentalVMOptions \
        -XX:+UseG1GC \
        -XX:G1HeapRegionSize=8M \
        -XX:G1HeapWastePercent=5 \
        -XX:G1MaxNewSizePercent=40 \
        -XX:G1MixedGCCountTarget=4 \
        -XX:G1MixedGCLiveThresholdPercent=90 \
        -XX:G1NewSizePercent=30 \
        -XX:G1RSetUpdatingPauseTimePercent=5 \
        -XX:G1ReservePercent=20 \
        -XX:ConcGCThreads=3 \
        -XX:InitiatingHeapOccupancyPercent=15 \
        -XX:MaxGCPauseMillis=200 \
        -XX:MaxTenuringThreshold=1 \
        -XX:SurvivorRatio=32 \
        -Dusing.aikars.flags=https://mcflags.emc.gs \
        -Daikars.new.flags=true \
        -jar folia.jar
#

I can see WebhookUtil is a problem, which makes some sense considering it's converting integer pixel data to PNGs, so maybe thats somehow causing the codeheap to explode (?)

#

.. I suppose it being a runnable lambda that's referencing runtime method params prob isn't helping

#

for reference, this is the method. will refactor a bit to be a little less runtime lambda dependent

vital path
#

I'll also be using -XX:ReservedCodeCacheSize=512M from here on to help stave off the crashes until I'm certain it's sorted, but unsure if that's just generally a good idea for 400+ players or just a bad workaround

paper siren
#

the size of the compiled code shouldn't really be higher with more players, unless you dynamically generate code

vital path
#

I'm not

#

there's nothing i'm doing afaik that would do that

#

other than maybe that particular method? but im not sure why

paper siren
#

are you frequently unregistering/re-registering event handlers by any chance?

vital path
#

don't believe so

paper siren
#

(or one of the plugins you're using)

vital path
#

Helper should register all of its listeners more or less at boot and I've never had any issues with it doing that before

#

Other than that, I'm not personally registering/unregistering event listeners during normal operation

vital path
#

Actually - nvm. Upon some further investigation it turns out my crash from today spat out a hs_err_pid file which seems to blame the not-really-working version of Spark I had loaded.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000071705aeb4b79, pid=2262816, tid=2324367
#
# JRE version: OpenJDK Runtime Environment Corretto-21.0.5.11.1 (21.0.5+11) (build 21.0.5+11-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-21.0.5.11.1 (21.0.5+11-LTS, mixed mode, sharing, tiered, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [spark-3feb06da661595-libasyncProfiler.so.tmp+0x28b79]  Profiler::recordExternalSamples(unsigned long long, unsigned long long, int, unsigned int, EventType, Event*)+0xb9
#

Removing that :l make sense that could crash things

manic quarry
sweet frost
#

hi guys how to increse the maximum Utitisation

twin garden
#

You need to allocate more CPU cores to your instance (if it's a vm) or change for a better CPU

proper saffron
twin garden
proper saffron
#

oh okay, so he expects higher workloads so he's asking for how to get higher potential perf

#

okok ty

tranquil lintel
#

Hello everyone, I am new to folia, I want to use folia version 1.21.7 but I can't find it on the paper homepage. Is there any way I can download this version?

little sable
#

You can compile yourself

wicked mantle
#

But yeah 1.21.7 needs to be self compiled

proper saffron
#

hello, does folia use bstats ? I'm wondering how much people use folia

arctic tapir
proper saffron
#

thanks a lot !

last sand
#

Any ideas why the PlayerTeleportEvent won't be triggered? I looked at the code it looks like it's getting triggered but ingame it doesn't listen to it...

daring nimbus
#

Some events do not work on Folia. That is one of them

scarlet ginkgo
fair merlin
#

Reminder that this is a help channel, not a random side convo channel @primal quail @scarlet ginkgo

heady halo
#

Does anybody have an idea why some chunks get corrupted like this?

daring nimbus
#

there should be some sort of error in the log when chunk corruption happens

#

though that really looks like WorldEdit or similar, usually chunks just become air

heady halo
subtle wasp
#

That's not Folia

heady halo
subtle wasp
#

That's what I said.

heady halo
#

I thought it was a Folia issue, that's why I i asked in here. Sorry for disturbance šŸ™

idle furnace
#

Always report on your version provider discord. If it is a Folia problem, make a prove of concept (from 0) only with Folia and then report it here

velvet radish
fair merlin
velvet radish
#

That’s what I’d like to hear actually. I’m sure the reason is complicated and I’d like to know if anyone here has the knowledge. I’m interested to hear why this breaks on folia in the first place

inner swift
#

Part of the reason: say the teleport was from a region to another, so from is different than to. Which region do you fire it from? Whichever is your answer, you cannot work with the other Location without running into threading headache

velvet radish
tardy ravine
#

Hello, im trying to build folia 1.21.4, but it seems unable to clone Spigot build data. Im also unable to git clone the repo manually. Maybe someone had that issue?

Execution failed for task ':folia-server:cloneSpigotBuildData'.
> io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false fetch --depth 1 origin 3edaf46ec1eed4115ce1b18d2846cded42577e42
fair merlin
tardy ravine
#

allright, thanks!

fossil plover
#

Hi, I wanted to know what the record is for the most players tested on a Folia server.

bold ridge
jaunty atlas
#

And the spread of players obv

fossil plover
#

thx

fair merlin
#

You’re going to need really burly hardware for a lot of players.

viral stone
#

The global region doesn't provide "global" access, it's just the global context hack thread is my understanding, it's where stuff with shared state is managed iirc

burnt plover
tawdry gullBOT
livid crag
#

@burnt plover please reach out to the fork you are using for support. This channel is for people using Folia

burnt plover
#

Oh, sorry

#

thanks anyway!

vague thorn
#

does anyone know why calling the PlayerDeathEvent gives a java.lang.NoSuchMethodError error?

#
PlayerDeathEvent deathEvent = new PlayerDeathEvent(player, drops, xp, deathMessage);
#

it works perfectly fine when on regular paper

finite hinge
#

Guessing it works on paper due to some spigot bytecode rewriting madness because that method doesn't seem to exist

#

Not sure how you got it to compile, what version of the API are you depending on?

#

Every single constructor, even the deprecated ones, takes a DamageSource as the second argument

fair merlin
#

Hopefully this isn’t ChatGPT generated code . . .

finite hinge
#

Unless they're using the old eclipse compiler and building in a special way I don't even know how they got that to work at all

#

It would be weird if AI guided them to such a thing

viral stone
#

That constructor exists in like 1.20.6 but was seemingy removed in the 1.21.x series somewhere

velvet radish
vague thorn
#

is there a version of the constructor that would work for both paper and folia

vague thorn
#

i'm using the 1.20.4 dependency, but the server is running 1.21.4

finite hinge
#

That makes sense then

vague thorn
#

so it probably isn't related to folia/paper, it must just be a version issue

#

because I tested the plugin on a 1.20.4 paper server

finite hinge
#

It might even still work on paper 1.21.4+, so long as you aren't using paper-plugin.yml, due to spigot's bytecode patcher

#

Folia might be missing a part of that though

#

Oh, or you just tested different versions, lol

viral stone
#

I don't think that event constructors have ever been part of the rewriting crap

vague thorn
#

yeah idk why i didnt realise i was testing on different versions

finite hinge
#

Event constructors are only sort of API so I guess Spigot wouldn't bother patching them

#

You aren't really supposed to be calling them yourself

vague thorn
#

interestingly the 1.21.4 constructor requires a damagesource whereas in 1.20.4 you can't include one

viral stone
#

DamageSource is newer API

vague thorn
#

yeah I would've thought they would add some backwards compatibility
I guess that's a lot to ask for when you shouldn't really be calling it in the first place though

viral stone
#

I mean, there is no means of backwards compatability there

finite hinge
#

iirc paper even marks all the constructors with @Internal

viral stone
#

the information literally does not exist, and reconstructing it in any form of accuracy using the older bukkit representation of that stuff is just a joke

vague thorn
#

yeah I can't blame paper

finite hinge
#

So basically you need to choose, does your plugin work on 1.20.4 or 1.21.7?

#

It can't work on both without a giant headache

vague thorn
#

i'll find the oldest version that uses the new constructor and use that version I guess

#

it looks like the change was made in 1.20.6

#

everything works now with 1.20.6, thanks everyone for the help

fair merlin
vague thorn
fair merlin
#

With Folia in particular you want to be on the most recent version. There's a lot of stuff beign fixed/updated that isn't tied to the Minecraft version. The jump from 1.21 to 1.21.4 is pretty huge.

torpid citrus
fair merlin
fair merlin
# torpid citrus wtf

Read the replies to their messages. If you're using a fork, you get support from whoever makes the fork, not here. We don't support software we don't make.

torpid citrus
fair merlin
#

People tend to fork it and then disable a bunch of safety checks or add patches we don’t really think are safe.

#

Which is another reason we don’t support forks here.

gentle shadow
#

Hello, error Playerguiadvanced

#

[04:56:59 ERROR]: Could not pass event InventoryClickEvent to PlayerGUIAdvanced v6.8.0
java.lang.IllegalArgumentException: Unsupported custom inventory size 43
at org.bukkit.craftbukkit.inventory.CraftContainer.getNotchInventoryType(CraftContainer.java:133) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at org.bukkit.craftbukkit.entity.CraftHumanEntity.openInventory(CraftHumanEntity.java:366) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at PlayerGUIAdvanced-6.8.0.jar/me.loving11ish.playerguiadvanced.y.a(ActionsMenu.java:123) ~[PlayerGUIAdvanced-6.8.0.jar:?]
at PlayerGUIAdvanced-6.8.0.jar/me.loving11ish.playerguiadvanced.r.a(MenuListeners.java:23) ~[PlayerGUIAdvanced-6.8.0.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[folia-api-1.21.6-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:71) ~[folia-api-1.21.6-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[folia-api-1.21.6-R0.1-SNAPSHOT.jar:?]

#

at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3286) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:59) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:14) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:31) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.server.level.ServerPlayer.lambda$queuePacketTask$3(ServerPlayer.java:684) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:243) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1659) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

daring nimbus
#

well, talk to the developer of that plugin. 43 is not a valid inventory size

#

inventory sizes have to be multiples of 9

gentle shadow
#

Aha, yes, I understand.
This same plugin, in this same version, worked fine in Folia 1.21.4 without any problems.

#

This problem became apparent when updating to 1.21.6

daring nimbus
#

Maybe a check was added there

#

But that has never been a valid inventory size since Minecraft existed

#

(at least not for the container/chest inventory)

#

Gotta love how that free plugin is obfuscated so I can't even look at its code to see how it gets to 43 OMEGALUL

#

okay it seems like it just creates an inventory with the size equal to the amount of online players or something. thats awful lol kek

regal anvil
tawdry gullBOT
proper saffron
# tawdry gull

In spigot and paper, every world tick on the same thread ? Only folia handles worlds on different threads thanks to its region system ?

inner swift
#

Yes, every world ticks in the same thread in Paper. The possibility of ticking worlds in parallel is Folia-only

proper saffron
#

thanks šŸ™‚

last sand
#

Hey everyone, just a small technical question, is there any reason why most of players (150 our of 170) would be merged in the same region although being hundreds or thousands of blocks away?

#

Any way to reduce the distance required to merge?

last sand
# tawdry gull

I've seen this as well but in my case the world was 20k

daring nimbus
#

are you sure they were that far away all the time? if one player walks from region A to B, if you are unlucky that causes them to merge

white laurel
#

what was the distance between players to trigger region merging? I remember 2k blocks or 1k blocks

tawdry gullBOT
tawdry gullBOT
quaint panther
#

@white laurel

white laurel
#

yes but it doesnt say how many blocks

quaint panther
#

below 5k blocks, bigger chance the region will merge

white laurel
#

I think thats an example? But I remember somebody of the staff mentioning at least 1k or 2k

quaint panther
#

yeah that's below 5k

#

there's no really accurate

daring nimbus
#

theres not really a fixed number. with a default grid-exponent value, its around ~900 blocks for a split at view-distance=10.
It was 1500, before this commit

#

imo if you have to worry about the actual numbers, your gamemode is probably not suited for Folia

white laurel
#

Thanks for that, its good to know to find a proper tuning

#

I was thinking into splitting a world into multiple worlds and do a load balancer

#

The actual folia problem is related to the fact that can be only one world? I dont remember correctly but I remember something about worlds

viral stone
#

folia doesn't support plugins loading worlds

white laurel
#

and to create more worlds?

viral stone
#

datapacks

#

or find a hack

white laurel
#

so by default nether and end are not generated?

viral stone
#

They are

white laurel
#

ah, I mean, if they are, why not possible to have multiple worlds?

viral stone
#

Because unloading worlds is not supported due to the complexities involved

#

loading iirc is fairly easy to fix and there are libraries which do that

#

unloading is an entirely different beast

white laurel
#

Unloading I mean I dont need it, or you talk about when server is stopping and worlds are ubloaded?

viral stone
#

I mean at runtime

#

if you don't need unloading then there are already libraries to load worlds at runtime

white laurel
#

ah cool thank you

dim merlin
torpid citrus
#

who can help? I make plugin on folia and i think my code have problems with build.gradle. My plugin dont see bukkit

lofty magnet
torpid citrus
lofty magnet
#

the one that is failing to import folia-api properly

tranquil lintel
#

ohh hmm my mspt so low but cpu so high, can someone help me...

daring nimbus
#

You only allowed it to use a single CPU core (100%), that's not enough

ashen flame
#

So im curious, why did you guys start to share build versions of folia?

quaint panther
#

because it's stable

tepid bronze
#

Whether there is more reasoning behind it, I don't know shrug

lofty magnet
#

there's also the fact that eventually sketchy third-party downloads would pop up so ĀÆ_(惄)_/ĀÆ

tepid bronze
#

And besides, Folia has been downloadable from the downloads API since basically forever too. So people who somewhat know their stuff could get pre-build jars already anyways

torpid lance
#

Hey guys, I have a SMP server that needs to support more than 1,000 players. I'm strongly considering using Filia, but I wanted to understand the differences in terms of development that I would have to take (my server is entirely my own)
Can anyone help me? It could be with articles, topics, or even experiences.

inner swift
#

Well, step 0 is layouting your server accordingly
Many SMP setups aren't favourable to that player count

tawdry gullBOT
inner swift
#

But, in general, the difference is that in Folia development you always need to be operating in the right thread

#

So, you'll need to use the relevant schedulers for entity/block related tasks and be more careful with thread safety, especially if you have multiple regions accessing data in your code

torpid lance
torpid lance
# tawdry gull

in that case, should I separate the world without limiting it with a border, then?

inner swift
#

Anything that belongs to or originates from a region thread has to be taken into account
Chunks, entities, events, any data your plugin might hold and that's not safe to be manipulated from other threads, etc

inner swift
torpid lance
#

sure, thx

gusty steeple
#

Folia will help if datapack have many mcfunctions?

I want to try "Incendium" datapack but when i see... 12k of files (and then, so many "server is overloaded message")

So I'm wondering if Folia can manage each function in each cpu thread.

finite hinge
#

Folia doesn't work like that, no

#

And it doesn't even support datapack functions at all

gusty steeple
finite hinge
#

Probably not but if a datapack is able to slow down a single server it'd still slow down every region by that same amount

#

So it wouldn't really help anyway

fair merlin
#

Not sure why you'd use datapacks with functions when you can use plugins.

viral stone
#

datapack functions kinda defeat part of the tenents of folia

gusty steeple
fair merlin
livid crag
gusty steeple
viral stone
#

datapacks have to go 10 miles around the block to perform a lot of operations that would be trivial otherwise

finite hinge
#

The terrain generation changes look neat but then they had to go and try to do custom structures and game mechanics and doing those with datapacks is slow

viral stone
#

But, the entire point of Folia is to be able to break a world up into independent tickable regions, command functions and the commands they generally use assume global state

livid crag
finite hinge
#

If you just wanted the terrain generation you could strip it down and get something that performs fine (and works on Folia)

fair merlin
#

Or pre-gen the world on Paper and move it to Folia.

gusty steeple
# fair merlin Or pre-gen the world on Paper and move it to Folia.

I understand, then it would be to pregenerate the world in Paper and move it to Folia, although I suppose that the datapack should stay installed (i understand that overwold breaks if datapack is deleted) and at least not load the chunks while.

Or the best thing to do would be to remove the functions that add enchantments and mobs and leave the most important things.

I would have to try it on a test server.

fair merlin
#

I'm not really sure how Terralith works - but in the past you'd pre-gen the world and then just move it over.

If it needs the datapack enabled then I probably wouldn't do that for Folia if the datapack requires functions.

gusty steeple
fair merlin
#

I mean for Folia you'd want something with no functions.

gusty steeple
fair merlin
#

For Paper you want less functions for better performance.

#

For Folia you want none.

gusty steeple
# fair merlin For Folia you want none.

Oh, that makes sense.

I had a wrong idea and I thought that with Folia I could improve mainly because of the parallelism. But from what I see, I would have to look only for plugins that achieve the same goal and are compatible with Folia.

gusty steeple
#

Thanks guys!

worthy lance
#

i got this when compile 1.21.7 server, how to fix ts please help

hard palm
#
net.minecraft.ReportedException: Exception ticking world
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1838) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1667) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
    at java.base/java.lang.Thread.run(Thread.java:1447) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ReferenceArrayList.get(int)" because "this.wrapped" is null
    at it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet$SetIterator.next(ReferenceOpenHashSet.java:520) ~[fastutil-8.5.15.jar:?]
    at net.minecraft.server.level.ChunkMap$TrackedEntity.broadcast(ChunkMap.java:1235) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at net.minecraft.server.level.ServerEntity.sendChanges(ServerEntity.java:230) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at net.minecraft.server.level.ChunkMap.newTrackerTick(ChunkMap.java:1027) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at net.minecraft.server.level.ChunkMap.tick(ChunkMap.java:1038) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:512) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:773) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1833) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
    ... 5 more
[02:02:25] [Region shutdown thread/INFO]: [RegionShutdownThread] Awaiting scheduler termination for 60s...
[02:02:25] [Region shutdown thread/INFO]: [RegionShutdownThread] Scheduler halted
[02:02:25] [Region shutdown thread/INFO]: Stopping server``` I recently received a crash that appears super generic on the latest version of Folia 1.21.7. It's so vague that I'm not entirely sure how or what to precisely patch. I'm somewhat aware that this is invoked by (often) a plugin; however, identifying that plugin has proven tricky, even through responses of URLs sent by electronic to related issues. This could be a core issue in Folia; however, that seems unlikely
finite hinge
#

Yeah... isn't multithreading fun?

#

Unless you figure out how to reliably reproduce that crash it is unlikely anything will ever be done about it

dim merlin
ashen flame
#

Wrong channel mb

hard palm
radiant juniper
#

Hello! I got an Epyc 9K84 server and would like to experiment Folia, how is the stability of Folia doing nowadays ? Also anybody know of a teams / factions / guild or similar plugin with claim system supporting Folia ? Thanks in advance

radiant juniper
#

And also what would be the most stable current branche for Folia ?

daring nimbus
#

latest

#

so 1.21.8 currently

full remnant
#

Hi guys. I need to write an authorization system when entering a minecraft server via discord (the server core is on folia). I need to kick a player from the server after 30 seconds, but this code with a delayed task does not work for me

if (!dslogins.containsKey(playerId)) {
    String authCode = String.format("%06d", new Random().nextInt(1000000)); // asynchronous?
    cods.put(authCode, playerId);
    player.sendMessage(ChatColor.YELLOW + "Enter the code " + authCode + " in our Discord bot for authorization!");
    Bukkit.getScheduler().runTaskLater(plugin, () -> {
        if (!dslogins.containsKey(playerId)) {
            player.kickPlayer("Authorization time has expired!");
        } else {
            player.sendMessage(ChatColor.GREEN + "You have successfully authorized!");
        }
    }, 600L);
}

AI (grok) suggests me to write the following code, but I have problems with folia-api dependencies:

GlobalRegionScheduler.getScheduler(plugin).runDelayed(() -> {
    if (awaitingAuth.containsKey(playerId) && awaitingAuth.get(playerId)) {
        Player onlinePlayer = Bukkit.getPlayer(playerId);
        if (onlinePlayer != null && onlinePlayer.isOnline()) {
            onlinePlayer.kickPlayer(ChatColor.RED + "Authorization time has expired (30 seconds)!");
        }
        awaitingAuth.remove(playerId);
        cods.remove(authCode); // Remove the code after expiration
    }
}, 600L);

Thanks in advance for any help !

inner swift
#

Tasks need to be run in the correct region thread

#

The first code is not correct because Folia doesn't use Spigot's scheduler system

full remnant
faint crown
#

Something like this should work... But you should note that dslogins should eventually be an ConcurrentHashMap (in case you currently use a normal one) and that depending on your remaining logic you should use it's atomic methods to make all your code threadsafe.

if (!dslogins.containsKey(playerId)) {
    String authCode = String.format("%06d", ThreadLocalRandom.current().nextInt(1000000)); 
    cods.put(authCode, playerId);
    player.sendMessage(ChatColor.YELLOW + "Enter the code " + authCode + " in our Discord bot for authorization!");
    player.getScheduler().runDelayed(plugin, task -> {
        if (!dslogins.containsKey(playerId)) {
        player.kickPlayer("Authorization time has expired!");
        } else {
        player.sendMessage(ChatColor.GREEN + "You have successfully authorized!");
    }
    }, null, 600L);
  }
#

(In discord the method is very weirdly formatted, idk why)

full remnant
faint crown
#

oh, i made a typo... its player.getScheduler()

#

(updated it)

full remnant
#

i find another method too with GlobalRegionScheduler

faint crown
vital path
#

There are some chunk claiming plugins but that's about best available random option out there

neat falcon
#

can i run folia with 36gb and 10 cores

fair merlin
#

Not simply re-ask the same question.

tawdry gullBOT
fair merlin
#

Lots of info in here.

torpid citrus
#

Hello guys, who can help me solve this problem? I dont understand why class world dont have function world.getRegionScheduler().
Path of my code:

for (World world : Bukkit.getWorlds()) {
                world.getRegionScheduler().run(this, (worldTask) -> {
                    int removedCount = 0;
                    for (Enderman enderMan : world.getEntitiesByClass(Enderman.class)) {
                        org.bukkit.block.data.BlockData carriedBlock = enderMan.getCarriedBlock();
                        if (carriedBlock != null) { 
                            enderMan.remove();
                            removedCount++;
                        }
                    }
                    getLogger().info(String.format("Removed %d EnderMen with items in world '%s'.", removedCount, world.getName()));
                }, 0L);
            }
white laurel
torpid citrus
white laurel
#

once you get the entity, each entity has an EntityScheduler

faint crown
#

Hey, how can i assign more threads to folia?
I currently have 16 Cores (32 Threads) on my machine, but folia doesn't seem to take them into account...

fierce knotBOT
scarlet ginkgo
#

paper-global.yml iirc

faint crown
#

i dind't set any limit?

#

and how does grid-exponent affect region size? (some googling let me think it has something to do with it?)

timber igloo
#

what is the current status of the worldborder in folia? From what i remember, for a very long time there was no native way to use a worldborder on folia, has this since changed? The Folia FAQ currently still mentions that the worldborder command is disabled https://docs.papermc.io/folia/faq/

wet arch
#

wasn't there some workaround for it by first applying the world border in vanilla/paper and loading the world in folia?

finite hinge
#

I don't remember the exact logic but I'm pretty sure you can only make regions larger

#

Like increasing the number makes regions larger but I don't think you can decrease it?

#

Or maybe you could go down to 2

#

That doesn't cut region sizes in half though

viral stone
#

I'd guess it's some factor of how the bitshifting for the regioniser logic works

finite hinge
#

If it's a shift increasing it would likely decrease the region size

#

So it works by some unknown means and increasing it either increases or decreases the size of regions šŸ˜„

viral stone
#

The shift shifts up the size of the grid

#

lower values = your boxes in the grid are smaller

pale plover
#

Is there anyway to get the old stacking raid farm 1.20 mechs on my Folia server?

tawdry gullBOT
fair merlin
pale plover
#

Okay one sec

pseudo ibex
#

Heyo, sometimes i'll get this error. Is this something you guys have been experiencing too? It's only me and it's a new world. ( a 1-2 months old )

#
[13:20:40 ERROR]: ------------------------------
[13:20:40 ERROR]: Current Thread: Region Scheduler Thread #2
[13:20:40 ERROR]:       PID: 132 | Suspended: false | Native: false | State: TIMED_WAITING
[13:20:40 ERROR]:       Stack:
[13:20:40 ERROR]:               java.base@23.0.2/jdk.internal.misc.Unsafe.park(Native Method)
[13:20:40 ERROR]:               java.base@23.0.2/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269)
[13:20:40 ERROR]:               net.minecraft.util.thread.BlockableEventLoop.waitForTasks(BlockableEventLoop.java:150)
[13:20:40 ERROR]:               net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:140)
[13:20:40 ERROR]:               net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.managedBlock(ServerChunkCache.java:829)
[13:20:40 ERROR]:               net.minecraft.server.level.ServerChunkCache.syncLoad(ServerChunkCache.java:122)
[13:20:40 ERROR]:               net.minecraft.server.level.ServerChunkCache.getChunkFallback(ServerChunkCache.java:156)
[13:20:40 ERROR]:               net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:330)
[13:20:40 ERROR]:               net.minecraft.world.level.Level.getChunk(Level.java:1028)
[13:20:40 ERROR]:               net.minecraft.world.level.Level.getChunkAt(Level.java:1017)
[13:20:40 ERROR]:               net.minecraft.world.level.Level.getFluidState(Level.java:1396)
[13:20:40 ERROR]:               net.minecraft.world.entity.Entity.updateFluidOnEyes(Entity.java:2009)
[13:20:40 ERROR]:               net.minecraft.world.entity.Entity.baseTick(Entity.java:880)
[13:20:40 ERROR]:               net.minecraft.world.entity.LivingEntity.baseTick(LivingEntity.java:451)
[13:20:40 ERROR]:               net.minecraft.world.entity.Entity.tick(Entity.java:847)
[13:20:40 ERROR]:               net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3252)
[13:20:40 ERROR]:               net.minecraft.world.entity.player.Player.tick(Player.java:323)
[13:20:40 ERROR]:               net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:996)
[13:20:40 ERROR]:               net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:365)
[13:20:40 ERROR]:               net.minecraft.network.Connection.tick(Connection.java:663)
[13:20:40 ERROR]:               io.papermc.paper.threadedregions.RegionizedWorldData.tickConnections(RegionizedWorldData.java:522)
[13:20:40 ERROR]:               net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1849)
[13:20:40 ERROR]:               net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1667)
[13:20:40 ERROR]:               io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407)
[13:20:40 ERROR]:               io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418)
[13:20:40 ERROR]:               ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546)
[13:20:40 ERROR]:               java.base@23.0.2/java.lang.Thread.runWith(Thread.java:1588)
[13:20:40 ERROR]:               java.base@23.0.2/java.lang.Thread.run(Thread.java:1575)
[13:20:45 ERROR]: [io.papermc.paper.threadedregions.FoliaWatchdogThread] Tick region located in world 'Havok' around chunk '[123, 189]' has not responded in 10.983004s:" ```
fair merlin
pseudo ibex
#

Yea I named my worlds...

fair merlin
pseudo ibex
#

Well it's happened a couple times so far. Would it help if I took a video?

#

From what I observed it just happened when I teleported to spawn.

#

Yes

#

Yea, my main world could be run and tested on ( if you want me to make a separate test server with a new world ). This issue seems to happen randomly, but I'd like to think it has to do with when a player teleports to a new region. ~ When this issue happens the server freezes up, and it's crashed once before.

cursive mango
#

Anyone messed around with plugins for mmorpg style servers? None of my usual plugins are available on folia (denizen, itemsadder, mythicmobs) and I'm trying to figure out what to grab šŸ˜… ExecutableItems is looking like a solid start.

north shale
#

You can learn Java and make your own.

cursive mango
# north shale You can learn Java and make your own.

I know java and have written my own plugins in the past. It was just the hope that I don't have to reinvent the wheel if a solution exists already. If I was using paper or a standard fork, then the plugins mentioned above would be the already existing solutions.

fair merlin
#

Probably helpful to search around this channel. I don’t know about those specific plugins. You’d have to do some legwork on your own to find out.

fair merlin
north shale
#

I think making your own plugins is way more helpful in the long run than using public ones

fair merlin
#

That’s not really a debate topic for this channel.

north shale
#

šŸ‘šŸ»

viral stone
#

Part of the reality of folia is that it's not designed as a slap-in replacement for paper, etc

#

I'm surprised that as many plugins put in the effort to support folia as have done so

cursive mango
# north shale I think making your own plugins is way more helpful in the long run than using p...

I agree in the case of doing something specialized, writing your own, tailored plugin will usually be better. I say usually because it depends how good of a programmer you are and how lag friendly you write it. The things I'm looking for publicly are much more generalized though. Mythicmobs is a core plugin to a lot of mmorpg servers that allow creation of custom mobs/items, abilities to be tied to those, and had a lot of handles for event triggers, built in stuff for handling adding custom based "elements" to the damage of mobs and weapons with strengths/weaknesses, etc. Its pretty well the gold standard for that style of server.

Denizen is more generalized than that, as its a scripting plugin originally meant for controlling the citizens plugin npc's to create quests, interactions, and whatever else. People started to find that its actually incredibly generalized though, and you can go through making entire minigames out of the thing if you want. Denizen is also useful for the reason that you can just reload the scripts with the server running and it works perfect every time. You don't have to go recompiling.

I don't expect to get off scott free without having to write plugins. Was just curious if anyone knew of any that fit some of that usefulness, which I found one in "executableitems", and now am in search of one for custom mobs before I decide to write it myself.

cursive mango
cursive mango
#

compared to the history of spiggot, bukkit, and paper, its pretty short.

#

especially for a lot of plugins needing near complete rewrites.

tawdry gullBOT
warm crown
#

Where appear the folia config? I dont found any folia.yml after start the server :v

#

where i can configure?

little sable
#

There are none

warm crown
#

So where i can configure?

#

In flags starting server?

#

Or where?

lofty magnet
#

what are you looking to configure?

warm crown
#

I want to now what i can configure

#

for my server

warm crown
viral stone
#

pretty sure that's in the paper configs

#

folia doesn't create its own config file

warm crown
#

How its named there?

#

The setting

#

because i dont found

lofty magnet
warm crown
#

for put to 800% of utilisation what i have to do?

#

now i have 400

viral stone
#

I mean, 100% = 1 thread

warm crown
#

i have 32 threads in my machine

#

So then how i can enable in folia :v

lofty magnet
#

did you even click the link I sent?

warm crown
#

yeah

#

You can help me ;D

lofty magnet
#

then why are you not reading it?

warm crown
#

threaded-regions.threads

#

this is where its?

#

aaa

#

i have found

#

nothing

#

gg

#

threaded-regions:
grid-exponent: 4
threads: -1

#

this would be 400%

#

right?

viral stone
#

-1 means that it uses some maths to work out the number of threads

warm crown
#

and grid-exponent

#

?

lofty magnet
#

read the rest of the docs

#
  • potentially the source
warm crown
lofty magnet
#

at least 800.000m² if you want each player to have their own region

warm crown
#

in minecraft

#

how much its

#

XD

lofty magnet
#

one block is one meter

warm crown
#

so 800k of radius?

lofty magnet
#

that's not what I said

warm crown
#

:;v

#

the world border how much need to be

#

:v

manic quarry
#

either your players are spread enough or not

lofty magnet
#

actually sorry I think my math was off

warm crown
#

XD

#

Then

#

what size

#

you recommend

lofty magnet
#

it's 800 million m² xD

warm crown
#

to put in server properties

warm crown
manic quarry
#

for folia? none, leave it default for best results

warm crown
#

but

#

i necesary

manic quarry
#

the more players are spread out, the more folia benefits

warm crown
#

pregen

#

right?

lofty magnet
#

which would be a radius of around 15k but that's only if players are perfectly spread which you will never achieve

manic quarry
#

you don't pregen on folia, you'd have to pregen hundreds of millions of chunks

lofty magnet
#

if you really want to limit it for some reason maybe use a radius of 100k or something large but pregenning doesn't make sense

warm crown
#

But

#

in the wiki

#

saids thats its better pregenerate

lofty magnet
#

folia has no wiki? what are you refering to?

warm crown
manic quarry
lofty magnet
#

"pre-gen" ;)

warm crown
#

XD

lofty magnet
#

"First, it is recommended that the world is pre-generated so that the number of chunk system worker threads required is reduced greatly."

manic quarry
lofty magnet
#

you tell me, English isn't my first language

warm crown
#

So its not necesary to add more pregen

#

for 800 players?

lofty magnet
#

just pre-generate as much as you think is necessary. generating more than the initial place people spawn doesn't make sense imo though

manic quarry
#

I mean, you can pregen like half of vanilla world border if you think it's worth it

#

imo it's not but hey, it's your time and resources ;)

lofty magnet
#

also I kinda don't agree with the suggestion to pre-generate seeing as it will run on separate threads anyways and don't influence the server at all (in the ideal environment of CPU threads not being limited)

warm crown
#

so

#

its better to put

#

500k world

#

size

lofty magnet
#

granted if you have 800 players all on their own thread then I doubt you have a CPU which can efficiently handle that lol

warm crown
#

than 20k worldsize

manic quarry
#

with 20k world size don't bother with folia

warm crown
#

perfect

#

and how much chunk view

#

you recommend?

manic quarry
#

however much you want

warm crown
warm crown
manic quarry
warm crown
#

but

manic quarry
#

some tips still apply, especially ones regarding ticking

warm crown
#

now i have put

#

32 chunks view

#

6 simulation

#

this its good?

manic quarry
#

that's what I'd use if I ever had the need to run folia

warm crown
#

perfect

manic quarry
#

do keep in mind that if I were ever to run folia I'd get at least threadripper pro 7985

#

that thing likes threads

subtle wasp
#

Piracy is not supported.

cursive mango
#

@subtle wasp for reference what is pirated there šŸ˜‚?

tawdry gullBOT
next crater
daring nimbus
#

player in your chat does not exist

warm crown
#

what its the best form to see the stats of folia tps and more?

#

I now the /tps but its there a best option?

daring nimbus
#

Spark has a Folia version

warm crown
#

its the best option?

warm crown
daring nimbus
#

don't think so

warm crown
#

So where i can find the spark for folia

#

:v

daring nimbus
#

iirc its some branch or PR you build yourself

warm crown
#

:c

daring nimbus
#

assuming thats up to that, check the git history etc

warm crown
#

😮

viral stone
#

I think that jars are published on their CI server or something

fair merlin
#

Hi, we don't support offline mode servers. Please see our rules in #welcome - specifically rule #7.

cursive mango
fair merlin
cursive mango
wooden isle
#

Hi, I am a developer and we are currently considering switching from Paper to Folia for a future large project. I saw that last month Folia got a stable release. I wanted to ask what you guys think about whether it's worth switching at the moment. Especially considering the fact that we are planning to modify many packets

dim merlin
#

I don't think it is a smart idea to plan a project for folia without having the needs for it yet
I would start on paper until it doesn't suffice anymore

#

And you actually hit a point where folia would be profitable
(Player spread and world size)

tawdry gullBOT
wooden isle
#

First of all, thanks for the quick answer :D;
What's about switching from Paper to Folia then? I'm talking about programming in particular. I know that you have to program thread-safe, but what do I have to consider with the Bukkit/Paper API? I also know about the schedulers. But if you start a big project now, can you somehow start to consider both softwares so that you can switch over faster?

dim merlin
#

That's more of a #folia-dev question but if you compile against paper and use the schedulers the biggest burden after that would be events availability

wooden isle
radiant needle
#

any way i can further optimise my netty to hold more players in a single region

#

struggling to hold more than 400 at my spawn at once

fair merlin
#

I mean Folia is not designed for many players in a single region. See the little factoid above. #folia-help message

radiant needle
#

well it’s good for the general gamemode but when we host keyalls we see performance plummet

#

we’ve got about 450-500 players spread across a 250k world border (ow) and 100k end worldborder and so on

daring nimbus
#

no idea what keyall is, but assuming its some kind of event, maybe just host it on a separate server?

#

e.g. Paper with like everything you don't need for that event disabled

radiant needle
#

a keyall is essentially where we give every player online a couple of crate keys

#

so we’ve got a ton of players all around the crates

daring nimbus
#

Maybe then the solution is to just bring the crates to the players or something like that.
this feels like something that is more easily solvable in the area of game design than anything

#

but having something that forces players to be in one spot is just poison for Folia

radiant needle
#

perhaps you’re right, i could try & give them the rewards instead of the key so they don’t actually come to spawn

daring nimbus
#

that likely is the easiest solution

radiant needle
#

i tried disabling clientboundsetentitymotionpacket which improved our netty perf but that’s the best i’ve found so far

cursive mango
radiant needle
#

another possible good idea

noble ridge
#

yo so my servers only got 3 regions yet im running it on a 6c/12t server

#

anyone know why ?

viral stone
#

regions is down to player spread, not the hardware

noble ridge
#

oh ok.

storm basalt
#

Why do my redstone machines lag as if the server had 5 tps but it is a constant 20? I am making a server for version 1.21.6

storm basalt
#

When I place blocks, they move back and half of them don't get placed. The first and last ones I placed work, but the ones in the middle seem to disappear.

storm basalt
#

but this is not about the lag machine, it is 5 pistons that are connected to the watch

#

and even when it is turned off, the blocks disappear

viral stone
#

I mean, folia inherits spigots interaction limiter that will discard fast block placements in the most janky manner, but, probably not an issue

#

It's pretty hard to say what you're seeing because, well, we're not magicians

tawdry gullBOT
fair merlin
storm basalt
#

ok wait

storm basalt
# tawdry gull

I can't find Spark on folia and it doesn't work without the plugin

fair merlin
#

Search this channel - it tells you how to get Folia for spark

#

If you're running Folia you want Spark installed.

#

Ah. We don't support offline mode servers here. Please see our rules in #welcome - specifically rule #7.

storm basalt
fair merlin
storm basalt
#

thank you, I can handle it myself

eternal ridge
#

I was testing today my folia sharding plugin, and i set offline-mode to false, because i needed to use mineflayer to get 1500+ bots onto it to test balancing with netty under load, in that scenario i cant get any further support?

timber igloo
#

if its reasonably evident that thats actually what you did, and you are not running offline mode in production, I dont think people will mind

eternal ridge
#

I understand if we would see like 150 online players, plugins, server-ready setup, like some commercial things there, and woow we need help with our cracked server.

I also consider the time-consumption of checking these things, but in my opinion its not relevant tbh.

fair merlin
eternal ridge
noble ridge
storm basalt
noble ridge
#

oh ok

vital path
# radiant needle struggling to hold more than 400 at my spawn at once

in general Folia definitely needs some optimizations for when players are viewers of a lot of other players. The PPS per player quickly bogs down the server to an unnecessary degree when hundreds of players move at once. not sure what the best strategy would be to improve this (maybe distance based LOD once enough players are visible?) but I do think something should be done. this is the only thing preventing high player density, small regions from working in a lot of cases

#

I've thrown more threads at it myself to try and reduce issues but I'm not aware of how those threads are utilized in that scenario

viral stone
#

distance based stuff already exists with the tracking ranges?

eternal ridge
#

I don’t think anything else is possible with many people in one place

vital path
#

if all of those people can see eachother the server gets overwhelmed quite fast

manic quarry
#

Yep. Folia never set to solve that problem

north shale
#

400 people in one area defeats the purpose of folia

tawdry gullBOT
north shale
#

The first one ^

umbral vault
steady cobalt
#

can someone help me with the TPS on the TAB plugin because i keep getting the error "Folia never updates MSPT and TPS values in the API, making %mspt% and %tps% return the default values (0 and 20)." can someone help?

dim merlin
#

just remove the tps from the tab?

steady cobalt
#

i would but i want to keep it

cursive mango
#

Folia has different placeholders for regionized tps and averaged tps iirc

dim merlin
steady cobalt
dim merlin
#

best to ask the folks from TAB

cursive mango
#

Its in the wiki pages. I've seen it before. At work and cant look it up

livid crag
#

If you have problem with TAB plugin displaying TPS, you hav to reach out to them for help

steady cobalt
fair merlin
steady cobalt
fair merlin
#

It's okay.

#

If you're having an issue or config problem with a plugin you always want to talk to the plugin folks.

steady cobalt
#

okok

cursive mango
vital path
# manic quarry Yep. Folia never set to solve that problem

Sure, but it should eventually provide a solution to that problem. The answer long term isn't just "don't put everyone in one spot" - real world servers like to have everyone group up, and in survival scenarios people will just naturally do that.

#

I run an SMP across a large map and we've had users run events where 200+ 300+ people all gather for something. It's not unrealistic at all as a usecase and I'm not about to tell them they can't do that

#

The benefit of Folia's multithreading is allowing large amounts of players to feasibly play together in the same world without the downsides of a single tick thread with good performance. The performance gets worse as people gather, but that's inevitably going to happen in SMPs and just in general. If the server grenades itself during organic player behavior, I'd consider that a bug and something worth fixing. If that happened in Paper under otherwise sustainable conditions I think that'd be a no brainer.

vital path
# tawdry gull

this Folia Spread command has nothing to do with what I'm talking about, either.

#

So yes, Folia never set out to solve that problem, but it's nevertheless a problem someone contributing to Folia is going to have to deal with eventually. If it's me, then it'll be me, but it makes really no sense why a PR providing fixes for that scenario would be against the point of the project. That kind of improvement would only benefit Paper and Folia.

#

It's possible I'm just misreading this and it's just misguided advice being thrown my way. I'll need to come up with a solution for this anyways, just kind of curious if it's worth writing it intending to upstream it or not.

fair merlin
vital path
#

It's an issue for both Paper and Folia realistically

#

There's just less valid use cases for such a thing in paper

fair merlin
#

My advice for anything like this is the same to anyone else: feel free to fork and do your own thing. If you plan to submit some sort of PR you’d be best off writing up a proposal first through an issue to see if it’s in a direction Folia would want to take.

Otherwise you can spend a lot of time working on some stuff just to get the PR rejected. Just my suggestion.

vital path
#

I just think you're massively misreading me

#

My server can only exist as it does because of Folia, but the networking code is just inadequate to handle a few hundred players all seeing eachother and moving at once. The PPS gets insane and threads get overwhelmed. It's a legitimate bug

#

The same amount of entities moving is perfectly fine, players are just highly dynamic and cause unique problems

#

This is an issue other servers are facing - people don't move and it's fine, but as soon as people start jumping around in those scenarios, their ping shoots up massively and things start to break which is far from something I'd say is expected

little sable
#

The proxies just couldn't hold the charge.

vital path
#

At least not in my situation

little sable
#

The best is that you try to troubleshoot with YourKit, you will be able to see which threads are overloaded or even blocking (like the io netty threads)

vital path
#

The whole server doesn't crash from this so I'd be a bit surprised if it was velocity

#

It's just a regional issue

#

Which makes me suspect folia far more than velocity since I'd assume everyone would lag out, not just the intensive regions users

little sable
#

I had exactly the same reasoning as you, except that I see the results given by our YourKit

vital path
#

I don't have a yourkit license so I'll have to just use Mission Control

little sable
#

Also, I noticed that plugins like Znpcs Plus also blocked netty io threads

#

There is a free trial period you can use

vital path
#

I've used it before so I can't do that unfortunately

little sable
#

This is an indication of what was happening on our YourKit when players had a lot of network latency, when we were using Velocity

#

After the error can be something else, I just provide you with our experience that we had on our server, if it can help you

viral stone
#

I mean, the common issue is just that hopping off to dispatch the work into netty is expensive

#

either you reduce packets by not sending things like equipment stuff as often, which needs some care, or you break protocollib and improve the dispatch handling

primal oyster
#

maybe it's an issue on the client! not on the server

#

have you confirmed the netty on server-side was "dying", and not the player's clients instead?

#

also, it's not really a paper issue.
at that point you're at, you have to tune in buffers, as well as give it more threads if necessary, netty can push a lot more than 300 people around each other, that's not even a question.
you should investigate and add metrics to all buffers to see if you're hitting something you don't want to

#

and verify if it could be your compression, or another plugin messing your pipeline

#

but I can pretty much tell it's either your plugins or the clients dying when around 300 players. our transmission rate on donutsmp is over 10.5M pps. we're doing just fine.

tawdry gullBOT
simple cobalt
#

this is probally a dumb question and I suspect the awnser is yes, but, will raising the world height on a folia 1.21.5 server to 512 decrease performance significantly? I'm hoping it dosent because I dont see why it would but im assuming it would

timber igloo
#

you dont see why it would but you are assuming it will?

#

i think that might change some mob spawning related stuff but besides that i dont see how that would impact performance

finite hinge
#

Mob spawning and some lighting stuff will take longer

timber igloo
#

maybe more memory -> gc takes more perf, but besides that?

#

oh yeah, lighting too

simple cobalt
#

thank you both for the awnsers!

carmine brook
#

It's really not, it just wasn't built for having hundreds of players on a server

swift flicker
#

Does anyone know how to find folia regions and identify them in game?

timber igloo
fair merlin
#

Why are you trying to find / identify them?

swift flicker
inner swift
#

The regions will always merge if interaction "between" them would've been otherwise possible

fair merlin
#

So no, you can't run into a scenario like that.

livid crag
swift flicker
fair merlin
#

Regions merge when they get too close to another.

#

It's not really "redstone" specific, it's player specific.

A player will have a "region" around them, and anything they do is in that region. If another player is far enough away to have their own region and then they wander close to each other those regions will merge.

You can't send a redstone signal 1000 blocks because you won't have all those chunks loaded anyway.

tawdry gullBOT
fair merlin
#

This kinda sorta illustrates some of it.

swift flicker
#

Waiting for it to load. Thanks for a great answer!

simple cobalt
#

Thank you for the in depth awnser ā¤ļø

tepid bronze
#

I mean it is finished, but extremely ugly, a folia fork, and sometimes freezes the jvm

vital path
# primal oyster and verify if it could be your compression, or another plugin messing your pipel...

I've recently turned off compression on our Folia side and left that to Velocity which I'm sure has helped considerably with stability going forward. I'll have to do some further testing and track down the root cause, but, assuming it's still even happening, the real solution in most cases is going to be reducing per player PPS in that scenario on the paper/folia side. Unless Velocity is choking which I kinda doubt

#

It wouldn't be impossible considering that this scenario turns "plr * plrVisible" from like 4-8k to 80k, though I can also very easily see that bogging down the client as well

timber igloo
#

is there currently some way to get something like a spark profiler for a specific region only?

viral coral
#

no

hexed ice
#

You can use the region profiler but that doesnt have any fancy online viewer to go along with it

timber igloo
#

ah yes, that would work

#

thanks

full remnant
#

Hello everyone, can anyone help me with installing worldguard for folia 1.21.4? I have already looked at several forks (for example https://github.com/Euphillya/WorldGuard-Folia or https://github.com/Folia-Inquisitors/WorldGuard-Folia), but I ran into a problem that these versions are written for minecraft 1.21.5 and for worldedit 7.3.9, due to a small amount of experience I can not understand how to rebuild the project for my version, if you can help with the right version I will be grateful

GitHub

šŸ›”ļø Protect your Minecraft server and lets players claim areas - Euphillya/WorldGuard-Folia

fair merlin
#

The one thing I’ll say is that you shouldn’t be running 1.21.4. Especially with Folia you want to be on the most recent version.

full remnant
tawdry gullBOT
icy umbra
#

is there any information on when Folia Stable is and when it will be available for the latest version?

fair merlin
#

We don’t have ETAs for anything basically ever. So not really, no.

icy umbra
#

How many players can be on a Folia server, i.e. how high can you scale it?

cursive mango
fair merlin
#

You could probably get 1000+ people on a single instance with the right setup and hardware.

#

But probably not if you have a bunch of janky plugins.

little sable
subtle lion
#

šŸ‘‹

#

Should I use Aikar flags on a Folia server?

little sable
torpid citrus
toxic prairie
#

what is the best way to sort my tablist without scoreboard teams

cursive mango
finite moth
#

Hey, I hope this is not a stupid question

#

So im starting to dev for flio as I want to scale my server

#

a lot of the plugins are fully custom by me

#

Do I need to do anything different on the backend for it to play nice?

#

and do I need to migrate to a different API

viral coral
#

read the readme

hard palm
little sable
# hard palm I have a patch you can snag from my WG branch that works around the issue of end...
GitHub

šŸ›”ļø Protect your Minecraft server and lets players claim areas - Euphillya/WorldGuard-Folia

fair merlin
little sable
#

I just answer the person :/

cursive mango
dim merlin
#

OR just use private messages or your own support

last sand
#

Does anyone have an idea on why fawe dropped Folia support?

#

Like what's the reason

#

is it such big of a challenge?

paper siren
#

It requires a lot of breaking changes that we don't want to push into mainline at the moment just to support folia

#

plus missing apis/features for stuff like regen

timber igloo
# last sand Does anyone have an idea on why fawe dropped Folia support?

theres a 2 year old PR that added experimental support for folia, i ported it to 1.21.4, but it is still very unstable.
the most basic functionality works, as in you can modify / place blocks, but basically anything regarding reading blocks/entities from the world i hvent gotten to work, and also it isnt able to load chunks which means you cant modify unloaded chunks (but this should not be very challenging to fix)

timber igloo
fair merlin
#

There is a #general channel. But we don't want to normalize people coming here to get support for software that isn't ours, like forks, plugins, etc. So not really something we want to do, no.

night minnow
#

Hello, sorry for writing this here, but will Folia be updated to version 1.21.7? If so, do you know approximately when?

viral stone
#

It already has dev builds for .7

#

or, well, it's on a branch

#

there are no ETAs

torpid citrus
#

Guys, how to install 2+ res packs on server with Folia? 1.21.4

cursive mango
daring nimbus
#

the client can do multiple server RPs at once nowadays, you don't need to merge them anyways

night minnow
#

Thanks!

fair merlin
torpid citrus
torpid citrus
fair merlin
# torpid citrus I don't understand why not run 1.21.4?

Folia isn’t like a regular Minecraft server. You always want to be on the most recent version. There’s a lot of changes and improvements that happen (and bug fixes) that aren’t tied to the Minecraft version.

#

So you should be at least the latest version of the website.

#

Or the 1.21.7 branch.

#

1.21.8 might build and run. Haven’t had a chance to test yet. Probably does since it’s a minor version change.

torpid citrus
fair merlin
#

Not strange - unfortunately expected. Anything built for Folia should be on 1.21.7/1.21.8 anyway.

#

If not you’ll want to find alternatives to them regardless. But there’s not a huge amount of folia plugins and most of them stay updated.

narrow bough
#

Which one is better for running Folia, the 14900K or the 9950X?

quaint panther
#

9950x

full remnant
#

Hi, guys, I have a plugin that create group in luckperms and add this group to player, but I need save in my lpc custom username color for groups, but when I add new group from plugin, I lost the old username color.How I can fix this problem without create a new plugin for chat?

cursive mango
night minnow
#

Thanks šŸ¤

supple viper
#

Hello, do you know if there are any compatible plugins on Folia? Because there is a list on the page that says there are compatible plugins, but it doesn't work.

#

I already know the plugins comes from the bottom but its not walking

#

I have tried the plugins that they are on the page nothing works

timber igloo
supple viper
#

Compatible plugins that are listed on the page does not work or block commands for example

dim merlin
timber igloo
#

But it's a decent start

fair merlin
#

I think we generally want to avoid people recommending random patches in this channel - especially patches from forks that have a lot of issues and unsafe/questionable stuff in them.

You yourself in the past have said that your margin for "safe" is different than others, so let's try to avoid recommending that kind of stuff here.

fair merlin
#

Someone asked about building Folia. Rpelying that it builds/run fine for you makes sense.

Saying "I have a bunch of non-Folia patches in my fork" makes sense.

Linking to a questionable fork does not make sense. Especially in the context of building / running Folia not forks of Folia.

#

Others would only experience this issue if they're using patches from that fork - which isn't software that's supported in this channel. If someone does have issues with that fork then they should seek to get support from whatever support forum that fork uses.

#

The issue you're linking to is closed, and has been for 2 weeks.

#

Honestly, I don't want a debate on this. Please stop linking random unsafe patches from random unsafe forks when in help channels.

spare loom
#

will a ryzen 9 9700x (8 cores 16 threads) and 64 gb ddr5 be good to run an smp on folia with a player count of around 200?

#

The paper mc website says it recommended to have at least 16 cores but I just want to confirm it because there isnt much info

#

damn alright

fair merlin
#

Also make sure your use case fits Folia.

tawdry gullBOT
fair merlin
#

200 people widely spread out is fine. 200 people in one area is not.

spare loom
fair merlin
#

If your server doesn't fit within those requirements, yes.

spare loom
#

alright thanks

ionic dome
#

[23:37:55] [Region Scheduler Thread #2/ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler] Region #-1 centered at chunk null in world 'null' failed to tick:
java.util.NoSuchElementException: No value present
at java.base/java.util.Optional.orElseThrow(Optional.java:377) ~[?:?]
at io.papermc.paper.command.brigadier.MessageComponentSerializer.message(MessageComponentSerializer.java:23) ~[folia-api-1.21.6-R0.1-SNAPSHOT.jar:1.21.6-6-e4b0ae9]
at net.minecraft.commands.Commands.finishParsing(Commands.java:405) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.commands.Commands.performCommand(Commands.java:353) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.commands.Commands.performCommand(Commands.java:345) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.commands.Commands.performPrefixedCommand(Commands.java:336) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs(DedicatedServer.java:435) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at io.papermc.paper.threadedregions.RegionizedServer.globalTick(RegionizedServer.java:309) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at io.papermc.paper.threadedregions.RegionizedServer$GlobalTickTickHandle.tickRegion(RegionizedServer.java:161) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.6.jar:1.21.6-6-e4b0ae9]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

How do I prevent this error?

#

Sometimes, when you use the wrong command, it throws this error and shuts down.

#

How do I prevent the server from shutting down?

fair merlin
#

What's the full log? What command is causing the issue? From a plugin?

tawdry gullBOT
mint ember
#

Why is the Folia scheduler only run 1 time per tick? Why not sooner

paper siren
#

which one exactly

manic quarry
timber igloo
primal geode
#

speedvanilla just too good

tepid bronze
#

<@&748618676189528155>

sudden tusk
#

Gottem

tepid bronze
#

I don't want to win crypto from mrbeast

#

:3 THANKS

toxic prairie
#

I was wondering if anyone here has an estimate of how many players I could support on an AX42 server from hetzner, using folia, a pre generated 3.5k x 3.5k worldpainter map, and some lightweight custom plugins

tawdry gullBOT
fair merlin
#

That’s far too small of a map.

#

But also: just like with Paper, it depends on the players, what they’re doing, what plugins you have, your config, etc etc

There’s no math for X CPU + Y RAM == Z player count

toxic prairie
#

I see, so is folia not going to help much in my case, even though it still uses multiple regions?

#

When I ran /tps during testing, it showed/said that multiple regions were being used

#

Nether and end are disabled

finite hinge
#

If people were bunched up you might get a couple out of a world that size

#

Not for long I suspect

fair merlin
#

So, no, it won’t help.

toxic prairie
#

I see, so it will be the same as using paper then

fair merlin
#

If you end up with one region and the other dimensions disabled, then yeah

#

It would effectively be a Paper server.

#

With less plugin support and less API

toxic prairie
#

My bad then

#

Thanks for your help

#

There is no way to change region sizes?

finite hinge
#

Not without rewriting the server from scratch, more or less

#

And at that point I'd just thread the various phases of a tick instead of doing the region stuff

fair merlin
#

And if you did it would totally hose stuff if players could see each other and be in different regions.

#

There’s a reason they merge when players get close.

finite hinge
#

Not if you were writing the server from scratch with it in mind

#

But that wouldn't be Folia or Paper anymore so probably a discussion for #general

quasi imp
#

will there be a 1.21.8 folia?

paper siren
#

there is

hexed ice
#

the website still shows 1.21.6 so I don't blame them

limber pebble
#

does spark currently work on folia?

#

it currently says their working on compatibility. Not sure if thats outdated or not.

fair merlin
#

There’s a build for it.

#

Search this channel for more info

limber pebble
#

wrd, thank you

scarlet ginkgo
#

with such a small map

#

the setting you’re looking for is grid-exponent

timber igloo
#

iirc you can change the region exponent

scarlet ginkgo
#

u can try setting it to 1 but yh, i assume paper would be better at this map size anyway

fair merlin
hard palm
#

Should scheduling attribute additions and removals (in this case, we have a plugin that modifies the user's attributes if wearing a full set of X/Y/Z) be delayed by one tick instead of ran instantly?

We receive a quite rare crash report that looks something like this:

    at it.unimi.dsi.fastutil.objects.ObjectOpenHashSet$SetIterator.next(ObjectOpenHashSet.java:575)
    at net.minecraft.world.entity.LivingEntity.refreshDirtyAttributes(LivingEntity.java:1349)
    at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3360)
    at net.minecraft.world.entity.player.Player.tick(Player.java:324)
    at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:1036)
    at net.minecraft.server.players.PlayerList.remove(PlayerList.java:615)
    at net.minecraft.server.players.PlayerList.remove(PlayerList.java:599)
    at net.minecraft.server.network.ServerGamePacketListenerImpl.removePlayerFromWorld(ServerGamePacketListenerImpl.java:2245)
    at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2221)
    at net.minecraft.network.Connection.handleDisconnection(Connection.java:923)
    at io.papermc.paper.threadedregions.RegionizedWorldData.tickConnections(RegionizedWorldData.java:567)
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1836)
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1626)
    at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:452)
    at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:435)``` I corresponded the exception to `AttributeInstance` (since this is what the method modifies) and found that I do in fact already schedule the code; however, execute it instantly, instead of delaying it

Example code:
```java
    public void removeAttributes(Player player) {
        FreshPlugin.getInstance().scheduler().delayed(player, () -> {
            for (Map.Entry<Attribute, AttributeModifier> entry : this.compiledAttributes.entrySet()) {
                final Attribute attribute = entry.getKey();
                final AttributeModifier modifier = entry.getValue();
                if (attribute == null || modifier == null) continue;

                final AttributeInstance instance = player.getAttribute(attribute);
                if (instance != null) instance.removeModifier(modifier);
            }
        }, 1);
    }```
hard palm
#

We utilize a customary scheduling format which executes at the player, here .delayed(player, ()

timber igloo
timber igloo
hard palm
#

Yeah and we pretty much handle this adequately, so it seems. This one is a little tricky to dive (deeper) into

timber igloo
#

ah, nevermind, i overlooked that removeattributes ends up scheduling it

hard palm
#

So my last guess here is that this particular event (for whatever reason) needs a specified delay to prevent obscure race conditions. There could be a deeper issue but it doesn't entirely stand out

timber igloo
hard palm
#

Correct, yes

#
    @NotNull
    default ScheduledTask delayed(@NotNull Entity entity, @NotNull Runnable task, long delay, TimeUnit unit) {
        return this.delayed(task, delay, unit);
    }``` So it'd be this one
timber igloo
hard palm
timber igloo
#

i mean in regards to race conditions, i dont really see how this could even cause a race condition? the player being disconnected is handled on the region thats ticking it, the entity scheduler is running on the same thread thats responsible for ticking the region.. it seems kinda weird

timber igloo
# hard palm Should scheduling attribute additions and removals (in this case, we have a plug...

im pretty sure that this is not caused by the code you provided. if your scheduler wrapper actually correctly schedules this on on the player scheduler, this cant happen. this is a concurrent modification on the attributesToUpdate. the stacktrace occurs whilst disconnecting, which is executed from the tickloop, meaning its defenetly on the players tickthread, the only real explanation for this would be that either your wrapper does not correctly schedule it (from what i saw, attribute modification doesnt do a tick thread check) or its caused by another plugin

hard palm
proud sandal
#

Could Folia theoretically be made to work across multiple machines? Mostly asking out of curiosity as I dont really have a use for that atm.

proud sandal
#

I wonder if 2B2T has also figured something out as I know they are a big user of folia

#

Ah ok

#

true

timber igloo