All Mods Resource Packs Data Packs Shaders Modpacks Plugins
env.json

env.json

by FirstMegaGame4 • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

MModding

env.json

env.json logo

Supports

Supports Fabric Loader Supports Quilt Loader

Requirements

Requires Fabric API

Concept

env.json is a Minecraft Library introducing a new sub json file extension format, with the goal of redirecting minecraft resources to other ones based on the environment context.

Implementations

env.json doesn't provide these redirections directly, but only the operations around env.json files and their resource reload management.

There is currently two official implementations of env.json:

Mod Identifier: env-driven-assets.

Environments: Client

Applies env.json operations to Minecraft Vanilla asset types.

Mod Identifier: env-driven-data.

Environments: Common & Server

Applies env.json operations to Minecraft Vanilla data types.

The env.json Format

[
  {
    "rules": [ // the primary set of rules, is an "any" type
      {
        "type": "sequence", // all rules in the sequence must pass
        "rule": [] // the rules
      },
      {
        "type": "any", // passes if at least one rule passes
        "rule": [] // the rules
      },
      {
        "type": "not", // reverses the rule
        "rule": { // the rule
          "type": "...",
          "rule": "..."
        }
      },
      {
        "type": "dimension", // passes if the current dimension matches this one
        "rule": "minecraft:overworld" // the dimension, can also be a tag
      },
      {
        "type": "biome", // passes if the current biome matches this one
        "rule": "minecraft:plains" // the biome, can also be a tag
      },
      {
        "type": "x_coord", // passes if the following operations on the x-axis are valid
        "rule": {
          "comparator": "==", // must be <, >, ==, <=, >=, =< or =>
          "value": "100" // must be an integer
        }
      },
      {
        "type": "y_coord", // passes if the following operations on the y-axis are valid
        "rule": {
          "comparator": "==", // must be <, >, ==, <=, >=, =< or =>
          "value": "100" // must be an integer
        }
      },
      {
        "type": "z_coord", // passes if the following operations on the z-axis are valid
        "rule": {
          "comparator": "==", // must be <, >, ==, <=, >=, =< or =>
          "value": "100" // must be an integer
        }
      },
      {
        "type": "submerged", // passes if the current context is surrounded by water or not
        "rule": true // true for "if it is submerged" and false for "if it is not submerged"
      },
      {
        "type": "sky", // passes if the context is above the sky limit, at or below
        "rule": "at" // must be "above", "at" or "below"
      },
      {
        "type": "water", // passes if the context is above the water level, at or below
        "rule": "at" // must be "above", "at" or "below"
      },
      {
        "type": "void", // passes if the context is above the void limit, at or below
        "rule": "at" // must be "above", "at" or "below"
      }
    ],
    "result": "minecraft:block/stone" // the redirected resource
  }
]

The file must be registered under this format: redirected_resource_name-redirected_resource_extension.env.json.

Usage For Developers

In your build.gradle

repositories {
    // ...
    maven { url 'https://jitpack.io' }
}

// ...

dependencies {
    // ...
    modImplementation "com.mmodding:env.json:${theMostBeautifulVersionYouCanFind}"
}

You can now get your EnvJson object from a Resource object thanks to ExtendedResource#of(Resource)#getEnvJson or parse it with EnvJson#parse(Path) or EnvJson#parse(InputStream).

Badge For Developers

Requires env.json

[<img src="https://goldmedia.top/uploads/gallery/env-json_desc_6_a86caeb9.png" width="256" alt="Requires env.json">](https://modrinth.com/mod/env.json)

Promotion

ModFest 1.20

How to Install env.json (Mod)

env.json by FirstMegaGame4 is verified for Fabric, Quilt across Minecraft versions 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1 (latest release: 0.4.3-beta, file size: 90 KB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1) and platform (Fabric, Quilt).
  2. Make sure you have the compatible loader or environment installed for Fabric, Quilt.
  3. Move the downloaded env.json file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.x
Fabric Quilt
last yr. 1
1.21 1.20.x
Fabric Quilt
last yr. 1
1.20.x
Fabric Quilt
last yr. 1
1.20.5
Fabric Quilt
last yr. 1
1.20.x
Fabric Quilt
last yr. 1
1.20.4
Fabric Quilt
last yr. 1
1.20.4
Fabric Quilt
last yr. 1
1.20.4
Fabric Quilt
last yr. 1
1.20.4
Fabric Quilt
last yr. 1
[0.4.3-beta] 0.4.3-beta by FirstMegaGame4 on Sep 09, 2024
Download
Add 1.21 Support.
[0.4.2-beta] 0.4.2-beta by FirstMegaGame4 on Jun 16, 2024
Download
Add 1.21 Support.
[0.4.1-beta] 0.4.1-beta by FirstMegaGame4 on Apr 30, 2024
Download
Add 1.20.6 Support.
[0.4.0-beta] 0.4.0-beta by FirstMegaGame4 on Apr 23, 2024
Download
  • Port to 1.20.5.
  • License Update.
  • Moved to MModding ownership.
[0.3.1-beta] 0.3.1-beta by FirstMegaGame4 on Jan 02, 2024
Download
Add 1.20.1, 1.20.2 and 1.20.3 Support.
[0.3.0-beta] 0.3.0-beta by FirstMegaGame4 on Dec 31, 2023
Download
Add "AT" Field for Localizations.
[0.2.1-beta] 0.2.1-beta by FirstMegaGame4 on Dec 31, 2023
Download
Downgrade Fabric Loader.
[0.2.0-beta] 0.2.0-beta by FirstMegaGame4 on Dec 31, 2023
Download
Add NotEnvJsonRule.
[0.1.0-beta] 0.1.0-beta by FirstMegaGame4 on Dec 30, 2023
Download
Initial Version.
env.json Icon
Download env.json
Select game version
Select platform