> For the complete documentation index, see [llms.txt](https://hirzigamingyt.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hirzigamingyt.gitbook.io/configuration/custom-generator.md).

# Custom Generator

Do you want a custom generator with the blocks you want? Yes, you can! To enable this, simply set `config.enableCustomGenerator` from `false` to `true`. Then, you can edit the left block, right block, and which blocks it spawns in this configuration.

For your information, you need to break a block in the middle first to make the generator work. You can use all types of blocks. If there is no block, just place one.

### Enabling Custom Generator

You can enable it by changing

```javascript
config.enableCustomGenerator = false
```

to

```javascript
config.enableCustomGenerator = true
```

### Left Block and Right Block

<pre class="language-javascript"><code class="lang-javascript">{
    left_block: ["LEFT BLOCK"], 
    right_block: ["RIGHT BLOCK"],
    under_block: [],
<strong>    blocks: [
</strong>        // ...
<strong>    ]
</strong>}
</code></pre>

To set left block to be `grass block` you can change the code to this

<pre class="language-javascript"><code class="lang-javascript"><strong>{
</strong>    left_block: ["minecraft:grass_block"], 
    right_block: ["RIGHT BLOCK"],
    under_block: [],
<strong>    blocks: [
</strong>        // ...
<strong>    ]
</strong>}
</code></pre>

you need to put `minecraft:` before the block identifier if the block is from vanilla minecraft\
To set right to be `stone` you can change the code to this

<pre class="language-javascript"><code class="lang-javascript">{
    left_block: ["minecraft:grass_block"], 
    right_block: ["minecraft:stone"],
<strong>    blocks: [
</strong>        // ...
<strong>    ]
</strong>}
</code></pre>

To set under block to be `netherite block` you can change the code to this, but if you don't want to leave it to be `[]`

<pre class="language-javascript"><code class="lang-javascript"><strong>{
</strong>    left_block: ["minecraft:grass_block"], 
    right_block: ["minecraft:stone"],
    under_block: ["netherite_block"],
<strong>    blocks: [
</strong>        // ...
<strong>    ]
</strong>}
</code></pre>

### Generator Blocks

For more information adding, changing and removing block from generator:

{% content-ref url="/pages/vtvyj0jHydUl1C4CL0L6" %}
[Generator Blocks and Chances](/configuration/generator-blocks-and-chances.md)
{% endcontent-ref %}

### Example Code

```javascript
config.customGenerator = [
	{
		left_block: ["minecraft:stone"],
		right_block: ["minecraft:dripstone_block"],
		under_block: [],
		blocks: [
			{ identifier: "stone", chance: 14 },
			{ identifier: "coal_block", chance: 13 },
			{ identifier: "iron_block", chance: 13 },
			{ identifier: "copper_block", chance: 12 },
			{ identifier: "gold_block", chance: 11 },
			{ identifier: "redstone_block", chance: 11 },
			{ identifier: "lapis_block", chance: 11 },
			{ identifier: "diamond_block", chance: 10 },
			{ identifier: "emerald_block", chance: 5 }
		],
		tools: [
			"minecraft:iron_pickaxe",
			"minecraft:gold_pickaxe",
			"minecraft:diamond_pickaxe",
			"minecraft:netherite_pickaxe",
		]
	},
	{
		left_block: ["minecraft:flowing_water", "minecraft:water", "WATERLOGGED"],
		right_block: ["minecraft:flowing_lava", "minecraft:lava"],
		under_block: ["minecraft:netherite_block"],
		blocks: [
			{ identifier: "stone", chance: 20 },
			{ identifier: "iron_block", chance: 20 },
			{ identifier: "gold_block", chance: 17.5 },
			{ identifier: "diamond_block", chance: 17.5 },
			{ identifier: "emerald_block", chance: 15 },
			{ identifier: "netherite_block", chance: 10 }
		],
		tools: [
			"minecraft:iron_pickaxe",
			"minecraft:gold_pickaxe",
			"minecraft:diamond_pickaxe",
			"minecraft:netherite_pickaxe",
		]
	}
]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hirzigamingyt.gitbook.io/configuration/custom-generator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
