Valkyrien Skies has a few built-in datapack systems that can be used to tweak its functionality or provide extra compat.
To start off with, you will need a datapack. The Minecraft wiki has a tutorial on the basics of setting one up here.
Valkyrien Skies currently has 3 datapack features. Being able to modify block properties (mass, friction, etc), being able to modify entity behaviour (teleported out the shipyard, or not. Commonly used for compat with modded entities), and being able to specify dimension properties (atmosphere and gravity, used by addons for calculations).
You can find a utility for creating these VS datapack files at https://cosmic-mod-generator.github.io
Block Properties
You can modify the weights of blocks already specified by Valkyrien Skies (you can see which weights it specifies here) by using the priority fields (like in the below example). Higher values have higher priority, with VS having a priority of 100. A priority of 101 is usually enough for most packs.
The files to specify block mass will be placed in your datapack as the following:<div class=“treeview”>
- (datapack name)
- pack.mcmeta
- data
- (datapack namespace)
- vs_mass
- (file name.json)
</div>
The file format is as follows:<div class=“treeview”>
(root list)
- (file name.json)
- vs_mass
- (datapack namespace)
- item
- “block” - namespace:name id of a block
- OR “tag” - namespace:name of a block tag
- “mass” - optional, specifies weight in kg of block
- “friction” - optional, specifies friction of block. Default is 0.5, ice is 0.05
- “elasticity” - optional, not implemented yet. Would define the “bounciness” of a block. “priority” - optional, specifies priority of weight. Should be 101 or more to override default VS values
- “no_collision” - optional, can be true or false. (false does nothing). True forces the block to not collide with/on ships, aka leaves, redstone links, etc.
- …
Note: If the “block” specifies a fluid instead of a normal block (e.g.minecraft:waterormymod:my_liquid), then “mass” will be treated as the liquid density, and “friction” will be treated as the drag coefficient. All other values (except priority) will be ignored.
An example file:
[
{
"block": "minecraft:block",
"mass": 0.0,
"priority": 101
},
{
"block": "mynamespace:myblock",
"friction": 0.0,
"no_collision": true
},
{
"tag": "namespace:myblocktag",
"mass": 0.0,
"friction": 0.0,
"elasticity": 0.0,
"priority": 101
}
]
You can get an example datapack here with all the values filled out, just make sure to replace the names when you make your own: example datapack download
To apply changes, you’ll need to restart minecraft.
Shipyard Entities
Most entities in the shipyard are automatically teleported to where they should be relative to the ship. However, this doesn’t work with all entities. Some entities (for example, paintings and item frames) need to stay in the shipyard for them to work properly. To account for this, VS allows you to specify certain entities to stay in the shipyard. This isn’t recommended for most entities, it won’t magically fix their pathfinding or anything and can often lead to more issues with them, but for some entities it’s just what they need.
The files to specify an entities handler will be placed in your datapack as the following:<div class=“treeview”>
- (datapack name)
- pack.mcmeta
- data
- (the entities namespace, aka the namespace of the mod that adds it)
- vs_entities
- (entity_name.json)
</div>You can get the entities namespace and name by looking at the “targeted entity” section of the F3 menu while looking at the entity (it will be written asnamespace:entity_name).
- (entity_name.json)
- vs_entities
- (the entities namespace, aka the namespace of the mod that adds it)
The file format is as follows:<div class=“treeview”>
(root tag)
- “handler” - “valkyrienskies:shipyard” or “valkyrienskies:default”
</div>
An example file:
{
"handler": "valkyrienskies:shipyard"
}
Currently in Valkyrien Skies there are only two handlers, valkyrienskies:shipyard and <code>valkyrienskies:default. Most entities are defaultby default, meaning they will be teleported outside the shipyard. There is one exception to this however. If the entity registry name (aka the name you use for the json file) hasseatorchair, or its class name contains SeatEntity, its default behavior will be shipyard instead. This is to try and add some 'automatic' compat with most modded seat entities. If this breaks one of your entities however, you can simply override this behavior for your entity by setting its handler to default`.
Dimension Properties
As of update 2.4.0, Valkyrien Skies has an atmospheric system. This means ships are affected by drag in the air, instead of simply moving forever if they have no gravity. 2.4.0 also introduces a unified per-dimension gravity system, so that addons don’t conflict with their own. These systems are both configurable with a datapack file.
The files to specify the dimension properties will be placed in your datapack as the following:<div class=“treeview”>
(datapack name)
- pack.mcmeta
- data
- (datapack namesapce)
- vs_dimension_parameters
- (file name.json)
</div>
- (file name.json)
- vs_dimension_parameters
- (datapack namesapce)
The file format is as follows:
<div class=“treeview”>
(root tag)
- “dimensionId” - The namespace:name of your dimension, but prefaced with
minecraft:dimension:. For example,minecraft:dimension:minecraft:overworldorminecraft:dimension:ad_astra:mars - “maxYPos” - The maxiumum height at which there is atmosphere. Set to -1 for no atmosphere at all
- “seaLevel” - The maximum height at which the atmosphere is full-strength. Ignored if maxYPos is -1
- “gravity” - Array of 3 numbers, specifying the gravity for each axis. For example,
[0.0, -10.0, 0.0]is overworld gravity. - “priority” - A number priority, specifying if this should override another pack. VS uses a priority of -1, anything higher than that will override.
</div>
An example file:
{
"dimensionId": "minecraft:dimension:minecraft:overworld",
"maxYPos": 1000,
"seaLevel": 62,
"gravity": [0.0, -10.0, 0.0],
"priority": 2
}