Skip to content

Minetweaker Support for Auto Gen [Pack Devs]

Skylar Sommers edited this page Nov 16, 2016 · 28 revisions

IMPORTANT INFORMATION:
Any BASE Scripts >NEEDS< to be placed in:
"Minecraft Instance/config/ACRONYM/BASE/scripts folder, not the normal MT scripts"

We currently support the ability to Automatically Generate New Materials like;
Ores, Nuggets, Ingots, Storage Blocks, Gears, Dusts & Plates.

[See Picture Below]

By default we ship with a few basic materials already included to auto-gen in the mod. [Hardcoded, Has a Config]
But in-case a pack maker would like to add more materials we do offer a simple way to implement custom materials through Minetweaker, the syntax is broken down into 3 parts. Importing, Setting the Base Material Variable and Registering the Item Type for the Material.

import com.acronym.base.IMaterialType;

var platinum = mods.base.Materials.getOrRegister("Platinum", 20, 8904681, false);
var enderium = mods.base.Materials.getOrRegister("Enderium", 21, 1919306, false);

platinum.registerNugget();
platinum.registerIngot();
platinum.registerDust();
platinum.registerGear();
platinum.registerPlate();
platinum.registerOre(3, 15, "pickaxe", 3);
platinum.registerBlock(5, 30, "pickaxe", 3);

enderium.registerNugget();
enderium.registerIngot();
enderium.registerDust();
enderium.registerPlate();
enderium.registerGear();

Example:
See Above

Explaination:

import com.acronym.base.IMaterialType; 

Imports the Functionality.

var platinum = mods.base.Materials.getOrRegister("Platinum", 20, 8904681, false);

This sets the variable of "platinum" by registering the platinum variable as a material: "Platinum" is the In-Game Material Name. 20 is the Meta Data, 8904681 is the Int Color and "false" is the boolean for having the "enchanted book" effect.

Finally:

platinum.registerNugget();
platinum.registerIngot();
platinum.registerDust();
platinum.registerGear();
platinum.registerPlate();
platinum.registerOre(3, 15, "pickaxe", 3);
platinum.registerBlock(5, 30, "pickaxe", 3);

Registers the Items that should be generated under that material. Only "special case" here is for Ore and Block. Where they accept a hardness value, blast resistance value, "harvest tool string" and harvest level.

[See "How to get an Int color" for Information on How to find the Int Color!]

Clone this wiki locally