Skip to content

Commit 447f9cb

Browse files
committed
kjs-ori: add deep drill registration event docs
1 parent 4d596bc commit 447f9cb

4 files changed

Lines changed: 77 additions & 1 deletion

File tree

wikis/kubejs-oritech/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default defineConfig({
4545
{
4646
text: "Events",
4747
items: [
48+
{ text: "Deep Drill Registration", link: "event/deepdrill_registration" },
4849
{ text: "Soul Collection", link: "event/soulcollection" },
4950
{ text: "Tags", link: "event/tags" },
5051
],
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Deep Drill Registration Event
2+
3+
This event is a utility event to allow registering new materials and recipes mined by the
4+
[Bedrock Extractor](../recipe/machine/bedrock_extractor.md) also known as the Deep Drill. Because the deep drill mechanic depends on a
5+
recipe and a tag, this event handles both of these registrations at the same time.
6+
7+
If you prefer registering both of these separately, check out the Bedrock Extractor recipe page and the
8+
[tag documentation](tags.md#resource-nodes).
9+
10+
**It is a server event and reloadable!**
11+
Keep in mind that server events have to be located inside the `kubejs/server_scripts` folder.
12+
13+
## Overview
14+
15+
Oritech uses the tag `oritech:resource_nodes` to determine which blocks can be mined from by the Bedrock Extractor. The item result
16+
is determined by a recipe. This event allows you to register new resource nodes and recipes for the Bedrock Extractor at the same time.
17+
18+
- access in a server script via: `EnderIOEvents.deepDrillRegistration`
19+
- functions
20+
- `add(...)`
21+
- description: registers the input block as resource node and adds the recipe for the Bedrock Extractor
22+
- parameters:
23+
- `inputBlock`
24+
- type: `Block`
25+
- required: yes
26+
- description: the block that should be mined as a resource node; this block will be tagged with `oritech:resource_nodes` automatically
27+
- `outputItem`
28+
- type: `ItemStack`
29+
- required: yes
30+
- description: the item that should be the result of mining the resource node; can include count
31+
- `time`
32+
- type: `Integer`
33+
- required: no
34+
- default: `60`
35+
- description: time in ticks for a single extraction operation; can mine multiple ores at once occasionally
36+
- `id`
37+
- type: `ResourceLocation`
38+
- required: yes
39+
- description: the recipe ID for the recipe; this must be unique
40+
41+
## Event Listener
42+
43+
To access the event, the first thing you need to do is to open an event listener for the `deepDrillRegistration` event in a server script.
44+
45+
```js
46+
EnderIOEvents.deepDrillRegistration(event => {
47+
// ...
48+
})
49+
```
50+
51+
After that, you can use the `add` function to register new resource nodes and recipes.
52+
53+
## Example
54+
55+
```js
56+
OritechEvents.soulCollection(event => {
57+
// registers the glass block as a resource node
58+
// adds a recipe that converts a glass block into a cobblestone
59+
// defaults to 60 ticks / 3 seconds
60+
event.add("glass", "cobblestone", "mymodpack:deep_drill/cobblestone")
61+
62+
// registers the dirt block as a resource node
63+
// adds a recipe that converts a dirt block into 4 iron ingots
64+
// requires 100 ticks / 5 seconds
65+
event.add("dirt", "4x iron_ingot", 100, "mymodpack:deep_drill/iron_ingot")
66+
})
67+
```

wikis/kubejs-oritech/docs/event/tags.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ ServerEvents.tags("block", event => {
6060

6161
## Resource Nodes
6262

63+
> [!DANGER] WARNING
64+
> Because the functionality of the Bedrock Extractor relies on a recipe **and** a tag, it is highly recommended to use the
65+
> [dedicated event](deepdrill_registration.md) for registering new recipes and resource nodes.
66+
6367
Oritech uses the block tag `oritech:resource_nodes` to determine which blocks can be used as resource nodes for the
6468
[Bedrock Extractor](../recipe/machine/bedrock_extractor.md). Tagging a block is required if it's used as an input for the
6569
extractor recipe.
@@ -82,7 +86,7 @@ is captured inside the unstable container. There are 3 different levels of insta
8286
- `oritech:unstable_container/medium` -> 1.0
8387
- `oritech:unstable_container/high` -> 5.0
8488

85-
Assigning these tags is also required to even capture a block inside of the safe.
89+
Assigning these tags is also required to capture a block inside of the safe.
8690

8791
```js
8892
ServerEvents.tags("block", event => {

wikis/kubejs-oritech/docs/recipe/machine/bedrock_extractor.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Internally, this machine is called the Deep Drill.
44

55
The Bedrock Extractor can mine ores from resource nodes that act as infinite sources of ores. These are usually found at Bedrock level.
66

7+
> [!DANGER] WARNING
8+
> Because the functionality of this machine relies on a recipe **and** a tag, it is highly recommended to use the
9+
> [dedicated event](../../event/deepdrill_registration.md) for registering new recipes and resource nodes.
10+
711
> [!WARNING] NOTE
812
> This recipe inherits from the Oritech base recipe. [Read about it first](../basics.md) before reading this page.
913

0 commit comments

Comments
 (0)