diff --git a/config-specs/paper/paper-global.yml b/config-specs/paper/paper-global.yml index 2c594519..dae97309 100644 --- a/config-specs/paper/paper-global.yml +++ b/config-specs/paper/paper-global.yml @@ -88,17 +88,20 @@ collisions: however, in the majority of cases, this is a worthy tradeoff commands: fix-target-selector-tag-completion: + vanilla: "false" default: "true" description: >- Workaround for a client bug preventing entity type tag suggestions from functioning in target selectors. Resolves [MC-235045](https://bugs.mojang.com/browse/MC-235045) suggest-player-names-when-null-tab-completions: + vanilla: "false" default: "true" description: >- Instructs the server to return a list of players when tab-completing when there are no other completions available time-command-affects-all-worlds: + vanilla: "true" default: "false" description: >- Whether the /time command should act on all worlds or just the sender's @@ -117,9 +120,11 @@ console: description: Whether the console command sender has all permissions item-validation: display-name: + vanilla: "2147483647" default: "8192" description: The maximum length of an item's display name in characters lore-line: + vanilla: "2147483647" default: "8192" description: The maximum length of a lore line in characters resolve-selectors-in-books: @@ -129,16 +134,20 @@ item-validation: creative mode will be able to crash the server in yet another way book: author: + vanilla: "2147483647" default: "8192" description: The maximum length of a book's author in characters page: + vanilla: "2147483647" default: "16384" description: The maximum length of a book's page in characters title: + vanilla: "2147483647" default: "8192" description: The maximum length of a book's title in characters book-size: page-max: + vanilla: disabled default: "2560" description: >- The max number of bytes a single page in a book can contribute to the @@ -197,6 +206,7 @@ messages: Formatted using [MiniMessage](https://docs.advntr.dev/minimessage/). misc: fix-entity-position-desync: + vanilla: "false" default: "true" description: >- Causes the server to lose the same precision that the client does for @@ -208,6 +218,7 @@ misc: Loads bukkit's permission.yml file before plugins, allowing them to check information set there immediately on enable max-joins-per-tick: + vanilla: "2147483647" default: "5" description: >- Sets the maximum amount of players that may join the server in a single @@ -265,9 +276,11 @@ packet-limiter: DROP which will ignore packets over the limit, and KICK which will kick players for exceeding the limit interval: + vanilla: "0.000001" default: "7.0" - description: "The interval, in seconds, for which max-packet-rate should apply" + description: The interval, in seconds, for which max-packet-rate should apply max-packet-rate: + vanilla: "999999.0" default: "500.0" description: The number of packets allowed per player within the interval kick-message: @@ -338,6 +351,7 @@ scoreboards: will incur a performance degradation spam-limiter: incoming-packet-threshold: + vanilla: "2147483647" default: "300" description: >- Sets the threshold at which the server will consider incoming packets spam @@ -409,16 +423,19 @@ unsupported-settings: The following settings are provided by Paper but are not officially supported. Use them at your own risk and they may be removed at any time. allow-headless-pistons: + vanilla: "true" default: "false" description: >- Whether the server should allow the creation of headless pistons. These are often used to break permanent blocks allow-permanent-block-break-exploits: + vanilla: "true" default: "false" description: >- Whether unbreakable blocks can be broken with Vanilla exploits. This includes bedrock, end portal frames, end portal blocks, and more allow-piston-duplication: + vanilla: "true" default: "false" description: >- Whether to allow duplication of TNT, carpets, and rails. This does not @@ -431,6 +448,7 @@ unsupported-settings: standing bug in Paper. Enabling this option means that the damage tick will be skipped, which may result in rapid damage on shields due to the missing invulnerability. perform-username-validation: + vanilla: "false" default: "true" description: >- Whether the server should validate usernames. While this may allow users @@ -443,6 +461,7 @@ unsupported-settings: supports ZLIB, GZIP and NONE, where None namely allows for compression to be disabled allow-unsafe-end-portal-teleportation: + vanilla: "true" default: "false" description: >- This setting allows for exploits related to end portal teleportation to be diff --git a/config-specs/paper/paper-world-defaults.yml b/config-specs/paper/paper-world-defaults.yml index ef73dacc..def714ef 100644 --- a/config-specs/paper/paper-world-defaults.yml +++ b/config-specs/paper/paper-world-defaults.yml @@ -108,6 +108,7 @@ chunks: ticks-per.autosave in bukkit.yml for this world. By default it will use the global ticks-per.autosave in bukkit.yml delay-chunk-unloads-by: + vanilla: 0s default: 10s description: >- Delays chunk unloads by the specified time. Formatted as a duration with a @@ -132,6 +133,7 @@ chunks: The timer is increased when chunks are kept loaded because of player activity max-auto-save-chunks-per-tick: + vanilla: "200" default: "24" description: >- The maximum number of chunks the auto-save system will save in a single @@ -148,6 +150,7 @@ chunks: This may have a performance impact collisions: allow-player-cramming-damage: + vanilla: "true" default: "false" description: >- Allows players to take damage from cramming when colliding with more @@ -165,6 +168,7 @@ collisions: also be counted towards the entity cramming limit so that they can take suffocation damage max-entity-collisions: + vanilla: "2147483647" default: "8" description: >- Instructs the server to stop processing collisions after this value is @@ -251,6 +255,7 @@ entities: default: "false" description: "Removes AI from pigmen spawned via nether portals " only-merge-items-horizontally: + vanilla: "true" default: "false" description: >- Prevents merging items that are not on the same y level, preventing potential @@ -261,9 +266,11 @@ entities: Makes parrots "sticky" so they do not fall off a player's shoulder when they move. Use crouch to shake them off phantoms-do-not-spawn-on-creative-players: + vanilla: "false" default: "true" description: "Disables spawning of phantoms on players in creative mode " phantoms-only-attack-insomniacs: + vanilla: "false" default: "true" description: "Prevents phantoms from attacking players who have slept " piglins-guard-chests: @@ -360,6 +367,7 @@ entities: H**; the item id will appear at the bottom of the tooltip that appears when you hover over an item count-all-mobs-for-spawning: + vanilla: "true" default: "false" description: >- Determines whether spawner mobs and other misc mobs are counted towards @@ -429,6 +437,7 @@ entities: spawn egg duplicate-uuid: mode: + vanilla: "NOTHING" default: SAFE_REGEN description: >- Specifies the method the server uses to resolve entities with @@ -448,6 +457,7 @@ entities: If multiple entities with duplicate UUIDs are within this many blocks, saferegen will delete all but 1 of them filter-bad-tile-entity-nbt-from-falling-blocks: + vanilla: "false" default: "true" description: >- Instructs the server to remove certain NBT data from falling blocks. @@ -455,6 +465,7 @@ entities: function correctly, but we do not recommend turning it off on a public server filtered-entity-tag-nbt-paths: + vanilla: "[]" # I don't know if we want this as it is kinda ugly in the actual page. I can change it to "[] " (will not be parsed as array) if it looks better. default: "[Pos, Motion, SleepingX, SleepingY, SleepingZ]" description: >- A list of NBT tags that will be removed from the EntityTag tag on items @@ -484,6 +495,7 @@ entities: despawned. The default value instructs the server to use the same default arrow despawn rate from spigot.yml that is used for all arrows per-player-mob-spawns: + vanilla: "false" default: "true" description: >- Determines whether the mob limit (in bukkit.yml) is counted per player @@ -818,6 +830,7 @@ fixes: value of disabled will disable this feature hopper: cooldown-when-full: + vanilla: "false" default: "true" description: >- Instructs the server to apply a short cooldown when the hopper is full, @@ -883,6 +896,7 @@ lootables: to new locations by breaking them via the likes of pistons. maps: item-frame-cursor-limit: + vanilla: "2147483647" default: "128" description: >- The number of cursors (markers) allowed per map. A large number of cursors @@ -999,6 +1013,7 @@ scoreboards: never on a team. Disabling this may slightly decrease the amount of time the server spends calculating entity collisions use-vanilla-world-scoreboard-name-coloring: + vanilla: "true" default: "false" description: >- Instructs the server to use the Vanilla scoreboard for player nickname @@ -1048,11 +1063,13 @@ tick-rates: for the names. Might change between updates! unsupported-settings: disable-world-ticking-when-empty: + vanilla: "true" default: "false" description: >- Stops the ticking of the world when there are no players or force loaded chunks present in the world. fix-invulnerable-end-crystal-exploit: + vanilla: "false" default: "true" description: >- If set to false, the creation of invulnerable end crystals will be diff --git a/config-specs/paper/server-properties.yml b/config-specs/paper/server-properties.yml index 609906ed..6f459216 100644 --- a/config-specs/paper/server-properties.yml +++ b/config-specs/paper/server-properties.yml @@ -145,6 +145,7 @@ op-permission-level: default: "4" description: "Sets the default permission level for ops when using /op. (Allowed values: 0, 1, 2, 3, 4)" pause-when-empty-seconds: + vanilla: "60" default: "-1" description: > How many seconds have to pass after no player has been online before the server is paused. diff --git a/config-specs/paper/spigot.yml b/config-specs/paper/spigot.yml index 4838af94..7ff58cb1 100644 --- a/config-specs/paper/spigot.yml +++ b/config-specs/paper/spigot.yml @@ -132,10 +132,12 @@ settings: description: Overrides the maximum for the maxAbsorption attribute. maxHealth: max: + vanilla: "1024.0" default: "2048.0" description: Overrides the maximum for the maxHealth attribute. movementSpeed: max: + vanilla: "1024.0" default: "2048.0" description: Overrides the maximum for the movementSpeed attribute. bungeecord: @@ -262,21 +264,26 @@ world-settings: to 0 for global (including cross-dimension). entity-activation-range: animals: + vanilla: "0" default: "32" description: The entity activation range for animals. flying-monsters: + vanilla: "0" default: "32" description: The entity activation range for flying monsters. ignore-spectators: default: "false" description: Whether spectators activate entities within range. misc: + vanilla: "0" default: "16" description: The entity activation range for misc entities. monsters: + vanilla: "0" default: "32" description: The entity activation range for monsters. raiders: + vanilla: "0" default: "64" description: The entity activation range for raiders. tick-inactive-villagers: @@ -358,6 +365,7 @@ world-settings: A limit of how many inactive villagers can be woken up on the same tick. water: + vanilla: "0" default: "16" description: The entity activation range for water mobs. entity-tracking-range: @@ -624,6 +632,7 @@ world-settings: default: "50" description: "This option does not operate, as it is disabled by a Paper patch." max-tnt-per-tick: + vanilla: "-1" default: "100" description: How many TNT to process per server tick. Set to 0 to disable. merge-radius: diff --git a/config-specs/paper/vanilla/paper-global.yml b/config-specs/paper/vanilla/paper-global.yml deleted file mode 100644 index 40364d4b..00000000 --- a/config-specs/paper/vanilla/paper-global.yml +++ /dev/null @@ -1,55 +0,0 @@ -commands: - fix-target-selector-tag-completion: - default: "false" - suggest-player-names-when-null-tab-completions: - default: "false" - time-command-affects-all-worlds: - default: "true" -item-validation: - book: - author: - default: "2147483647" - title: - default: "2147483647" - page: - default: "2147483647" - book-size: - page-max: - default: disabled - display-name: - default: "2147483647" - lore-line: - default: "2147483647" - resolve-selectors-in-books: - default: "true" -misc: - max-joins-per-tick: - default: "2147483647" - fix-entity-position-desync: - default: "false" -packet-limiter: - default: "" - description: >- - Vanilla has no packet limit by default (to disable it for all practical purposes set `all-packets.interval` to 0.000001 and `all-packets.max-packet-rate` to 999999.0, - but it's better for security to set more specific limits). It's not feasible to reach Paper's default packet limit with a Vanilla client. - This defaults to 500 packets per 7 seconds. If you want, you can override this setting for specific packets. -spam-limiter: - default: "" - description: >- - You may want to look into this for fast crafting. Vanilla has no spam limit (set the limits to 2147483647 for this), although it's not feasible to reach Paper's default spam limit with a Vanilla client. -unsupported-settings: - inline-docs-warning: - title: "Unsupported Settings" - message: >- - The following settings are provided by Paper, but are not officially - supported. They may be removed at any time, so use them at your own risk. - allow-headless-pistons: - default: "true" - allow-permanent-block-break-exploits: - default: "true" - allow-piston-duplication: - default: "true" - allow-unsafe-end-portal-teleportation: - default: "true" - perform-username-validation: - default: "false" diff --git a/config-specs/paper/vanilla/paper-world-defaults.yml b/config-specs/paper/vanilla/paper-world-defaults.yml deleted file mode 100644 index b4654224..00000000 --- a/config-specs/paper/vanilla/paper-world-defaults.yml +++ /dev/null @@ -1,47 +0,0 @@ -chunks: - delay-chunk-unloads-by: - default: "0s" - max-auto-save-chunks-per-tick: - default: "200" -collisions: - allow-player-cramming-damage: - default: "true" - max-entity-collisions: - default: "2147483647" - description: >- - The actual default value would be infinity. 2147483647 is the closest to infinity. -entities: - behavior: - only-merge-items-horizontally: - default: "true" - phantoms-do-not-spawn-on-creative-players: - default: "false" - phantoms-only-attack-insomniacs: - default: "false" - spawning: - count-all-mobs-for-spawning: - default: "true" - per-player-mob-spawns: - default: "false" - duplicate-uuid: - mode: - default: "NOTHING" - filter-bad-tile-entity-nbt-from-falling-blocks: - default: "false" - filtered-entity-tag-nbt-paths: - default: "" - description: "The default value is: []" -hopper: - cooldown-when-full: - default: "false" -maps: - item-frame-cursor-limit: - default: "2147483647" -scoreboards: - use-vanilla-world-scoreboard-name-coloring: - default: "true" -unsupported-settings: - disable-world-ticking-when-empty: - default: "true" - fix-invulnerable-end-crystal-exploit: - default: "false" diff --git a/config-specs/paper/vanilla/server-properties.yml b/config-specs/paper/vanilla/server-properties.yml deleted file mode 100644 index 16d8697b..00000000 --- a/config-specs/paper/vanilla/server-properties.yml +++ /dev/null @@ -1,2 +0,0 @@ -pause-when-empty-seconds: - default: 60 diff --git a/config-specs/paper/vanilla/spigot.yml b/config-specs/paper/vanilla/spigot.yml deleted file mode 100644 index 963aba5f..00000000 --- a/config-specs/paper/vanilla/spigot.yml +++ /dev/null @@ -1,27 +0,0 @@ -settings: - attribute: - maxHealth: - max: - default: "1024.0" - movementSpeed: - max: - default: "1024.0" -world-settings: - default: - entity-activation-range: - animals: - default: "0" - monsters: - default: "0" - raiders: - default: "0" - misc: - default: "0" - water: - default: "0" - villagers: - default: "0" - flying-monsters: - default: "0" - max-tnt-per-tick: - default: "-1" diff --git a/docs/paper/admin/how-to/get-to-vanilla.mdx b/docs/paper/admin/how-to/get-to-vanilla.mdx index fa99fe5a..6c507fb1 100644 --- a/docs/paper/admin/how-to/get-to-vanilla.mdx +++ b/docs/paper/admin/how-to/get-to-vanilla.mdx @@ -7,10 +7,10 @@ description: This page lists all changes that result in a different experience t import React from 'react'; import ConfigDocBlock from '@site/src/components/config/ConfigDocBlock'; -import VanillaWorldDefaults from '!!raw-loader!@site/config-specs/paper/vanilla/paper-world-defaults.yml' -import VanillaGlobalDefaults from '!!raw-loader!@site/config-specs/paper/vanilla/paper-global.yml' -import SpigotChanges from '!!raw-loader!@site/config-specs/paper/vanilla/spigot.yml' -import ServerProperties from '!!raw-loader!@site/config-specs/paper/vanilla/server-properties.yml' +import VanillaWorldDefaults from '!!raw-loader!@site/config-specs/paper/paper-world-defaults.yml' +import VanillaGlobalDefaults from '!!raw-loader!@site/config-specs/paper/paper-global.yml' +import SpigotChanges from '!!raw-loader!@site/config-specs/paper/spigot.yml' +import ServerProperties from '!!raw-loader!@site/config-specs/paper/server-properties.yml' Due to the way the Bukkit API is implemented in Paper, the gameplay experience between Vanilla and Paper can have inconsistencies. This can be furthered by efforts to fix bugs present in Vanilla Minecraft. @@ -31,16 +31,16 @@ Unfortunately, it currently is not possible to get a 100% Vanilla experience in ::: ## server.properties - + ## paper-world-defaults.yml - + ## paper-global.yml - + ## spigot.yml - + ## Further considerations diff --git a/src/components/config/ConfigDocBlock.tsx b/src/components/config/ConfigDocBlock.tsx index 2a3763b8..ba2c644a 100644 --- a/src/components/config/ConfigDocBlock.tsx +++ b/src/components/config/ConfigDocBlock.tsx @@ -130,11 +130,11 @@ const YamlNodeWithDescription = ({ separator, showAllDescriptions, defaultValue, + vanilla, }) => { const ignoreInitialRenderRef = useRef(false); const [showDescription, setShowDescription] = useState(showAllDescriptions); - - node.default = node.default || defaultValue; + node.default = vanilla ? node.vanilla : node.default || defaultValue; node.description = node.description || "N/A"; const checkForHash = () => { @@ -219,6 +219,7 @@ const YamlTreeNode = ({ showAllDescriptions, defaultValue, warning, + vanilla, }): ReactNode => { if (name === "inline-docs-warning") return null; @@ -275,22 +276,44 @@ const YamlTreeNode = ({ false, separator, showAllDescriptions, - defaultValue + defaultValue, + vanilla )} ); }; +const filterYamlNodeForVanilla = (node: any): any => { + if (node?.vanilla) { + return node; + } + + const filteredNode = {}; + for (const [key, value] of Object.entries(node)) { + if (typeof value === "object" && value !== null) { + const child = filterYamlNodeForVanilla(value); + if (child !== null) { + filteredNode[key] = child; + } + } + } + + return Object.keys(filteredNode).length > 0 ? filteredNode : null; +}; + const renderYamlData = ( data: unknown, parentKey: string, root = false, separator: string, showAllDescriptions: boolean, - defaultValue: string + defaultValue: string, + vanilla = false ): ReactNode => { const renderedNodes: JSX.Element[] = []; - + if (vanilla) { + data = filterYamlNodeForVanilla(data); + } for (const [key, value] of Object.entries(data)) { if (typeof value === "object" && value !== null) { if ( @@ -307,6 +330,7 @@ const renderYamlData = ( separator={separator} showAllDescriptions={showAllDescriptions} defaultValue={defaultValue} + vanilla={vanilla} /> ); } else { @@ -321,6 +345,7 @@ const renderYamlData = ( showAllDescriptions={showAllDescriptions} defaultValue={defaultValue} warning={"inline-docs-warning" in value ? value["inline-docs-warning"] : null} + vanilla={vanilla} /> ); } @@ -335,6 +360,7 @@ export default function Config({ separator = ": ", showDescriptions = false, defaultValue = "N/A", + vanilla = false, }): ReactNode { const [showAllDescriptions, setShowAllExpanded] = useState(showDescriptions); let ymlData = yaml.load(data); @@ -347,7 +373,7 @@ export default function Config({ > {showAllDescriptions ? "Collapse All" : "Expand All"} - {renderYamlData(ymlData, "", true, separator, showAllDescriptions, defaultValue)} + {renderYamlData(ymlData, "", true, separator, showAllDescriptions, defaultValue, vanilla)} );