Skip to content

Hosting the resource pack

oddlama edited this page Dec 5, 2021 · 2 revisions

This guide will explain how to generate the required resource pack and how you can host it yourself. This is only required if you made changes to the language files, want to merge it with another resource pack, or if you just want to self-host it. Otherwise vane will automatically distribute the official resource pack for your version of vane.

1. Start server and generate resource pack

We will start the server once to generate all config files and to generate the resource pack. After starting your server, execute vane generate_resource_pack. After a success message is displayed, you may stop the server and continue with the next section.

CAREFUL: Being OP is not enough to execute /vane generate_resource_pack in-game, you would need either the vane.core.commands.vane or the vane.*.commands.* permission. At this stage it is probably fastest to just use the server console.


2. Adjust settings and distribute resource pack

You may now edit all vane-*/config.yml files to your preference. Also be sure to NEVER delete the storage.json files, unless you want to wipe your server. They contain dynamic plugin state such as portal locations, region settings, spawn location, user permissions, and a lot more. Have a look inside, if you are in doubt.

The generated resource pack from the last step will now be in the main folder of your server, where you will also find your paper.jar and your plugins/ folder.

It contains translated messages for all plugin messages and may also include some icons for the few custom items (if you use vane-trifles or vane-enchantments for example). Therefore, it is absolutely necessary for you and your players to use this resource-pack additionally to whatever you are using normally. It will not affect anything else in the game, just things provided by vane.

You generally have two options going forward. Either you manually give the resource pack to all your players, or you host it somewhere and let minecraft download it automatically when joining your server.

  • 2.A. Distribute manually

    Disable the resource pack distribution in vane-core/config.yml. The relevant configuration is called:

    resource_pack:
      # Enable resource pack distribution.
      # Default: true
      enabled: false     # <---- Set to false HERE

    You can skip to the next section now.

  • 2.B. Host it using Google Drive, Dropbox or a similar service

    Please follow this tutorial (Adding a Resource Pack to a Minecraft Server), until you have a shared link and a sha-1 sum, but DO NOT edit your server.properties. Instead follow the instructions below after the subsections.

  • 2.C. Host it using your own webserver

    Copy the vane-resource-pack.zip to a publicly accessible location on your webserver. As of version 1.16, minecraft has problems with https links, so make sure it is also accessible over http for the time being. Going forward you will need:

    • The link to your resource pack (e.g. http://example.com/vane-resource-pack.zip)
    • The sha-1 sum of the zip file (On Linux, execute: sha1sum vane-resource-pack.zip, on Windows use CertUtil -hashfile "C:\Users\path\to\vane-resource-pack.zip" SHA1 in the cmd)

Continue by editing vane-core/config.yml. We will now enable the built-in resource-pack distributor. The advantage of using the vane distribution instead of server.properties is that it will wait until the client has fully loaded the pack, before it starts sending messages. This prevens messages from being interpreted by the client before it has a chance to translate it. (Could cause strange messages in the chat like {vane_admin.chat}).

vane-core/config.yml:

resource_pack:
  custom_resource_pack:
    enabled: true

    # Resource pack SHA-1 sum. Required to verify
    # resource pack integrity.
    sha1: "c3514d0b2d714ec78013b1edaf44d7e5b96d1de9"    # <---- Enter your sha-1 sum here

    # URL to an resource pack. Will request players
    # to use the specified resource pack.
    url: "http://example.com/path/to/pack.zip"          # <---- Replace this with your link

  # ...

The next time you start your server, you should see a message like

[13:37:42 INFO]: [vane-core] Distributing resource pack from 'http://example.com/vane-resource-pack.zip' with sha1 <sha1sum>

which indicates that that your resourcepack will now be distributed.