Aetherium Wiki
Aetherium ▾
Version: Aetherium

Section 1: Setup & Applying Values

  1. Add Modrinth Maven to your repositories
repositories {
    exclusiveContent {
        forRepository {
            maven {
                name = "Modrinth"
                url = "https://api.modrinth.com/maven"
            }
        }
        filter {
            includeGroup "maven.modrinth"
        }
    }
}
  1. Add Aetherium as a dependency using its latest version under dependencies (latest version always provided)
dependencies {
    implementation "maven.modrinth:aetherium:latest_release"
}
  1. Create a new class anywhere as long as you register it with your Main class. (Example Provided)
package com.example.mod_id;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Aetherium implements ModInitializer {
	public static final String MOD_ID = "mod_id";
	public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

	@Override
	public void onInitialize() {
		LOGGER.info("Hello Fabric World!");

		ModIdValuesInit.register();
	}

	public static Identifier id(String path) {
		return Identifier.fromNamespaceAndPath(MOD_ID, path);
	}
}
package com.example.mod_id;

import org.mythic_goose.aetherium.api.*; // Wildcard import for all Aetherium API classes

public class ModIdValuesInit {
  public static void register() {

      Aeth naturalBase = Aeth.ofDecimalString("0.001");
      AethValues.set(Items.GRASS_BLOCK, naturalBase); // example of a predefined value being applied to a vanilla block
      AethValues.setTag(ItemTags.LEAVES, naturalBase); // same with item tags. Check AethValues for Documentation on all the methods available to you. 

      // Custom values defined seperately from a hub of multiple things.
      AethValues.setTag(ConventionalItemTags.OBSIDIANS, Aeth.ofDecimalString("149.992"));
      AethValues.set(Items.DRAGON_EGG, Aeth.ofDecimalString("15750.578"));

      // additionaly you can add ".multiply(2)" or ".divide(3)" to any Aeth value to multiply or divide it by a number. You can also use ".add()" and ".subtract()" to add or subtract Aeth values from each other. Check the Aeth class for more information on what you can do with Aeth values.
  }
}