Pufferfish Fork Configuration

This article will detail each option in the Pufferfish paper fork configuration and what it should be used for. Most of the options included in the configuration should be left at their default values, and changes should only be made if vanilla gameplay is impacted or if additional performance is required.

General Configuration

enable-books: This option can be used to prevent players from editing books on your server. This may be desirable because books are commonly the cause of exploits including duplication bugs and crashes. If this option is set to false, it can be overridden on a per-player basis by setting the pufferfish.usebooks permission.

enable-suffocation-optimization: When enabled, this option optimizes a suffocation check that each entity must perform. With tens of thousands of entities, the suffocation check can take a considerable amount of time to run, and this option rate limits the check to only run when an entity is capable of taking damage. There is a slight possibility for modification to vanilla gameplay which is why it is exposed as an option.

enable-async-mob-spawning: Pufferfish includes an optimization that will offload much of the computational effort involved with spawning new mobs to a different thread. This option should always be left enabled as there is no noticeable impact on vanilla gameplay.

enable-async-entity-tracker: (Pufferfish+ Exclusive) Pufferfish+ includes an optimization that completely offloads the entity tracking workload to an async thread. When this optimization is enabled, plugins will not be able to listen to the PlayerVelocityEvent, but all other plugin-related things should continue to work properly, with the caveat that tracker-related packets may be sent out-of-order (although they will always be sent on the main thread). Enabling this option will allow you to increase your entity tracking ranges in spigot.yml without negatively impacting performance.

enable-async-entity-pathfinding: (Pufferfish+ Exclusive) Pufferfish+ also has the ability to offload most of the work of pathfinding (which itself is most of the work of entity ticking as a whole) to async threads. With this option enabled, plugins should still function completely normally, and the only difference you may see are that mobs may take slightly longer to make pathfinding-related decisions, as these decisions are made off the main thread.

sentry-dsn: Sentry is a service that can be used to log, monitor, and track errors that happen in your server. If you would like to set up Sentry, visit Sentry's website, sign up (the free tier should be enough to get started), and create a new Java application. Then copy and paste the provided DSN into this configuration option and restart your server.

inactive-goal-selector-disable: This option, when set to true, will prevent inactive entities from selecting new pathfinder goals. This is a worthwhile optimization for most servers, but it may break some farms.

disable-method-profiler: This option will disable some additional profiling done by the game. This profiling is not necessary to run in production and only causes additional lag, which is why it's disabled by Pufferfish.

DAB

DAB is an optimization that reduces the frequency of brain ticks. Brain ticks are very intensive, which is why they are limited. DAB can be tuned to meet your preferred performance-experience tradeoff. The farther away entities are from players, the less frequently their brains will be ticked. While DAB does impact the AI goal selector behavior of all entities, the only entities who's brain ticks are limited are:

  • Villager
  • Axolotl
  • Hoglin
  • Zombified Piglin
  • Goat

dab.enabled: Selectes whether or not DAB should be enabled. It is strongly recommended to leave this to true.

dab.start-distance: Entities closer than this number of blocks to the nearest player will not be affected by DAB.

dab.activation-dist-mod: Increase this value to make entities farther away tick more frequently, decrease to make entities farther away tick less frequently. This value should generally be left at the default of 8. Large servers may want to reduce the value to 7, but this value should never be reduced below 6. Reducing this value has diminishing returns, meaning that the difference between 8 and 7 is far larger than the difference between 7 and 6, and so on. The exact calculation to obtain the tick frequency for an entity is: freq = (distanceToPlayer^2) / (2^value), where value is this configuration setting.

dab.max-tick-freq: No matter what the result of the aforementioned calculation is, entities will never be ticked less frequently than this often (in ticks). For example, if this is set to 20, then no matter how far an entity is, it will always be ticked at least once per second.

dab.blacklisted-entities: Use this configuration option to specify that certain entities should not be impacted by DAB. The format looks as follows:

dab:
  blacklisted-entities:
  - villager
  - hoglin

Flare

Flare is a fully featured profiler built in to Pufferfish. Flare is a paid product which can be purchased by subscribing to Airplane's patreon. Flare is also provided for Pufferfish Host customers, more details can be found here.

flare.url: The URL of the Flare server to use for profiling.

web-services.token: The token to use for authentication to the Flare server.