import React from 'react'; export default () => (

CraftTweaker API

The CraftTweaker API Is Only for 1.12.x

The CraftTweaker add-on has been created to make adding new deposits to Geolosys in an even more robust way. You can follow along the following pages to see how this works.

Ores and stones both require a special import in your {' '} .zs {' '} script. For ores, use {' '} import mods.geolosys.ores; , and for stones use {' '} import mods.geolosys.stones;

There are multiple types of deposits which are able to be made with the CraftTweaker API, listed below.

Plain Deposit

A plain / standard ore deposit is one which generates in any biome with only a single block. This is the method that has been used by Geolosys up until Version 3.0.0, so if you'd like that standard distribution of ores, you'd probably want to use this. The arguments are listed below and must be in this order - the format is {' '} [ObjectType] name

So, for example - to generate Spruce Logs from Y-levels 0-70, with a chance and size of 20, blacklisted from the nether and the end, and with a sample block of Oak wood, you would do the following:

        
          mods.geolosys.ores.addOre(
          {/* eslint-disable-next-line max-len */}
          <blockstate:minecraft:log:variant=spruce>, <blockstate:minecraft:log:variant=oak>, 0, 70, 20, 20, 1.0 as float, [-1, 1]
          );
        
      

Optionally, if you want to specify what blocks this deposit can replace, you can do so by specifying it as a list as the last argument:

        
          mods.geolosys.ores.addOre(
          {/* eslint-disable-next-line max-len */}
          <blockstate:minecraft:log:variant=spruce>, <blockstate:minecraft:log:variant=oak>, 0, 70, 20, 20, 1.0 as float, [-1, 1], [<blockstate:minecraft:stone>]
          );
        
      

Biome-Restricted Deposit

A biome restricted deposit is new to Geolosys v3.0.0.This kind of deposit can only generate in prescribed biomes. The CraftTweaker API, as of writing, does not yet have much by means of biome functionality, but fortunatly it does have an in-game command to help your search: {' '} /ct biomes {' '} This command will output a list of biome ResourceLocations (that's the <modid>:<internalBiomeName> part of the output) which can be used in blacklisting or whitelisting a deposit from that biome. The order of the arguments are:

So, expanding on the above example, if we want to restrict that to only Plains and Deserts we can use the following:

        
          mods.geolosys.ores.addOre(
          {/* eslint-disable-next-line max-len */}
          <blockstate:minecraft:log:variant=spruce>, <blockstate:minecraft:log:variant=oak>, 0, 70, 20, 20, 1.0 as float, [-1, 1], ["minecraft:plains", "minecraft:desert"], true
          );
        
      

Again, this can include a specific list of blocks that this deposit can replace. Here is an example; as always, it's just tacked onto the end:

        
          mods.geolosys.ores.addOre(
          {/* eslint-disable-next-line max-len */}
          <blockstate:minecraft:log:variant=spruce>, <blockstate:minecraft:log:variant=oak>, 0, 70, 20, 20, 1.0 as float, [-1, 1], ["minecraft:plains", "minecraft:desert"], true, [<blockstate:minecraft:stone>]
          );
        
      

Multi-Ore Deposit

A multi-ore deposit is one which consists of multiple different types of ores. The frequency of each ore within the deposit must be defined, so be sure that you follow these closely! The argument order is as follows:

For example:

        
          mods.geolosys.ores.addOre(
          [<blockstate:minecraft:log:variant=spruce>,
          <blockstate:minecraft:log:variant=birch>],
          [50, 50],
          [<blockstate:minecraft:log:variant=oak>,
          <blockstate:minecraft:log2:variant=acacia>],
          [20, 80],
          0, 70, 20, 20, 1.0 as float, [-1, 1]
          );
        
      

Of course, you can once again add a custom set of blocks the deposit can replace if you'd like to override the ones in the config:

        
          mods.geolosys.ores.addOre(
          [<blockstate:minecraft:log:variant=spruce>,
          <blockstate:minecraft:log:variant=birch>],
          [50, 50],
          [<blockstate:minecraft:log:variant=oak>,
          <blockstate:minecraft:log2:variant=acacia>],
          [20, 80],
          0, 70, 20, 20, 1.0 as float, [-1, 1],
          [<blockstate:minecraft:stone>]
          );
        
      

Biome-Restricted Multi-Ore Deposit

Last in the ore deposits is a biome-restricted, multi-ore deposit. This one should speak for itself, but if it doesn't it is a deposit which whose generation biome can be black/whitelisted and can consist of multiple blocks. As you might imagine, the arguments look like an an amalgamation of the two:

So for example, to get our previous multi-ore deposit to spawn in only the biomes specified, you can do the following:

        
          mods.geolosys.ores.addOre(
          {/* eslint-disable-next-line max-len */}
          [<blockstate:minecraft:log:variant=spruce>, <blockstate:minecraft:log:variant=birch>],
          [50, 50],
          {/* eslint-disable-next-line max-len */}
          [<blockstate:minecraft:log:variant=oak>, <blockstate:minecraft:log2:variant=acacia>],
          [20, 80],
          0, 70, 20, 20, 1.0 as float, [-1, 1],
          ["minecraft:plains", "minecraft:desert"],
          true
          );
        
      

And lastly an example of how this would look with a specified list of replacement materials:

        
          mods.geolosys.ores.addOre(
          {/* eslint-disable-next-line max-len */}
          [<blockstate:minecraft:log:variant=spruce>, <blockstate:minecraft:log:variant=birch>],
          [50, 50],
          {/* eslint-disable-next-line max-len */}
          [<blockstate:minecraft:log:variant=oak>, <blockstate:minecraft:log2:variant=acacia>],
          [20, 80],
          0, 70, 20, 20, 1.0 as float, [-1, 1],
          ["minecraft:plains", "minecraft:desert"],
          true,
          [<blockstate:minecraft:stone>]
          );
        
      
);