resourcepack.ai
DOCS

How a pack works

IDs and namespaces

Everything RP Engine holds (an item, a sound, a model, a dialog) has one ID. You use it in commands (/rp give mypack:ruby), in other plugins' configs and in the API. It is written like a Minecraft resource location (namespace:path):

mypack:ruby
mypack:furniture/chair

Lowercase a-z, digits and _ . - / (no / in the namespace). An uppercase letter is refused at load rather than lowercased, because the client would treat MyPack and mypack as two different things.

The ID is the reference#

The ID goes straight into the item's model reference, and the file paths follow from it:

mypack:ruby  →  assets/mypack/items/ruby.json       the item definition
             →  assets/mypack/models/item/ruby.json the model
             →  assets/mypack/textures/item/ruby.png yours

Only the texture is yours to ship. The other two files are generated.

Before Minecraft 1.21.4

From 1.21.4 the game picks an item's model by name, so nothing is allocated and two packs from different people work side by side with nothing to configure.

Before 1.21.4 the game picks a model by number. RP Engine allocates the numbers for you and keeps them in plugins/RPEngine/model-numbers.json. Never edit or delete that file, and expect that packs from two sources can clash. Minecraft versions has the detail.

Namespaces#

The namespace is the folder name under content/, and the path is the key in a definition file. ruby: in content/mypack/items/gems.yml is mypack:ruby. There is nothing to declare or register.

Shader objects and dialogs from a Studio pack have the namespace studio, as in /rp shader studio:my_hud.

Two packs collide only if they use the same folder name, and that is caught at load with both sources named.

Reserved#

minecraft and realms are refused.

Content there would point at vanilla's own assets. To replace vanilla art, use overrides/ instead.

Store IDs, never what they resolve to#

When another plugin's config refers to RP Engine content, write the ID. An ID never changes. What it resolves to (a model path, a character) is worked out at build time and can move when other content changes.

Icons are the case that bites: they are given characters in ID order, so adding one shifts every icon after it. A config that saved the character instead of the ID then shows a different picture. Use the %rpengine_icon_...% placeholder instead.