Skip to content

Commit d6b75e2

Browse files
committed
rename modifyItem to modifyItemEntry
1 parent 6e2ac4f commit d6b75e2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

wikis/lootjs/docs/api/loot-entries-transformer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ LootJS.lootTables(event => {
8585

8686
## `replaceItem`
8787

88-
Replaces all items that matches the filter with the given item. By replacing the item all loot conditions and item functions are kept. If you don't want this use [`modifyItem`](#) and create your own `LootEntry`.
88+
Replaces all items that matches the filter with the given item. By replacing the item all loot conditions and item functions are kept. If you don't want this use [`modifyItemEntry`](#) and create your own `LootEntry`.
8989

9090
- Syntax:
9191
- `.replaceItem(filter: ItemFilter, item: Item)`, _<sub>see [ItemFilter]</sub>_
@@ -118,16 +118,16 @@ LootJS.lootTables(event => {
118118
})
119119
```
120120

121-
## `modifyItem`
121+
## `modifyItemEntry`
122122

123-
Same as `modifyEntry` but will only iterates through `LootItemEntry`s.
123+
Same as `modifyItemEntry` but will only iterates through `LootItemEntry`s.
124124

125125
- Syntax:
126-
- `.modifyItem((entry: LootItemEntry) => { ... })`
126+
- `.modifyItemEntry((entry: LootItemEntry) => { ... })`
127127

128128
```js
129129
LootJS.lootTables(event => {
130-
event.getLootTable("minecraft:chests/simple_dungeon").modifyItem(itemEntry => {
130+
event.getLootTable("minecraft:chests/simple_dungeon").modifyItemEntry(itemEntry => {
131131
if (itemEntry.item.id === "minecraft:string") {
132132
itemEntry.setCount([5, 12])
133133
}

wikis/lootjs/docs/loot-tables/modify-loot-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ LootJS.lootTables(event => {
5353
event
5454
.getLootTable("minecraft:chests/desert_pyramid")
5555
.firstPool()
56-
.modifyItem(itemEntry => {
56+
.modifyItemEntry(itemEntry => {
5757
if (itemEntry.item.id === "minecraft:diamond") {
5858
itemEntry.setWeight(1)
5959
}

0 commit comments

Comments
 (0)