Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4f9171c
begin new addon... fun
wolfieboy09 Dec 24, 2025
f95c9f0
perhaps made the main page more intresting in text...
wolfieboy09 Dec 24, 2025
05194b7
Lot more work. Need to continue on it
wolfieboy09 Dec 25, 2025
6587bb1
oh kube wiki parser
wolfieboy09 Dec 25, 2025
7d59ef6
Added more stuff for the research node event
wolfieboy09 Dec 27, 2025
ccb8e93
clairify
wolfieboy09 Dec 27, 2025
64b4b27
bleh
wolfieboy09 Dec 27, 2025
cd5961f
Category modifications and creation page
wolfieboy09 Dec 27, 2025
7b7172d
wiki parser, please
wolfieboy09 Dec 27, 2025
0c3f437
Oh, change it to Text
wolfieboy09 Dec 27, 2025
dc2bb5f
forgot this page
wolfieboy09 Dec 27, 2025
4bc5255
Server scripts, not startup
wolfieboy09 Jan 1, 2026
fda676f
forgot this one
wolfieboy09 Jan 1, 2026
abc1135
Add .custom to the rewards and requirements
wolfieboy09 Jan 1, 2026
8399cd5
Registration of custom rewards. commit to see how it looks so far
wolfieboy09 Jan 1, 2026
4a3a858
one more thing to this
wolfieboy09 Jan 2, 2026
8eb96e0
I think this is the final part of the wiki
wolfieboy09 Jan 2, 2026
2990b27
Note to self: don't copy paste from source code, and proof read
wolfieboy09 Jan 2, 2026
a1b5f33
oopsies
wolfieboy09 Jan 2, 2026
feb0388
beans
wolfieboy09 Jan 2, 2026
d181c43
aaaa
wolfieboy09 Jan 2, 2026
97b310b
some event handeling. Need to get more in
wolfieboy09 Jan 2, 2026
18b17ff
Clarify the hidden method
wolfieboy09 Jan 27, 2026
cf87481
grammarly told me so
wolfieboy09 Jan 27, 2026
5d493bb
aaaaaaaaaaaaaa
wolfieboy09 Jan 27, 2026
53ad351
I hate this
wolfieboy09 Jan 27, 2026
e901304
KubeJS player stage support
wolfieboy09 Feb 6, 2026
1352044
New thing and info at the top
wolfieboy09 Feb 12, 2026
620d051
regex replace 1
wolfieboy09 Feb 25, 2026
ca64622
regexify 2
wolfieboy09 Feb 25, 2026
6ffaee5
regexify 3
wolfieboy09 Feb 25, 2026
197e554
Used an online python runner and copied this line on accident
wolfieboy09 Feb 25, 2026
e3f6432
Used an online python runner and copied this line on accident x2
wolfieboy09 Feb 25, 2026
a52bb41
Create meta.yml
wolfieboy09 Feb 25, 2026
b02bd0d
Update page.kubedoc
wolfieboy09 Feb 25, 2026
a24d2f1
update
wolfieboy09 Feb 25, 2026
77e762d
Create meta.yml
wolfieboy09 Feb 25, 2026
d615d52
Create meta.yml
wolfieboy09 Feb 25, 2026
3b0356b
Update page.kubedoc
wolfieboy09 Feb 25, 2026
b8ba154
go away copilot, PLEASE
wolfieboy09 Feb 25, 2026
8fccbfa
final
wolfieboy09 Feb 25, 2026
c0e642d
Merge branch 'KubeJS-Mods:main' into main
wolfieboy09 Mar 14, 2026
5058300
thing 1
wolfieboy09 Mar 14, 2026
4c3c381
thing 2
wolfieboy09 Mar 14, 2026
8e9d0f3
quote 4
wolfieboy09 Mar 14, 2026
c12522b
evil "
wolfieboy09 Mar 14, 2026
8583f1d
Merge branch 'kube-mods:main' into recovered-work
wolfieboy09 Jul 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions wiki/addons/research-tree/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
title: "Research Tree"
2 changes: 2 additions & 0 deletions wiki/addons/research-tree/events/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: "ResearchTree Events"
description: "Events you can hook onto and do things with"
1 change: 1 addition & 0 deletions wiki/addons/research-tree/events/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
script: server
32 changes: 32 additions & 0 deletions wiki/addons/research-tree/events/page.kubedoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Research Events
## Research Started
```js
// The first argument (where 'namespace:node_id' is) is required.
// This will get run when that research node has started
ResearchTree.researchStarted('namespace:node_id', event => {
// This gets the player who has started this research
event.getPlayer()

// This gets the level where the player is located
event.getLevel()

// Gets the research node that has been started
event.node()
})
```

