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
* start bedrock implementation
* comments
* Todo comments
* comment
* return BedrockItem and run standard
* Small changes
* remove tools
* matchNbt in equal()
* better matchNbt
* remove bedrock-protocol from devDependencies
* Notch -> Network in pc impl, add matchNbt to pc
* canPlaceOn and canDestroy
* CanPlaceOn and CanDestroy for java - NEED TO TEST
* Fix weird indentation from my formatter
* notch -> network
* revert the breaking change
* clarify in comments that this is not tested
* Start bedrock support in original Item class
* Linter
* blocksCanPlaceOn and blocksCanDestroy
* start implementing stack ID
* add stack ID to fromNotch()
* Initial support for <1.16.220, however item formats are inconsistent and this can be improved
* <1.16.220 support, can be improved later to use supportFeature()
* update types and docs
* update docs
* use NBT builder functions where possible
* nbt.simplify() to make it more readable
* use optional chaining
* update types
* update docs
* Use supportFeature and bedrock features added in mcdata PR; fixes
* Add stack ID to tests (temp) and damage default to 0
* remove separate BedrockItem class, don't check ench len
* linter
* don't use Or assignment to support older node
* revert checking enchs length
* use stackID parameter in tests
* remove network types and add stackID to fromNotch
* update docs and types
* stack ID is null in java (mcdata feature?)
* Fix tests for stack ID, start adding bedrock tests
* clean up some unnecessary values
* no need to test for null
* More readable notch methods
* Change blocksCanPlaceOn/Destroy to return [name, properties]
* Anvil is undefined if registry type is bedrock
* change blocksCanPlaceOn/Destroy
* update types and docs
* Update index.d.ts
`matchStackSize` - whether to check for count equality
43
45
46
+
`matchNbt` - wether to check for NBT equality
47
+
44
48
Checks equality between two items based on itemType, count, metadata, and stringified nbt
45
49
46
50
#### item.type
@@ -58,6 +62,10 @@ See http://www.minecraftwiki.net/wiki/Data_values#Data
58
62
59
63
Buffer.
60
64
65
+
#### item.stackId
66
+
67
+
The stack ID of the item, if the version supports Stack IDs.
68
+
61
69
#### item.name
62
70
63
71
#### item.displayName
@@ -82,7 +90,22 @@ the item's custom lore (ie. set in give command)
82
90
83
91
#### item.enchants
84
92
85
-
A getter/setter for abstracting the underlying nbt (does calculations)
93
+
#### get item.enchants(): { name: string, lvl: number }[]
94
+
95
+
Returns an array of enchants on the Item with their name and level
96
+
97
+
#### set item.enchants({ name: string, lvl: number }[])
98
+
99
+
Updates the Item's NBT enchantments based on assigned array
100
+
101
+
#### get item.blocksCanPlaceOn(): [name][]
102
+
#### set item.blocksCanPlaceOn(blockNames: string[])
103
+
In adventure mode, the list of block names (as strings) that this Item can be placed on
104
+
105
+
#### get item.blocksCanDestroy(): [name][]
106
+
#### set item.blocksCanDestroy(blockNames: string[])
107
+
108
+
In adventure mode, the list of block names (as strings) that this Item can be used to break
86
109
87
110
#### item.repairCost
88
111
@@ -91,7 +114,7 @@ See https://minecraft.gamepedia.com/Anvil_mechanics#Anvil_Uses
91
114
92
115
#### item.spawnEggMobName
93
116
94
-
A getter for abstracting the underlying nbt, get's the mob name from a spawn egg Item. e.g. a zombie spawn egg on 1.8 will return `Zombie`
117
+
If the current item is a type of Spawn Egg, the protocol name of the entity that will be spawned. For example, a zombie spawn egg on 1.8 will return `Zombie`.
0 commit comments