1. Starting - lixxir/VMinus GitHub Wiki
Getting Started
File Locations
All VMinus files are nicknamed "visions" short for re-visions. Dependent on what you are modifying, they are located in different directories:
FOR CONFIGS:
- Item visions go in config/visions/items
- Block visions go in config/visions/blocks
- Entity visions go in config/visions/entities
- Effect visions go in config/visions/effects
- Enchantment visions go in config/visions/enchantments
- Creative Tab visions go in config/visions/creative_tabs
FOR DATAPACKS:
- Item visions go in data/visions/items
- Block visions go in data/visions/blocks
- Entity visions go in data/visions/entities
- Effect visions go in data/visions/effects
- Enchantment visions go in data/visions/enchantments
- Creative Tab visions go in data/visions/creative_tabs
You can also create sub-folders inside these directories for better organization.
Creating the File
For demonstration purposes, an item will be modified. The first file would be located at config/visions/items (if you're using a datapack, it is located at data/visions/items). Start by creating a file in that location with a .json extension. The file can then be opened in any text editor to begin adding functionality. However, Visual Studio is recommended as it will highlight invalid JSON syntax.
Deciding what the Vision Applies To
Once the file is open, the next step is deciding what the vision applies to. Once it is decided what the vision applies to, create a key-value pair. In this instance, the key is defined as "item", and the value is defined as "minecraft:diamond".
{
"item": "minecraft:diamond"
}
For items the key is "item". If you modifying multiple items it would be "items", but for blocks it would be "block" / "blocks" and so on.
Defining Vision Properties
Next, decide what properties should be modified. In this case, "max_damage", "has_glint", and "max_stack_size" properties will be changed. All of these properties would be formatted as such:
{
"item": "minecraft:diamond",
"max_damage": 512,
"has_glint": true,
"max_stack_size": 1
}
For future reference, "max_stack_size" and "max_damage" are considered integer properties, while "has_glint" is considered a boolean property.
If all steps are followed correctly, after reloading the world / datapacks, the diamond should have 512 max damage, glint like an enchantment, and only be stackable to one.
If other properties need to be changed, check out the other wiki pages on properties. If you want to change other features like blocks or entities, check out those ones too.
Applying Vision to Multiple Features
Lists
If you wish to apply visions to multiple features without repeating code there are multiple ways to do so. In this example, an "items" array is created which stores both the "minecraft:diamond" value and the "minecraft:diamond_sword" value. This will cause the vision to apply to both items (or anything specified in the list).
{
"items": [
"minecraft:diamond",
"minecraft:diamond_sword"
],
"max_damage": 512,
"has_glint": true,
"max_stack_size": 1
}
The name of the lists is the plural form of the feature, E.g. "items", "blocks", "entities", etc. To add more entries, you add values inside the list in quotes, and separate them with commas.
Tags
Minecraft uses a tag system to group similar items together under one value. For instance, the "#minecraft:swords" tag contains all tagged swords. Below is an example of applying a vision to a diamond and the swords tag.
{
"items": [
"minecraft:diamond",
"#minecraft:swords"
],
"has_glint": true
}
Here is another example where you can optionally leave out the hashtag and instead specify "tag" as the key.
{
"tag": "minecraft:swords",
"has_glint": true
}
Wildcard Notation
If you want a vision to apply to a large amount of features, but there is no tag to do so, wildcard notation can provide the ability to do so. Asterisks can placed before text to check if the features registry name ends in the text (E.g. "minecraft:sword" applies to every feature which has it's registry name ending in "sword"). Asterisks can be placed after the text to check if the features registry name begins in the text (E.g. "minecraft:iron" applies to every feature which has it's registry name beginning in "iron"). Below is an example of a vision that applies to "minecraft:string" and any Minecraft feature which name ends in slab.
{
"items": [
"minecraft:string",
"minecraft:*slab"
],
"has_glint": true
}
Optional Namespace Specification
If you want to specify ANY feature with a provided name regardless of its name space, then you can optionally leave out the namespace of the feature. Below is an example of a vision which applies to silver ingots in ANY mod, and any feature which registry name ends in slab.
{
"items": [
"silver_ingot",
"*slab"
],
"has_glint": true
}
A convenient use-case for this is to not specify any namespaces for minecraft items, as typically no mods will register an item with the same registry name as a vanilla item.
All qualifier
If you want a vision to apply to every feature in its vision category, you can specify "all".
{
"item": "all"
"max_stack_size": 1
}
That is all for the tutorial. If you wish to add other properties or look at other more advanced features like conditions, then check out the rest of the wiki!