## Research Started
```js
// The first argument (where 'namespace:node_id' is) is required.
// This will get run when that research node has completed
ResearchTree.researchCompleted('namespace:node_id', event => {
// This gets the player who has completed this research
event.getPlayer()

// This gets the level where the player is located
event.getLevel()

// Gets the research node that has been completed
event.node()
})
```
2 changes: 2 additions & 0 deletions wiki/addons/research-tree/helpers/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: "Requirements, Rewards, and more"
description: "Documentation describing stuff for research nodes and more"
129 changes: 129 additions & 0 deletions wiki/addons/research-tree/helpers/page.kubedoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
>>> info
For a more detailed list of everything listed, visit the [Research Tree General Knowledge](https://github.com/wolfieboy09/ResearchTree/wiki/General-Knowledge) page.
<<<

# Requirements
Requirements are used for research nodes where certain things need to be met before researching can actually begin.

>>> info
These listed methods will all be under `Requirements`.
`ItemRequirement`s are also **not** bound to the limit of 99 item count (as what an `ItemStack` would have. You could have 500 and it'll still work.)
<<<

## Items
`[java].item(item: Item, amount: int)`
Creates an `ItemRequirement` requiring an item with the required amount.

`[java].item(item: TagKey<Item>, amount: int)`
Creates an `ItemRequirement` allowing any item tag (eg. `#c:ingots/lead`), with the required amount

## Fluids
`[java].fluid(fluid: Fluid, amount: int)`
Creates a `FluidRequirement` allowing any fluid (eg. `minecraft:water`), with the required amount (in mB)

`[java].fluid(fluid: TagKey<Fluid>, amount: int)`
Creates a `FluidRequirement` allowing any fluid tag (eg. `kubejs:deadly_liquid`), with the required amount (in mB)

## Energy
`[java].energy(amount: int)`
Creates an `EnergyRequirement` with the required amount of energy (FE)

## Advancement
`[java].advancement(advancement: ResourceLocation)`
Creates an `AdvancementRequirement` requiring the player to have the advancement before proceeding

`[java].advancement(advancements: ResourceLocation[])`
Creates an `AdvancementRequirement` requiring the player to have the given advancements before proceeding

## Dimension
>>> info
When research has begun, the player must visit the dimension for it to be counted as fulfilled
<<<

`[java].dimension(dimension: RegistryKey<Level>)`
Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end`)

`[java].dimensions(dimensions: RegistryKey<Level>[])`
Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end` and `minecraft:the_nether`)

## Timed Dimension
This is the same thing as `Dimension`, but with the number of ticks the player has been in each dimension.

`[java].dimension(dimension: RegistryKey<Level>, int duration)`
Now, with a second parameter, the amount of time the player has to be in each dimension. Creates a `TimedDimensionRequirement`.

`[java].dimensions(dimensions: RegistryKey<Level>[], int duration). `
Creates a `TimedDimensionRequirement` with a list of dimensions.


## Time
`[java].time(ticks: int)`
Creates a `TimeRequirement` requiring the player to wait a certain amount of time

## Stage Requirement
`[java].requireStage(stage: String)`
Creates `PlayerStageRequirement` requiring the player to have a stage unlocked/added. (Note: This only works with KubeJS stages).

## Custom Requirements
`[java].custom(kubeRequirement: ResourceLocation)`
Allows you to use a requirement created with KubeJS

# Rewards
>>> info
These listed methods will all be under `Rewards`.
<<<

## Items
`[java].item(item: Item, amount: int)`
Creates an `ItemReward` granting the player the item(s)

`[java].item(stack: ItemStack)`
Creates an `ItemReward` from a given `ItemStack`

## Command Execution
>>> info
This will execute a command with permission level `2`, and it will be like the player ran it ignoring player permission level.
To target the player, you can do `@s` or `@p` for the player who has been rewarded.
Commands are not required to have a `/` at the start (eg. `/kill @p` will do the same as `kill @p`)
<<<

`[java].command(command: String)`
Executes a command as the player (eg `title @p title {'text':'Research Complete!','color':'gold'}`)

`[java].command(command: String, diplayName: Text)`
Executes a command as the player. Display name will show up instead of the command (eg: you can do `kill @s` and have the display name as `Text.of('200 diamond blocks!!')`)

## Experience Points
`[java].xp(amount: int)`
Grants the player an amount of xp points (**NOT** levels)

`[java].xpLevels(amount: int)`
Grants the player an amount of xp levels

## Attribute Modification
>>> warn
Any attributes changed to the player (eg max health) are **permanent** changes.
The modifier id must also be unique.
<<<
`[java].attribute(attribute: ResourceLocation, modifierId: ResourceLocation, amount: double, operation: AttributeModifierOperation?)`
Modifies the player's attributes to one via the reward. If the `operation` argument is not present, it will default to `AttributeModifier.Operation.ADD_VALUE`.

## Loot Tables
`[java].lootTable(lootTableId: ResourceLocation)`
Grants the player a loot table that is rolled.

## Mob Effects
`[java].effect(effectInstance: MobEffectInstance)`
Gives the player an effect. To make `MobEffectInstance`, see `MobEffectUtil`

## Recipe Unlocking
`[java].unlockRecipes(recipes: ResourceLocation[])`
Unlocks the given recipes to the player

## Stage Unlocking
`[java].grantStage(stage: String)`
Creates a `PlayerUnlockStageReward` which grants the player a stage. (Note: This only works with KubeJS stages).

## Custom Rewards
`[java].custom(kubeReward: ResourceLocation)`
Allows you to use a reward created with KubeJS
4 changes: 4 additions & 0 deletions wiki/addons/research-tree/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "F07631B3"
addon: "third-party"
download-curseforge: "research-tree"
download-modrinth: "research-tree"
1 change: 1 addition & 0 deletions wiki/addons/research-tree/page.kubedoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Research Tree adds an entire system for a data-driven researching system.
2 changes: 2 additions & 0 deletions wiki/addons/research-tree/rar-registration/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: "Registering Custom Requirements and Rewards"
description: "How to create custom research requirements and rewards"
1 change: 1 addition & 0 deletions wiki/addons/research-tree/rar-registration/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
script: startup
56 changes: 56 additions & 0 deletions wiki/addons/research-tree/rar-registration/page.kubedoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Custom Requirements
```js
StartupEvents.registry('researchtree:requirement_types', event => {
// This is the requirement type. This will be kubejs:my_requirement
// This is important for defining requirements on research nodes.
event.create('my_requirement')

// This determines if the requirement is currently met
// Should return true or false
.isMet(player => {
// Example: check if player has a specific item in inventory
return player.inventory.contains('minecraft:diamond')
})

// Returns a progress value between 0.0 and 1.0
// Used to show partial completion in the UI
.progress(player => {
// Example: check diamond count (max 64)
let count = 0
player.inventory.allItems.forEach(stack => {
if (stack.id == 'minecraft:diamond') {
count += stack.count
}
})
return count / 64.0
})

// Display text is OPTIONAL
// By default, the lang key would be 'requirement.kubejs.<requirement id>'
// So this example would be 'requirement.kubejs.my_requirement'
// You can define a lang key, or use this method
.displayText(Text.of('Must have diamonds'))
})
```


# Custom Rewards
```js
StartupEvents.registry('researchtree:reward_types', event => {
// This is the reward type. This will be kubejs:my_reward
// This is important for defining rewards on research nodes (and category dependencies)
event.create('my_reward')

// This is OPTIONAL. You should have this because you're making a custom reward...
// This gives you both the player and the level
.grant((player, level) => {
// Here you can do anything that involves the player and level
})

// Display text is OPTIONAL
// By default, the lang key would be 'reward.kubejs.<requirement id>'
// So this example would be 'reward.kubejs.my_reward'
// You can define a lang key, or this method
.displayText(Text.of('My epic reward'))
})
```
2 changes: 2 additions & 0 deletions wiki/addons/research-tree/research-categories/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: "Research Categories"
description: "Guide on how to add and modify existing Categories."
1 change: 1 addition & 0 deletions wiki/addons/research-tree/research-categories/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
script: server
52 changes: 52 additions & 0 deletions wiki/addons/research-tree/research-categories/page.kubedoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Creating Research Categories
Everything will go under the `ResearchTree.category` event

`[java]exists(id: ResourceLocation)`
Return `true` or `false` depending if a research category exists or not.

`[java]modify(id: ResourceLocation)`
Modifies a research category. For methods, see below. **There are extra methods for modifications!**

`[java]create(id: ResourceLocation)`
>>> info
Internally, this constructs a `ResourceLocation` that gets set to `kubejs:[the id you chose]`.
For example, `create('super_cool_category')` will get constructed as `kubejs:super_cool_category`.
<<<

## Methods
`[java].name(name: Text)`
Overrides the default name (the id of the category formatted) to a custom one.

`[java].description(description: Text)`
Creates a description for the category

`[java].icon(icon: Item)`
Sets the categories icon as an item

`[java].unlockRequirement(unlockRequirement: ResourceLocation)`
Unlocks the category after a research node has been completed

`[java].addPrerequisite(prerequisite: ResourceLocation)`
Requires another category to be unlocked before this category

`[java].addPrerequisites(prerequisites: ResourceLocation[])`
Same thing as above, but as a list (adds it to the current ones)

`[java].sortOrder(order: int)`
Display order. Defaults to `0`.

| Method | Type | Notes |
| `name` | ==OPTIONAL== | Defaults to formatted id |
| `description` | ==OPTIONAL== | Category will have no description |
| `icon` | ==OPTIONAL== | Category will have no icon |
| `unlockRequirement` | ==OPTIONAL== | Will be unlocked. If it is locked, no research in this category can be started |
| `addPrerequisite`/`addPrerequisites` | ==OPTIONAL== | Will not rely on other categories to be unlocked first |
| `sortOrder` | ==OPTIONAL== | Defaults to `0`. Sort order is used to sort the categories |

The following is for category modification - methods above are also included with modifications:
## Methods
`[java].removeUnlockRequirement()`
Removes the requirement for another research node to be completed

`[java].removePrerequisites(category: ResourceLocation)`
Removes the requirement for another category to be unlocked
2 changes: 2 additions & 0 deletions wiki/addons/research-tree/research-nodes/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: "Research Nodes"
description: "Add, remove, or modify research nodes"
1 change: 1 addition & 0 deletions wiki/addons/research-tree/research-nodes/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
script: server
61 changes: 61 additions & 0 deletions wiki/addons/research-tree/research-nodes/page.kubedoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Creating Research Nodes
Everything will go under the `ResearchTree.research` event

`[java]exists(id: ResourceLocation)`
Return `true` or `false` depending if a research node exists or not.

`[java]remove(id: ResourceLocation)`
Removes a research node (eg, `some_other_mod:epic_researchable`)

`[java]modify(id: ResourceLocation)`
Modifies a research node (eg, `another_mod:super_cool_researchable`). For methods, see below

`[java]create(id: ResourceLocation)`
>>> info
Internally, this constructs a `ResourceLocation` that gets set to `kubejs:[the id you chose]`.
For example, `create('my_research_node')` will get constructed as `kubejs:my_research_node`.
<<<

## Methods

`[java].icon(icon: Item)`
The item icon that will be rendered for the node. (eg, `minecraft:dirt` would render dirt, for example)

`[java].pos(x: int, y: int)`
There is also `position` that does the same thing

`[java].title(title: Text)`
Overrides the default name (the node's id formatted) with a custom one. Use `Text#of` for the argument

`[java].description(description: Text)`
Creates a description for the research node

`[java].prerequisite(prerequisite: ResourceLocation)`
This can be attached multiple times to make other research nodes required to unlock this node.
To get the research node id, enable advanced tooltips via `F3+H`

`[java].requires(requirement: ResearchRequirement)`
See (link the `helpers#Requirements` here) for possible requirements.

`[java].reward(reward: ResearchReward)`
See (link the `helpers#Rewards` here) for possible rewards.

`[java].category(category: ResourceLocation)`
Links the node to a category

`[java].hidden()`
Hides the node until the parent is completed. The rest of the branch will also show up.

`[java].ticksPerPercent(ticksPerPercent: int)`
For every `1%` of research, the player must wait the ticks set in `ticksPerPercent` for `1%` of progression.

| Method | Type | Notes |
| `icon` | ==REQUIRED== | Not required for research node modification |
| `pos` | ==REQUIRED== | Not required for research node modification |
| `title` | ==OPTIONAL== | Defaults to formatted id |
| `description` | ==OPTIONAL== | No description is provided |
| `prerequisite` | ==OPTIONAL== | When none provided, does not rely on other nodes to be unlocked |
| `requires` | ==OPTIONAL== | When none provided, researching begins immedentally |
| `reward` | ==OPTIONAL== | When none provided, no rewards are granted |
| `category` | ==OPTIONAL== | Defaults to the uncategorized section |
| `ticksPerPercent` | ==OPTIONAL== | Defaults to `100` ticks per `1%` (`10000` total ticks) |