What are you searching for?

Prickle
Prickle

Prickle

Prickle is a JSON based configuration file format brought to Minecraft.

download 6.3M Downloads · favorite 336 Followers · Updated 1 week ago
Fabric Forge Library Neoforge Quilt Storage Utility 1.21 1.21.1 1.21.2 1.21.3 1.21.4 +7 more

Versions

inventory_2
PrickleMC-fabric-1.21.11-21.11.1

21.11.1 · 1 week ago · 85.19 KB

Release download
Fabric Quilt 1.21.11
inventory_2
PrickleMC-neoforge-1.21.11-21.11.1

21.11.1 · 1 week ago · 82.81 KB

Release download
Neoforge 1.21.11
inventory_2
PrickleMC-fabric-1.21.10-21.10.2

21.10.2 · 3 months ago · 85.21 KB

Release download
Fabric Quilt 1.21.10
inventory_2
PrickleMC-neoforge-1.21.10-21.10.2

21.10.2 · 3 months ago · 82.83 KB

Release download
Neoforge 1.21.10
inventory_2
PrickleMC-fabric-1.21.9-21.9.1

21.9.1 · 4 months ago · 85.19 KB

Release download
Fabric Quilt 1.21.9

About

Prickle is a JSON based config format. This mod allows the format to be used in Minecraft! For technical documentation please see the GitHub page.

FaQ

What benefits does Prickle offer?
Prickle is based on JSON but adds several useful features like comments and decorators. Prickle is 100% backwards compatible with JSON and supports all of its features, tools, and syntax highlighting.

Why is this called Prickle?
Prickle is the collective noun for a group of hedgehogs. Hedgehogs are one of my favourite animals and I think they are a fitting metaphor for config files. For example, they both may seen intimidating at first but can be nice once you get to know and understand them.

Why not use an existing format?
In the past I have used JSON for my config files but there were several issues such as the lack of comments and default values. Prickle adds these features to JSON while remaining 100% backwards compatible. I have tried other formats like TOML but was disappointed with a lot of their Java implementations. They often lack features I feel are important, have serious bugs, and are no longer being maintained. Minecraft already uses JSON for datapacks and commands, making it a familiar choice for most players.

Format Specifications

In Prickle property values are wrapped in a JSON object. This allows metadata like comments to be attributed to that property.

For example a standard JSON file would look like this.

{
  "database_host": "192.168.1.222"
}

The same JSON as a Prickle file would look like this.

{
  "database_host": {
    "//": "The IP address of the database to connect to.",
    "value": "192.168.1.222"
  }
}

Comments

The // key is reserved for comments. Comments are only used to provide additional context to the reader and should never influence how the file is parsed. Comments can be a JSON string or an array of strings for multiline comments.

{
  "database_host": {
    "//": [
      "The IP address of the database to connect to.",
      "The port can be defined at the end using an :"
    ],
    "value": "192.168.1.222:1273"
  }
}

Decorators

Decorators are named comments that convey a specific attribute of the property. A common example of a decorator is //default which can be used to display the default value of the property. Like comments, decorators have no influence on how the file is parsed, they only describe how the property will be parsed.

You may encounter some of the following decorators in prickle files.

  • //default - The default value of the property.
  • //reference - A resource that can be used to learn more, like a link to a wiki page.
  • //range - The acceptable range for a value. For example >=5.
  • //regex - A regex pattern that the value must match.
  • //empty-allowed - If the value can be empty or not. (default is true).

Sponsors

Nodecraft sponsor banner

This project is sponsored by Nodecraft. Use code DARKHAX for 30% off your first month of service!

open_in_new View on Modrinth
Compatibility
Client: Required Server: Required
gavel LGPL-2.1-only

Conversation

What are your thoughts?

Related projects

Library
Fabric API
Fabric API

by modmuss50

Lightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.

download 127.9M
favorite 27,365
Library
Cloth Config API
Cloth Config API

by shedaniel

Configuration Library for Minecraft Mods

download 94.0M
favorite 13,653
Optimization Utility
FerriteCore
FerriteCore

by malte0811

Memory usage optimizations

download 84.0M
favorite 12,704
Utility
Mod Menu
Mod Menu

by Prospector

Adds a mod menu to view the list of mods you have installed.

download 77.4M
favorite 22,097
lock Cookie consent

SkinMC uses cookies to provide functionality and features.