gero
AAdmincraft
•Created by gero on 9/22/2024 in #questions
Wrong formula for pre-1.19.4 horse breeding?
Horse breeding got easier in 1.19.4 and when our server migrated from 1.18.2 to 1.21.1, we wrote a plugin to use the old formula (or so we thought).
When researching, the internet suggests the formula for pre-1.19.4 for the speed of a foal is
(Speed of parent 1 + Speed of parent 2 + random value between 0.1125 and 0.3375) / 3
. So we implemented it and thought everything is fine.
Some of our players noticed that they would get way more better horses than before, so we wrote a plugin that breeds horses from set-parents (horses with speed of 13 blocks per second, 0.308) automatically and collects the speed values of the foals.
The average speed was about 11.85 blocks per second (0.281) for 1.18.2 without any plugins and 1.21.1 with our plugin.
But the number of horses that have a speed of 13 blocks per second (0,308) or more was not at all similar: 1% for 1.18.2 without plugins and 13% for 1.21.1 with our plugin that applies the formula from above.
When calculating the probability for 13 blocks per second horses based on the formula, 13% makes sense. But that is not what vanilla 1.18.2 uses!
Is it the wrong formula? Are we forgetting something?8 replies
AAdmincraft
•Created by gero on 8/12/2024 in #questions
Why is there no server software making use of the JNI/FFI?
When it comes to server software, 99% is based on the vanilla minecraft server. There are efforts to rewrite it completely (feather_rs, valence, ...), but not a single one achieved feature parity with the vanilla version. In Java, there is something called the JNI which allows the JVM to call natively compiled code (written in some other programming language e.g. C, C++, Rust, Zig, ...) and therefore could offer huge performance advantages over the existing java code. Isn't that an opportunity to rewrite very specific, computing intense functions with the use of JNI/FFI and achieve a much more performant server software?
I'm not at all familiar with JNI or FFI and I'm sure there is a simple answer to this (No speed advantage? Cross-Platform compability? Too complex?).
14 replies