Lens Grinder

This chapter contains information about the Lens Grinder and how to add new recipes using Datapacks.

Lens Grinder

The Lens Grinder is a machine that uses Energy to create Lenses. For example you can create Crystal Lenses by placing a block of the corresponding crystal into the Lens Grinder and selecting the Lens recipe associated with that lens.

The Interface and Grinding Lenses

lens_grinder.png

By default the interface displays Categories of Lenses and you'll need to select a category before selecting a program. If you need to go back to the Cateogory selection screen you can press the arrow button in the top left of the GUI.

Before you start grinding lenses you will need to supply it with some energy.

To grind a lens all you need to do is place a regular Lens or a Crystal of the corresponding Crystal Lens that you want to craft and then select the crystal lens type you want to craft.

Creating Lens Grinder Recipes and Categories

In this article we will look into how to make Lens Grinder Categories and Lens recipes.

Lens Grinder Categories

Folder Location: data/NAMESPACE_HERE/envirocore/lens_grinder_category/

This is a base blank category without item Icons:

{}

Yup that's right, all you need is an empty json file for the base category although you will need to add Localizations to the category id using some sort of resource loader or resource pack. Below is what you'd need to add to your lang file to add a localization to the category:

"lens_grinder_category.NAPESPACE_HERE.CATEGORY_JSON_FILE_NAME": "NAME OF CATEGORY HERE"
Category Icons

You can add item icons to your Category too, below is an example of a Lens Grinder Category with icons:

{
  "icons":[
    {"raw:item": "minecraft:diamond_ore"},
    {"raw:item": "minecraft:gold_ore"}
  ]
}

Lens Grinder Recipes

Folder Location: data/NAMESPACE_HERE/envirocore/lens_grinder/

This is the base Lens Grinder recipe.

{
  "categories": [],
  "focus": "",
  "r": 255, "g": 255, "b": 255,
  "input": {
  },
  "output": {
  },
  "duration": {"raw:int": 40}
}
Categories

Setting which categories this shows up under is pretty simple all you have to do is get your category id which would be "NAMESPACE_HERE:LENS_GRINDER_CATEGORY_JSON_FILE_NAME_HERE"So for example if you wanted to add your recipe to both your own category and one from environmental tech you could do the following:

"categories": [
  "NAMESPACE_HERE:LENS_GRINDER_JSON_FILE_NAME_HERE",
  "envirotech:colored"
]
Focus ID

The program id would be for example the id of the void miner focus id.

"focus": "envirotech:white"
Lens RGB

The R, G and B values are for the color that the Lens will be after crafted. Each value can be between the values of 0 and 255.

Input and Output

The syntax for input and output items can be found in: Recipe Item Types

You will most likely want to just use the Lens or Crystal Lens that is in envirocore so the format for that would be:

"raw:item": "envirocore:lens"

or

"raw:item": "envirocore:crystal_lens"
Overriding Recipes

If you want to disable or replace any of the recipes for the Assembler you can follow This Tutorial