mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies
bukkitcraftbukkithacktoberfestjavaminecraftminecraft-apiminecraft-performanceminecraft-serverpaperpaper-apipapermcspigot-forktacos
131b67c38a
This change reimplements the entire BehaviorFindPosition method to get rid of all of the streams, and implement the logic in a more sane way. We keep vanilla behavior 100% the same with this change, just wrote more optimal, as we can abort iterating POI's as soon as we find a match.... One slight change is that Minecraft adds a random delay before a POI is attempted again. I've increased the amount of that delay based on the distance to said POI, so farther POI's will not be attempted as often. Additionally, we spiral out, so we favor local POI's before we ever favor farther POI's. We also try to pathfind 1 POI at a time instead of collecting multiple POI's then tossing them all to the pathfinder, so that once we get a match we can return before even looking at other POI's. This benefits us in that ideally, a villager will constantly find the near POI's and not even try to pathfind to the farther POI. Trying to pathfind to distant POI's is what causes significant lag. Other improvements here is to stop spamming the POI manager with empty nullables. Vanilla used them to represent if they needed to load POI data off disk or not. Well, we load POI data async on chunk load, so we have it, and we surely do not ever want to load POI data sync either for unloaded chunks! So this massively reduces object count in the POI hashmaps, resulting in less hash collions, and also less memory use. Additionally, unemployed villagers were using significant time due to major ineffeciency in the code rebuilding data that is static every single invocation for every POI type... So we cache that and only rebuild it if professions change, which should be never unless a plugin manipulates and adds custom professions, which it will handle by rebuilding. |
||
---|---|---|
.github/ISSUE_TEMPLATE | ||
licenses | ||
Paper-MojangAPI | ||
scripts | ||
Spigot-API-Patches | ||
Spigot-Server-Patches | ||
work | ||
.editorconfig | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
CONTRIBUTING.md | ||
LICENSE.md | ||
paper | ||
pom.xml | ||
README.md |
Paper
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.
Support and Project Discussion:
How To (Server Admins)
Paperclip is a jar file that you can download and run just like a normal jar file.
Download Paper from our downloads page.
Run the Paperclip jar directly from your server. Just like old times
- Documentation on using Paper: paper.readthedocs.io
- For a sneak peak on upcoming features, see here
How To (Plugin Developers)
- See our API patches here
- See upcoming, pending, and recently added API here
- Paper API javadocs here: papermc.io/javadocs
- Maven Repo (for paper-api):
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
- Artifact Information:
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
How To (Compiling Jar From Source)
To compile Paper, you need JDK 8, maven, and an internet connection.
Clone this repo, run ./paper jar
from bash, get files.
How To (Pull Request)
See Contributing
Special Thanks To:
YourKit, makers of the outstanding java profiler, support open source projects of all kinds with their full featured Java and .NET application profilers. We thank them for granting Paper an OSS license so that we can make our software the best it can be.