Documentation for changes in API/2.6.2 (#62)

* Document latest Geyser changes:
- remote resource packs

* Update/Finish pack docs

* small typo fixes

* Update page content

* fix build

* Update supported Bedrock version
This commit is contained in:
chris authored and GitHub committed 2025-03-25 16:49:28 +01:00
1 parent 5c377d82c6
commit 9b72dff649
7 files changed
+114 -8

No files matched your search

+1
View File
@@ -99,6 +99,7 @@ const sidebars: SidebarsConfig = {
id: 'geyser/custom-resource-packs'
},
items: [
'geyser/packs',
'geyser/custom-items',
'geyser/custom-blocks',
'geyser/custom-skulls',
+3 -3
View File
@@ -1,9 +1,9 @@
{
"bedrock": {
"supported": "1.21.40-1.21.60",
"supported": "1.21.40-1.21.70",
"latest": {
"id": 776,
"name": "1.21.60"
"id": 786,
"name": "1.21.70"
}
},
"java": {
+1 -1
View File
@@ -97,7 +97,7 @@ The skin package contains some records representing skin data. If you want to ch
#### [Pack](https://github.com/GeyserMC/Geyser/tree/master/api/src/main/java/org/geysermc/geyser/api/pack) {#pack}
The pack package contains classes and interfaces related to resource packs in Geyser. You can create custom resource packs and send them to individual sessions before they log in using the [SessionLoadResourcePacksEvent](https://github.com/GeyserMC/Geyser/blob/master/api/src/main/java/org/geysermc/geyser/api/event/bedrock/SessionLoadResourcePacksEvent.java).
If you wish to send a resource pack to all sessions, you can use the [GeyserLoadResourcePacksEvent](https://github.com/GeyserMC/Geyser/blob/master/api/src/main/java/org/geysermc/geyser/api/event/lifecycle/GeyserLoadResourcePacksEvent.java).
If you wish to send a resource pack to all sessions, you can use the [GeyserDefineResourcePacksEvent](https://github.com/GeyserMC/Geyser/blob/master/api/src/main/java/org/geysermc/geyser/api/event/lifecycle/GeyserDefineResourcePacksEvent.java).
Packs can be created using a [PackCodec](https://github.com/GeyserMC/Geyser/blob/master/api/src/main/java/org/geysermc/geyser/api/pack/PackCodec.java), such as the provided [PathPackCodec](https://github.com/GeyserMC/Geyser/blob/master/api/src/main/java/org/geysermc/geyser/api/pack/PathPackCodec.java).
This allows you to load a Bedrock resource pack from a file path:
+2 -2
View File
@@ -39,7 +39,7 @@ Then, restart Geyser (or the server Geyser runs on).
## Updating Extensions {#updating-extensions}
To update extensions, use the `update` folder within the extensions directory as follows:
1. Copy the updated versions of your extension jars into the `update` folder inside the extensions directory.
1. Copy the updated versions of your extension jars into the `update` folder inside the `extensions` directory.
2. On the next server or application restart, any extensions in the `update` folder will automatically replace the corresponding extensions in the main extensions directory. If an extension is new, it will be added.
3. If an update fails, it will be logged, and the server/application will proceed with loading extensions as usual. You can review the logs to address any issues.
@@ -54,7 +54,7 @@ Geyser recognizes extensions when they have a file called `extension.yml` in the
id: exampleid
name: ExampleExtension
main: org.geyser.extension.exampleid.ExampleExtension
api: 2.4.1
api: 2.6.2
version: 1.0.0
authors: [ExampleAuthor]
```
+2 -2
View File
@@ -32,7 +32,7 @@ Add Geyser's API codebase as a dependency:
<dependency>
<groupId>org.geysermc.geyser</groupId>
<artifactId>api</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.6.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
@@ -40,7 +40,7 @@ Add Geyser's API codebase as a dependency:
**Gradle**
```groovy
dependencies {
compileOnly('org.geysermc.geyser:api:2.6.1-SNAPSHOT')
compileOnly('org.geysermc.geyser:api:2.6.2-SNAPSHOT')
}
```
@@ -28,6 +28,10 @@ The Geyser specific properties are prioritized over the plugin properties!
- ```server``` means to match the bind address of the TCP server
- any other string will be used as-is for the bind address.
- ```-DgeyserBroadcastPort=19132```
- This can be used in cases where the port Geyser runs on does not match the port players use to connect to (e.g. due to port forwarding routings).
- When not set or set to 0, it defaults to the same port that Geyser runs on
## Disabling warnings and advanced configuration {#disabling-warnings-and-advanced-configuration}
You may disable some warnings that may be printed to the console by using the following command line arguments. The values shown are the defaults used by Geyser, unless otherwise noted.
+101
View File
@@ -0,0 +1,101 @@
---
title: Using Resource Packs with Geyser
description: This page explains how to use resource packs with Geyser.
---
# Introduction
Geyser supports sending Bedrock edition resource packs to connecting Bedrock clients.
However, Geyser does not convert resource packs from the Java Edition format into the Bedrock edition format.
Resource packs offer a range of customization options. Just like on Java, they can be used for a wide variety of things:
- Texture Modifications: Resource packs can change the look of blocks, items, and entities, providing a unique visual experience.
- Sound Changes: Custom sound effects or music tracks can be added to create a more immersive atmosphere.
- UI Enhancements: Resource packs can modify the user interface - a popular example would be providing a dark mode UI option.
... and much more!
# Using resource packs
### Sending local packs
The easiest way to send resource packs to Bedrock players is by putting the Bedrock edition resource pack, either as a `.zip` or `.mcpack` file, into Geyser's `packs` folder.
Location of the 'packs' folder:
- Fabric/NeoForge: `/config/Geyser-<platform>/packs/`
- Geyser Standalone: `/packs/` at the root directory
- Other platforms: `/plugins/Geyser-<platform>/packs/`
After restarting the server (or reloading Geyser), players that connect will receive all packs that are in that folder.
### Remote pack urls (accessible using the Geyser API)
As an alternative to sending local packs, you can also send resource packs by sending Bedrock players a link to download the packs from.
This works similarly to Java edition's pack downloading. However, there are a few key limitations:
- The link must be a direct link to the resource pack download (it will follow redirects, but those must result in a file download)
- The Content-Length header must specify the exact file size.
- The Content-Type application header must be set to `application/zip`.
Geyser will download your configured remote resource packs once on boot, and warn you if any of these conditions are not met.
It is unfortunately not possible to bypass these, as these are restrictions imposed by the Bedrock client.
To verify headers manually, curl the website and check the values.
For example:
`curl -I -L https://download.geysermc.org/v2/projects/geyseroptionalpack/versions/1.0.10/builds/11/downloads/geyseroptionalpack` returns the following:
- `-I`: This option tells curl to fetch the HTTP response headers in the output.
- `-L`: Ensures that curl follows redirects
The output for this shows the following:
```shell
HTTP/1.1 200 OK
Date: Wed, 03 Jul 2024 23:03:06 GMT
Content-Type: application/zip
Content-Length: 95400
Connection: keep-alive
access-control-allow-methods: GET
access-control-allow-origin: *
Cache-Control: public, s-maxage=1209600
content-disposition: attachment; filename="=?UTF-8?Q?GeyserOptionalPack.mcpack?="; filename*=UTF-8''GeyserOptionalPack.mcpack
etag: "0258409cde3a2906e1085490fa5b10b77"
last-modified: Wed, 03 Jul 2024 08:42:41 GMT
CF-Cache-Status: HIT
Age: 21500
Accept-Ranges: bytes
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=DUpNVi9R96y13%2BlJm%2BNTpDLvSt9bw9CFDUh8Qwhpb9SsqjJbuInBGtSM5hiM2dGbSGkUccP4KvSqqD%2FCKrrcQ9ur5at5G0u8FrfooVTKLP%2B4MwGoUl29DwlxeMVg6tX36RjjICmV97M4FlErCZEe%2F3gM%2FA%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 89da81ca69c63735-FRA
alt-svc: h3=":443"; ma=86400
```
This shows that the content-length is indeed set correctly, and that the content type indeed is `application/zip`.
Further, Geyser will attempt to read the `ETag` to see if the content has changed. To query that, you can use the following:
`curl -I -L -v https://download.geysermc.org/v2/projects/geyseroptionalpack/versions/1.0.10/builds/11/downloads/geyseroptionalpack 2>&1 | grep ETag`
Alternatively, just using the `-v` header will turn on verbose mode that would also display the etag.
# Common questions
- **Does Geyser support behavior packs/add-ons?** <br />
No. These would require modifications on the Java server side, which isn't possible when Geyser is used on a proxy.
However, many things that are possible with add-ons or behavior packs can be done with Geyser's API - such as [custom items](/wiki/geyser/custom-items)
or [custom blocks](/wiki/geyser/custom-blocks).
- **Does Geyser convert Java edition resource packs?** <br />
Not currently. For now, you need to manually create a Bedrock edition resource pack equivalent.
- **Can I allow players to choose resource packs themselves?** <br />
On most Bedrock platforms (except consoles), players are able to download and install resource packs on the client.
There is also a Geyser extension, [PickPack](https://github.com/onebeastchris/PickPack) that uses the Geyser API to allow all Bedrock players to choose from a set of resource packs.
- **On proxy setups: Are per-backend-server resource packs possible?** <br />
This unfortunately is not possible natively, as Bedrock edition only allows removing and adding packs when connecting initially to the server.
However, with the usage of the transfer packet, it is possible to instruct the Bedrock client to re-connect to the server, and to apply changes then.
For per-server-packs, you can use the unofficial [GeyserPackSync](https://github.com/onebeastchris/GeyserPackSync) plugin.
- **Does Geyser have an API to send resource packs?** <br />
Yes! See the [Geyser API docs](/wiki/geyser/api/) for more info on that. There is a `SessionLoadResourcePacksEvent` to determine which
packs are sent to each connecting player, or the more general `GeyserDefineResourcePacksEvent` that defines the packs all users receive.
- **Can I use subpacks or specify the load order of resource packs**? <br />
You can! However, this feature requires you to use the Geyser API.