You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
-4
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,6 @@ For core carpet functionality, this is the right place. Check available download
30
30
31
31
Check [carpet-extra](https://github.com/gnembon/carpet-extra/) add-on mod for more whacky and crazy features, including autocrafting, block-placing dispensers, and even chicken-shearing!
32
32
33
-
## auto crafting table
34
-
35
-
Due to compatibility issues with vanilla and other mods, download [auto crafting table](https://github.com/gnembon/carpet-autoCraftingTable/releases) by Skyrising as a separate add-on to carpet
36
-
37
33
## scarpet app store
38
34
39
35
If you want to browse or contribute to the scarpet app store check available apps, go [here](https://github.com/gnembon/scarpet), its free!
Copy file name to clipboardexpand all lines: docs/scarpet/Full.md
+15-13
Original file line number
Diff line number
Diff line change
@@ -3650,7 +3650,7 @@ version indicates the version of the connected carpet client.
3650
3650
### `query(e, 'effect', name?)`
3651
3651
3652
3652
Without extra arguments, it returns list of effect active on a living entity. Each entry is a triple of short
3653
-
effect name, amplifier, and remaining duration in ticks. With an argument, if the living entity has not that potion active,
3653
+
effect name, amplifier, and remaining duration in ticks (-1 if it has infinity duration). With an argument, if the living entity has not that potion active,
3654
3654
returns `null`, otherwise return a tuple of amplifier and remaining duration.
3655
3655
3656
3656
<pre>
@@ -3990,7 +3990,7 @@ players, since they are controlled client side.
Applies status effect to the living entity. Takes several optional parameters, which default to `0`, `true`,
3993
-
`true` and `false`. If no duration is specified, or if it's null or 0, the effect is removed. If name is not specified,
3993
+
`true` and `false`. If no duration is specified, or if it's null or 0, the effect is removed. If duration is less than 0, it will represent infinity. If name is not specified,
3994
3994
it clears all effects.
3995
3995
3996
3996
### `modify(e, 'health', float)`
@@ -4257,7 +4257,8 @@ use the same scheme.
4257
4257
If the entity or a block doesn't have
4258
4258
an inventory, all API functions typically do nothing and return null.
4259
4259
4260
-
Most items returned are in the form of a triple of item name, count, and nbt or the extra data associated with an item.
4260
+
Most items returned are in the form of a triple of item name, count, and the full nbt of an item. When saving an item, if the
4261
+
nbt is provided, it overrides the item type provided in the name.
4261
4262
4262
4263
### `item_list(tag?)`
4263
4264
@@ -4370,20 +4371,22 @@ negative numbers to indicate slots counted from 'the back'.
4370
4371
4371
4372
<pre>
4372
4373
inventory_get(player(), 0) => null // nothing in first hotbar slot
4373
-
inventory_get(x,y,z, 5) => ['stone', 1, {}]
4374
-
inventory_get(player(), -1) => ['diamond_pickaxe', 1, {Damage:4}] // slightly damaged diamond pick in the offhand
Modifies or sets a stack in inventory. specify count 0 to empty the slot. If item is not specified, keeps existing
4380
-
item, just modifies the count. If item is provided - replaces current item. If nbt is provided - adds a tag to the
4381
-
stack at slot. Returns previous stack in that slot.
4381
+
item, just modifies the count. If item is provided - replaces current item. If nbt is provided - uses the tag to create the item fully
4382
+
ignoring the item name. If nbt is provided and count is not null, the sets the custom count on the tag from the count parameter.
4383
+
If count is `null` and item is `null`, an item is entirely defined by the `nbt` parameter. Returns previous stack in that slot.
4382
4384
4383
4385
<pre>
4384
-
inventory_set(player(), 0, 0) => ['stone', 64, {}] // player had a stack of stone in first hotbar slot
4385
-
inventory_set(player(), 0, 6) => ['diamond', 64, {}] // changed stack of diamonds in player slot to 6
4386
-
inventory_set(player(), 0, 1, 'diamond_axe','{Damage:5}') => null //added slightly damaged diamond axe to first player slot
4386
+
inventory_set(player(), 0, 0) => ['stone', 64, {id:"minecraft:stone"}] // player had a stack of stone in first hotbar slot
4387
+
inventory_set(player(), 0, 6) => ['diamond', 64, {id:"minecraft:diamond"}] // changed stack of diamonds in player slot to 6
4388
+
inventory_set(player(), 0, 1, 'diamond_axe','{components:{"minecraft:damage":5},id:"minecraft:diamond_axe"}') => null //added slightly damaged diamond axe to first player slot
4389
+
inventory_set(player(), 0, null, null, '{components:{"minecraft:damage":5},id:"minecraft:diamond_axe"}') => null // same effect as above
Copy file name to clipboardexpand all lines: docs/scarpet/api/Entities.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -421,7 +421,7 @@ version indicates the version of the connected carpet client.
421
421
### `query(e, 'effect', name?)`
422
422
423
423
Without extra arguments, it returns list of effect active on a living entity. Each entry is a triple of short
424
-
effect name, amplifier, and remaining duration in ticks. With an argument, if the living entity has not that potion active,
424
+
effect name, amplifier, and remaining duration in ticks (-1 if it has infinity duration). With an argument, if the living entity has not that potion active,
425
425
returns `null`, otherwise return a tuple of amplifier and remaining duration.
426
426
427
427
<pre>
@@ -761,7 +761,7 @@ players, since they are controlled client side.
Applies status effect to the living entity. Takes several optional parameters, which default to `0`, `true`,
764
-
`true` and `false`. If no duration is specified, or if it's null or 0, the effect is removed. If name is not specified,
764
+
`true` and `false`. If no duration is specified, or if it's null or 0, the effect is removed. If duration is less than 0, it will represent infinity. If name is not specified,
Modifies or sets a stack in inventory. specify count 0 to empty the slot. If item is not specified, keeps existing
149
-
item, just modifies the count. If item is provided - replaces current item. If nbt is provided - adds a tag to the
150
-
stack at slot. Returns previous stack in that slot.
150
+
item, just modifies the count. If item is provided - replaces current item. If nbt is provided - uses the tag to create the item fully
151
+
ignoring the item name. If nbt is provided and count is not null, the sets the custom count on the tag from the count parameter.
152
+
If count is `null` and item is `null`, an item is entirely defined by the `nbt` parameter. Returns previous stack in that slot.
151
153
152
154
<pre>
153
-
inventory_set(player(), 0, 0) => ['stone', 64, {}] // player had a stack of stone in first hotbar slot
154
-
inventory_set(player(), 0, 6) => ['diamond', 64, {}] // changed stack of diamonds in player slot to 6
155
-
inventory_set(player(), 0, 1, 'diamond_axe','{Damage:5}') => null //added slightly damaged diamond axe to first player slot
155
+
inventory_set(player(), 0, 0) => ['stone', 64, {id:"minecraft:stone"}] // player had a stack of stone in first hotbar slot
156
+
inventory_set(player(), 0, 6) => ['diamond', 64, {id:"minecraft:diamond"}] // changed stack of diamonds in player slot to 6
157
+
inventory_set(player(), 0, 1, 'diamond_axe','{components:{"minecraft:damage":5},id:"minecraft:diamond_axe"}') => null //added slightly damaged diamond axe to first player slot
158
+
inventory_set(player(), 0, null, null, '{components:{"minecraft:damage":5},id:"minecraft:diamond_axe"}') => null // same effect as above
0 commit comments